gnu: Use 'modify-phases' syntax.
[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, 2017 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 <kkebreau@posteo.net>
45 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
47 ;;;
48 ;;; This file is part of GNU Guix.
49 ;;;
50 ;;; GNU Guix is free software; you can redistribute it and/or modify it
51 ;;; under the terms of the GNU General Public License as published by
52 ;;; the Free Software Foundation; either version 3 of the License, or (at
53 ;;; your option) any later version.
54 ;;;
55 ;;; GNU Guix is distributed in the hope that it will be useful, but
56 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
57 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
58 ;;; GNU General Public License for more details.
59 ;;;
60 ;;; You should have received a copy of the GNU General Public License
61 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
62
63 (define-module (gnu packages python)
64 #:use-module ((guix licenses) #:prefix license:)
65 #:use-module (gnu packages)
66 #:use-module (gnu packages algebra)
67 #:use-module (gnu packages adns)
68 #:use-module (gnu packages attr)
69 #:use-module (gnu packages backup)
70 #:use-module (gnu packages bash)
71 #:use-module (gnu packages check)
72 #:use-module (gnu packages compression)
73 #:use-module (gnu packages crypto)
74 #:use-module (gnu packages databases)
75 #:use-module (gnu packages django)
76 #:use-module (gnu packages file)
77 #:use-module (gnu packages fontutils)
78 #:use-module (gnu packages gcc)
79 #:use-module (gnu packages ghostscript)
80 #:use-module (gnu packages gl)
81 #:use-module (gnu packages glib)
82 #:use-module (gnu packages graphviz)
83 #:use-module (gnu packages graphics)
84 #:use-module (gnu packages gstreamer)
85 #:use-module (gnu packages gtk)
86 #:use-module (gnu packages icu4c)
87 #:use-module (gnu packages image)
88 #:use-module (gnu packages imagemagick)
89 #:use-module (gnu packages libevent)
90 #:use-module (gnu packages libffi)
91 #:use-module (gnu packages linux)
92 #:use-module (gnu packages man)
93 #:use-module (gnu packages maths)
94 #:use-module (gnu packages multiprecision)
95 #:use-module (gnu packages networking)
96 #:use-module (gnu packages ncurses)
97 #:use-module (gnu packages openstack)
98 #:use-module (gnu packages password-utils)
99 #:use-module (gnu packages pcre)
100 #:use-module (gnu packages perl)
101 #:use-module (gnu packages pkg-config)
102 #:use-module (gnu packages protobuf)
103 #:use-module (gnu packages qt)
104 #:use-module (gnu packages readline)
105 #:use-module (gnu packages sdl)
106 #:use-module (gnu packages search)
107 #:use-module (gnu packages shells)
108 #:use-module (gnu packages ssh)
109 #:use-module (gnu packages statistics)
110 #:use-module (gnu packages tex)
111 #:use-module (gnu packages texinfo)
112 #:use-module (gnu packages tls)
113 #:use-module (gnu packages version-control)
114 #:use-module (gnu packages video)
115 #:use-module (gnu packages web)
116 #:use-module (gnu packages base)
117 #:use-module (gnu packages xml)
118 #:use-module (gnu packages xorg)
119 #:use-module (gnu packages xdisorg)
120 #:use-module (gnu packages tcl)
121 #:use-module (gnu packages bdw-gc)
122 #:use-module (guix packages)
123 #:use-module (guix download)
124 #:use-module (guix git-download)
125 #:use-module (guix utils)
126 #:use-module (guix build-system gnu)
127 #:use-module (guix build-system cmake)
128 #:use-module (guix build-system python)
129 #:use-module (guix build-system trivial)
130 #:use-module (srfi srfi-1))
131
132 (define-public python-2.7
133 (package
134 (name "python")
135 (version "2.7.13")
136 (source
137 (origin
138 (method url-fetch)
139 (uri (string-append "https://www.python.org/ftp/python/"
140 version "/Python-" version ".tar.xz"))
141 (sha256
142 (base32
143 "0cgpk3zk0fgpji59pb4zy9nzljr70qzgv1vpz5hq5xw2d2c47m9m"))
144 (patches (search-patches "python-2.7-search-paths.patch"
145 "python-2-deterministic-build-info.patch"
146 "python-2.7-site-prefixes.patch"
147 "python-2.7-source-date-epoch.patch"
148 "python-2.7-getentropy-on-old-kernels.patch"))
149 (modules '((guix build utils)))
150 ;; suboptimal to delete failing tests here, but if we delete them in the
151 ;; arguments then we need to make sure to strip out that phase when it
152 ;; gets inherited by python and python-minimal.
153 (snippet
154 '(begin
155 (for-each delete-file
156 '("Lib/test/test_compileall.py"
157 "Lib/test/test_ctypes.py" ; fails on mips64el
158 "Lib/test/test_distutils.py"
159 "Lib/test/test_import.py"
160 "Lib/test/test_shutil.py"
161 "Lib/test/test_socket.py"
162 "Lib/test/test_subprocess.py"))
163 #t))))
164 (outputs '("out"
165 "tk")) ;tkinter; adds 50 MiB to the closure
166 (build-system gnu-build-system)
167 (arguments
168 `(;; 356 tests OK.
169 ;; 6 tests failed:
170 ;; test_compileall test_distutils test_import test_shutil test_socket
171 ;; test_subprocess
172 ;; 39 tests skipped:
173 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
174 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
175 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
176 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
177 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
178 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
179 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
180 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
181 ;; test_winreg test_winsound test_zipfile64
182 ;; 4 skips unexpected on linux2:
183 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
184 #:test-target "test"
185 #:configure-flags
186 (list "--enable-shared" ;allow embedding
187 "--with-system-ffi" ;build ctypes
188 "--with-ensurepip=install" ;install pip and setuptools
189 "--enable-unicode=ucs4"
190 (string-append "LDFLAGS=-Wl,-rpath="
191 (assoc-ref %outputs "out") "/lib"))
192
193 #:modules ((ice-9 ftw) (ice-9 match)
194 (guix build utils) (guix build gnu-build-system))
195 #:phases
196 (modify-phases %standard-phases
197 (add-before
198 'configure 'patch-lib-shells
199 (lambda _
200 ;; Filter for existing files, since some may not exist in all
201 ;; versions of python that are built with this recipe.
202 (substitute* (filter file-exists?
203 '("Lib/subprocess.py"
204 "Lib/popen2.py"
205 "Lib/distutils/tests/test_spawn.py"
206 "Lib/test/test_subprocess.py"))
207 (("/bin/sh") (which "sh")))
208
209 ;; Use zero as the timestamp in .pyc files so that builds are
210 ;; deterministic. TODO: Remove it when this variable is set in
211 ;; gnu-build-system.scm.
212 (setenv "SOURCE_DATE_EPOCH" "1")
213 #t))
214 (add-before 'configure 'do-not-record-configure-flags
215 (lambda* (#:key configure-flags #:allow-other-keys)
216 ;; Remove configure flags from the installed '_sysconfigdata.py'
217 ;; and 'Makefile' so we don't end up keeping references to the
218 ;; build tools.
219 ;;
220 ;; Preserve at least '--with-system-ffi' since otherwise the
221 ;; thing tries to build libffi, fails, and we end up with a
222 ;; Python that lacks ctypes.
223 (substitute* "configure"
224 (("^CONFIG_ARGS=.*$")
225 (format #f "CONFIG_ARGS='~a'\n"
226 (if (member "--with-system-ffi" configure-flags)
227 "--with-system-ffi"
228 ""))))
229 #t))
230 (add-before
231 'check 'pre-check
232 (lambda _
233 ;; 'Lib/test/test_site.py' needs a valid $HOME
234 (setenv "HOME" (getcwd))
235 #t))
236 (add-after
237 'unpack 'set-source-file-times-to-1980
238 ;; XXX One of the tests uses a ZIP library to pack up some of the
239 ;; source tree, and fails with "ZIP does not support timestamps
240 ;; before 1980". Work around this by setting the file times in the
241 ;; source tree to sometime in early 1980.
242 (lambda _
243 (let ((circa-1980 (* 10 366 24 60 60)))
244 (ftw "." (lambda (file stat flag)
245 (utime file circa-1980 circa-1980)
246 #t))
247 #t)))
248 (add-after 'install 'remove-tests
249 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
250 ;; because these files are used by some libraries out there.
251 (lambda* (#:key outputs #:allow-other-keys)
252 (let ((out (assoc-ref outputs "out")))
253 (match (scandir (string-append out "/lib")
254 (lambda (name)
255 (string-prefix? "python" name)))
256 ((pythonX.Y)
257 (let ((testdir (string-append out "/lib/" pythonX.Y
258 "/test")))
259 (with-directory-excursion testdir
260 (for-each delete-file-recursively
261 (scandir testdir
262 (match-lambda
263 ((or "." "..") #f)
264 (file
265 (not
266 (string-prefix? "test_support."
267 file))))))
268 (call-with-output-file "__init__.py" (const #t))
269 #t)))))))
270 (add-before 'strip 'make-libraries-writable
271 (lambda* (#:key outputs #:allow-other-keys)
272 ;; Make .so files writable so they can be stripped.
273 (let ((out (assoc-ref outputs "out")))
274 (for-each (lambda (file)
275 (chmod file #o755))
276 (find-files (string-append out "/lib")
277 "\\.so"))
278 #t)))
279 (add-after 'install 'move-tk-inter
280 (lambda* (#:key outputs #:allow-other-keys)
281 ;; When Tkinter support is built move it to a separate output so
282 ;; that the main output doesn't contain a reference to Tcl/Tk.
283 (let ((out (assoc-ref outputs "out"))
284 (tk (assoc-ref outputs "tk")))
285 (when tk
286 (match (find-files out "tkinter.*\\.so")
287 ((tkinter.so)
288 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
289 ;; want it under TK/lib/pythonX.Y/site-packages.
290 (let* ((len (string-length out))
291 (target (string-append
292 tk "/"
293 (string-drop
294 (dirname (dirname tkinter.so))
295 len)
296 "/site-packages")))
297 (install-file tkinter.so target)
298 (delete-file tkinter.so)))))
299 #t))))))
300 (inputs
301 `(("bzip2" ,bzip2)
302 ("gdbm" ,gdbm)
303 ("libffi" ,libffi) ; for ctypes
304 ("sqlite" ,sqlite) ; for sqlite extension
305 ("openssl" ,openssl)
306 ("readline" ,readline)
307 ("zlib" ,zlib)
308 ("tcl" ,tcl)
309 ("tk" ,tk))) ; for tkinter
310 (native-inputs
311 `(("pkg-config" ,pkg-config)))
312 (native-search-paths
313 (list (search-path-specification
314 (variable "PYTHONPATH")
315 (files '("lib/python2.7/site-packages")))))
316 (home-page "https://www.python.org")
317 (synopsis "High-level, dynamically-typed programming language")
318 (description
319 "Python is a remarkably powerful dynamic programming language that
320 is used in a wide variety of application domains. Some of its key
321 distinguishing features include: clear, readable syntax; strong
322 introspection capabilities; intuitive object orientation; natural
323 expression of procedural code; full modularity, supporting hierarchical
324 packages; exception-based error handling; and very high level dynamic
325 data types.")
326 (license license:psfl)))
327
328 ;; Current 2.x version.
329 (define-public python-2 python-2.7)
330
331 (define-public python-3.5
332 (package (inherit python-2)
333 (version "3.5.3")
334 (source (origin
335 (method url-fetch)
336 (uri (string-append "https://www.python.org/ftp/python/"
337 version "/Python-" version ".tar.xz"))
338 (patches (search-patches
339 "python-fix-tests.patch"
340 "python-3.5-fix-tests.patch"
341 "python-3.5-getentropy-on-old-kernels.patch"
342 "python-3-deterministic-build-info.patch"
343 "python-3-search-paths.patch"))
344 (patch-flags '("-p0"))
345 (sha256
346 (base32
347 "1c6v1n9nz4mlx9mw1125fxpmbrgniqdbbx9hnqx44maqazb2mzpf"))
348 (snippet
349 '(begin
350 (for-each delete-file
351 '("Lib/ctypes/test/test_win32.py" ; fails on aarch64
352 "Lib/test/test_fcntl.py"))
353 #t))))
354 (arguments (substitute-keyword-arguments (package-arguments python-2)
355 ((#:tests? _) #t)))
356 (native-search-paths
357 (list (search-path-specification
358 (variable "PYTHONPATH")
359 (files (list (string-append "lib/python"
360 (version-major+minor version)
361 "/site-packages"))))))))
362
363 ;; Current 3.x version.
364 (define-public python-3 python-3.5)
365
366 ;; Current major version.
367 (define-public python python-3)
368
369 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
370 ;; Python (Tk -> libxcb -> Python.)
371
372 (define-public python2-minimal
373 (package (inherit python-2)
374 (name "python-minimal")
375 (outputs '("out"))
376
377 ;; Keep zlib, which is used by 'pip' (via the 'zipimport' module), which
378 ;; is invoked upon 'make install'. 'pip' also expects 'ctypes' and thus
379 ;; libffi.
380 (inputs `(("libffi" ,libffi)
381 ("zlib" ,zlib)))))
382
383 (define-public python-minimal
384 (package (inherit python)
385 (name "python-minimal")
386 (outputs '("out"))
387
388 ;; Build fails due to missing ctypes without libffi.
389 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
390 ;; zlib is required by 'zipimport', used by pip.
391 (inputs `(("libffi" ,libffi)
392 ("openssl" ,openssl)
393 ("zlib" ,zlib)))))
394
395 (define* (wrap-python3 python
396 #:optional
397 (name (string-append (package-name python) "-wrapper")))
398 (package (inherit python)
399 (name name)
400 (source #f)
401 (build-system trivial-build-system)
402 (outputs '("out"))
403 (inputs `(("bash" ,bash)))
404 (propagated-inputs `(("python" ,python)))
405 (arguments
406 `(#:modules ((guix build utils))
407 #:builder
408 (begin
409 (use-modules (guix build utils))
410 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
411 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
412 (mkdir-p bin)
413 (for-each
414 (lambda (old new)
415 (symlink (string-append python old)
416 (string-append bin "/" new)))
417 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
418 `("python" ,"pydoc" ,"idle" ,"pip"))
419 ;; python-config outputs search paths based upon its location,
420 ;; use a bash wrapper to avoid changing its outputs.
421 (let ((bash (string-append (assoc-ref %build-inputs "bash")
422 "/bin/bash"))
423 (old (string-append python "python3-config"))
424 (new (string-append bin "/python-config")))
425 (with-output-to-file new
426 (lambda ()
427 (format #t "#!~a~%" bash)
428 (format #t "exec \"~a\" \"$@\"~%" old)
429 (chmod new #o755)
430 #t)))))))
431 (synopsis "Wrapper for the Python 3 commands")
432 (description
433 "This package provides wrappers for the commands of Python@tie{}3.x such
434 that they can be invoked under their usual name---e.g., @command{python}
435 instead of @command{python3}.")))
436
437 (define-public python-wrapper (wrap-python3 python))
438 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
439
440 (define-public python-psutil
441 (package
442 (name "python-psutil")
443 (version "4.3.0")
444 (source
445 (origin
446 (method url-fetch)
447 (uri (pypi-uri "psutil" version))
448 (sha256
449 (base32
450 "1w4r09fvn6kd80m5mx4ws1wz100brkaq6hzzpwrns8cgjzjpl6c6"))))
451 (build-system python-build-system)
452 (arguments
453 ;; FIXME: some tests does not return and times out.
454 '(#:tests? #f))
455 (home-page "https://www.github.com/giampaolo/psutil")
456 (synopsis "Library for retrieving information on running processes")
457 (description
458 "psutil (Python system and process utilities) is a library for retrieving
459 information on running processes and system utilization (CPU, memory, disks,
460 network) in Python. It is useful mainly for system monitoring, profiling and
461 limiting process resources and management of running processes. It implements
462 many functionalities offered by command line tools such as: ps, top, lsof,
463 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
464 pidof, tty, taskset, pmap.")
465 (license license:bsd-3)))
466
467 (define-public python2-psutil
468 (package-with-python2 python-psutil))
469
470 (define-public python-passlib
471 (package
472 (name "python-passlib")
473 (version "1.7.1")
474 (source
475 (origin
476 (method url-fetch)
477 (uri (pypi-uri "passlib" version))
478 (sha256
479 (base32
480 "1q2khqpj9rlcgdmkypjdq1kswvhjf72bq0zk2cv669cc2dj8z51x"))))
481 (build-system python-build-system)
482 (native-inputs
483 `(("python-nose" ,python-nose)))
484 (propagated-inputs
485 `(("python-py-bcrypt" ,python-py-bcrypt)))
486 (arguments
487 `(#:phases
488 (modify-phases %standard-phases
489 (add-before 'check 'set-PYTHON_EGG_CACHE
490 ;; some tests require access to "$HOME/.cython"
491 (lambda* _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
492 (home-page "https://bitbucket.org/ecollins/passlib")
493 (synopsis
494 "Comprehensive password hashing framework")
495 (description
496 "Passlib is a password hashing library for Python 2 & 3, which provides
497 cross-platform implementations of over 30 password hashing algorithms, as well
498 as a framework for managing existing password hashes. It's designed to be
499 useful for a wide range of tasks, from verifying a hash found in /etc/shadow,
500 to providing full-strength password hashing for multi-user application.")
501 (license license:bsd-3)))
502
503 (define-public python2-passlib
504 (package-with-python2 python-passlib))
505
506 (define-public python-py-bcrypt
507 (package
508 (name "python-py-bcrypt")
509 (version "0.4")
510 (source
511 (origin
512 (method url-fetch)
513 (uri (string-append
514 "https://pypi.python.org/packages/source/p/py-bcrypt/py-bcrypt-"
515 version
516 ".tar.gz"))
517 (sha256
518 (base32
519 "0y6smdggwi5s72v6p1nn53dg6w05hna3d264cq6kas0lap73p8az"))))
520 (build-system python-build-system)
521 (home-page "https://code.google.com/p/py-bcrypt")
522 (synopsis
523 "Bcrypt password hashing and key derivation")
524 (description
525 "A python wrapper of OpenBSD's Blowfish password hashing code. This
526 system hashes passwords using a version of Bruce Schneier's Blowfish block
527 cipher with modifications designed to raise the cost of off-line password
528 cracking and frustrate fast hardware implementation. The computation cost of
529 the algorithm is parametised, so it can be increased as computers get faster.
530 The intent is to make a compromise of a password database less likely to
531 result in an attacker gaining knowledge of the plaintext passwords (e.g. using
532 John the Ripper).")
533 ;; "sha2.c" is under BSD-3;
534 ;; "blowfish.c" and "bcrypt.c" are under BSD-4;
535 ;; the rest is under ISC.
536 (license (list license:isc license:bsd-3 license:bsd-4))))
537
538 (define-public python2-py-bcrypt
539 (package-with-python2 python-py-bcrypt))
540
541
542 (define-public python-paramiko
543 (package
544 (name "python-paramiko")
545 (version "2.1.2")
546 (source
547 (origin
548 (method url-fetch)
549 (uri (pypi-uri "paramiko" version))
550 (sha256
551 (base32
552 "04734n0wy3hxk6rij4fr29in5jmr70nxpc7pqi2ksbjysfz4kbjz"))))
553 (build-system python-build-system)
554 (arguments
555 '(#:phases
556 (modify-phases %standard-phases
557 (replace 'check
558 (lambda _
559 (zero? (system* "python" "test.py")))))))
560 (propagated-inputs
561 `(("python-pyasn1" ,python-pyasn1)
562 ("python-cryptography" ,python-cryptography)))
563 (home-page "http://www.paramiko.org/")
564 (synopsis "SSHv2 protocol library")
565 (description "Paramiko is a python implementation of the SSHv2 protocol,
566 providing both client and server functionality. While it leverages a Python C
567 extension for low level cryptography (PyCrypto), Paramiko itself is a pure
568 Python interface around SSH networking concepts.")
569 (license license:lgpl2.1+)))
570
571 (define-public python2-paramiko
572 (package-with-python2 python-paramiko))
573
574
575 (define-public python-httplib2
576 (package
577 (name "python-httplib2")
578 (version "0.9.2")
579 (source
580 (origin
581 (method url-fetch)
582 (uri (pypi-uri "httplib2" version))
583 (sha256
584 (base32
585 "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
586 (build-system python-build-system)
587 (home-page "https://github.com/jcgregorio/httplib2")
588 (synopsis "Comprehensive HTTP client library")
589 (description
590 "A comprehensive HTTP client library supporting many features left out of
591 other HTTP libraries.")
592 (license license:expat)))
593
594 (define-public python2-httplib2
595 (package-with-python2 python-httplib2))
596
597 (define-public python-ecdsa
598 (package
599 (name "python-ecdsa")
600 (version "0.13")
601 (source
602 (origin
603 (method url-fetch)
604 (uri (string-append
605 "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-"
606 version
607 ".tar.gz"))
608 (sha256
609 (base32
610 "1yj31j0asmrx4an9xvsaj2icdmzy6pw0glfpqrrkrphwdpi1xkv4"))))
611 (build-system python-build-system)
612 (inputs
613 `(("openssl" ,openssl)))
614 (home-page
615 "https://github.com/warner/python-ecdsa")
616 (synopsis
617 "ECDSA cryptographic signature library (pure python)")
618 (description
619 "This is an easy-to-use implementation of ECDSA cryptography (Elliptic
620 Curve Digital Signature Algorithm), implemented purely in Python. With this
621 library, you can quickly create keypairs (signing key and verifying key), sign
622 messages, and verify the signatures. The keys and signatures are very short,
623 making them easy to handle and incorporate into other protocols.")
624 (license license:expat)))
625
626 (define-public python2-ecdsa
627 (package-with-python2 python-ecdsa))
628
629 (define-public python-ccm
630 (package
631 (name "python-ccm")
632 (version "2.1.6")
633 (source
634 (origin
635 (method url-fetch)
636 (uri (pypi-uri "ccm" version))
637 (sha256
638 (base32
639 "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
640 (build-system python-build-system)
641 (propagated-inputs
642 `(("python-pyyaml" ,python-pyyaml)
643 ;; Not listed in setup.py, but used in ccmlib/node.py for full
644 ;; functionality
645 ("python-psutil" ,python-psutil)
646 ("python-six" ,python-six)))
647 (home-page "https://github.com/pcmanus/ccm")
648 (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
649 localhost")
650 (description "Cassandra Cluster Manager is a development tool for testing
651 local Cassandra clusters. It creates, launches and removes Cassandra clusters
652 on localhost.")
653 (license license:asl2.0)))
654
655 (define-public python2-ccm
656 (package-with-python2 python-ccm))
657
658 (define-public python-pytz
659 (package
660 (name "python-pytz")
661 (version "2017.2")
662 (source
663 (origin
664 (method url-fetch)
665 (uri (pypi-uri "pytz" version ".zip"))
666 (sha256
667 (base32
668 "12cmd3j46d2gcw08bspvp6s9icfcvx88zjz52n1bli9dyvl5dh7m"))))
669 (build-system python-build-system)
670 (native-inputs
671 `(("unzip" ,unzip)))
672 (home-page "http://pythonhosted.org/pytz")
673 (synopsis "Python timezone library")
674 (description "This library brings the Olson tz database into Python. It
675 allows accurate and cross platform timezone calculations using Python 2.4 or
676 higher. It also solves the issue of ambiguous times at the end of daylight
677 saving time. Almost all of the Olson timezones are supported.")
678 (license license:expat)))
679
680 (define-public python2-pytz
681 (package-with-python2 python-pytz))
682
683 (define-public python-clyent
684 (package
685 (name "python-clyent")
686 (version "1.2.1")
687 (source
688 (origin
689 (method url-fetch)
690 (uri (pypi-uri "clyent" version))
691 (sha256
692 (base32
693 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
694 (build-system python-build-system)
695 (native-inputs
696 `(("python-mock" ,python-mock)))
697 (home-page "https://github.com/binstar/clyent")
698 (synopsis "Command line client library")
699 (description "Clyent is a Python command line utiliy library. It is used
700 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
701 (license license:bsd-3)))
702
703 (define-public python2-clyent
704 (package-with-python2 python-clyent))
705
706 (define-public python-babel
707 (package
708 (name "python-babel")
709 (version "2.3.4")
710 (source
711 (origin
712 (method url-fetch)
713 (uri (pypi-uri "Babel" version))
714 (sha256
715 (base32
716 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
717 (build-system python-build-system)
718 (propagated-inputs
719 `(("python-pytz" ,python-pytz)))
720 (arguments `(#:tests? #f)) ; no test target
721 (home-page "http://babel.pocoo.org/")
722 (synopsis
723 "Tools for internationalizing Python applications")
724 (description
725 "Babel is composed of two major parts:
726 - tools to build and work with gettext message catalogs
727 - a Python interface to the CLDR (Common Locale Data Repository), providing
728 access to various locale display names, localized number and date formatting,
729 etc. ")
730 (license license:bsd-3)))
731
732 (define-public python2-babel
733 (package-with-python2 python-babel))
734
735 (define-public python2-backport-ssl-match-hostname
736 (package
737 (name "python2-backport-ssl-match-hostname")
738 (version "3.5.0.1")
739 (source
740 (origin
741 (method url-fetch)
742 (uri (string-append
743 "https://pypi.python.org/packages/source/b/"
744 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
745 version ".tar.gz"))
746 (sha256
747 (base32
748 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
749 (build-system python-build-system)
750 (arguments
751 `(#:python ,python-2
752 #:tests? #f)) ; no test target
753 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
754 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
755 (description
756 "This backport brings the ssl.match_hostname() function to users of
757 earlier versions of Python. The function checks the hostname in the
758 certificate returned by the server to which a connection has been established,
759 and verifies that it matches the intended target hostname.")
760 (license license:psfl)))
761
762 (define-public python-hdf4
763 (package
764 (name "python-hdf4")
765 (version "0.9")
766 (source
767 (origin
768 (method url-fetch)
769 (uri (pypi-uri name version))
770 (sha256
771 (base32
772 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
773 (build-system python-build-system)
774 (native-inputs `(("nose" ,python-nose)))
775 (propagated-inputs `(("numpy" ,python-numpy)))
776 (inputs
777 `(("hdf4" ,hdf4)
778 ("libjpeg" ,libjpeg)
779 ("zlib" ,zlib)))
780 (arguments
781 `(#:phases
782 (modify-phases %standard-phases
783 (replace 'check
784 (lambda _
785 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
786 ;; on to import numpy. Somehow this works on their CI system.
787 ;; Let's just manage PYTHONPATH here instead.
788 (substitute* "runexamples.sh"
789 (("export PYTHONPATH=.*") ""))
790 (setenv "PYTHONPATH"
791 (string-append (getcwd) ":"
792 (getenv "PYTHONPATH")))
793 (and (zero? (system* "./runexamples.sh"))
794 (zero? (system* "nosetests" "-v"))))))))
795 (home-page "https://github.com/fhs/python-hdf4")
796 (synopsis "Python interface to the NCSA HDF4 library")
797 (description
798 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
799 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
800 NetCDF files can also be read and modified. Python-HDF4 is a fork of
801 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
802 (license license:expat)))
803
804 (define-public python2-hdf4
805 (package-with-python2 python-hdf4))
806
807 (define-public python-h5py
808 (package
809 (name "python-h5py")
810 (version "2.7.0")
811 (source
812 (origin
813 (method url-fetch)
814 (uri (pypi-uri "h5py" version))
815 (sha256
816 (base32
817 "0433sdv6xc9p7v1xs1gvbxp7p152ywi3nplgjb258q9fvw9469br"))))
818 (build-system python-build-system)
819 (arguments
820 `(#:tests? #f ; no test target
821 #:phases
822 (modify-phases %standard-phases
823 (add-after 'unpack 'fix-hdf5-paths
824 (lambda* (#:key inputs #:allow-other-keys)
825 (let ((prefix (assoc-ref inputs "hdf5")))
826 (substitute* "setup_build.py"
827 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
828 (string-append "['" prefix "/lib" "']"))
829 (("'/opt/local/include', '/usr/local/include'")
830 (string-append "'" prefix "/include" "'")))
831 (substitute* "setup_configure.py"
832 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
833 (string-append "['" prefix "/lib" "']")))
834 #t))))))
835 (propagated-inputs
836 `(("python-six" ,python-six)
837 ("python-numpy" ,python-numpy)))
838 (inputs
839 `(("hdf5" ,hdf5)))
840 (native-inputs
841 `(("python-cython" ,python-cython)
842 ("python-pkgconfig" ,python-pkgconfig)))
843 (home-page "http://www.h5py.org/")
844 (synopsis "Read and write HDF5 files from Python")
845 (description
846 "The h5py package provides both a high- and low-level interface to the
847 HDF5 library from Python. The low-level interface is intended to be a
848 complete wrapping of the HDF5 API, while the high-level component supports
849 access to HDF5 files, datasets and groups using established Python and NumPy
850 concepts.")
851 (license license:bsd-3)))
852
853 (define-public python2-h5py
854 (package-with-python2 python-h5py))
855
856 (define-public python-netcdf4
857 (package
858 (name "python-netcdf4")
859 (version "1.2.9")
860 (source
861 (origin
862 (method url-fetch)
863 (uri (pypi-uri "netCDF4" version))
864 (sha256
865 (base32
866 "1h6jq338amlbk0ilzvjyl7cck80i0bah9a5spn9in71vy2qxm7i5"))))
867 (build-system python-build-system)
868 (native-inputs
869 `(("python-cython" ,python-cython)))
870 (propagated-inputs
871 `(("python-numpy" ,python-numpy)))
872 (inputs
873 `(("netcdf" ,netcdf)
874 ("hdf4" ,hdf4)
875 ("hdf5" ,hdf5)))
876 (arguments
877 '(#:phases
878 (modify-phases %standard-phases
879 (replace 'check
880 (lambda _
881 (setenv "NO_NET" "1") ; disable opendap tests
882 (with-directory-excursion "test"
883 (setenv "PYTHONPATH" ; find and add the library we just built
884 (string-append
885 (car (find-files "../build" "lib.*"
886 #:directories? #:t
887 #:fail-on-error? #:t))
888 ":" (getenv "PYTHONPATH")))
889 (zero? (system* "python" "run_all.py"))))))))
890 (home-page
891 "https://github.com/Unidata/netcdf4-python")
892 (synopsis "Python/numpy interface to the netCDF library")
893 (description "Netcdf4-python is a Python interface to the netCDF C
894 library. netCDF version 4 has many features not found in earlier
895 versions of the library and is implemented on top of HDF5. This module
896 can read and write files in both the new netCDF 4 and the old netCDF 3
897 format, and can create files that are readable by HDF5 clients. The
898 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
899 to users of that module.")
900 ;; The software is mainly ISC, but includes some files covered
901 ;; by the Expat license.
902 (license (list license:isc license:expat))))
903
904 (define-public python2-netcdf4
905 (package-with-python2 python-netcdf4))
906
907 (define-public python-lockfile
908 (package
909 (name "python-lockfile")
910 (version "0.12.2")
911 (source
912 (origin
913 (method url-fetch)
914 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
915 "lockfile-" version ".tar.gz"))
916 (sha256
917 (base32
918 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
919 (build-system python-build-system)
920 (arguments '(#:test-target "check"))
921 (native-inputs
922 `(("python-pbr" ,python-pbr)))
923 (home-page "https://launchpad.net/pylockfile")
924 (synopsis "Platform-independent file locking module")
925 (description
926 "The lockfile package exports a LockFile class which provides a simple
927 API for locking files.")
928 (license license:expat)))
929
930 (define-public python2-lockfile
931 (package-with-python2 python-lockfile))
932
933 (define-public python-mock
934 (package
935 (name "python-mock")
936 (version "1.0.1")
937 (source
938 (origin
939 (method url-fetch)
940 (uri (pypi-uri "mock" version))
941 (sha256
942 (base32
943 "0kzlsbki6q0awf89rc287f3aj8x431lrajf160a70z0ikhnxsfdq"))))
944 (build-system python-build-system)
945 (arguments '(#:test-target "check"))
946 (home-page "https://github.com/testing-cabal/mock")
947 (synopsis "Python mocking and patching library for testing")
948 (description
949 "Mock is a library for testing in Python. It allows you to replace parts
950 of your system under test with mock objects and make assertions about how they
951 have been used.")
952 (license license:expat)))
953
954 (define-public python2-mock
955 (package-with-python2 python-mock))
956
957 ;;; Some packages (notably, certbot and python-acme) rely on this newer version
958 ;;; of python-mock. However, a large number of packages fail to build with
959 ;;; mock@2, so we add a new variable for now. Also, there may be a dependency
960 ;;; cycle between mock and six, so we avoid creating python2-mock@2 for now.
961 (define-public python-mock-2
962 (package
963 (inherit python-mock)
964 (version "2.0.0")
965 (source
966 (origin
967 (method url-fetch)
968 (uri (pypi-uri "mock" version))
969 (sha256
970 (base32
971 "1flbpksir5sqrvq2z0dp8sl4bzbadg21sj4d42w3klpdfvgvcn5i"))))
972 (propagated-inputs
973 `(("python-pbr" ,python-pbr-minimal)
974 ,@(package-propagated-inputs python-mock)))))
975
976 (define-public python-setuptools
977 (package
978 (name "python-setuptools")
979 (version "31.0.0")
980 (source
981 (origin
982 (method url-fetch)
983 (uri (pypi-uri "setuptools" version))
984 (sha256
985 (base32
986 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
987 (modules '((guix build utils)))
988 (snippet
989 '(begin
990 ;; Remove included binaries which are used to build self-extracting
991 ;; installers for Windows.
992 ;; TODO: Find some way to build them ourself so we can include them.
993 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
994 #t))))
995 (build-system python-build-system)
996 ;; FIXME: Tests require pytest, which itself relies on setuptools.
997 ;; One could bootstrap with an internal untested setuptools.
998 (arguments
999 `(#:tests? #f))
1000 (home-page "https://pypi.python.org/pypi/setuptools")
1001 (synopsis
1002 "Library designed to facilitate packaging Python projects")
1003 (description
1004 "Setuptools is a fully-featured, stable library designed to facilitate
1005 packaging Python projects, where packaging includes:
1006 Python package and module definitions,
1007 distribution package metadata,
1008 test hooks,
1009 project installation,
1010 platform-specific details,
1011 Python 3 support.")
1012 ;; TODO: setuptools now bundles the following libraries:
1013 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1014 (license (list license:psfl ; setuptools itself
1015 license:expat ; six, appdirs, pyparsing
1016 license:asl2.0 ; packaging is dual ASL2/BSD-2
1017 license:bsd-2))))
1018
1019 (define-public python2-setuptools
1020 (package-with-python2 python-setuptools))
1021
1022 (define-public python-uniseg
1023 (package
1024 (name "python-uniseg")
1025 (version "0.7.1")
1026 (source
1027 (origin
1028 (method url-fetch)
1029 (uri (string-append "https://bitbucket.org/emptypage/uniseg-python/"
1030 "get/rel-" version ".tar.gz"))
1031 (file-name (string-append name "-" version ".tar.gz"))
1032 (sha256
1033 (base32
1034 "1df4gddnj2a0v8z35wb2ra5vvh1f1qyxs8fgd25c8g64031mna6x"))))
1035 (build-system python-build-system)
1036 (arguments
1037 '(#:tests? #f)) ; The test suite requires network access.
1038 (home-page
1039 "https://bitbucket.org/emptypage/uniseg-python")
1040 (synopsis
1041 "Python library to determine Unicode text segmentations")
1042 (description
1043 "Uniseg is a Python package used to determine Unicode text segmentations.
1044 Supported segmentations include:
1045 @enumerate
1046 @item @dfn{Code point} (any value in the Unicode codespace)
1047 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1048 multiple Unicode code points, e.g. \"G\" + acute-accent)
1049 @item Word break
1050 @item Sentence break
1051 @item Line break
1052 @end enumerate")
1053 (license license:expat)))
1054
1055 (define-public python2-uniseg
1056 (package-with-python2 python-uniseg))
1057
1058 ;;; Pycrypto is abandoned upstream:
1059 ;;;
1060 ;;; https://github.com/dlitz/pycrypto/issues/173
1061 ;;;
1062 ;;; TODO Remove this package from GNU Guix.
1063 (define-public python-pycrypto
1064 (package
1065 (name "python-pycrypto")
1066 (version "2.6.1")
1067 (source
1068 (origin
1069 (method url-fetch)
1070 (uri (pypi-uri "pycrypto" version))
1071 (patches (search-patches "python-pycrypto-CVE-2013-7459.patch"))
1072 (sha256
1073 (base32
1074 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj"))))
1075 (build-system python-build-system)
1076 (inputs
1077 `(("python" ,python)
1078 ("gmp" ,gmp)))
1079 (arguments
1080 `(#:phases
1081 (modify-phases %standard-phases
1082 (add-before 'build 'set-build-env
1083 ;; pycrypto runs an autoconf configure script behind the scenes
1084 (lambda _ (setenv "CONFIG_SHELL" (which "bash")) #t)))))
1085 (home-page "http://www.pycrypto.org/")
1086 (synopsis "Cryptographic modules for Python")
1087 (description
1088 "Pycrypto is a collection of both secure hash functions (such as SHA256
1089 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal,
1090 etc.). The package is structured to make adding new modules easy.")
1091 (license license:public-domain)))
1092
1093 (define-public python2-pycrypto
1094 (let ((pycrypto (package-with-python2 python-pycrypto)))
1095 (package (inherit pycrypto)
1096 (inputs
1097 `(("python" ,python-2)
1098 ,@(alist-delete
1099 "python"
1100 (package-inputs pycrypto)))))))
1101
1102 (define-public python-eventlet
1103 (package
1104 (name "python-eventlet")
1105 (version "0.20.1")
1106 (source
1107 (origin
1108 (method url-fetch)
1109 (uri (pypi-uri "eventlet" version))
1110 (sha256
1111 (base32
1112 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1113 (build-system python-build-system)
1114 (propagated-inputs
1115 `(("python-greenlet" ,python-greenlet)))
1116 (arguments
1117 ;; TODO: Requires unpackaged 'enum-compat'.
1118 '(#:tests? #f))
1119 (home-page "http://eventlet.net")
1120 (synopsis "Concurrent networking library for Python")
1121 (description
1122 "Eventlet is a concurrent networking library for Python that
1123 allows you to change how you run your code, not how you write it.
1124 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1125 Coroutines ensure that the developer uses a blocking style of programming
1126 that is similar to threading, but provide the benefits of non-blocking I/O.
1127 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1128 from the Python interpreter, or as a small part of a larger application.")
1129 (license license:expat)))
1130
1131 (define-public python2-eventlet
1132 (let ((base (package-with-python2
1133 (strip-python2-variant python-eventlet))))
1134 (package (inherit base)
1135 (propagated-inputs
1136 `(("python2-enum34" ,python2-enum34)
1137 ,@(package-propagated-inputs base))))))
1138
1139 (define-public python-keyring
1140 (package
1141 (name "python-keyring")
1142 (version "8.7")
1143 (source
1144 (origin
1145 (method url-fetch)
1146 (uri (pypi-uri "keyring" version))
1147 (sha256
1148 (base32
1149 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
1150 (build-system python-build-system)
1151 (native-inputs
1152 `(("python-setuptools-scm" ,python-setuptools-scm)))
1153 (propagated-inputs
1154 `(("python-pycrypto" ,python-pycrypto)))
1155 (arguments
1156 `(#:tests? #f)) ;TODO: tests require pytest
1157 (home-page "https://github.com/jaraco/keyring")
1158 (synopsis "Store and access your passwords safely")
1159 (description
1160 "The Python keyring lib provides a easy way to access the system keyring
1161 service from python. It can be used in any application that needs safe
1162 password storage.")
1163 ;; "MIT" and PSF dual license
1164 (license license:x11)))
1165
1166 (define-public python2-keyring
1167 (package-with-python2 python-keyring))
1168
1169 (define-public python-six
1170 (package
1171 (name "python-six")
1172 (version "1.10.0")
1173 (source
1174 (origin
1175 (method url-fetch)
1176 (uri (pypi-uri "six" version))
1177 (sha256
1178 (base32
1179 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
1180 (build-system python-build-system)
1181 (native-inputs
1182 `(("python-py" ,python-py)
1183 ("python-pytest" ,python-pytest)))
1184 (home-page "http://pypi.python.org/pypi/six/")
1185 (synopsis "Python 2 and 3 compatibility utilities")
1186 (description
1187 "Six is a Python 2 and 3 compatibility library. It provides utility
1188 functions for smoothing over the differences between the Python versions with
1189 the goal of writing Python code that is compatible on both Python versions.
1190 Six supports every Python version since 2.5. It is contained in only one
1191 Python file, so it can be easily copied into your project.")
1192 (license license:x11)))
1193
1194 (define-public python2-six
1195 (package-with-python2 python-six))
1196
1197 (define-public python-dateutil
1198 (package
1199 (name "python-dateutil")
1200 (version "2.6.0")
1201 (source
1202 (origin
1203 (method url-fetch)
1204 (uri (pypi-uri "python-dateutil" version))
1205 (sha256
1206 (base32
1207 "1lhq0hxjc3cfha101q02ld5ijlpfyjn2w1yh7wvpiy367pgzi8k2"))))
1208 (build-system python-build-system)
1209 (propagated-inputs
1210 `(("python-six" ,python-six)))
1211 (home-page "https://dateutil.readthedocs.io/en/stable/")
1212 (synopsis "Extensions to the standard datetime module")
1213 (description
1214 "The dateutil module provides powerful extensions to the standard
1215 datetime module, available in Python 2.3+.")
1216 (license license:bsd-3)))
1217
1218 (define-public python2-dateutil
1219 (package-with-python2 python-dateutil))
1220
1221 (define-public python-parsedatetime
1222 (package
1223 (name "python-parsedatetime")
1224 (version "2.4")
1225 (source
1226 (origin
1227 (method url-fetch)
1228 (uri (pypi-uri "parsedatetime" version))
1229 (sha256
1230 (base32
1231 "0jxqkjks7z9dn222cqgvskp4wr6d92aglinxq7pd2w4mzdc7r09x"))))
1232 (build-system python-build-system)
1233 (native-inputs
1234 `(("python-nose" ,python-nose)
1235 ("python-pyicu" ,python-pyicu)
1236 ("python-pytest" ,python-pytest)
1237 ("python-pytest-runner" ,python-pytest-runner)))
1238 (propagated-inputs
1239 `(("python-future" ,python-future)))
1240 (home-page "https://github.com/bear/parsedatetime/")
1241 (synopsis
1242 "Parse human-readable date/time text")
1243 (description
1244 "Parse human-readable date/time text.")
1245 (license license:asl2.0)))
1246
1247 (define-public python2-parsedatetime
1248 (package-with-python2 python-parsedatetime))
1249
1250 (define-public python-schedule
1251 (package
1252 (name "python-schedule")
1253 (version "0.4.3")
1254 (source
1255 (origin
1256 (method url-fetch)
1257 (uri (pypi-uri "schedule" version))
1258 (sha256
1259 (base32
1260 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1261 (build-system python-build-system)
1262 (native-inputs
1263 `(("python-pytest" ,python-pytest)
1264 ("python-mock" ,python-mock)))
1265 (home-page "https://github.com/dbader/schedule")
1266 (synopsis "Schedule periodic function calls in Python")
1267 (description
1268 "Schedule is an in-process scheduler for periodic jobs that uses the
1269 builder pattern for configuration. Schedule lets you run Python functions (or
1270 any other callable) periodically at pre-determined intervals using a simple,
1271 human-friendly syntax.")
1272 (license license:expat)))
1273
1274 (define-public python2-schedule
1275 (package-with-python2 python-schedule))
1276
1277 (define-public python-pandas
1278 (package
1279 (name "python-pandas")
1280 (version "0.19.2")
1281 (source
1282 (origin
1283 (method url-fetch)
1284 (uri (pypi-uri "pandas" version))
1285 (sha256
1286 (base32 "0540cnbwy2hc4hv2sxfs8i47xi91qzvzxfn80dl785ibiicly3vg"))
1287 (patches
1288 (search-patches "python-pandas-skip-failing-tests.patch"))))
1289 (build-system python-build-system)
1290 (propagated-inputs
1291 `(("python-numpy" ,python-numpy)
1292 ("python-pytz" ,python-pytz)
1293 ("python-dateutil" ,python-dateutil)))
1294 (native-inputs
1295 `(("python-nose" ,python-nose)
1296 ("python-cython" ,python-cython)))
1297 (home-page "http://pandas.pydata.org")
1298 (synopsis "Data structures for data analysis, time series, and statistics")
1299 (description
1300 "Pandas is a Python package providing fast, flexible, and expressive data
1301 structures designed to make working with structured (tabular,
1302 multidimensional, potentially heterogeneous) and time series data both easy
1303 and intuitive. It aims to be the fundamental high-level building block for
1304 doing practical, real world data analysis in Python.")
1305 (license license:bsd-3)))
1306
1307 (define-public python2-pandas
1308 (package-with-python2 python-pandas))
1309
1310 (define-public python-tzlocal
1311 (package
1312 (name "python-tzlocal")
1313 (version "1.2.2")
1314 (source
1315 (origin
1316 (method url-fetch)
1317 (uri (pypi-uri "tzlocal" version))
1318 (sha256
1319 (base32
1320 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
1321 (build-system python-build-system)
1322 (propagated-inputs
1323 `(("python-pytz" ,python-pytz)))
1324 (home-page "https://github.com/regebro/tzlocal")
1325 (synopsis
1326 "Local timezone information for Python")
1327 (description
1328 "Tzlocal returns a tzinfo object with the local timezone information.
1329 This module attempts to fix a glaring hole in pytz, that there is no way to
1330 get the local timezone information, unless you know the zoneinfo name, and
1331 under several distributions that's hard or impossible to figure out.")
1332 (license license:cc0)))
1333
1334 (define-public python2-pysqlite
1335 (package
1336 (name "python2-pysqlite")
1337 (version "2.8.3")
1338 (source
1339 (origin
1340 (method url-fetch)
1341 (uri (pypi-uri "pysqlite" version))
1342 (sha256
1343 (base32
1344 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
1345 (build-system python-build-system)
1346 (inputs
1347 `(("sqlite" ,sqlite)))
1348 (arguments
1349 `(#:python ,python-2 ; incompatible with Python 3
1350 #:tests? #f)) ; no test target
1351 (home-page "https://github.com/ghaering/pysqlite")
1352 (synopsis "SQLite bindings for Python")
1353 (description
1354 "Pysqlite provides SQLite bindings for Python that comply to the
1355 Database API 2.0T.")
1356 (license license:zlib)))
1357
1358
1359 (define-public python2-mechanize
1360 (package
1361 (name "python2-mechanize")
1362 (version "0.2.5")
1363 (source
1364 (origin
1365 (method url-fetch)
1366 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1367 version ".tar.gz"))
1368 (sha256
1369 (base32
1370 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1371 (build-system python-build-system)
1372 (arguments
1373 `(#:python ,python-2 ; apparently incompatible with Python 3
1374 #:tests? #f))
1375 ;; test fails with message
1376 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1377 ;; (python-3.3.2) or
1378 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1379 ;; (python-2.7.5).
1380 ;; The source code is from March 2011 and probably not up-to-date
1381 ;; with respect to python unit tests.
1382 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1383 (synopsis
1384 "Stateful programmatic web browsing in Python")
1385 (description
1386 "Mechanize implements stateful programmatic web browsing in Python,
1387 after Andy Lester’s Perl module WWW::Mechanize.")
1388 (license (license:non-copyleft
1389 "file://COPYING"
1390 "See COPYING in the distribution."))))
1391
1392
1393 (define-public python-simplejson
1394 (package
1395 (name "python-simplejson")
1396 (version "3.10.0")
1397 (source
1398 (origin
1399 (method url-fetch)
1400 (uri (pypi-uri "simplejson" version))
1401 (sha256
1402 (base32
1403 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
1404 (build-system python-build-system)
1405 (home-page "http://simplejson.readthedocs.org/en/latest/")
1406 (synopsis
1407 "Json library for Python")
1408 (description
1409 "JSON (JavaScript Object Notation) is a subset of JavaScript
1410 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1411 format.
1412
1413 Simplejson exposes an API familiar to users of the standard library marshal
1414 and pickle modules. It is the externally maintained version of the json
1415 library contained in Python 2.6, but maintains compatibility with Python 2.5
1416 and (currently) has significant performance advantages, even without using
1417 the optional C extension for speedups. Simplejson is also supported on
1418 Python 3.3+.")
1419 (license license:x11)))
1420
1421 (define-public python2-simplejson
1422 (package-with-python2 python-simplejson))
1423
1424
1425 (define-public python-pyicu
1426 (package
1427 (name "python-pyicu")
1428 (version "1.9.5")
1429 (source
1430 (origin
1431 (method url-fetch)
1432 (uri (pypi-uri "PyICU" version))
1433 (sha256
1434 (base32
1435 "16rmxy9y0qhqqna2v49i7nzwm09as699rbyvh4raw7w602w55c3k"))))
1436 (build-system python-build-system)
1437 (arguments
1438 '(#:phases
1439 (modify-phases %standard-phases
1440 (add-before 'check 'delete-failing-test
1441 (lambda _
1442 ;; XXX: These tests require locales that are unavailable
1443 ;; in the build environment.
1444 (delete-file "test/test_DateTimeParserGenerator.py")
1445 #t)))))
1446 (inputs
1447 `(("icu4c" ,icu4c)))
1448 (home-page "http://pyicu.osafoundation.org/")
1449 (synopsis "Python extension wrapping the ICU C++ API")
1450 (description
1451 "PyICU is a python extension wrapping the ICU C++ API.")
1452 (license license:x11)))
1453
1454 (define-public python2-pyicu
1455 (package-with-python2 python-pyicu))
1456
1457 (define-public python2-dogtail
1458 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1459 ;; spaces in indentation" with Python 3.
1460 (package
1461 (name "python2-dogtail")
1462 (version "0.9.9")
1463 (source (origin
1464 (method url-fetch)
1465 (uri (pypi-uri "dogtail" version))
1466 (sha256
1467 (base32
1468 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1469 (build-system python-build-system)
1470 (arguments `(#:python ,python-2
1471 #:tests? #f)) ; invalid command "test"
1472 ;; Currently no offical homepage.
1473 (home-page "https://pypi.python.org/pypi/dogtail/")
1474 (synopsis "GUI test tool and automation framework written in Python")
1475 (description
1476 "Dogtail is a GUI test tool and automation framework written in Python.
1477 It uses Accessibility (a11y) technologies to communicate with desktop
1478 applications. dogtail scripts are written in Python and executed like any
1479 other Python program.")
1480 (license license:gpl2+)))
1481
1482 (define-public python2-empy
1483 (package
1484 (name "python2-empy")
1485 (version "3.3")
1486 (source (origin
1487 (method url-fetch)
1488 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1489 version ".tar.gz"))
1490 (sha256
1491 (base32
1492 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1493 (build-system python-build-system)
1494 (arguments
1495 `(#:python ,python-2
1496 #:phases
1497 (modify-phases %standard-phases
1498 (replace 'check
1499 (lambda _
1500 (zero? (system* "./test.sh")))))))
1501 (home-page "http://www.alcyone.com/software/empy/")
1502 (synopsis "Templating system for Python")
1503 (description
1504 "EmPy is a system for embedding Python expressions and statements in
1505 template text; it takes an EmPy source file, processes it, and produces
1506 output. This is accomplished via expansions, which are special signals to the
1507 EmPy system and are set off by a special prefix (by default the at sign, @@).
1508 EmPy can expand arbitrary Python expressions and statements in this way, as
1509 well as a variety of special forms. Textual data not explicitly delimited in
1510 this way is sent unaffected to the output, allowing Python to be used in
1511 effect as a markup language. Also supported are callbacks via hooks,
1512 recording and playback via diversions, and dynamic, chainable filters. The
1513 system is highly configurable via command line options and embedded
1514 commands.")
1515 (license license:lgpl2.1+)))
1516
1517 (define-public python2-element-tree
1518 (package
1519 (name "python2-element-tree")
1520 (version "1.2.6")
1521 (source (origin
1522 (method url-fetch)
1523 (uri (string-append
1524 "http://effbot.org/media/downloads/elementtree-"
1525 version "-20050316.tar.gz"))
1526 (sha256
1527 (base32
1528 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1529 (build-system python-build-system)
1530 (arguments
1531 `(#:python ,python-2 ; seems to be part of Python 3
1532 #:tests? #f)) ; no 'test' sub-command
1533 (synopsis "Toolkit for XML processing in Python")
1534 (description
1535 "ElementTree is a Python library supporting lightweight XML processing.")
1536 (home-page "http://effbot.org/zone/element-index.htm")
1537 (license (license:x11-style
1538 "http://docs.python.org/2/license.html"
1539 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1540
1541 (define-public python2-pybugz
1542 (package
1543 (name "python2-pybugz")
1544 (version "0.6.11")
1545 (source (origin
1546 (method url-fetch)
1547 (uri (string-append
1548 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1549 version ".tar.gz"))
1550 (sha256
1551 (base32
1552 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1553 (patches (search-patches "pybugz-stty.patch"
1554 "pybugz-encode-error.patch"))))
1555 (build-system python-build-system)
1556 (arguments
1557 `(#:python ,python-2 ; SyntaxError with Python 3
1558 #:tests? #f)) ; no 'test' sub-command
1559 (propagated-inputs
1560 `(("element-tree" ,python2-element-tree)))
1561 (synopsis "Python and command-line interface to Bugzilla")
1562 (description
1563 "PyBugz is a Python library and command-line tool to query the Bugzilla
1564 bug tracking system. It is meant as an aid to speed up interaction with the
1565 bug tracker.")
1566 (home-page "http://www.liquidx.net/pybugz/")
1567 (license license:gpl2)))
1568
1569 (define-public python-enum34
1570 (package
1571 (name "python-enum34")
1572 (version "1.1.6")
1573 (source
1574 (origin
1575 (method url-fetch)
1576 (uri (pypi-uri "enum34" version))
1577 (sha256
1578 (base32
1579 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1580 (build-system python-build-system)
1581 (home-page "https://pypi.python.org/pypi/enum34")
1582 (synopsis "Backported Python 3.4 Enum")
1583 (description
1584 "Enum34 is the new Python stdlib enum module available in Python 3.4
1585 backported for previous versions of Python from 2.4 to 3.3.")
1586 (license license:bsd-3)))
1587
1588 (define-public python2-enum34
1589 (package-with-python2 python-enum34))
1590
1591 (define-public python-parse-type
1592 (package
1593 (name "python-parse-type")
1594 (version "0.3.4")
1595 (source
1596 (origin
1597 (method url-fetch)
1598 (uri (string-append "https://pypi.python.org/packages/source/p/"
1599 "parse_type/parse_type-" version ".tar.gz"))
1600 (sha256
1601 (base32
1602 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1603 (build-system python-build-system)
1604 (arguments
1605 `(#:phases
1606 (modify-phases %standard-phases
1607 (add-after 'unpack 'patch-tests
1608 (lambda _
1609 (substitute* "tests/test_parse_type_parse.py"
1610 ;; Newer Python versions don't have the problem this test tests.
1611 (("self[.]assertRaises[(]parse.TooManyFields, p.parse, ''[)]")
1612 ""))
1613 #t)))))
1614 (propagated-inputs
1615 `(("python-six" ,python-six)
1616 ("python-parse" ,python-parse)))
1617 (native-inputs
1618 `(("python-pytest" ,python-pytest)
1619 ("python-pytest-runner" ,python-pytest-runner)))
1620 (home-page "https://github.com/jenisys/parse_type")
1621 (synopsis "Extended parse module")
1622 (description
1623 "Parse_type extends the python parse module.")
1624 (properties
1625 `((python2-variant . ,(delay python2-parse-type))))
1626 (license license:bsd-3)))
1627
1628 (define-public python2-parse-type
1629 (let ((base (package-with-python2
1630 (strip-python2-variant python-parse-type))))
1631 (package (inherit base)
1632 (propagated-inputs
1633 `(("python2-enum34" ,python2-enum34)
1634 ,@(package-propagated-inputs base))))))
1635
1636 (define-public python-parse
1637 (package
1638 (name "python-parse")
1639 (version "1.6.6")
1640 (source
1641 (origin
1642 (method url-fetch)
1643 (uri (pypi-uri "parse" version))
1644 (sha256
1645 (base32
1646 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1647 (patches (search-patches "python-parse-too-many-fields.patch"))))
1648 (build-system python-build-system)
1649 (arguments
1650 `(#:phases
1651 (modify-phases %standard-phases
1652 (replace 'check
1653 (lambda _ (zero? (system* "python" "test_parse.py")))))))
1654 (home-page "https://github.com/r1chardj0n3s/parse")
1655 (synopsis "Parse strings")
1656 (description
1657 "Parse strings using a specification based on the Python format()
1658 syntax.")
1659 (license license:x11)))
1660
1661 (define-public python-polib
1662 (package
1663 (name "python-polib")
1664 (version "1.0.8")
1665 (source (origin
1666 (method url-fetch)
1667 (uri (pypi-uri "polib" version))
1668 (sha256
1669 (base32
1670 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1671 (build-system python-build-system)
1672 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1673 (synopsis "Manipulate, create and modify gettext files")
1674 (description "Polib can manipulate any gettext format (po, pot and mo)
1675 files. It can be used to create po files from scratch or to modify
1676 existing ones.")
1677 (license license:expat)))
1678
1679 (define-public python2-polib
1680 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1681 (package
1682 (inherit base)
1683 (arguments `(,@(package-arguments base)
1684 ;; Tests don't work with python2.
1685 #:tests? #f)))))
1686
1687 (define-public scons
1688 (package
1689 (name "scons")
1690 (version "2.5.1")
1691 (source (origin
1692 (method url-fetch)
1693 (uri (string-append "mirror://sourceforge/scons/scons/" version
1694 "/scons-" version ".tar.gz"))
1695 (sha256
1696 (base32
1697 "1wji1z9jdkhnmm99apx6fhld9cs52rr56aigniyrcsmlwy52298b"))))
1698 (build-system python-build-system)
1699 (arguments
1700 ;; With Python 3.x, fails to build with a syntax error.
1701 `(#:python ,python-2
1702 #:use-setuptools? #f ; still relies on distutils
1703 #:tests? #f)) ; no 'python setup.py test' command
1704 (home-page "http://scons.org/")
1705 (synopsis "Software construction tool written in Python")
1706 (description
1707 "SCons is a software construction tool. Think of SCons as an improved,
1708 cross-platform substitute for the classic Make utility with integrated
1709 functionality similar to autoconf/automake and compiler caches such as ccache.
1710 In short, SCons is an easier, more reliable and faster way to build
1711 software.")
1712 (license license:x11)))
1713
1714 (define-public python-extras
1715 (package
1716 (name "python-extras")
1717 (version "0.0.3")
1718 (source
1719 (origin
1720 (method url-fetch)
1721 (uri (string-append
1722 "https://pypi.python.org/packages/source/e/extras/extras-"
1723 version ".tar.gz"))
1724 (sha256
1725 (base32
1726 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1727 (build-system python-build-system)
1728 (arguments
1729 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1730 '(#:tests? #f))
1731 (home-page "https://github.com/testing-cabal/extras")
1732 (synopsis "Useful extensions to the Python standard library")
1733 (description
1734 "Extras is a set of extensions to the Python standard library.")
1735 (license license:expat)))
1736
1737 (define-public python2-extras
1738 (package-with-python2 python-extras))
1739
1740 (define-public python-mimeparse
1741 (package
1742 (name "python-mimeparse")
1743 (version "0.1.4")
1744 (source
1745 (origin
1746 (method url-fetch)
1747 (uri (string-append
1748 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1749 version ".tar.gz"))
1750 (sha256
1751 (base32
1752 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1753 (build-system python-build-system)
1754 (arguments
1755 '(#:tests? #f)) ; no setup.py test command
1756 (home-page
1757 "https://github.com/dbtsai/python-mimeparse")
1758 (synopsis "Python library for parsing MIME types")
1759 (description
1760 "Mimeparse provides basic functions for parsing MIME type names and
1761 matching them against a list of media-ranges.")
1762 (license license:expat)))
1763
1764 (define-public python2-mimeparse
1765 (package-with-python2 python-mimeparse))
1766
1767 (define-public python-nose
1768 (package
1769 (name "python-nose")
1770 (version "1.3.7")
1771 (source
1772 (origin
1773 (method url-fetch)
1774 (uri (pypi-uri "nose" version))
1775 (sha256
1776 (base32
1777 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
1778 (build-system python-build-system)
1779 (arguments
1780 '(#:tests? #f)) ; FIXME: test suite fails
1781 (home-page "http://readthedocs.org/docs/nose/")
1782 (synopsis "Python testing library")
1783 (description
1784 "Nose extends the unittest library to make testing easier.")
1785 (license license:lgpl2.0+)))
1786
1787 (define-public python2-nose
1788 (package-with-python2 python-nose))
1789
1790 (define-public python-nose2
1791 (package
1792 (name "python-nose2")
1793 (version "0.6.5")
1794 (source
1795 (origin
1796 (method url-fetch)
1797 (uri (pypi-uri "nose2" version))
1798 (sha256
1799 (base32
1800 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1801 (build-system python-build-system)
1802 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
1803 (propagated-inputs
1804 `(("python-cov-core" ,python-cov-core)
1805 ("python-pytest-cov" ,python-pytest-cov)
1806 ("python-six" ,python-six)))
1807 (home-page "https://github.com/nose-devs/nose2")
1808 (synopsis "Next generation of nicer testing for Python")
1809 (description
1810 "Nose2 is the next generation of nicer testing for Python, based on the
1811 plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1812 better plugin api, being easier for users to configure, and simplifying internal
1813 interfaces and processes.")
1814 (license license:bsd-2)))
1815
1816 (define-public python2-nose2
1817 (package-with-python2 python-nose2))
1818
1819 (define-public python-unittest2
1820 (package
1821 (name "python-unittest2")
1822 (version "0.5.1")
1823 (source
1824 (origin
1825 (method url-fetch)
1826 (uri (string-append
1827 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1828 version ".tar.gz"))
1829 (sha256
1830 (base32
1831 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1832 (build-system python-build-system)
1833 (home-page "http://pypi.python.org/pypi/unittest2")
1834 (synopsis "Python unit testing library")
1835 (description
1836 "Unittest2 is a replacement for the unittest module in the Python
1837 standard library.")
1838 (license license:psfl)))
1839
1840 (define-public python2-unittest2
1841 (package (inherit python-unittest2)
1842 (name "python2-unittest2")
1843 (version "0.5.1")
1844 (source
1845 (origin
1846 (method url-fetch)
1847 (uri (string-append
1848 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1849 version ".tar.gz"))
1850 (sha256
1851 (base32
1852 "0wbs4i4x3x7klr3v35ss6p9mcqz883i1xgcpkhvl7n2lyv6yhpda"))))
1853 (arguments
1854 `(#:python ,python-2
1855 #:tests? #f)))) ; no setup.py test command
1856
1857 (define-public python-pafy
1858 (package
1859 (name "python-pafy")
1860 (version "0.5.3.1")
1861 (source
1862 (origin
1863 (method url-fetch)
1864 (uri (pypi-uri "pafy" version))
1865 (sha256
1866 (base32
1867 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1868 (build-system python-build-system)
1869 (arguments
1870 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1871 (propagated-inputs
1872 ;; Youtube-dl is a python package which is imported in the file
1873 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1874 `(("youtube-dl" ,youtube-dl)))
1875 (home-page "https://np1.github.io/pafy/")
1876 (synopsis "Retrieve YouTube content and metadata")
1877 (description
1878 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1879 (license license:lgpl3+)))
1880
1881 (define-public python-py
1882 (package
1883 (name "python-py")
1884 (version "1.4.32")
1885 (source
1886 (origin
1887 (method url-fetch)
1888 (uri (pypi-uri "py" version))
1889 (sha256
1890 (base32
1891 "19s1pql9pq85h1qzsdwgyb8a3k1qgkvh33b02m8kfqhizz8rzf64"))))
1892 (build-system python-build-system)
1893 (arguments
1894 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1895 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1896 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1897 ;; Is this module globally installed?"
1898 '(#:tests? #f))
1899 (home-page "http://pylib.readthedocs.org/")
1900 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1901 (description
1902 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1903 code introspection, and logging.")
1904 (license license:expat)))
1905
1906 (define-public python2-py
1907 (package-with-python2 python-py))
1908
1909 (define-public python-pytest
1910 (package
1911 (name "python-pytest")
1912 (version "2.7.3")
1913 (source
1914 (origin
1915 (method url-fetch)
1916 (uri (string-append
1917 "https://pypi.python.org/packages/source/p/pytest/pytest-"
1918 version ".tar.gz"))
1919 (sha256
1920 (base32
1921 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
1922 (modules '((guix build utils)))
1923 (snippet
1924 ;; One of the tests involves the /usr directory, so it fails.
1925 '(substitute* "testing/test_argcomplete.py"
1926 (("def test_remove_dir_prefix\\(self\\):")
1927 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
1928 (build-system python-build-system)
1929 (propagated-inputs
1930 `(("python-py" ,python-py)))
1931 (native-inputs
1932 `(;; Tests need the "regular" bash since 'bash-final' lacks `compgen`.
1933 ("bash" ,bash)
1934 ("python-nose" ,python-nose)
1935 ("python-mock" ,python-mock)))
1936 (home-page "http://pytest.org")
1937 (synopsis "Python testing library")
1938 (description
1939 "Pytest is a testing tool that provides auto-discovery of test modules
1940 and functions, detailed info on failing assert statements, modular fixtures,
1941 and many external plugins.")
1942 (license license:expat)))
1943
1944 (define-public python2-pytest
1945 (package-with-python2 python-pytest))
1946
1947 ;; Some packages require a newer pytest.
1948 (define-public python-pytest-3.0
1949 (package
1950 (inherit python-pytest)
1951 (name "python-pytest")
1952 (version "3.0.7")
1953 (source (origin
1954 (method url-fetch)
1955 (uri (pypi-uri "pytest" version))
1956 (sha256
1957 (base32
1958 "1asc4b2nd2a4f0g3r12y97rslq5wliji7b73wwkvdrm5s7mrc1mp"))))
1959 (arguments
1960 `(#:phases
1961 (modify-phases %standard-phases
1962 (add-before 'check 'disable-invalid-test
1963 (lambda _
1964 (substitute* "testing/test_argcomplete.py"
1965 (("def test_remove_dir_prefix" line)
1966 (string-append "@pytest.mark.skip"
1967 "(reason=\"Assumes that /usr exists.\")\n "
1968 line)))
1969 #t)))))
1970 (native-inputs
1971 `(("python-hypothesis" ,python-hypothesis)
1972 ,@(package-native-inputs python-pytest)))
1973 (properties `((python2-variant . ,(delay python2-pytest-3.0))))))
1974
1975 (define-public python2-pytest-3.0
1976 (let ((base (package-with-python2
1977 (strip-python2-variant python-pytest-3.0))))
1978 (package (inherit base)
1979 (native-inputs
1980 `(("python2-enum34" ,python2-enum34)
1981 ,@(package-native-inputs base))))))
1982
1983 (define-public python-pytest-cov
1984 (package
1985 (name "python-pytest-cov")
1986 (version "2.4.0")
1987 (source
1988 (origin
1989 (method url-fetch)
1990 (uri (pypi-uri "pytest-cov" version))
1991 (sha256
1992 (base32
1993 "03c2qc42r4bczyw93gd7n0qi1h1jfhw7fnbhi33c3vp1hs81gm2k"))))
1994 (build-system python-build-system)
1995 (arguments
1996 `(#:phases
1997 (modify-phases %standard-phases
1998 (replace 'check
1999 (lambda _
2000 ;; options taken from tox.ini
2001 ;; TODO: make "--restructuredtext" tests pass. They currently fail
2002 ;; with "Duplicate implicit target name"
2003 (zero? (system* "python" "./setup.py" "check"
2004 "--strict" "--metadata")))))))
2005 (propagated-inputs
2006 `(("python-coverage" ,python-coverage)
2007 ("python-pytest" ,python-pytest)))
2008 (home-page "https://github.com/pytest-dev/pytest-cov")
2009 (synopsis "Pytest plugin for measuring coverage")
2010 (description
2011 "Pytest-cov produces coverage reports. It supports centralised testing and
2012 distributed testing in both @code{load} and @code{each} modes. It also
2013 supports coverage of subprocesses.")
2014 (license license:expat)))
2015
2016 (define-public python2-pytest-cov
2017 (package-with-python2 python-pytest-cov))
2018
2019 (define-public python-pytest-runner
2020 (package
2021 (name "python-pytest-runner")
2022 (version "2.11.1")
2023 (source
2024 (origin
2025 (method url-fetch)
2026 (uri (pypi-uri "pytest-runner" version))
2027 (sha256
2028 (base32
2029 "1cw978kqqcq916b9gfns1qjqvg33c5ail5jhw9054dsynkm32flq"))))
2030 (build-system python-build-system)
2031 (arguments
2032 `(#:phases
2033 (modify-phases %standard-phases
2034 ;; The fancy way of setting the version with setuptools_scm does not
2035 ;; seem to work here.
2036 (add-after 'unpack 'set-version
2037 (lambda _
2038 (substitute* "docs/conf.py"
2039 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
2040 (string-append "version = \"" ,version "\"")))
2041 #t)))))
2042 (native-inputs
2043 `(("python-pytest" ,python-pytest)
2044 ("python-setuptools-scm" ,python-setuptools-scm)))
2045 (home-page "https://github.com/pytest-dev/pytest-runner")
2046 (synopsis "Invoke py.test as a distutils command")
2047 (description
2048 "This package provides a @command{pytest-runner} command that
2049 @file{setup.py} files can use to run tests.")
2050 (license license:expat)))
2051
2052 (define-public python2-pytest-runner
2053 (package-with-python2 python-pytest-runner))
2054
2055 (define-public python-pytest-mock
2056 (package
2057 (name "python-pytest-mock")
2058 (version "1.2")
2059 (source
2060 (origin
2061 (method url-fetch)
2062 (uri (pypi-uri "pytest-mock" version ".zip"))
2063 (sha256
2064 (base32
2065 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
2066 (build-system python-build-system)
2067 (native-inputs
2068 `(("unzip" ,unzip)))
2069 (propagated-inputs
2070 `(("python-pytest" ,python-pytest)))
2071 (home-page "https://github.com/pytest-dev/pytest-mock/")
2072 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
2073 (description
2074 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
2075 around the patching API provided by the @code{mock} package, but with the
2076 benefit of not having to worry about undoing patches at the end of a test.
2077 The mocker fixture has the same API as @code{mock.patch}, supporting the
2078 same arguments.")
2079 (properties `((python2-variant . ,(delay python2-pytest-mock))))
2080 (license license:expat)))
2081
2082 (define-public python2-pytest-mock
2083 (let ((base (package-with-python2
2084 (strip-python2-variant python-pytest-mock))))
2085 (package (inherit base)
2086 (propagated-inputs
2087 `(("python2-mock" ,python2-mock)
2088 ,@(package-propagated-inputs base))))))
2089
2090 (define-public python-pytest-xdist
2091 (package
2092 (name "python-pytest-xdist")
2093 (version "1.14")
2094 (source
2095 (origin
2096 (method url-fetch)
2097 (uri (pypi-uri "pytest-xdist" version ".zip"))
2098 (sha256
2099 (base32
2100 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
2101 (modules '((guix build utils)))
2102 (snippet
2103 '(begin
2104 ;; Remove pre-compiled .pyc files from source.
2105 (for-each delete-file-recursively
2106 (find-files "." "__pycache__" #:directories? #t))
2107 (for-each delete-file (find-files "." "\\.pyc$"))
2108 #t))))
2109 (build-system python-build-system)
2110 (arguments
2111 '(#:tests? #f)) ;FIXME: Some tests are failing.
2112 ;; #:phases
2113 ;; (modify-phases %standard-phases
2114 ;; (delete 'check)
2115 ;; (add-after 'install 'check
2116 ;; (lambda* (#:key inputs outputs #:allow-other-keys)
2117 ;; (add-installed-pythonpath inputs outputs)
2118 ;; (zero? (system* "py.test" "-v")))))
2119 (native-inputs
2120 `(("unzip" ,unzip)
2121 ("python-setuptools-scm" ,python-setuptools-scm)))
2122 (propagated-inputs
2123 `(("python-execnet" ,python-execnet)
2124 ("python-pytest" ,python-pytest)
2125 ("python-py" ,python-py)))
2126 (home-page
2127 "https://github.com/pytest-dev/pytest-xdist")
2128 (synopsis
2129 "Plugin for py.test with distributed testing and loop-on-failing modes")
2130 (description
2131 "The pytest-xdist plugin extends py.test with some unique test execution
2132 modes: parallelization, running tests in boxed subprocesses, the ability
2133 to run tests repeatedly when failed, and the ability to run tests on multiple
2134 Python interpreters or platforms. It uses rsync to copy the existing
2135 program code to a remote location, executes there, and then syncs the
2136 result back.")
2137 (license license:expat)))
2138
2139 (define-public python2-pytest-xdist
2140 (package-with-python2 python-pytest-xdist))
2141
2142 (define-public python-scripttest
2143 (package
2144 (name "python-scripttest")
2145 (version "1.3")
2146 (source
2147 (origin
2148 (method url-fetch)
2149 (uri (string-append
2150 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
2151 version ".tar.gz"))
2152 (sha256
2153 (base32
2154 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
2155 (build-system python-build-system)
2156 (native-inputs
2157 `(("python-pytest" ,python-pytest)))
2158 (home-page "http://pythonpaste.org/scripttest/")
2159 (synopsis "Python library to test command-line scripts")
2160 (description "Scripttest is a Python helper library for testing
2161 interactive command-line applications. With it you can run a script in a
2162 subprocess and see the output as well as any file modifications.")
2163 (license license:expat)))
2164
2165 (define-public python2-scripttest
2166 (package-with-python2 python-scripttest))
2167
2168 (define-public python-testtools
2169 (package
2170 (name "python-testtools")
2171 (version "1.4.0")
2172 (source
2173 (origin
2174 (method url-fetch)
2175 (uri (pypi-uri "testtools" version))
2176 (sha256
2177 (base32
2178 "1vw8yljnd75d396hhw6s2hrf4cclzy845ifd5am0lxsl235z3i8c"))))
2179 (build-system python-build-system)
2180 (arguments
2181 `(#:phases
2182 (modify-phases %standard-phases
2183 (add-after 'unpack 'fix-module-imports
2184 (lambda _
2185 (substitute* "setup.py"
2186 (("'unittest2>=0.8.0',") ""))
2187 (substitute* '("testtools/testcase.py"
2188 "testtools/testsuite.py"
2189 "testtools/run.py"
2190 "testtools/tests/test_run.py"
2191 "testtools/tests/test_testsuite.py"
2192 "testtools/tests/test_deferredruntest.py")
2193 ;; unittest2 is a backport of Python2.7 features to Python 2.4.
2194 (("import unittest2 as unittest") "import unittest")
2195 (("import unittest2") "import unittest as unittest2")
2196 (("from unittest2 import") "from unittest import"))
2197 (substitute* "testtools/tests/test_testresult.py"
2198 ;; NUL in source code is not allowed (raises ValueError).
2199 (("\\x00\\x04") "\\x04"))
2200 #t)))))
2201 (propagated-inputs
2202 `(("python-mimeparse" ,python-mimeparse)
2203 ("python-extras" ,python-extras)))
2204 (home-page "https://github.com/testing-cabal/testtools")
2205 (synopsis
2206 "Extensions to the Python standard library unit testing framework")
2207 (description
2208 "Testtools extends the Python standard library unit testing framework to
2209 provide matchers, more debugging information, and cross-Python
2210 compatibility.")
2211 (license license:psfl)))
2212
2213 (define-public python2-testtools
2214 (package-with-python2 python-testtools))
2215
2216 (define-public python-testscenarios
2217 (package
2218 (name "python-testscenarios")
2219 (version "0.4")
2220 (source
2221 (origin
2222 (method url-fetch)
2223 (uri (string-append
2224 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
2225 version ".tar.gz"))
2226 (sha256
2227 (base32
2228 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
2229 (build-system python-build-system)
2230 (propagated-inputs
2231 `(("python-testtools" ,python-testtools)))
2232 (home-page "https://launchpad.net/testscenarios")
2233 (synopsis "Pyunit extension for dependency injection")
2234 (description
2235 "Testscenarios provides clean dependency injection for Python unittest
2236 style tests.")
2237 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2238
2239 (define-public python2-testscenarios
2240 (package-with-python2 python-testscenarios))
2241
2242 (define-public python-testresources
2243 (package
2244 (name "python-testresources")
2245 (version "0.2.7")
2246 (source
2247 (origin
2248 (method url-fetch)
2249 (uri (string-append
2250 "https://pypi.python.org/packages/source/t/testresources/testresources-"
2251 version ".tar.gz"))
2252 (sha256
2253 (base32
2254 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
2255 (build-system python-build-system)
2256 (home-page "https://launchpad.net/testresources")
2257 (synopsis
2258 "Pyunit extension for managing test resources")
2259 (description
2260 "Testresources is an extension to Python's unittest to allow declarative
2261 use of resources by test cases.")
2262 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2263
2264 (define-public python2-testresources
2265 (package-with-python2 python-testresources))
2266
2267 (define-public python-subunit
2268 (package
2269 (name "python-subunit")
2270 (version "0.0.21")
2271 (source
2272 (origin
2273 (method url-fetch)
2274 (uri (string-append
2275 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
2276 version ".tar.gz"))
2277 (sha256
2278 (base32
2279 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
2280 (build-system python-build-system)
2281 (propagated-inputs
2282 `(("python-extras" ,python-extras)
2283 ("python-mimeparse" ,python-mimeparse)))
2284 (native-inputs
2285 `(("python-testscenarios" ,python-testscenarios)))
2286 (home-page "http://launchpad.net/subunit")
2287 (synopsis "Python implementation of the subunit protocol")
2288 (description
2289 "Python-subunit is a Python implementation of the subunit test streaming
2290 protocol.")
2291 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2292
2293 (define-public python2-subunit
2294 (package-with-python2 python-subunit))
2295
2296 ;; Recent versions of python-fixtures and python-testrepository need
2297 ;; python-pbr for packaging, which itself needs these two packages for
2298 ;; testing.
2299 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2300 ;; same source, just without any test dependencies and with tests disabled.
2301 ;; python-pbr-minmal is then used to package python-fixtures and
2302 ;; python-testrepository.
2303 ;; Strictly speaking we currently could remove the test-requirements from the
2304 ;; normal python-pbr package (and save this package) since test are disabled
2305 ;; there anyway. But this may change in future.
2306 (define python-pbr-minimal
2307 (package
2308 (name "python-pbr-minimal")
2309 (version "3.0.1")
2310 (source
2311 (origin
2312 (method url-fetch)
2313 (uri (pypi-uri "pbr" version))
2314 (sha256
2315 (base32
2316 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
2317 (build-system python-build-system)
2318 (arguments
2319 `(#:tests? #f))
2320 (home-page "http://docs.openstack.org/developer/pbr/")
2321 (synopsis "Minimal build of python-pbr used for bootstrapping")
2322 (description
2323 "Used only for bootstrapping python2-pbr, you should not need this.")
2324 (license license:asl2.0)))
2325
2326 (define python2-pbr-minimal
2327 (package-with-python2 python-pbr-minimal))
2328
2329 (define-public python-pbr
2330 (package
2331 (inherit python-pbr-minimal)
2332 (name "python-pbr")
2333 (arguments
2334 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2335 (propagated-inputs
2336 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2337 (native-inputs
2338 `(("python-fixtures" ,python-fixtures)
2339 ;; discover, coverage, hacking, subunit
2340 ("python-mock" ,python-mock)
2341 ("python-six" ,python-six)
2342 ("python-sphinx" ,python-sphinx)
2343 ("python-testrepository" ,python-testrepository)
2344 ("python-testresources" ,python-testresources)
2345 ("python-testscenarios" ,python-testscenarios)
2346 ("python-testtools" ,python-testtools)
2347 ("python-virtualenv" ,python-virtualenv)))
2348 (synopsis "Enhance the default behavior of Python’s setuptools")
2349 (description
2350 "Python Build Reasonableness (PBR) is a library that injects some useful
2351 and sensible default behaviors into your setuptools run. It will set
2352 versions, process requirements files and generate AUTHORS and ChangeLog file
2353 from git information.
2354 ")))
2355
2356 (define-public python2-pbr
2357 (package-with-python2 python-pbr))
2358
2359 (define-public python-fixtures
2360 (package
2361 (name "python-fixtures")
2362 (version "1.4.0")
2363 (source
2364 (origin
2365 (method url-fetch)
2366 (uri (pypi-uri "fixtures" version))
2367 (sha256
2368 (base32
2369 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
2370 (build-system python-build-system)
2371 (arguments
2372 '(#:phases
2373 (modify-phases %standard-phases
2374 (replace 'check
2375 (lambda _
2376 (zero? (system* "python" "-m" "testtools.run"
2377 "fixtures.test_suite")))))))
2378 (propagated-inputs
2379 `(("python-six" ,python-six)))
2380 (native-inputs
2381 `(("python-mock" ,python-mock)
2382 ("python-pbr-minimal" ,python-pbr-minimal)
2383 ("python-testtools" ,python-testtools)))
2384 (home-page "https://launchpad.net/python-fixtures")
2385 (synopsis "Python test fixture library")
2386 (description
2387 "Fixtures provides a way to create reusable state, useful when writing
2388 Python tests.")
2389 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2390
2391 (define-public python2-fixtures
2392 (package-with-python2 python-fixtures))
2393
2394 (define-public python-testrepository
2395 (package
2396 (name "python-testrepository")
2397 (version "0.0.20")
2398 (source
2399 (origin
2400 (method url-fetch)
2401 (uri (string-append
2402 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2403 version ".tar.gz"))
2404 (sha256
2405 (base32
2406 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2407 (build-system python-build-system)
2408 (arguments
2409 ;; FIXME: Many tests are failing.
2410 '(#:tests? #f))
2411 (propagated-inputs
2412 `(("python-fixtures" ,python-fixtures)
2413 ("python-subunit" ,python-subunit)
2414 ("python-testtools" ,python-testtools)))
2415 (native-inputs
2416 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
2417 ("python-mimeparse" ,python-mimeparse)))
2418 (home-page "https://launchpad.net/testrepository")
2419 (synopsis "Database for Python test results")
2420 (description "Testrepository provides a database of test results which can
2421 be used as part of a developer's workflow to check things such as what tests
2422 have failed since the last commit or what tests are currently failing.")
2423 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2424
2425 (define-public python2-testrepository
2426 (package-with-python2 python-testrepository))
2427
2428 (define-public python-coverage
2429 (package
2430 (name "python-coverage")
2431 (version "4.1")
2432 (source
2433 (origin
2434 (method url-fetch)
2435 (uri (pypi-uri "coverage" version))
2436 (sha256
2437 (base32
2438 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
2439 (build-system python-build-system)
2440 (arguments
2441 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
2442 '(#:tests? #f))
2443 (home-page "http://nedbatchelder.com/code/coverage")
2444 (synopsis "Code coverage measurement for Python")
2445 (description
2446 "Coverage measures code coverage, typically during test execution. It
2447 uses the code analysis tools and tracing hooks provided in the Python standard
2448 library to determine which lines are executable, and which have been
2449 executed.")
2450 (license license:bsd-3)))
2451
2452 (define-public python2-coverage
2453 (package-with-python2 python-coverage))
2454
2455 (define-public python-cov-core
2456 (package
2457 (name "python-cov-core")
2458 (version "1.15.0")
2459 (source
2460 (origin
2461 (method url-fetch)
2462 (uri (pypi-uri "cov-core" version))
2463 (sha256
2464 (base32
2465 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2466 (build-system python-build-system)
2467 (propagated-inputs
2468 `(("python-coverage" ,python-coverage)))
2469 (home-page "https://github.com/schlamar/cov-core")
2470 (synopsis "Coverage plugin core for pytest-cov, nose-cov and nose2-cov")
2471 (description
2472 "This is a library package for use by @code{pytest-cov}, @code{nose-cov}
2473 and @code{nose2-cov}. It is useful for developing coverage plugins for these
2474 testing frameworks.")
2475 (license license:expat)))
2476
2477 (define-public python2-cov-core
2478 (package-with-python2 python-cov-core))
2479
2480 (define-public python-discover
2481 (package
2482 (name "python-discover")
2483 (version "0.4.0")
2484 (source
2485 (origin
2486 (method url-fetch)
2487 (uri (string-append
2488 "https://pypi.python.org/packages/source/d/discover/discover-"
2489 version ".tar.gz"))
2490 (sha256
2491 (base32
2492 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2493 (build-system python-build-system)
2494 (home-page "http://pypi.python.org/pypi/discover/")
2495 (synopsis
2496 "Python test discovery for unittest")
2497 (description
2498 "Discover provides test discovery for unittest, a feature that has been
2499 backported from Python 2.7 for Python 2.4+.")
2500 (license license:bsd-3)))
2501
2502 (define-public python2-discover
2503 (package-with-python2 python-discover))
2504
2505 (define-public behave
2506 (package
2507 (name "behave")
2508 (version "1.2.5")
2509 (source (origin
2510 (method url-fetch)
2511 (uri (pypi-uri "behave" version ".tar.bz2"))
2512 (sha256
2513 (base32
2514 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
2515 (build-system python-build-system)
2516 (propagated-inputs
2517 `(("python-six" ,python-six)
2518 ("python-parse" ,python-parse)
2519 ("python-parse-type" ,python-parse-type)))
2520 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2521 ;PyHamcrest>=1.8
2522 (home-page "https://github.com/behave/behave")
2523 (synopsis "Python behavior-driven development")
2524 (description
2525 "Behave is a tool for behavior-driven development in python.
2526 Behavior-driven development (or BDD) is an agile software development
2527 technique that encourages collaboration between developers, QA and
2528 non-technical or business participants in a software project. Behave uses
2529 tests written in a natural language style, backed up by Python code.")
2530 (license license:x11)))
2531
2532 (define-public python-exif-read
2533 (package
2534 (name "python-exif-read")
2535 (version "2.1.2")
2536 (source (origin
2537 (method url-fetch)
2538 (uri (pypi-uri "ExifRead" version))
2539 (sha256
2540 (base32
2541 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2542 (build-system python-build-system)
2543 (arguments `(#:tests? #f)) ; no tests
2544 (home-page "https://github.com/ianare/exif-py")
2545 (synopsis "Python library to extract EXIF data from image files")
2546 (description
2547 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2548 files.")
2549 (license license:bsd-3)))
2550
2551 (define-public python2-exif-read
2552 (package-with-python2 python-exif-read))
2553
2554 (define-public python-pyld
2555 (package
2556 (name "python-pyld")
2557 (version "0.7.1")
2558 (source (origin
2559 (method url-fetch)
2560 (uri (pypi-uri "PyLD" version))
2561 (sha256
2562 (base32
2563 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
2564 (build-system python-build-system)
2565 (arguments `(#:tests? #f)) ; no tests
2566 (home-page "https://github.com/digitalbazaar/pyld")
2567 (synopsis "Python implementation of the JSON-LD specification")
2568 (description
2569 "PyLD is an implementation of the JSON-LD specification.")
2570 (license license:bsd-3)))
2571
2572 (define-public python2-pyld
2573 (package-with-python2 python-pyld))
2574
2575 (define-public python-certifi
2576 (package
2577 (name "python-certifi")
2578 (version "2017.1.23")
2579 (source (origin
2580 (method url-fetch)
2581 (uri (pypi-uri "certifi" version))
2582 (sha256
2583 (base32
2584 "1klrzl3hgvcf2mjk00g0k3kk1p2z27vzwnxivwar4vhjmjvpz1w1"))))
2585 (build-system python-build-system)
2586 (home-page "https://certifi.io/")
2587 (synopsis "Python CA certificate bundle")
2588 (description
2589 "Certifi is a Python library that contains a CA certificate bundle, which
2590 is used by the Requests library to verify HTTPS requests.")
2591 (license license:asl2.0)))
2592
2593 (define-public python2-certifi
2594 (package-with-python2 python-certifi))
2595
2596 (define-public python-click
2597 (package
2598 (name "python-click")
2599 (version "6.7")
2600 (source
2601 (origin
2602 (method url-fetch)
2603 (uri (pypi-uri "click" version))
2604 (sha256
2605 (base32
2606 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
2607 (build-system python-build-system)
2608 (arguments
2609 `(#:phases
2610 (modify-phases %standard-phases
2611 (add-after 'unpack 'fix-paths
2612 (lambda* (#:key inputs #:allow-other-keys)
2613 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2614 "cross-libc" "libc"))))
2615 (substitute* "click/_unicodefun.py"
2616 (("'locale'")
2617 (string-append "'" glibc "/bin/locale'"))))
2618 #t))
2619 (replace 'check
2620 (lambda _
2621 (zero? (system* "make" "test")))))))
2622 (native-inputs
2623 `(("python-pytest" ,python-pytest)))
2624 (home-page "http://click.pocoo.org")
2625 (synopsis "Command line library for Python")
2626 (description
2627 "Click is a Python package for creating command line interfaces in a
2628 composable way with as little code as necessary. Its name stands for
2629 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2630 with sensible defaults out of the box.")
2631 (license license:bsd-3)))
2632
2633 (define-public python2-click
2634 (package-with-python2 python-click))
2635
2636 (define-public python-wheel
2637 (package
2638 (name "python-wheel")
2639 (version "0.30.0a0")
2640 (source
2641 (origin
2642 (method url-fetch)
2643 (uri (pypi-uri "wheel" version))
2644 (sha256
2645 (base32
2646 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
2647 (build-system python-build-system)
2648 (native-inputs
2649 `(("python-jsonschema" ,python-jsonschema)
2650 ("python-pytest-cov" ,python-pytest-cov)))
2651 (home-page "https://bitbucket.org/pypa/wheel/")
2652 (synopsis "Format for built Python packages")
2653 (description
2654 "A wheel is a ZIP-format archive with a specially formatted filename and
2655 the @code{.whl} extension. It is designed to contain all the files for a PEP
2656 376 compatible install in a way that is very close to the on-disk format. Many
2657 packages will be properly installed with only the @code{Unpack} step and the
2658 unpacked archive preserves enough information to @code{Spread} (copy data and
2659 scripts to their final locations) at any later time. Wheel files can be
2660 installed with a newer @code{pip} or with wheel's own command line utility.")
2661 (license license:expat)
2662 (properties `((python2-variant . ,(delay python2-wheel))))))
2663
2664 (define-public python2-wheel
2665 (let ((wheel (package-with-python2
2666 (strip-python2-variant python-wheel))))
2667 (package (inherit wheel)
2668 (native-inputs `(("python2-functools32" ,python2-functools32)
2669 ,@(package-native-inputs wheel))))))
2670
2671
2672 (define-public python-requests
2673 (package
2674 (name "python-requests")
2675 (version "2.13.0")
2676 (source (origin
2677 (method url-fetch)
2678 (uri (pypi-uri "requests" version))
2679 (sha256
2680 (base32
2681 "1s0wg4any4dsv5l3hqjxqk2zgb7pdbqhy9rhc8kh3aigfq4ws8jp"))))
2682 ;; TODO: unbundle urllib3 and chardet.
2683 (build-system python-build-system)
2684 (arguments
2685 ;; FIXME: Some tests require network access.
2686 '(#:tests? #f))
2687 (home-page "http://python-requests.org/")
2688 (synopsis "Python HTTP library")
2689 (description
2690 "Requests is a Python HTTP client library. It aims to be easier to use
2691 than Python’s urllib2 library.")
2692 (license license:asl2.0)))
2693
2694 ;; Some software requires an older version of Requests, notably Docker
2695 ;; Compose.
2696 (define-public python-requests-2.7
2697 (package (inherit python-requests)
2698 (version "2.7.0")
2699 (source (origin
2700 (method url-fetch)
2701 (uri (pypi-uri "requests" version))
2702 (sha256
2703 (base32
2704 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2705
2706 (define-public python2-requests
2707 (package-with-python2 python-requests))
2708
2709 (define-public python-vcversioner
2710 (package
2711 (name "python-vcversioner")
2712 (version "2.16.0.0")
2713 (source
2714 (origin
2715 (method url-fetch)
2716 (uri (pypi-uri "vcversioner" version))
2717 (sha256
2718 (base32
2719 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2720 (build-system python-build-system)
2721 (synopsis "Python library for version number discovery")
2722 (description "Vcversioner is a Python library that inspects tagging
2723 information in a variety of version control systems in order to discover
2724 version numbers.")
2725 (home-page "https://github.com/habnabit/vcversioner")
2726 (license license:isc)))
2727
2728 (define-public python2-vcversioner
2729 (package-with-python2 python-vcversioner))
2730
2731 (define-public python-jsonschema
2732 (package
2733 (name "python-jsonschema")
2734 (version "2.5.1")
2735 (source (origin
2736 (method url-fetch)
2737 (uri
2738 (string-append
2739 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2740 version ".tar.gz"))
2741 (sha256
2742 (base32
2743 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
2744 (build-system python-build-system)
2745 (arguments
2746 '(#:phases
2747 (modify-phases %standard-phases
2748 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
2749 (native-inputs
2750 `(("python-nose" ,python-nose)
2751 ("python-vcversioner" ,python-vcversioner)))
2752 (home-page "https://github.com/Julian/jsonschema")
2753 (synopsis "Implementation of JSON Schema for Python")
2754 (description
2755 "Jsonschema is an implementation of JSON Schema for Python.")
2756 (license license:expat)
2757 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2758
2759 (define-public python2-jsonschema
2760 (let ((jsonschema (package-with-python2
2761 (strip-python2-variant python-jsonschema))))
2762 (package (inherit jsonschema)
2763 (native-inputs
2764 `(("python2-mock" ,python2-mock)
2765 ,@(package-native-inputs jsonschema)))
2766 (propagated-inputs
2767 `(("python2-functools32" ,python2-functools32))))))
2768
2769 (define-public python-schema
2770 (package
2771 (name "python-schema")
2772 (version "0.6.6")
2773 (source
2774 (origin
2775 (method url-fetch)
2776 (uri (pypi-uri "schema" version))
2777 (sha256
2778 (base32
2779 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2780 (build-system python-build-system)
2781 (native-inputs
2782 `(("python-pytest" ,python-pytest)))
2783 (home-page "https://github.com/keleshev/schema")
2784 (synopsis "Simple data validation library")
2785 (description
2786 "@code{python-schema} is a library for validating Python data
2787 structures, such as those obtained from config-files, forms, external
2788 services or command-line parsing, converted from JSON/YAML (or
2789 something else) to Python data-types.")
2790 (license license:psfl)))
2791
2792 (define-public python2-schema
2793 (package-with-python2 python-schema))
2794
2795 (define-public python-schema-0.5
2796 (package (inherit python-schema)
2797 (version "0.5.0")
2798 (source
2799 (origin
2800 (method url-fetch)
2801 (uri (pypi-uri "schema" version))
2802 (sha256
2803 (base32
2804 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2805
2806 (define-public python2-schema-0.5
2807 (package-with-python2 python-schema-0.5))
2808
2809 (define-public python-kitchen
2810 (package
2811 (name "python-kitchen")
2812 (version "1.2.4")
2813 (source
2814 (origin
2815 (method url-fetch)
2816 (uri (pypi-uri "kitchen" version))
2817 (sha256
2818 (base32
2819 "0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq"))))
2820 (build-system python-build-system)
2821 (propagated-inputs
2822 `(("python-chardet" ,python-chardet)))
2823 (home-page "https://github.com/fedora-infra/kitchen")
2824 (synopsis "Python API for snippets")
2825 (description "@code{kitchen} module provides a python API for all sorts of
2826 little useful snippets of code that everybody ends up writing for their projects
2827 but never seem big enough to build an independent release. Use kitchen and stop
2828 cutting and pasting that code over and over.")
2829 (license (list license:lgpl2.1+
2830 ;; subprocess.py, test_subprocess.py,
2831 ;; kitchen/pycompat25/defaultdict.py:
2832 license:psfl))))
2833
2834 (define-public python2-kitchen
2835 (package-with-python2 python-kitchen))
2836
2837 (define-public python-unidecode
2838 (package
2839 (name "python-unidecode")
2840 (version "0.04.20")
2841 (source (origin
2842 (method url-fetch)
2843 (uri (pypi-uri "Unidecode" version))
2844 (sha256
2845 (base32
2846 "1q00i8gpsq3d9r0q8wk4b290fxl0kqlsdk7iadvli45in6s1hi7d"))))
2847 (build-system python-build-system)
2848 (home-page "https://pypi.python.org/pypi/Unidecode")
2849 (synopsis "ASCII transliterations of Unicode text")
2850 (description
2851 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2852 useful when integrating with legacy code that doesn't support Unicode, or for
2853 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2854 machine identifiers from human-readable Unicode strings that should still be
2855 somewhat intelligeble.")
2856 (license license:gpl2+)))
2857
2858 (define-public python2-unidecode
2859 (package-with-python2 python-unidecode))
2860
2861 (define-public python-pyjwt
2862 (package
2863 (name "python-pyjwt")
2864 (version "1.5.3")
2865 (source
2866 (origin
2867 (method url-fetch)
2868 (uri (pypi-uri "PyJWT" version))
2869 (sha256
2870 (base32
2871 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2872 (modules '((guix build utils)))
2873 (snippet
2874 '(begin
2875 (for-each delete-file-recursively
2876 (find-files "." "\\.pyc$"))
2877 #t))))
2878 (build-system python-build-system)
2879 (native-inputs
2880 `(("python-pytest" ,python-pytest-3.0)
2881 ("python-pytest-cov" ,python-pytest-cov)
2882 ("python-pytest-runner" ,python-pytest-runner)))
2883 (home-page "https://github.com/progrium/pyjwt")
2884 (synopsis "JSON Web Token implementation in Python")
2885 (description
2886 "PyJWT is a JSON Web Token implementation written in Python.")
2887 (license license:expat)))
2888
2889 (define-public python2-pyjwt
2890 (package-with-python2 python-pyjwt))
2891
2892 (define-public python-pykka
2893 (package
2894 (name "python-pykka")
2895 (version "1.2.1")
2896 (source
2897 (origin
2898 (method url-fetch)
2899 (uri (pypi-uri "Pykka" version))
2900 (sha256
2901 (base32
2902 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2903 (build-system python-build-system)
2904 (native-inputs
2905 `(("python-mock" ,python-mock)
2906 ("python-nose" ,python-nose)
2907 ("python-gevent" ,python-gevent)
2908 ("python-eventlet" ,python-eventlet)))
2909 (home-page "https://www.pykka.org/")
2910 (synopsis "Pykka is a Python implementation of the actor model")
2911 (description
2912 "Pykka is a Python implementation of the actor model.
2913 The actor model introduces some simple rules to control the sharing
2914 of state and cooperation between execution units, which makes it
2915 easier to build concurrent applications.")
2916 (license license:asl2.0)))
2917
2918 (define-public python2-pykka
2919 (package-with-python2 python-pykka))
2920
2921 (define-public python-oauthlib
2922 (package
2923 (name "python-oauthlib")
2924 (version "1.0.3")
2925 (source (origin
2926 (method url-fetch)
2927 (uri (pypi-uri "oauthlib" version))
2928 (sha256
2929 (base32
2930 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
2931 (build-system python-build-system)
2932 (native-inputs
2933 `(("python-nose" ,python-nose)
2934 ("python-mock" ,python-mock)
2935 ("python-cryptography" ,python-cryptography)
2936 ("python-pyjwt" ,python-pyjwt)
2937 ("python-blinker" ,python-blinker)))
2938 (home-page "https://github.com/idan/oauthlib")
2939 (synopsis "OAuth implementation for Python")
2940 (description
2941 "Oauthlib is a generic, spec-compliant, thorough implementation of the
2942 OAuth request-signing logic.")
2943 (license license:bsd-3)
2944 (properties `((python2-variant . ,(delay python2-oauthlib))))))
2945
2946 (define-public python2-oauthlib
2947 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
2948 (package
2949 (inherit base)
2950 (native-inputs `(("python2-unittest2" ,python2-unittest2)
2951 ,@(package-native-inputs base))))))
2952
2953 (define-public python-itsdangerous
2954 (package
2955 (name "python-itsdangerous")
2956 (version "0.24")
2957 (source
2958 (origin
2959 (method url-fetch)
2960 (uri (string-append
2961 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2962 version ".tar.gz"))
2963 (sha256
2964 (base32
2965 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2966 (build-system python-build-system)
2967 (home-page "https://github.com/mitsuhiko/itsdangerous")
2968 (synopsis "Python library for passing data to/from untrusted environments")
2969 (description
2970 "Itsdangerous provides various helpers to pass trusted data to untrusted
2971 environments and back.")
2972 (license license:bsd-3)))
2973
2974 (define-public python2-itsdangerous
2975 (package-with-python2 python-itsdangerous))
2976
2977 (define-public python-pyyaml
2978 (package
2979 (name "python-pyyaml")
2980 (version "3.12")
2981 (source
2982 (origin
2983 (method url-fetch)
2984 (uri (pypi-uri "PyYAML" version))
2985 (sha256
2986 (base32
2987 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
2988 (build-system python-build-system)
2989 (inputs
2990 `(("libyaml" ,libyaml)))
2991 (home-page "http://pyyaml.org/wiki/PyYAML")
2992 (synopsis "YAML parser and emitter for Python")
2993 (description
2994 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2995 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2996 API, and sensible error messages. PyYAML supports standard YAML tags and
2997 provides Python-specific tags that allow to represent an arbitrary Python
2998 object.")
2999 (license license:expat)))
3000
3001 (define-public python2-pyyaml
3002 (package-with-python2 python-pyyaml))
3003
3004 (define-public python-virtualenv
3005 (package
3006 (name "python-virtualenv")
3007 (version "15.0.3")
3008 (source
3009 (origin
3010 (method url-fetch)
3011 (uri (pypi-uri "virtualenv" version))
3012 (sha256
3013 (base32
3014 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
3015 (build-system python-build-system)
3016 (arguments
3017 `(#:phases
3018 (modify-phases %standard-phases
3019 (replace 'check
3020 (lambda _
3021 ;; Disable failing test. See upstream bug report
3022 ;; https://github.com/pypa/virtualenv/issues/957
3023 (substitute* "tests/test_virtualenv.py"
3024 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
3025 (zero? (system* "py.test")))))))
3026 (native-inputs
3027 `(("python-mock" ,python-mock)
3028 ("python-pytest" ,python-pytest)))
3029 (home-page "https://virtualenv.pypa.io/")
3030 (synopsis "Virtual Python environment builder")
3031 (description
3032 "Virtualenv is a tool to create isolated Python environments.")
3033 (license license:expat)))
3034
3035 (define-public python2-virtualenv
3036 (package-with-python2 python-virtualenv))
3037
3038 (define-public python-markupsafe
3039 (package
3040 (name "python-markupsafe")
3041 (version "0.23")
3042 (source
3043 (origin
3044 (method url-fetch)
3045 (uri (string-append
3046 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
3047 version ".tar.gz"))
3048 (sha256
3049 (base32
3050 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
3051 (build-system python-build-system)
3052 (home-page "https://github.com/mitsuhiko/markupsafe")
3053 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3054 (description
3055 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3056 for Python.")
3057 (license license:bsd-3)))
3058
3059 (define-public python2-markupsafe
3060 (package-with-python2 python-markupsafe))
3061
3062 (define-public python-jinja2
3063 (package
3064 (name "python-jinja2")
3065 (version "2.9.6")
3066 (source
3067 (origin
3068 (method url-fetch)
3069 (uri (pypi-uri "Jinja2" version))
3070 (sha256
3071 (base32
3072 "1zzrkywhziqffrzks14kzixz7nd4yh2vc0fb04a68vfd2ai03anx"))))
3073 (build-system python-build-system)
3074 (arguments
3075 `(#:phases
3076 (modify-phases %standard-phases
3077 ;; These files cannot be built with Python < 3.6. See
3078 ;; https://github.com/pallets/jinja/issues/655
3079 ;; FIXME: Remove this when the "python" package is upgraded.
3080 (add-after 'unpack 'delete-incompatible-files
3081 (lambda _
3082 (for-each delete-file
3083 '("jinja2/asyncsupport.py"
3084 "jinja2/asyncfilters.py"))
3085 #t)))))
3086 (propagated-inputs
3087 `(("python-markupsafe" ,python-markupsafe)))
3088 (home-page "http://jinja.pocoo.org/")
3089 (synopsis "Python template engine")
3090 (description
3091 "Jinja2 is a small but fast and easy to use stand-alone template engine
3092 written in pure Python.")
3093 (license license:bsd-3)))
3094
3095 (define-public python2-jinja2
3096 (package-with-python2 python-jinja2))
3097
3098 (define-public python-pystache
3099 (package
3100 (name "python-pystache")
3101 (version "0.5.4")
3102 (source (origin
3103 (method url-fetch)
3104 (uri (pypi-uri "pystache" version))
3105 (sha256
3106 (base32
3107 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3108 (build-system python-build-system)
3109 (arguments
3110 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3111 (home-page "http://defunkt.io/pystache/")
3112 (synopsis "Python logic-less template engine")
3113 (description
3114 "Pystache is a Python implementation of the framework agnostic,
3115 logic-free templating system Mustache.")
3116 (license license:expat)
3117 (properties `((python2-variant . ,(delay python2-pystache))))))
3118
3119 (define-public python2-pystache
3120 (package (inherit (package-with-python2
3121 (strip-python2-variant python-pystache)))
3122 (arguments
3123 `(#:python ,python-2
3124 #:phases
3125 (modify-phases %standard-phases
3126 (replace 'check
3127 (lambda _
3128 (zero? (system* "python" "test_pystache.py")))))))))
3129
3130 (define-public python-joblib
3131 (package
3132 (name "python-joblib")
3133 (version "0.10.3")
3134 (source (origin
3135 (method url-fetch)
3136 (uri (pypi-uri "joblib" version))
3137 (sha256
3138 (base32
3139 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
3140 (modules '((guix build utils)))
3141 (snippet
3142 '(begin
3143 ;; Remove pre-compiled .pyc files from source.
3144 (for-each delete-file-recursively
3145 (find-files "." "__pycache__" #:directories? #t))
3146 (for-each delete-file (find-files "." "\\.pyc$"))
3147 #t))))
3148 (build-system python-build-system)
3149 (arguments
3150 `(#:phases
3151 (modify-phases %standard-phases
3152 (add-before 'check 'disable-failing-tests
3153 (lambda _
3154 ;; This numpydoc tests fails for unknown reasons
3155 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
3156 ;; This numpydoc test depends on matplotlib, which is not a
3157 ;; required input.
3158 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
3159 ;; These tests fail to execute sys.executable
3160 (substitute* "joblib/test/test_parallel.py"
3161 (("import nose" line)
3162 (string-append "from nose.plugins.skip import SkipTest\n" line))
3163 (("def test_nested_parallel_warnings" line)
3164 (string-append "@SkipTest\n" line))
3165 (("def test_parallel_with_interactively_defined_functions" line)
3166 (string-append "@SkipTest\n" line)))
3167 #t)))))
3168 ;; Provide nose to enable tests command
3169 (native-inputs
3170 `(("python-nose" ,python-nose)
3171 ("python-sphinx" ,python-sphinx)
3172 ("python-docutils" ,python-docutils)
3173 ("python-numpydoc" ,python-numpydoc)))
3174 (home-page "http://pythonhosted.org/joblib/")
3175 (synopsis "Using Python functions as pipeline jobs")
3176 (description
3177 "Joblib is a set of tools to provide lightweight pipelining in Python.
3178 In particular, joblib offers: transparent disk-caching of the output values
3179 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3180 logging and tracing of the execution.")
3181 (license license:bsd-3)))
3182
3183 (define-public python2-joblib
3184 (package-with-python2 python-joblib))
3185
3186 (define-public python-docutils
3187 (package
3188 (name "python-docutils")
3189 (version "0.13.1")
3190 (source
3191 (origin
3192 (method url-fetch)
3193 (uri (pypi-uri "docutils" version))
3194 (sha256
3195 (base32
3196 "1gkma47i609jfs7dssxn4y9vsz06qi0l5q41nws0zgkpnrghz33i"))))
3197 (build-system python-build-system)
3198 (arguments
3199 '(#:tests? #f)) ; no setup.py test command
3200 (home-page "http://docutils.sourceforge.net/")
3201 (synopsis "Python Documentation Utilities")
3202 (description
3203 "Docutils is a modular system for processing documentation into useful
3204 formats, such as HTML, XML, and LaTeX. For input Docutils supports
3205 reStructuredText.")
3206 ;; Most of the source code is public domain, but some source files are
3207 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3208 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3209
3210 (define-public python2-docutils
3211 (package-with-python2 python-docutils))
3212
3213 (define-public python-pygments
3214 (package
3215 (name "python-pygments")
3216 (version "2.2.0")
3217 (source
3218 (origin
3219 (method url-fetch)
3220 (uri (pypi-uri "Pygments" version))
3221 (sha256
3222 (base32
3223 "1k78qdvir1yb1c634nkv6rbga8wv4289xarghmsbbvzhvr311bnv"))))
3224 (build-system python-build-system)
3225 (arguments
3226 ;; FIXME: Tests require sphinx, which depends on this.
3227 '(#:tests? #f))
3228 (home-page "http://pygments.org/")
3229 (synopsis "Syntax highlighting")
3230 (description
3231 "Pygments is a syntax highlighting package written in Python.")
3232 (license license:bsd-2)))
3233
3234 (define-public python2-pygments
3235 (package-with-python2 python-pygments))
3236
3237 (define-public python-sphinxcontrib-websupport
3238 (package
3239 (name "python-sphinxcontrib-websupport")
3240 (version "1.0.1")
3241 (source (origin
3242 (method url-fetch)
3243 (uri (pypi-uri "sphinxcontrib-websupport" version))
3244 (sha256
3245 (base32
3246 "1f9f0wjpi9nhikbyaz6d19s7qvzdf1nq2g5dsh640fma4q9rd1bs"))))
3247 (build-system python-build-system)
3248 (propagated-inputs
3249 `(("python-mock" ,python-mock)
3250 ("python-pytest" ,python-pytest)
3251 ("python-xapian-bindings" ,python-xapian-bindings)))
3252 ;; Needed for running the test suite
3253 (native-inputs
3254 `(("python-six" ,python-six)
3255 ("python-jinja2" ,python-jinja2)
3256 ("python-docutils" ,python-docutils)
3257 ("python-sphinx" ,python-sphinx)
3258 ("python-sqlalchemy" ,python-sqlalchemy)
3259 ("python-whoosh" ,python-whoosh)))
3260 (home-page "http://sphinx-doc.org/")
3261 (synopsis "Sphinx API for web applications")
3262 (description "This package provides a Python API to easily integrate
3263 Sphinx documentation into your web application. It provides tools to
3264 integrate Sphinx documents in web templates and to handle searches.")
3265 (license license:bsd-3)))
3266
3267 (define-public python-sphinx
3268 (package
3269 (name "python-sphinx")
3270 (version "1.5.1")
3271 (source
3272 (origin
3273 (method url-fetch)
3274 (uri (pypi-uri "Sphinx" version))
3275 (sha256
3276 (base32
3277 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
3278 (build-system python-build-system)
3279 (arguments
3280 `(#:phases
3281 (modify-phases %standard-phases
3282 (replace 'check
3283 (lambda _
3284 ;; Requires Internet access.
3285 (delete-file "tests/test_build_linkcheck.py")
3286 (zero? (system* "make" "test")))))))
3287 (propagated-inputs
3288 `(("python-imagesize" ,python-imagesize)
3289 ("python-sphinx-alabaster-theme"
3290 ,python-sphinx-alabaster-theme)
3291 ("python-babel" ,python-babel)
3292 ("python-snowballstemmer" ,python-snowballstemmer)
3293 ("python-docutils" ,python-docutils)
3294 ("python-jinja2" ,python-jinja2)
3295 ("python-pygments" ,python-pygments)
3296 ("python-requests" ,python-requests)
3297 ("python-six" ,python-six)))
3298 (native-inputs
3299 `(("graphviz" ,graphviz)
3300 ("python-html5lib" ,python-html5lib)
3301 ("python-mock" ,python-mock)
3302 ("python-nose" ,python-nose)))
3303 (home-page "http://sphinx-doc.org/")
3304 (synopsis "Python documentation generator")
3305 (description "Sphinx is a tool that makes it easy to create documentation
3306 for Python projects or other documents consisting of multiple reStructuredText
3307 sources.")
3308 (license license:bsd-3)
3309 (properties `((python2-variant . ,(delay python2-sphinx))))))
3310
3311 (define-public python-sphinx-1.6
3312 (package (inherit python-sphinx)
3313 (name "python-sphinx")
3314 (version "1.6.3")
3315 (source (origin
3316 (method url-fetch)
3317 (uri (pypi-uri "Sphinx" version))
3318 (sha256
3319 (base32
3320 "1rj6f3i8hmrx2qlkshi5kp5xcy98dlynwlyl05yvflj5f66dp2xg"))))
3321 (arguments
3322 `(#:phases
3323 (modify-phases %standard-phases
3324 (replace 'check
3325 (lambda _
3326 ;; Requires Internet access.
3327 (delete-file "tests/test_build_linkcheck.py")
3328 (substitute* "tests/test_build_latex.py"
3329 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
3330 "@pytest.mark.skip()"))
3331 (zero? (system* "make" "test")))))))
3332 (propagated-inputs
3333 `(("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)
3334 ,@(package-propagated-inputs python-sphinx)))
3335 (native-inputs
3336 `(("python-pytest" ,python-pytest-3.0)
3337 ("imagemagick" ,imagemagick) ; for "convert"
3338 ,@(package-native-inputs python-sphinx)))
3339 (properties '())))
3340
3341 (define-public python-sphinx-1.5.3
3342 (package
3343 (inherit python-sphinx)
3344 (name "python-sphinx")
3345 (version "1.5.3")
3346 (source
3347 (origin
3348 (method url-fetch)
3349 (uri (pypi-uri "Sphinx" version))
3350 (sha256
3351 (base32
3352 "0kw1axswbvaavr8ggyf4qr6hnisnrzlbkkcdada69vk1x9xjassg"))))
3353 (native-inputs
3354 `(("python-pytest" ,python-pytest-3.0)
3355 ,@(package-native-inputs python-sphinx)))))
3356
3357 (define-public python2-sphinx
3358 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
3359 (package
3360 (inherit base)
3361 (native-inputs `(("python2-mock" ,python2-mock)
3362 ("python2-enum34" ,python2-enum34)
3363 ,@(package-native-inputs base)))
3364 (propagated-inputs `(("python2-pytz" ,python2-pytz)
3365 ,@(package-propagated-inputs base))))))
3366
3367 (define-public python-sphinx-rtd-theme
3368 (package
3369 (name "python-sphinx-rtd-theme")
3370 (version "0.2.4")
3371 (source
3372 (origin
3373 (method url-fetch)
3374 (uri (pypi-uri "sphinx_rtd_theme" version))
3375 (sha256
3376 (base32
3377 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
3378 (build-system python-build-system)
3379 (arguments '(#:tests? #f)) ; No tests.
3380 (propagated-inputs
3381 `(("python-sphinx" ,python-sphinx)))
3382 (home-page "https://github.com/snide/sphinx_rtd_theme/")
3383 (synopsis "ReadTheDocs.org theme for Sphinx")
3384 (description "A theme for Sphinx used by ReadTheDocs.org.")
3385 (license license:expat)))
3386
3387 (define-public python2-sphinx-rtd-theme
3388 (package-with-python2 python-sphinx-rtd-theme))
3389
3390 (define-public python-rst.linker
3391 (package
3392 (name "python-rst.linker")
3393 (version "1.7")
3394 (source
3395 (origin
3396 (method url-fetch)
3397 (uri (pypi-uri "rst.linker" version))
3398 (sha256
3399 (base32
3400 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
3401 (build-system python-build-system)
3402 (propagated-inputs
3403 `(("python-dateutil" ,python-dateutil)
3404 ("python-six" ,python-six)))
3405 (native-inputs
3406 `(("python-setuptools-scm" ,python-setuptools-scm)))
3407 ;; Test would require path.py, which would introduce a cyclic dependence.
3408 (arguments `(#:tests? #f))
3409 ;; Note: As of version 1.7 the documentation is not worth building.
3410 (home-page "https://github.com/jaraco/rst.linker")
3411 (synopsis "Sphinx plugin to add links and timestamps")
3412 (description "rst.linker allows to automatically replace text by a
3413 reStructuredText external reference or timestamps. It's primary purpose is to
3414 augment the changelog, but it can be used for other documents, too.")
3415 (license license:expat)))
3416
3417 (define-public python2-rst.linker
3418 (package-with-python2 python-rst.linker))
3419
3420 (define-public python-feedgenerator
3421 (package
3422 (name "python-feedgenerator")
3423 (version "1.9")
3424 (source
3425 (origin
3426 (method url-fetch)
3427 (uri (pypi-uri "feedgenerator" version))
3428 (sha256
3429 (base32
3430 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3431 (modules '((guix build utils)))
3432 (snippet
3433 '(begin
3434 ;; Remove pre-compiled .pyc files from source.
3435 (for-each delete-file-recursively
3436 (find-files "." "__pycache__" #:directories? #t))
3437 (for-each delete-file (find-files "." "\\.pyc$"))
3438 #t))))
3439 (build-system python-build-system)
3440 (propagated-inputs
3441 `(("python-pytz" ,python-pytz)
3442 ("python-six" ,python-six)))
3443 (home-page "https://github.com/getpelican/feedgenerator")
3444 (synopsis
3445 "Standalone version of Django's Atom/RSS feed generator")
3446 (description
3447 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3448 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3449 (license license:bsd-3)))
3450
3451 (define-public python2-feedgenerator
3452 (package-with-python2 python-feedgenerator))
3453
3454 (define-public python-blinker
3455 (package
3456 (name "python-blinker")
3457 (version "1.4")
3458 (source
3459 (origin
3460 (method url-fetch)
3461 (uri (pypi-uri "blinker" version))
3462 (sha256
3463 (base32
3464 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3465 (build-system python-build-system)
3466 (home-page "http://pythonhosted.org/blinker/")
3467 (synopsis "Fast, simple object-to-object and broadcast signaling")
3468 (description
3469 "Blinker provides a fast dispatching system that allows any number of
3470 interested parties to subscribe to events, or \"signals\".")
3471 (license license:expat)))
3472
3473 (define-public python2-blinker
3474 (package-with-python2 python-blinker))
3475
3476 (define-public pelican
3477 (package
3478 (name "pelican")
3479 (version "3.6.3")
3480 (source
3481 (origin
3482 (method url-fetch)
3483 (uri (pypi-uri "pelican" version))
3484 (sha256
3485 (base32
3486 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
3487 (build-system python-build-system)
3488 (propagated-inputs
3489 `(("python-feedgenerator" ,python-feedgenerator)
3490 ("python-jinja2" ,python-jinja2)
3491 ("python-pygments" ,python-pygments)
3492 ("python-docutils" ,python-docutils)
3493 ("python-pytz" ,python-pytz)
3494 ("python-blinker" ,python-blinker)
3495 ("python-unidecode" ,python-unidecode)
3496 ("python-six" ,python-six)
3497 ("python-dateutil" ,python-dateutil)))
3498 (home-page "http://getpelican.com/")
3499 (arguments
3500 `(;; XXX Requires a lot more packages to do unit tests :P
3501 #:tests? #f
3502 #:phases (modify-phases %standard-phases
3503 (add-before
3504 'install 'adjust-requires
3505 ;; Since feedgenerator is installed from git, it doesn't
3506 ;; conform to the version requirements.
3507 ;;
3508 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3509 ;; version requirement so setuptools doesn't get confused.
3510 (lambda _
3511 (substitute* "setup.py"
3512 (("['\"]feedgenerator.*?['\"]")
3513 "'feedgenerator'")))))))
3514 (synopsis "Python-based static site publishing system")
3515 (description
3516 "Pelican is a tool to generate a static blog from reStructuredText,
3517 Markdown input files, and more. Pelican uses Jinja2 for templating
3518 and is very extensible.")
3519 (license license:agpl3+)))
3520
3521 (define-public python-scikit-learn
3522 (package
3523 (name "python-scikit-learn")
3524 (version "0.19.0")
3525 (source
3526 (origin
3527 (method url-fetch)
3528 (uri (string-append
3529 "https://github.com/scikit-learn/scikit-learn/archive/"
3530 version ".tar.gz"))
3531 (file-name (string-append name "-" version ".tar.gz"))
3532 (sha256
3533 (base32
3534 "0g7q4ri75mj93wpa9bp83a3jmrf3dm5va9h7k4zkbcxr6bgqka15"))))
3535 (build-system python-build-system)
3536 (arguments
3537 `(#:phases
3538 (modify-phases %standard-phases
3539 (delete 'check)
3540 (add-after 'install 'check
3541 ;; Running tests from the source directory requires
3542 ;; an "inplace" build with paths relative to CWD.
3543 ;; http://scikit-learn.org/stable/developers/advanced_installation.html#testing
3544 ;; Use the installed version instead.
3545 (lambda* (#:key inputs outputs #:allow-other-keys)
3546 (add-installed-pythonpath inputs outputs)
3547 ;; some tests require access to "$HOME"
3548 (setenv "HOME" "/tmp")
3549 ;; Step out of the source directory just to be sure.
3550 (chdir "..")
3551 (zero? (system* "nosetests" "-v" "sklearn")))))))
3552 (inputs
3553 `(("openblas" ,openblas)))
3554 (native-inputs
3555 `(("python-nose" ,python-nose)
3556 ("python-cython" ,python-cython)))
3557 (propagated-inputs
3558 `(("python-numpy" ,python-numpy)
3559 ("python-scipy" ,python-scipy)))
3560 (home-page "http://scikit-learn.org/")
3561 (synopsis "Machine Learning in Python")
3562 (description
3563 "Scikit-learn provides simple and efficient tools for data
3564 mining and data analysis.")
3565 (license license:bsd-3)))
3566
3567 (define-public python2-scikit-learn
3568 (package-with-python2 python-scikit-learn))
3569
3570 (define-public python-scikit-image
3571 (package
3572 (name "python-scikit-image")
3573 (version "0.11.3")
3574 (source
3575 (origin
3576 (method url-fetch)
3577 (uri (string-append
3578 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3579 version ".tar.gz"))
3580 (sha256
3581 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3582 (build-system python-build-system)
3583 (arguments
3584 ;; TODO: Some tests require running X11 server. Disable them?
3585 '(#:tests? #f))
3586 ;; See DEPENDS.txt for the list of build and run time requiremnts
3587 (propagated-inputs
3588 `(("python-matplotlib" ,python-matplotlib)
3589 ("python-networkx" ,python-networkx)
3590 ("python-scipy" ,python-scipy)
3591 ("python-pillow" ,python-pillow)))
3592 (native-inputs
3593 `(("python-numpy" ,python-numpy)
3594 ("python-cython" ,python-cython)
3595 ("python-six" ,python-six)))
3596 (home-page "http://scikit-image.org/")
3597 (synopsis "Image processing in Python")
3598 (description
3599 "Scikit-image is a collection of algorithms for image processing.")
3600 (license license:bsd-3)))
3601
3602 (define-public python2-scikit-image
3603 (package-with-python2 python-scikit-image))
3604
3605 (define-public python-redis
3606 (package
3607 (name "python-redis")
3608 (version "2.10.5")
3609 (source
3610 (origin
3611 (method url-fetch)
3612 (uri (pypi-uri "redis" version))
3613 (sha256
3614 (base32 "0csmrkxb29x7xs9b51zplwkkq2hwnbh9jns1g85dykn5rxmaxysx"))))
3615 (build-system python-build-system)
3616 ;; Tests require a running Redis server
3617 (arguments '(#:tests? #f))
3618 ;; As long as we are not running test, we do not need this input :-)
3619 ;;(native-inputs
3620 ;; `(("python-pytest" ,python-pytest)))
3621 (home-page "https://github.com/andymccurdy/redis-py")
3622 (synopsis "Redis Python client")
3623 (description
3624 "This package provides a Python interface to the Redis key-value store.")
3625 (license license:expat)))
3626
3627 (define-public python2-redis
3628 (package-with-python2 python-redis))
3629
3630 (define-public python-rq
3631 (package
3632 (name "python-rq")
3633 (version "0.7.1")
3634 (source
3635 (origin
3636 (method url-fetch)
3637 (uri (pypi-uri "rq" version))
3638 (sha256
3639 (base32 "0gaq5pnh0zy46r8jvygi0ifbvz3pq6i7xla78ijcgjw0x77qzsdh"))))
3640 (build-system python-build-system)
3641 (propagated-inputs
3642 `(("python-click" ,python-click)
3643 ("python-redis" ,python-redis)))
3644 (home-page "http://python-rq.org/")
3645 (synopsis "Simple job queues for Python")
3646 (description
3647 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3648 processing them in the background with workers. It is backed by Redis and it
3649 is designed to have a low barrier to entry.")
3650 (license license:bsd-2)))
3651
3652 (define-public python2-rq
3653 (package-with-python2 python-rq))
3654
3655 (define-public python-cython
3656 (package
3657 (name "python-cython")
3658 (version "0.26")
3659 (source
3660 (origin
3661 (method url-fetch)
3662 (uri (pypi-uri "Cython" version))
3663 (sha256
3664 (base32
3665 "0riciynnr0r68cvg6r3gbhi9x7h44pdwb7926m6n5vfs5p1f492c"))))
3666 (build-system python-build-system)
3667 ;; we need the full python package and not just the python-wrapper
3668 ;; because we need libpython3.3m.so
3669 (inputs
3670 `(("python" ,python)))
3671 (arguments
3672 `(#:phases
3673 (modify-phases %standard-phases
3674 (add-before 'check 'set-HOME
3675 ;; some tests require access to "$HOME/.cython"
3676 (lambda _ (setenv "HOME" "/tmp") #t))
3677 (replace 'check
3678 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
3679 (home-page "http://cython.org/")
3680 (synopsis "C extensions for Python")
3681 (description "Cython is an optimising static compiler for both the Python
3682 programming language and the extended Cython programming language. It makes
3683 writing C extensions for Python as easy as Python itself.")
3684 (license license:asl2.0)
3685 (properties `((python2-variant . ,(delay python2-cython))))))
3686
3687 (define-public python2-cython
3688 (package (inherit (package-with-python2
3689 (strip-python2-variant python-cython)))
3690 (name "python2-cython")
3691 (inputs
3692 `(("python-2" ,python-2))))) ; this is not automatically changed
3693
3694 ;; The RPython toolchain currently does not support Python 3.
3695 (define-public python2-rpython
3696 (package
3697 (name "python2-rpython")
3698 (version "0.1.4")
3699 (source
3700 (origin
3701 (method url-fetch)
3702 (uri (pypi-uri "rpython" version))
3703 (sha256
3704 (base32
3705 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3706 (build-system python-build-system)
3707 (arguments `(#:python ,python-2))
3708 (native-inputs
3709 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3710 (home-page "https://rpython.readthedocs.org")
3711 (synopsis "Framework for implementing interpreters and virtual machines")
3712 (description "RPython is a translation and support framework for
3713 producing implementations of dynamic languages, emphasizing a clean separation
3714 between language specification and implementation aspects.")
3715 (license license:expat)))
3716
3717 (define-public python-numpy
3718 (package
3719 (name "python-numpy")
3720 (version "1.12.0")
3721 (source
3722 (origin
3723 (method url-fetch)
3724 (uri (string-append
3725 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3726 (file-name (string-append name "-" version ".tar.gz"))
3727 (sha256
3728 (base32
3729 "025d4j4aakcp8w5i5diqh812cbbjgac7jszx1j56ivrbi1i8vv7d"))))
3730 (build-system python-build-system)
3731 (inputs
3732 `(("openblas" ,openblas)
3733 ("lapack" ,lapack)))
3734 (native-inputs
3735 `(("python-cython" ,python-cython)
3736 ("python-nose" ,python-nose)
3737 ("gfortran" ,gfortran)))
3738 (arguments
3739 `(#:phases
3740 (modify-phases %standard-phases
3741 (add-before 'build 'set-environment-variables
3742 (lambda* (#:key inputs #:allow-other-keys)
3743 (call-with-output-file "site.cfg"
3744 (lambda (port)
3745 (format port
3746 "[openblas]
3747 libraries = openblas
3748 library_dirs = ~a/lib
3749 include_dirs = ~a/include
3750
3751 # backslash-n to make emacs happy
3752 \n[lapack]
3753 lapack_libs = lapack
3754 library_dirs = ~a/lib
3755 include_dirs = ~a/include
3756 "
3757 (assoc-ref inputs "openblas")
3758 (assoc-ref inputs "openblas")
3759 (assoc-ref inputs "lapack")
3760 (assoc-ref inputs "lapack"))))
3761 ;; Use "gcc" executable, not "cc".
3762 (substitute* "numpy/distutils/system_info.py"
3763 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3764 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3765 #t))
3766 ;; Tests can only be run after the library has been installed and not
3767 ;; within the source directory.
3768 (delete 'check)
3769 (add-after 'install 'check
3770 (lambda* (#:key outputs inputs #:allow-other-keys)
3771 ;; Make installed package available for running the tests
3772 (add-installed-pythonpath inputs outputs)
3773 (with-directory-excursion "/tmp"
3774 (zero? (system* "python" "-c"
3775 "import numpy; numpy.test(verbose=2)"))))))))
3776 (home-page "http://www.numpy.org/")
3777 (synopsis "Fundamental package for scientific computing with Python")
3778 (description "NumPy is the fundamental package for scientific computing
3779 with Python. It contains among other things: a powerful N-dimensional array
3780 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3781 and Fortran code, useful linear algebra, Fourier transform, and random number
3782 capabilities.")
3783 (license license:bsd-3)))
3784
3785 (define-public python2-numpy
3786 (package-with-python2 python-numpy))
3787
3788 (define-public python-munch
3789 (package
3790 (name "python-munch")
3791 (version "2.0.4")
3792 (source
3793 (origin
3794 (method url-fetch)
3795 (uri (pypi-uri "munch" version))
3796 (sha256
3797 (base32
3798 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3799 (build-system python-build-system)
3800 (home-page "https://github.com/Infinidat/munch")
3801 (synopsis "Dot-accessible dictionary")
3802 (description "Munch is a dot-accessible dictionary similar to JavaScript
3803 objects.")
3804 (license license:expat)))
3805
3806 (define-public python2-munch
3807 (package-with-python2 python-munch))
3808
3809 (define-public python-colormath
3810 (package
3811 (name "python-colormath")
3812 (version "2.1.1")
3813 (source
3814 (origin
3815 (method url-fetch)
3816 (uri (pypi-uri "colormath" version))
3817 (sha256
3818 (base32
3819 "01wp5xwm0a89wdm1dc9rr1ij90idzdiiipxdj1yslhqzkhnjnfh0"))))
3820 (build-system python-build-system)
3821 (propagated-inputs
3822 `(("python-networkx" ,python-networkx)
3823 ("python-numpy" ,python-numpy)))
3824 (home-page "https://github.com/gtaylor/python-colormath")
3825 (synopsis "Color math and conversion library")
3826 (description
3827 "This is a Python library for color math and conversions.")
3828 (license license:bsd-3)))
3829
3830 (define-public python2-colormath
3831 (package-with-python2 python-colormath))
3832
3833 (define-public python-spectra
3834 (package
3835 (name "python-spectra")
3836 (version "0.0.8")
3837 (source
3838 (origin
3839 (method url-fetch)
3840 (uri (pypi-uri "spectra" version))
3841 (sha256
3842 (base32
3843 "0n87kzhpkml2s2q91rdkl8wz2kkv5b0bkrgww45lxa5vq34qh6w5"))))
3844 (build-system python-build-system)
3845 (arguments
3846 `(#:phases
3847 (modify-phases %standard-phases
3848 (replace 'check
3849 (lambda _
3850 (zero? (system* "nosetests" "-v")))))))
3851 (propagated-inputs
3852 `(("python-colormath" ,python-colormath)))
3853 (native-inputs
3854 `(("python-nose" ,python-nose)))
3855 (home-page "http://github.com/jsvine/spectra")
3856 (synopsis "Color scales and color conversion")
3857 (description
3858 "This package provides a Python library intended to make color math,
3859 color scales, and color space conversion easy. It has support for:
3860
3861 @enumerate
3862 @item Color scales
3863 @item Color ranges
3864 @item Color blending
3865 @item Brightening/darkening colors
3866 @item Saturating/desaturating colors
3867 @item Conversion to/from multiple color spaces.
3868 @end enumerate\n")
3869 (license license:expat)))
3870
3871 (define-public python2-spectra
3872 (package-with-python2 python-spectra))
3873
3874 (define-public python2-fastlmm
3875 (package
3876 (name "python2-fastlmm")
3877 (version "0.2.21")
3878 (source
3879 (origin
3880 (method url-fetch)
3881 (uri (pypi-uri "fastlmm" version ".zip"))
3882 (sha256
3883 (base32
3884 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3885 (build-system python-build-system)
3886 (arguments
3887 `(#:python ,python-2)) ; only Python 2.7 is supported
3888 (propagated-inputs
3889 `(("python2-numpy" ,python2-numpy)
3890 ("python2-scipy" ,python2-scipy)
3891 ("python2-matplotlib" ,python2-matplotlib)
3892 ("python2-pandas" ,python2-pandas)
3893 ("python2-scikit-learn" ,python2-scikit-learn)
3894 ("python2-pysnptools" ,python2-pysnptools)))
3895 (native-inputs
3896 `(("unzip" ,unzip)
3897 ("python2-cython" ,python2-cython)
3898 ("python2-mock" ,python2-mock)
3899 ("python2-nose" ,python2-nose)))
3900 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3901 (synopsis "Perform genome-wide association studies on large data sets")
3902 (description
3903 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3904 Models, is a program for performing both single-SNP and SNP-set genome-wide
3905 association studies (GWAS) on extremely large data sets.")
3906 (license license:asl2.0)))
3907
3908 (define-public python-numpy-documentation
3909 (package
3910 (name "python-numpy-documentation")
3911 (version (package-version python-numpy))
3912 (source (package-source python-numpy))
3913 (build-system python-build-system)
3914 (native-inputs
3915 `(("python-matplotlib" ,python-matplotlib)
3916 ("python-numpy" ,python-numpy)
3917 ("pkg-config" ,pkg-config)
3918 ("python-sphinx" ,python-sphinx)
3919 ("python-numpydoc" ,python-numpydoc)
3920 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3921 texlive-fonts-ec
3922 texlive-generic-ifxetex
3923 texlive-generic-pdftex
3924 texlive-latex-amsfonts
3925 texlive-latex-capt-of
3926 texlive-latex-cmap
3927 texlive-latex-environ
3928 texlive-latex-eqparbox
3929 texlive-latex-etoolbox
3930 texlive-latex-expdlist
3931 texlive-latex-fancyhdr
3932 texlive-latex-fancyvrb
3933 texlive-latex-fncychap
3934 texlive-latex-float
3935 texlive-latex-framed
3936 texlive-latex-geometry
3937 texlive-latex-graphics
3938 texlive-latex-hyperref
3939 texlive-latex-mdwtools
3940 texlive-latex-multirow
3941 texlive-latex-oberdiek
3942 texlive-latex-parskip
3943 texlive-latex-preview
3944 texlive-latex-tabulary
3945 texlive-latex-threeparttable
3946 texlive-latex-titlesec
3947 texlive-latex-trimspaces
3948 texlive-latex-ucs
3949 texlive-latex-upquote
3950 texlive-latex-url
3951 texlive-latex-varwidth
3952 texlive-latex-wrapfig)))
3953 ("texinfo" ,texinfo)
3954 ("perl" ,perl)
3955 ("scipy-sphinx-theme"
3956 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3957 (method git-fetch)
3958 (uri (git-reference
3959 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3960 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3961 (sha256
3962 (base32
3963 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3964 ,@(package-native-inputs python-numpy)))
3965 (arguments
3966 `(#:tests? #f ; we're only generating the documentation
3967 #:phases
3968 (modify-phases %standard-phases
3969 (delete 'build)
3970 (replace 'install
3971 (lambda* (#:key inputs outputs #:allow-other-keys)
3972 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3973 (doc (string-append
3974 data "/doc/" ,name "-"
3975 ,(package-version python-numpy)))
3976 (info-reader (string-append data "/info"))
3977 (html (string-append doc "/html"))
3978 (scipy-sphinx-theme "scipy-sphinx-theme")
3979 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3980 (pyver ,(string-append "PYVER=")))
3981
3982 ;; FIXME: this is needed to for texlive-union to generate
3983 ;; fonts, which are not found.
3984 (setenv "HOME" "/tmp")
3985
3986 (with-directory-excursion "doc"
3987 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3988 (mkdir-p html)
3989 (system* "make" "html" pyver)
3990 (system* "make" "latex" "PAPER=a4" pyver)
3991 (system* "make" "-C" "build/latex"
3992 "all-pdf" "PAPER=a4" pyver)
3993 ;; FIXME: Generation of the info file fails.
3994 ;; (system* "make" "info" pyver)
3995 ;; (mkdir-p info)
3996 ;; (copy-file "build/texinfo/numpy.info"
3997 ;; (string-append info "/numpy.info"))
3998 (for-each (lambda (file)
3999 (copy-file (string-append "build/latex" file)
4000 (string-append doc file)))
4001 '("/numpy-ref.pdf" "/numpy-user.pdf"))
4002 (with-directory-excursion "build/html"
4003 (for-each (lambda (file)
4004 (let* ((dir (dirname file))
4005 (tgt-dir (string-append html "/" dir)))
4006 (unless (equal? "." dir)
4007 (mkdir-p tgt-dir))
4008 (install-file file html)))
4009 (find-files "." ".*")))))
4010 #t)))))
4011 (home-page (package-home-page python-numpy))
4012 (synopsis "Documentation for the python-numpy package")
4013 (description (package-description python-numpy))
4014 (license (package-license python-numpy))))
4015
4016 (define-public python2-numpy-documentation
4017 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
4018 (package
4019 (inherit numpy-documentation)
4020 (native-inputs `(("python2-functools32" ,python2-functools32)
4021 ,@(package-native-inputs numpy-documentation))))))
4022
4023 (define-public python-pygit2
4024 (package
4025 (name "python-pygit2")
4026 (version "0.26.0")
4027 (source
4028 (origin
4029 (method url-fetch)
4030 (uri (pypi-uri "pygit2" version))
4031 (sha256
4032 (base32
4033 "1cbc488ra3kg7r3qky17ms0szi3cda2d96qfkv1l9djsy9hnvw57"))
4034 (patches
4035 (search-patches "python-pygit2-disable-network-tests.patch"))))
4036 (build-system python-build-system)
4037 (propagated-inputs
4038 `(("python-six" ,python-six)
4039 ("python-cffi" ,python-cffi)
4040 ("libgit2" ,libgit2)
4041 ("python-tox" ,python-tox)))
4042 (home-page "https://github.com/libgit2/pygit2")
4043 (synopsis "Python bindings for libgit2")
4044 (description "Pygit2 is a set of Python bindings to the libgit2 shared
4045 library, libgit2 implements Git plumbing.")
4046 ;; GPL2.0 only, with linking exception.
4047 (license license:gpl2)))
4048
4049 (define-public python2-pygit2
4050 (package-with-python2 python-pygit2))
4051
4052 (define-public python-pyparsing
4053 (package
4054 (name "python-pyparsing")
4055 (version "2.2.0")
4056 (source
4057 (origin
4058 (method url-fetch)
4059 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
4060 "/pyparsing-" version
4061 "/pyparsing-" version ".tar.gz"))
4062 (sha256
4063 (base32
4064 "016b9gh606aa44sq92jslm89bg874ia0yyiyb643fa6dgbsbqch8"))))
4065 (build-system python-build-system)
4066 (outputs '("out" "doc"))
4067 (arguments
4068 `(#:tests? #f ; no test target
4069 #:phases
4070 (modify-phases %standard-phases
4071 (add-after 'install 'install-doc
4072 (lambda* (#:key outputs #:allow-other-keys)
4073 (let* ((doc (string-append (assoc-ref outputs "doc")
4074 "/share/doc/" ,name "-" ,version))
4075 (html-doc (string-append doc "/html"))
4076 (examples (string-append doc "/examples")))
4077 (mkdir-p html-doc)
4078 (mkdir-p examples)
4079 (for-each
4080 (lambda (dir tgt)
4081 (map (lambda (file)
4082 (install-file file tgt))
4083 (find-files dir ".*")))
4084 (list "docs" "htmldoc" "examples")
4085 (list doc html-doc examples))
4086 #t))))))
4087 (home-page "http://pyparsing.wikispaces.com")
4088 (synopsis "Python parsing class library")
4089 (description
4090 "The pyparsing module is an alternative approach to creating and
4091 executing simple grammars, vs. the traditional lex/yacc approach, or the use
4092 of regular expressions. The pyparsing module provides a library of classes
4093 that client code uses to construct the grammar directly in Python code.")
4094 (license license:expat)))
4095
4096 (define-public python2-pyparsing
4097 (package-with-python2 python-pyparsing))
4098
4099 (define-public python-numpydoc
4100 (package
4101 (name "python-numpydoc")
4102 (version "0.5")
4103 (source
4104 (origin
4105 (method url-fetch)
4106 (uri (string-append
4107 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
4108 version ".tar.gz"))
4109 (sha256
4110 (base32
4111 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
4112 (modules '((guix build utils)))
4113 (snippet
4114 '(begin
4115 ;; Drop a test requiring matplotlib, which we cannot add as an
4116 ;; input since it would create a circular dependency: Extend the
4117 ;; test for Python 3, where it is already dropped, to Python 2.
4118 (substitute* "numpydoc/tests/test_plot_directive.py"
4119 (("3") "2"))))))
4120 (build-system python-build-system)
4121 (propagated-inputs
4122 `(("python-sphinx" ,python-sphinx)))
4123 (native-inputs
4124 `(("python-nose" ,python-nose)))
4125 (home-page "https://pypi.python.org/pypi/numpydoc")
4126 (synopsis
4127 "Numpy's Sphinx extensions")
4128 (description
4129 "Sphinx extension to support docstrings in Numpy format.")
4130 (license license:bsd-2)))
4131
4132 (define-public python2-numpydoc
4133 (package-with-python2 python-numpydoc))
4134
4135 (define-public python-numexpr
4136 (package
4137 (name "python-numexpr")
4138 (version "2.6.1")
4139 (source
4140 (origin
4141 (method url-fetch)
4142 (uri (pypi-uri "numexpr" version))
4143 (sha256
4144 (base32
4145 "01lsja72m32z0i5p8rwxbfyzk4mplh72k2a140nwh8vv4wpyfbnv"))))
4146 (build-system python-build-system)
4147 (arguments `(#:tests? #f)) ; no tests included
4148 (propagated-inputs
4149 `(("python-numpy" ,python-numpy)))
4150 (home-page "https://github.com/pydata/numexpr")
4151 (synopsis "Fast numerical expression evaluator for NumPy")
4152 (description
4153 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
4154 expressions that operate on arrays are accelerated and use less memory than
4155 doing the same calculation in Python. In addition, its multi-threaded
4156 capabilities can make use of all your cores, which may accelerate
4157 computations, most specially if they are not memory-bounded (e.g. those using
4158 transcendental functions).")
4159 (license license:expat)))
4160
4161 (define-public python2-numexpr
4162 (package-with-python2 python-numexpr))
4163
4164 (define-public python-cycler
4165 (package
4166 (name "python-cycler")
4167 (version "0.10.0")
4168 (source (origin
4169 (method url-fetch)
4170 (uri (pypi-uri "cycler" version))
4171 (sha256
4172 (base32
4173 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
4174 (build-system python-build-system)
4175 (arguments
4176 ;; XXX: The current version requires 'coveralls' which we don't have.
4177 ;; Enable this for the next release which uses 'python-pytest'.
4178 '(#:tests? #f))
4179 (propagated-inputs
4180 `(("python-six" ,python-six)))
4181 (home-page "http://matplotlib.org/cycler/")
4182 (synopsis "Composable keyword argument iterator")
4183 (description
4184 "When using @code{matplotlib} and plotting more than one line, it is
4185 common to want to be able to want to be able to cycle over one or more artist
4186 styles; but the plotting logic can quickly become involved.
4187 To address this and enable easy cycling over arbitrary @code{kwargs}, the
4188 @code{Cycler} class was developed.")
4189 (license license:bsd-3)))
4190
4191 (define-public python2-cycler
4192 (package-with-python2 python-cycler))
4193
4194 (define-public python-colorspacious
4195 (package
4196 (name "python-colorspacious")
4197 (version "1.1.0")
4198 (source
4199 (origin
4200 (method url-fetch)
4201 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
4202 version ".tar.gz"))
4203 (file-name (string-append name "-" version))
4204 (sha256
4205 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
4206 (build-system python-build-system)
4207 (propagated-inputs
4208 `(("python-numpy" ,python-numpy)))
4209 (native-inputs
4210 `(("python-nose" ,python-nose)))
4211 (arguments
4212 `(#:phases
4213 (modify-phases %standard-phases
4214 (replace 'check
4215 (lambda _
4216 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
4217 (home-page "https://github.com/njsmith/colorspacious")
4218 (synopsis "Python library for colorspace conversions")
4219 (description "@code{colorspacious} is a Python library that lets you
4220 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
4221 (license license:expat)))
4222
4223 (define-public python2-colorspacious
4224 (package-with-python2 python-colorspacious))
4225
4226 (define-public python-matplotlib
4227 (package
4228 (name "python-matplotlib")
4229 (version "2.0.2")
4230 (source
4231 (origin
4232 (method url-fetch)
4233 (uri (pypi-uri "matplotlib" version))
4234 (sha256
4235 (base32
4236 "1w8z2a1l7s72p1byfz7g03wqhygqxi8w82619dqb3a1lm97w9yqg"))))
4237 (build-system python-build-system)
4238 (propagated-inputs ; the following packages are all needed at run time
4239 `(("python-cycler" ,python-cycler)
4240 ("python-pyparsing" ,python-pyparsing)
4241 ("python-pygobject" ,python-pygobject)
4242 ("gobject-introspection" ,gobject-introspection)
4243 ("python-tkinter" ,python "tk")
4244 ("python-dateutil" ,python-dateutil)
4245 ("python-numpy" ,python-numpy)
4246 ("python-pillow" ,python-pillow)
4247 ("python-pytz" ,python-pytz)
4248 ("python-six" ,python-six)
4249 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
4250 ;; from 'gtk+') provides the required 'typelib' files used by
4251 ;; 'gobject-introspection'. The location of these files is set with the
4252 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
4253 ;; is done automatically by a 'native-search-path' procedure. However,
4254 ;; at run-time the user must set this variable as follows:
4255 ;;
4256 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
4257 ("gtk+" ,gtk+)
4258 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
4259 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
4260 ;; object. For this reason we need to import both libraries.
4261 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
4262 ("python-pycairo" ,python-pycairo)
4263 ("python-cairocffi" ,python-cairocffi)))
4264 (inputs
4265 `(("libpng" ,libpng)
4266 ("imagemagick" ,imagemagick)
4267 ("freetype" ,freetype)
4268 ("cairo" ,cairo)
4269 ("glib" ,glib)
4270 ;; FIXME: Add backends when available.
4271 ;("python-wxpython" ,python-wxpython)
4272 ("python-pyqt" ,python-pyqt)
4273 ("tcl" ,tcl)
4274 ("tk" ,tk)))
4275 (native-inputs
4276 `(("pkg-config" ,pkg-config)
4277 ("python-nose" ,python-nose)
4278 ("python-mock" ,python-mock)))
4279 (arguments
4280 `(#:phases
4281 (modify-phases %standard-phases
4282 (add-before 'build 'configure-environment
4283 (lambda* (#:key outputs inputs #:allow-other-keys)
4284 (let ((cairo (assoc-ref inputs "cairo"))
4285 (gtk+ (assoc-ref inputs "gtk+")))
4286 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
4287 ;; has not effect.
4288 (setenv "LD_LIBRARY_PATH"
4289 (string-append cairo "/lib:" gtk+ "/lib"))
4290 (setenv "HOME" (getcwd))
4291 (call-with-output-file "setup.cfg"
4292 (lambda (port)
4293 (format port "[directories]~%
4294 basedirlist = ~a,~a~%
4295 [rc_options]~%
4296 backend = TkAgg~%"
4297 (assoc-ref inputs "tcl")
4298 (assoc-ref inputs "tk")))))
4299 #t)))))
4300 (home-page "http://matplotlib.org")
4301 (synopsis "2D plotting library for Python")
4302 (description
4303 "Matplotlib is a Python 2D plotting library which produces publication
4304 quality figures in a variety of hardcopy formats and interactive environments
4305 across platforms. Matplotlib can be used in Python scripts, the python and
4306 ipython shell, web application servers, and six graphical user interface
4307 toolkits.")
4308 (license license:psfl)
4309 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4310
4311 (define-public python2-matplotlib
4312 (let ((matplotlib (package-with-python2
4313 (strip-python2-variant python-matplotlib))))
4314 (package (inherit matplotlib)
4315 ;; Make sure to use special packages for Python 2 instead
4316 ;; of those automatically rewritten by package-with-python2.
4317 (propagated-inputs
4318 `(("python2-pycairo" ,python2-pycairo)
4319 ("python2-functools32" ,python2-functools32)
4320 ("python2-pygobject-2" ,python2-pygobject-2)
4321 ("python2-subprocess32" ,python2-subprocess32)
4322 ("python2-tkinter" ,python-2 "tk")
4323 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4324 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4325
4326 (define-public python-matplotlib-documentation
4327 (package
4328 (name "python-matplotlib-documentation")
4329 (version (package-version python-matplotlib))
4330 (source (package-source python-matplotlib))
4331 (build-system python-build-system)
4332 (native-inputs
4333 `(("python-matplotlib" ,python-matplotlib)
4334 ("python-colorspacious" ,python-colorspacious)
4335 ("python-sphinx" ,python-sphinx)
4336 ("python-numpydoc" ,python-numpydoc)
4337 ("python-ipython" ,python-ipython)
4338 ("python-mock" ,python-mock)
4339 ("graphviz" ,graphviz)
4340 ("texlive" ,texlive)
4341 ("texinfo" ,texinfo)
4342 ,@(package-native-inputs python-matplotlib)))
4343 (arguments
4344 `(#:tests? #f ; we're only generating documentation
4345 #:phases
4346 (modify-phases %standard-phases
4347 (replace 'build
4348 (lambda _
4349 (chdir "doc")
4350 ;; Produce pdf in 'A4' format.
4351 (substitute* "conf.py"
4352 (("latex_paper_size = 'letter'") "")
4353 ;; latex_paper_size is deprecated -> set paper size using
4354 ;; latex_elements
4355 (("latex_elements\\['pointsize'\\] = '11pt'" match)
4356 ;; insert at a point where latex_elements{} is defined:
4357 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
4358 (zero? (system* "python" "make.py" "html" "latex" "texinfo"))))
4359 (replace 'install
4360 (lambda* (#:key inputs outputs #:allow-other-keys)
4361 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4362 (doc (string-append data "/doc/python-matplotlib-" ,version))
4363 (info (string-append data "/info"))
4364 (html (string-append doc "/html")))
4365 (mkdir-p html)
4366 (mkdir-p info)
4367 (copy-recursively "build/html" html)
4368 (symlink (string-append html "/_images")
4369 (string-append info "/matplotlib-figures"))
4370 (with-directory-excursion "build/texinfo"
4371 (substitute* "matplotlib.texi"
4372 (("@image\\{([^,]*)" all file)
4373 (string-append "@image{matplotlib-figures/" file)))
4374 (symlink (string-append html "/_images")
4375 "./matplotlib-figures")
4376 (system* "makeinfo" "--no-split"
4377 "-o" "matplotlib.info" "matplotlib.texi"))
4378 (copy-file "build/texinfo/matplotlib.info"
4379 (string-append info "/matplotlib.info"))
4380 (copy-file "build/latex/Matplotlib.pdf"
4381 (string-append doc "/Matplotlib.pdf")))
4382 #t)))))
4383 (home-page (package-home-page python-matplotlib))
4384 (synopsis "Documentation for the python-matplotlib package")
4385 (description (package-description python-matplotlib))
4386 (license (package-license python-matplotlib))))
4387
4388 (define-public python2-matplotlib-documentation
4389 (package-with-python2 python-matplotlib-documentation))
4390
4391 (define-public python2-pysnptools
4392 (package
4393 (name "python2-pysnptools")
4394 (version "0.3.9")
4395 (source
4396 (origin
4397 (method url-fetch)
4398 (uri (pypi-uri "pysnptools" version ".zip"))
4399 (sha256
4400 (base32
4401 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
4402 (build-system python-build-system)
4403 (arguments
4404 `(#:python ,python-2)) ; only Python 2.7 is supported
4405 (propagated-inputs
4406 `(("python2-numpy" ,python2-numpy)
4407 ("python2-scipy" ,python2-scipy)
4408 ("python2-pandas" ,python2-pandas)))
4409 (native-inputs
4410 `(("python2-cython" ,python2-cython)))
4411 (native-inputs
4412 `(("unzip" ,unzip)))
4413 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
4414 (synopsis "Library for reading and manipulating genetic data")
4415 (description
4416 "PySnpTools is a library for reading and manipulating genetic data. It
4417 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4418 those files. It can also efficiently manipulate ranges of integers using set
4419 operators such as union, intersection, and difference.")
4420 (license license:asl2.0)))
4421
4422 (define-public python-rpy2
4423 (package
4424 (name "python-rpy2")
4425 (version "2.9.0")
4426 (source
4427 (origin
4428 (method url-fetch)
4429 (uri (pypi-uri "rpy2" version))
4430 (sha256
4431 (base32
4432 "0bqihjrdqwj5r1h86shvfb1p5hfr4a6klv1v54bzfr9r144w3rni"))))
4433 (build-system python-build-system)
4434 (arguments
4435 '(#:modules ((ice-9 ftw)
4436 (srfi srfi-1)
4437 (srfi srfi-26)
4438 (guix build utils)
4439 (guix build python-build-system))
4440 #:phases
4441 (modify-phases %standard-phases
4442 ;; Without this phase the test loader cannot find the directories, in
4443 ;; which it is supposed to look for test files.
4444 (add-after 'unpack 'fix-tests
4445 (lambda* (#:key outputs #:allow-other-keys)
4446 (substitute* "rpy/tests.py"
4447 (("loader.discover\\(")
4448 "loader.discover(rpy_root + '/' +"))
4449 #t))
4450 (replace 'check
4451 (lambda* (#:key outputs inputs #:allow-other-keys)
4452 (let ((cwd (getcwd)))
4453 (setenv "PYTHONPATH"
4454 (string-append cwd "/build/"
4455 (find (cut string-prefix? "lib" <>)
4456 (scandir (string-append cwd "/build")))
4457 ":"
4458 (getenv "PYTHONPATH"))))
4459 (zero? (system* "python" "-m" "rpy2.tests" "-v")))))))
4460 (propagated-inputs
4461 `(("python-six" ,python-six)
4462 ("python-jinja2" ,python-jinja2)
4463 ("python-pytz" ,python-pytz)))
4464 (inputs
4465 `(("readline" ,readline)
4466 ("icu4c" ,icu4c)
4467 ("pcre" ,pcre)
4468 ("r-minimal" ,r-minimal)
4469 ("r-survival" ,r-survival)
4470 ("r-ggplot2" ,r-ggplot2)
4471 ("r-rsqlite" ,r-rsqlite)
4472 ("r-dplyr" ,r-dplyr)
4473 ("r-dbplyr" ,r-dbplyr)
4474 ("python-numpy" ,python-numpy)))
4475 (native-inputs
4476 `(("zlib" ,zlib)))
4477 (home-page "http://rpy.sourceforge.net/")
4478 (synopsis "Python interface to the R language")
4479 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
4480 low-level interface to R from Python, a proposed high-level interface,
4481 including wrappers to graphical libraries, as well as R-like structures and
4482 functions.")
4483 ;; Any of these licenses can be picked for the R interface. The whole
4484 ;; project is released under GPLv2+ according to the license declaration
4485 ;; in "setup.py".
4486 (license (list license:mpl2.0 license:gpl2+ license:lgpl2.1+))))
4487
4488 (define-public python-scipy
4489 (package
4490 (name "python-scipy")
4491 (version "0.19.1")
4492 (source
4493 (origin
4494 (method url-fetch)
4495 (uri (pypi-uri "scipy" version))
4496 (sha256
4497 (base32
4498 "1rl411bvla6q7qfdb47fpdnyjhfgzl6smpha33n9ar1klykjr6m1"))))
4499 (build-system python-build-system)
4500 (propagated-inputs
4501 `(("python-numpy" ,python-numpy)
4502 ("python-matplotlib" ,python-matplotlib)
4503 ("python-pyparsing" ,python-pyparsing)))
4504 (inputs
4505 `(("lapack" ,lapack)
4506 ("openblas" ,openblas)))
4507 (native-inputs
4508 `(("python-cython" ,python-cython)
4509 ("python-nose" ,python-nose)
4510 ("python-sphinx" ,python-sphinx)
4511 ("python-numpydoc" ,python-numpydoc)
4512 ("gfortran" ,gfortran)
4513 ("perl" ,perl)))
4514 (outputs '("out" "doc"))
4515 (arguments
4516 `(#:phases
4517 (modify-phases %standard-phases
4518 (add-before 'build 'configure-openblas
4519 (lambda* (#:key inputs #:allow-other-keys)
4520 (call-with-output-file "site.cfg"
4521 (lambda (port)
4522 (format port
4523 "[blas]
4524 libraries = openblas
4525 library_dirs = ~a/lib
4526 include_dirs = ~a/include
4527
4528 # backslash-n to make emacs happy
4529 \n[atlas]
4530 library_dirs = ~a/lib
4531 atlas_libs = openblas
4532 "
4533 (assoc-ref inputs "openblas")
4534 (assoc-ref inputs "openblas")
4535 (assoc-ref inputs "openblas"))))
4536 #t))
4537 (add-after 'install 'install-doc
4538 (lambda* (#:key inputs outputs #:allow-other-keys)
4539 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4540 (doc (string-append data "/doc/" ,name "-" ,version))
4541 (html (string-append doc "/html"))
4542 (pyver ,(string-append "PYVER=")))
4543 ;; Make installed package available for building the
4544 ;; documentation
4545 (add-installed-pythonpath inputs outputs)
4546 (with-directory-excursion "doc"
4547 ;; Fix generation of images for mathematical expressions.
4548 (substitute* (find-files "source" "conf\\.py")
4549 (("pngmath_use_preview = True")
4550 "pngmath_use_preview = False"))
4551 (mkdir-p html)
4552 (system* "make" "html" pyver)
4553 (with-directory-excursion "build/html"
4554 (for-each (lambda (file)
4555 (let* ((dir (dirname file))
4556 (tgt-dir (string-append html "/" dir)))
4557 (install-file file html)))
4558 (find-files "." ".*")))))
4559 #t))
4560 (add-after 'unpack 'fix-tests
4561 (lambda _
4562 (substitute* "scipy/integrate/tests/test_quadpack.py"
4563 (("libm.so") "libm.so.6"))
4564 #t))
4565 ;; Tests can only be run after the library has been installed and not
4566 ;; within the source directory.
4567 (delete 'check)
4568 (add-after 'install 'check
4569 (lambda* (#:key inputs outputs #:allow-other-keys)
4570 (add-installed-pythonpath inputs outputs)
4571 (with-directory-excursion "/tmp"
4572 (zero? (system* "python" "-c"
4573 "import scipy; scipy.test('full')")))
4574 #t)))))
4575 (home-page "http://www.scipy.org/")
4576 (synopsis "The Scipy library provides efficient numerical routines")
4577 (description "The SciPy library is one of the core packages that make up
4578 the SciPy stack. It provides many user-friendly and efficient numerical
4579 routines such as routines for numerical integration and optimization.")
4580 (properties `((python2-variant . ,(delay python2-scipy))))
4581 (license license:bsd-3)))
4582
4583 (define-public python2-scipy
4584 (package-with-python2
4585 (strip-python2-variant python-scipy)))
4586
4587 (define-public python-sockjs-tornado
4588 (package
4589 (name "python-sockjs-tornado")
4590 (version "1.0.3")
4591 (source
4592 (origin
4593 (method url-fetch)
4594 (uri (pypi-uri "sockjs-tornado" version))
4595 (sha256
4596 (base32
4597 "16cff40nniqsyvda1pb2j3b4zwmrw7y2g1vqq78lp20xpmhnwwkd"))))
4598 (build-system python-build-system)
4599 (arguments
4600 `(;; There are no tests, and running the test phase requires missing
4601 ;; dependencies
4602 #:tests? #f))
4603 (propagated-inputs
4604 `(("python-tornado" ,python-tornado)))
4605 (home-page "http://github.com/mrjoes/sockjs-tornado/")
4606 (synopsis
4607 "SockJS python server implementation on top of Tornado framework")
4608 (description
4609 "SockJS-tornado provides the server side counterpart to a SockJS client
4610 library, through the Tornado framework.
4611
4612 SockJS provides a low latency, full duplex, cross-domain communication channel
4613 between a web browser and web server.")
4614 (license license:expat)))
4615
4616 (define-public python2-sockjs-tornado
4617 (package-with-python2 python-sockjs-tornado))
4618
4619 (define-public python-socksipy-branch
4620 (package
4621 (name "python-socksipy-branch")
4622 (version "1.01")
4623 (source
4624 (origin
4625 (method url-fetch)
4626 (uri (pypi-uri "SocksiPy-branch" version))
4627 (sha256
4628 (base32
4629 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4630 (build-system python-build-system)
4631 (arguments
4632 `(#:tests? #f)) ; There are no tests
4633 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4634 (synopsis "Python SOCKS module")
4635 (description
4636 "SocksiPy - A Python SOCKS client module. It provides a
4637 socket-like interface that supports connections to any TCP
4638 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4639 The original version was developed by Dan Haim, this is a
4640 branch created by Mario Vilas to address some open issues,
4641 as the original project seems to have been abandoned circa 2007.")
4642 (license license:bsd-3)))
4643
4644 (define-public python2-socksipy-branch
4645 (package-with-python2 python-socksipy-branch))
4646
4647 (define-public python-sqlalchemy
4648 (package
4649 (name "python-sqlalchemy")
4650 (version "1.0.12")
4651 (source
4652 (origin
4653 (method url-fetch)
4654 (uri (string-append "https://pypi.python.org/packages/source/S/"
4655 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
4656 (sha256
4657 (base32
4658 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
4659 (build-system python-build-system)
4660 (native-inputs
4661 `(("python-cython" ,python-cython) ;for c extensions
4662 ("python-pytest" ,python-pytest)
4663 ("python-mock" ,python-mock))) ;for tests
4664 (arguments
4665 `(#:phases
4666 (modify-phases %standard-phases
4667 (replace 'check
4668 (lambda _ (zero? (system* "py.test")))))))
4669 (home-page "http://www.sqlalchemy.org")
4670 (synopsis "Database abstraction library")
4671 (description
4672 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
4673 gives application developers the full power and flexibility of SQL. It
4674 provides a full suite of well known enterprise-level persistence patterns,
4675 designed for efficient and high-performing database access, adapted into a
4676 simple and Pythonic domain language.")
4677 (license license:x11)))
4678
4679 (define-public python2-sqlalchemy
4680 (package-with-python2 python-sqlalchemy))
4681
4682 (define-public python-pycodestyle
4683 (package
4684 (name "python-pycodestyle")
4685 (version "2.3.1")
4686 (source
4687 (origin
4688 (method url-fetch)
4689 (uri (pypi-uri "pycodestyle" version))
4690 (sha256
4691 (base32
4692 "0rk78b66p57ala26mdldl9lafr48blv5s659sah9q50qnfjmc8k8"))))
4693 (build-system python-build-system)
4694 (home-page "https://pycodestyle.readthedocs.io/")
4695 (synopsis "Python style guide checker")
4696 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4697 Python code against some of the style conventions in
4698 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4699 (license license:expat)))
4700
4701 (define-public python2-pycodestyle
4702 (package-with-python2 python-pycodestyle))
4703
4704 (define-public python-orderedmultidict
4705 (package
4706 (name "python-orderedmultidict")
4707 (version "0.7.11")
4708 (source
4709 (origin
4710 (method url-fetch)
4711 (uri (pypi-uri "orderedmultidict" version))
4712 (sha256
4713 (base32
4714 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4715 (build-system python-build-system)
4716 (arguments
4717 `(#:phases
4718 (modify-phases %standard-phases
4719 (add-after 'unpack 'fix-tests
4720 (lambda _
4721 ;; The package uses nosetest for running the tests.
4722 ;; Adding this initfile allows to run the test suite
4723 ;; without requiring nosetest.
4724 (zero? (system* "touch" "tests/__init__.py")))))))
4725 (propagated-inputs
4726 `(("python-six" ,python-six)))
4727 (native-inputs
4728 `(("python-pycodestyle" ,python-pycodestyle)))
4729 (home-page "https://github.com/gruns/orderedmultidict")
4730 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4731 (description "This package contains a library for ordered multivalue
4732 dictionaries. A multivalue dictionary is a dictionary that can store
4733 multiple values for the same key. An ordered multivalue dictionary is a
4734 multivalue dictionary that retains the order of insertions and deletions.")
4735 (license license:unlicense)))
4736
4737 (define-public python2-orderedmultidict
4738 (package-with-python2 python-orderedmultidict))
4739
4740 (define-public python-furl
4741 (package
4742 (name "python-furl")
4743 (version "0.5.6")
4744 (source
4745 (origin
4746 (method url-fetch)
4747 (uri (pypi-uri "furl" version))
4748 (sha256
4749 (base32
4750 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
4751 (build-system python-build-system)
4752 (propagated-inputs
4753 `(("python-six" ,python-six)
4754 ("python-orderedmultidict" ,python-orderedmultidict)))
4755 (native-inputs
4756 `(("python-pycodestyle" ,python-pycodestyle)))
4757 (home-page "https://github.com/gruns/furl")
4758 (synopsis "URL manipulation in Python")
4759 (description "Furl provides an easy-to-use alternative to the
4760 @code{urllib} and @code{urlparse} modules for manipulating URLs.")
4761 (license license:unlicense)))
4762
4763 (define-public python2-furl
4764 (package-with-python2 python-furl))
4765
4766 (define-public python-flaky
4767 (package
4768 (name "python-flaky")
4769 (version "3.4.0")
4770 (source (origin
4771 (method url-fetch)
4772 (uri (pypi-uri "flaky" version))
4773 (sha256
4774 (base32
4775 "18pkmf79rfkfpy1d2rrx3v55nxj762ilyk9rvd6s6dccxw58imsa"))))
4776 (build-system python-build-system)
4777 (arguments
4778 ;; TODO: Tests require 'coveralls' and 'genty' which are not in Guix yet.
4779 '(#:tests? #f))
4780 (home-page "https://github.com/box/flaky")
4781 (synopsis "Automatically rerun flaky tests")
4782 (description
4783 "Flaky is a plugin for @code{nose} or @code{py.test} that automatically
4784 reruns flaky tests.
4785
4786 Ideally, tests reliably pass or fail, but sometimes test fixtures must rely
4787 on components that aren't 100% reliable. With flaky, instead of removing
4788 those tests or marking them to @code{@@skip}, they can be automatically
4789 retried.")
4790 (license license:asl2.0)))
4791
4792 (define-public python2-flaky
4793 (package-with-python2 python-flaky))
4794
4795 (define-public python-flask-babel
4796 (package
4797 (name "python-flask-babel")
4798 (version "0.11.1")
4799 (source
4800 (origin
4801 (method url-fetch)
4802 (uri (pypi-uri "Flask-Babel" version))
4803 (sha256
4804 (base32
4805 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
4806 (build-system python-build-system)
4807 (propagated-inputs
4808 `(("python-flask" ,python-flask)
4809 ("python-babel" ,python-babel)
4810 ("python-jinja2" ,python-jinja2)
4811 ("python-pytz" ,python-pytz)))
4812 (home-page "https://github.com/python-babel/flask-babel")
4813 (synopsis "Add i18n/l10n support to Flask applications")
4814 (description "This package implements internationalization and localization
4815 support for Flask. This is based on the Python babel module as well as pytz -
4816 both of which are installed automatically if you install this library.")
4817 (license license:bsd-3)))
4818
4819 (define-public python2-flask-babel
4820 (package-with-python2 python-flask-babel))
4821
4822 (define-public python-sqlalchemy-utils
4823 (package
4824 (name "python-sqlalchemy-utils")
4825 (version "0.32.13")
4826 (source
4827 (origin
4828 (method url-fetch)
4829 (uri (pypi-uri "SQLAlchemy-Utils" version))
4830 (sha256
4831 (base32
4832 "0vsib7gidjamzsz6w4s5pdhxzxsrkghjnm4sqwk94igjrl3i5ixj"))))
4833 (build-system python-build-system)
4834 (arguments
4835 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
4836 ;; #:phases
4837 ;; (modify-phases %standard-phases
4838 ;; (replace 'check
4839 ;; (lambda _
4840 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
4841 (propagated-inputs
4842 `(("python-six" ,python-six)
4843 ("python-sqlalchemy" ,python-sqlalchemy)))
4844 (native-inputs
4845 `(("python-dateutil" ,python-dateutil)
4846 ("python-flexmock" ,python-flexmock)
4847 ("python-psycopg2" ,python-psycopg2)
4848 ("python-pytest" ,python-pytest)
4849 ("python-pytz" ,python-pytz)))
4850 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
4851 (synopsis "Various utility functions for SQLAlchemy")
4852 (description
4853 "SQLAlchemy-utils provides various utility functions and custom data types
4854 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
4855
4856 You might also want to install the following optional dependencies:
4857 @enumerate
4858 @item @code{python-passlib}
4859 @item @code{python-babel}
4860 @item @code{python-cryptography}
4861 @item @code{python-pytz}
4862 @item @code{python-psycopg2}
4863 @item @code{python-furl}
4864 @item @code{python-flask-babel}
4865 @end enumerate
4866 ")
4867 (license license:bsd-3)))
4868
4869 (define-public python2-sqlalchemy-utils
4870 (package-with-python2 python-sqlalchemy-utils))
4871
4872 (define-public python-alembic
4873 (package
4874 (name "python-alembic")
4875 (version "0.8.10")
4876 (source
4877 (origin
4878 (method url-fetch)
4879 (uri (pypi-uri "alembic" version))
4880 (sha256
4881 (base32
4882 "06br9sfqypnjlal6fsbnky3zb0askwcn3diz8k3kwa0qcblm0fqf"))))
4883 (build-system python-build-system)
4884 (native-inputs
4885 `(("python-mock" ,python-mock)
4886 ("python-pytest-cov" ,python-pytest-cov)))
4887 (propagated-inputs
4888 `(("python-sqlalchemy" ,python-sqlalchemy)
4889 ("python-mako" ,python-mako)
4890 ("python-editor" ,python-editor)))
4891 (home-page "http://bitbucket.org/zzzeek/alembic")
4892 (synopsis
4893 "Database migration tool for SQLAlchemy")
4894 (description
4895 "Alembic is a lightweight database migration tool for usage with the
4896 SQLAlchemy Database Toolkit for Python.")
4897 (license license:expat)))
4898
4899 (define-public python2-alembic
4900 (package-with-python2 python-alembic))
4901
4902 (define-public python-autopep8
4903 (package
4904 (name "python-autopep8")
4905 (version "1.2.4")
4906 (source
4907 (origin
4908 (method url-fetch)
4909 (uri (pypi-uri "autopep8" version))
4910 (sha256
4911 (base32
4912 "18parm383lfn42a00wklv3qf20p4v277f1x3cn58x019dqk1xqrq"))))
4913 (build-system python-build-system)
4914 (propagated-inputs
4915 `(("python-pep8" ,python-pep8)))
4916 (home-page "https://github.com/hhatto/autopep8")
4917 (synopsis "Format Python code according to the PEP 8 style guide")
4918 (description
4919 "@code{autopep8} automatically formats Python code to conform to
4920 the PEP 8 style guide. It uses the pycodestyle utility to determine
4921 what parts of the code needs to be formatted. @code{autopep8} is
4922 capable of fixing most of the formatting issues that can be reported
4923 by pycodestyle.")
4924 (license (license:non-copyleft
4925 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4926
4927 (define-public python2-autopep8
4928 (package-with-python2 python-autopep8))
4929
4930 (define-public python-distutils-extra
4931 (package
4932 (name "python-distutils-extra")
4933 (version "2.38")
4934 (source
4935 (origin
4936 (method url-fetch)
4937 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4938 version "/+download/python-distutils-extra-"
4939 version ".tar.gz"))
4940 (sha256
4941 (base32
4942 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4943 (build-system python-build-system)
4944 (home-page "https://launchpad.net/python-distutils-extra/")
4945 (synopsis "Enhancements to Python's distutils")
4946 (description
4947 "The python-distutils-extra module enables you to easily integrate
4948 gettext support, themed icons, and scrollkeeper-based documentation into
4949 Python's distutils.")
4950 (license license:gpl2)))
4951
4952 (define-public python2-distutils-extra
4953 (package-with-python2 python-distutils-extra))
4954
4955 (define-public python2-elib.intl
4956 (package
4957 (name "python2-elib.intl")
4958 (version "0.0.3")
4959 (source
4960 (origin
4961 ;; This project doesn't tag releases or publish tarballs, so we take
4962 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4963 (method git-fetch)
4964 (uri (git-reference
4965 (url "https://github.com/dieterv/elib.intl.git")
4966 (commit "d09997cfef")))
4967 (sha256
4968 (base32
4969 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4970 (build-system python-build-system)
4971 (arguments
4972 ;; incompatible with Python 3 (exception syntax)
4973 `(#:python ,python-2
4974 #:tests? #f))
4975 (home-page "https://github.com/dieterv/elib.intl")
4976 (synopsis "Enhanced internationalization for Python")
4977 (description
4978 "The elib.intl module provides enhanced internationalization (I18N)
4979 services for your Python modules and applications.")
4980 (license license:lgpl3+)))
4981
4982 (define-public python-pillow
4983 (package
4984 (name "python-pillow")
4985 (version "3.3.3")
4986 (source
4987 (origin
4988 (method url-fetch)
4989 (uri (pypi-uri "Pillow" version))
4990 (patches (search-patches "python-pillow-freetype-2.7-test-failure.patch"))
4991 (sha256
4992 (base32
4993 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
4994 (build-system python-build-system)
4995 (native-inputs
4996 `(("python-nose" ,python-nose)))
4997 (inputs
4998 `(("freetype" ,freetype)
4999 ("lcms" ,lcms)
5000 ("zlib" ,zlib)
5001 ("libjpeg" ,libjpeg)
5002 ("openjpeg" ,openjpeg)
5003 ("libtiff" ,libtiff)
5004 ("libwebp" ,libwebp)))
5005 (arguments
5006 `(#:phases (modify-phases %standard-phases
5007 (add-after
5008 'install 'check-installed
5009 (lambda* (#:key outputs inputs #:allow-other-keys)
5010 (begin
5011 (setenv "HOME" (getcwd))
5012 ;; Make installed package available for running the
5013 ;; tests
5014 (add-installed-pythonpath inputs outputs)
5015 (and (zero? (system* "python" "selftest.py"
5016 "--installed"))
5017 (zero? (system* "python" "test-installed.py"))))))
5018 (delete 'check))))
5019 (home-page "https://pypi.python.org/pypi/Pillow")
5020 (synopsis "Fork of the Python Imaging Library")
5021 (description
5022 "The Python Imaging Library adds image processing capabilities to your
5023 Python interpreter. This library provides extensive file format support, an
5024 efficient internal representation, and fairly powerful image processing
5025 capabilities. The core image library is designed for fast access to data
5026 stored in a few basic pixel formats. It should provide a solid foundation for
5027 a general image processing tool.")
5028 (license (license:x11-style
5029 "http://www.pythonware.com/products/pil/license.htm"
5030 "The PIL Software License"))))
5031
5032 (define-public python2-pillow
5033 (package-with-python2 python-pillow))
5034
5035 (define-public python-pycparser
5036 (package
5037 (name "python-pycparser")
5038 (version "2.17")
5039 (source
5040 (origin
5041 (method url-fetch)
5042 (uri (pypi-uri "pycparser" version))
5043 (sha256
5044 (base32
5045 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
5046 (outputs '("out" "doc"))
5047 (build-system python-build-system)
5048 (native-inputs
5049 `(("pkg-config" ,pkg-config)))
5050 (arguments
5051 `(#:phases
5052 (modify-phases %standard-phases
5053 (replace 'check
5054 (lambda _
5055 (with-directory-excursion "tests"
5056 (zero? (system* "python" "all_tests.py")))))
5057 (add-after 'install 'install-doc
5058 (lambda* (#:key outputs #:allow-other-keys)
5059 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5060 (doc (string-append data "/doc/" ,name "-" ,version))
5061 (examples (string-append doc "/examples")))
5062 (mkdir-p examples)
5063 (for-each (lambda (file)
5064 (copy-file (string-append "." file)
5065 (string-append doc file)))
5066 '("/README.rst" "/CHANGES" "/LICENSE"))
5067 (copy-recursively "examples" examples)))))))
5068 (home-page "https://github.com/eliben/pycparser")
5069 (synopsis "C parser in Python")
5070 (description
5071 "Pycparser is a complete parser of the C language, written in pure Python
5072 using the PLY parsing library. It parses C code into an AST and can serve as
5073 a front-end for C compilers or analysis tools.")
5074 (license license:bsd-3)))
5075
5076 (define-public python2-pycparser
5077 (package-with-python2 python-pycparser))
5078
5079 (define-public python-cffi
5080 (package
5081 (name "python-cffi")
5082 (version "1.10.0")
5083 (source
5084 (origin
5085 (method url-fetch)
5086 (uri (pypi-uri "cffi" version))
5087 (sha256
5088 (base32 "1mffyilq4qycm8gs4wkgb18rnqil8a9blqq77chdlshzxc8jkc5k"))))
5089 (build-system python-build-system)
5090 (outputs '("out" "doc"))
5091 (inputs
5092 `(("libffi" ,libffi)))
5093 (propagated-inputs ; required at run-time
5094 `(("python-pycparser" ,python-pycparser)))
5095 (native-inputs
5096 `(("pkg-config" ,pkg-config)
5097 ("python-sphinx" ,python-sphinx)
5098 ("python-pytest" ,python-pytest)))
5099 (arguments
5100 `(#:modules ((ice-9 ftw)
5101 (srfi srfi-26)
5102 (guix build utils)
5103 (guix build python-build-system))
5104 #:phases
5105 (modify-phases %standard-phases
5106 (replace 'check
5107 (lambda _
5108 (setenv "PYTHONPATH"
5109 (string-append
5110 (getenv "PYTHONPATH")
5111 ":" (getcwd) "/build/"
5112 (car (scandir "build" (cut string-prefix? "lib." <>)))))
5113
5114 ;; XXX The "normal" approach of setting CC and friends does
5115 ;; not work here. Is this the correct way of doing things?
5116 (substitute* "testing/embedding/test_basic.py"
5117 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
5118 (string-append "c = distutils.ccompiler.new_compiler();"
5119 "c.set_executables(compiler='gcc',"
5120 "compiler_so='gcc',linker_exe='gcc',"
5121 "linker_so='gcc -shared')")))
5122 (substitute* "testing/cffi0/test_ownlib.py"
5123 (("'cc testownlib") "'gcc testownlib"))
5124 (zero? (system* "py.test" "-v" "c/" "testing/"))))
5125 (add-after 'install 'install-doc
5126 (lambda* (#:key outputs #:allow-other-keys)
5127 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5128 (doc (string-append data "/doc/" ,name "-" ,version))
5129 (html (string-append doc "/html")))
5130 (with-directory-excursion "doc"
5131 (system* "make" "html")
5132 (mkdir-p html)
5133 (copy-recursively "build/html" html))
5134 (copy-file "LICENSE" (string-append doc "/LICENSE"))
5135 #t))))))
5136 (home-page "http://cffi.readthedocs.org")
5137 (synopsis "Foreign function interface for Python")
5138 (description
5139 "Foreign Function Interface for Python calling C code.")
5140 (license license:expat)))
5141
5142 (define-public python2-cffi
5143 (package-with-python2 python-cffi))
5144
5145 (define-public python-xcffib
5146 (package
5147 (name "python-xcffib")
5148 (version "0.5.1")
5149 (source
5150 (origin
5151 (method url-fetch)
5152 (uri (pypi-uri "xcffib" version))
5153 (sha256
5154 (base32
5155 "09gbnmr5vn58mm8xi3fmd7fz6743cks6c46dphnxzwax6zsxmy60"))))
5156 (build-system python-build-system)
5157 (inputs
5158 `(("libxcb" ,libxcb)))
5159 (propagated-inputs
5160 `(("python-cffi" ,python-cffi) ; used at run time
5161 ("python-six" ,python-six)))
5162 (arguments
5163 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
5164 #:tests? #f
5165 #:phases
5166 (modify-phases %standard-phases
5167 (add-after 'unpack 'fix-libxcb-path
5168 (lambda* (#:key inputs #:allow-other-keys)
5169 (let ((libxcb (assoc-ref inputs "libxcb")))
5170 (substitute* '("xcffib/__init__.py")
5171 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
5172 #t)))
5173 (add-after 'install 'install-doc
5174 (lambda* (#:key outputs #:allow-other-keys)
5175 (let ((doc (string-append (assoc-ref outputs "out") "/share"
5176 "/doc/" ,name "-" ,version)))
5177 (mkdir-p doc)
5178 (copy-file "README.md"
5179 (string-append doc "/README.md"))
5180 #t))))))
5181 (home-page "https://github.com/tych0/xcffib")
5182 (synopsis "XCB Python bindings")
5183 (description
5184 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
5185 support for Python 3 and PyPy. It is based on cffi.")
5186 (license license:expat)))
5187
5188 (define-public python2-xcffib
5189 (package-with-python2 python-xcffib))
5190
5191 (define-public python-cairocffi
5192 (package
5193 (name "python-cairocffi")
5194 (version "0.8.0")
5195 (source
5196 (origin
5197 (method url-fetch)
5198 ;; The archive on pypi is missing the 'utils' directory!
5199 (uri (string-append "https://github.com/Kozea/cairocffi/archive/v"
5200 version ".tar.gz"))
5201 (file-name (string-append name "-" version ".tar.gz"))
5202 (sha256
5203 (base32
5204 "1rk2dvy3fxrga6bvvxc2fi5lbaynm5h4a0w0aaxyn3bc77rszjg9"))))
5205 (build-system python-build-system)
5206 (outputs '("out" "doc"))
5207 (inputs
5208 `(("gdk-pixbuf" ,gdk-pixbuf)
5209 ("cairo" ,cairo)))
5210 (native-inputs
5211 `(("pkg-config" ,pkg-config)
5212 ("python-sphinx" ,python-sphinx)
5213 ("python-docutils" ,python-docutils)))
5214 (propagated-inputs
5215 `(("python-xcffib" ,python-xcffib))) ; used at run time
5216 (arguments
5217 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
5218 #:tests? #f
5219 #:phases
5220 (modify-phases %standard-phases
5221 (add-after 'install 'install-doc
5222 (lambda* (#:key inputs outputs #:allow-other-keys)
5223 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5224 (doc (string-append data "/doc/" ,name "-" ,version))
5225 (html (string-append doc "/html")))
5226 (setenv "LD_LIBRARY_PATH"
5227 (string-append (assoc-ref inputs "cairo") "/lib" ":"
5228 (assoc-ref inputs "gdk-pixbuf") "/lib"))
5229 (setenv "LANG" "en_US.UTF-8")
5230 (mkdir-p html)
5231 (for-each (lambda (file)
5232 (copy-file (string-append "." file)
5233 (string-append doc file)))
5234 '("/README.rst" "/CHANGES" "/LICENSE"))
5235 (system* "python" "setup.py" "build_sphinx")
5236 (copy-recursively "docs/_build/html" html)
5237 #t))))))
5238 (home-page "https://github.com/Kozea/cairocffi")
5239 (synopsis "Python bindings and object-oriented API for Cairo")
5240 (description
5241 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
5242 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
5243 graphics library with support for multiple backends including image buffers,
5244 PNG, PostScript, PDF, and SVG file output.")
5245 (license license:bsd-3)))
5246
5247 (define-public python2-cairocffi
5248 (package-with-python2 python-cairocffi))
5249
5250 (define-public python-decorator
5251 (package
5252 (name "python-decorator")
5253 (version "4.0.10")
5254 (source
5255 (origin
5256 (method url-fetch)
5257 (uri (pypi-uri "decorator" version))
5258 (sha256
5259 (base32 "0w7hg59hlpq74jpyja4yfryap0ccjvchgpkfp20rhj9krgnrhvlw"))))
5260 (build-system python-build-system)
5261 (arguments '(#:tests? #f)) ; no test target
5262 (home-page "https://pypi.python.org/pypi/decorator/")
5263 (synopsis "Python module to simplify usage of decorators")
5264 (description
5265 "The aim of the decorator module is to simplify the usage of decorators
5266 for the average programmer, and to popularize decorators usage giving examples
5267 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
5268 etc. The core of this module is a decorator factory.")
5269 (license license:expat)))
5270
5271 (define-public python2-decorator
5272 (package-with-python2 python-decorator))
5273
5274 (define-public python-drmaa
5275 (package
5276 (name "python-drmaa")
5277 (version "0.7.7")
5278 (source
5279 (origin
5280 (method url-fetch)
5281 (uri (pypi-uri "drmaa" version))
5282 (sha256
5283 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
5284 (build-system python-build-system)
5285 ;; The test suite requires libdrmaa which is provided by the cluster
5286 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
5287 ;; should be set to the path of the libdrmaa library.
5288 (arguments '(#:tests? #f))
5289 (native-inputs
5290 `(("python-nose" ,python-nose)))
5291 (home-page "https://pypi.python.org/pypi/drmaa")
5292 (synopsis "Python bindings for the DRMAA library")
5293 (description
5294 "A Python package for Distributed Resource Management (DRM) job
5295 submission and control. This package is an implementation of the DRMAA 1.0
5296 Python language binding specification.")
5297 (license license:bsd-3)))
5298
5299 (define-public python2-drmaa
5300 (package-with-python2 python-drmaa))
5301
5302 (define-public python-grako
5303 (package
5304 (name "python-grako")
5305 (version "3.99.9")
5306 (source
5307 (origin
5308 (method url-fetch)
5309 (uri
5310 (pypi-uri "grako" version ".zip"))
5311 (sha256
5312 (base32
5313 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
5314 (build-system python-build-system)
5315 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
5316 (native-inputs
5317 `(("unzip" ,unzip)
5318 ("python-pytest" ,python-pytest-3.0)
5319 ("python-pytest-runner" ,python-pytest-runner)))
5320 (home-page "https://bitbucket.org/neogeny/grako")
5321 (synopsis "EBNF parser generator")
5322 (description
5323 "Grako takes a grammar in a variation of EBNF as input, and outputs a
5324 memoizing PEG/Packrat parser in Python.")
5325 (license license:bsd-3)))
5326
5327 (define-public python2-grako
5328 (package-with-python2 python-grako))
5329
5330 (define-public python-gridmap
5331 (package
5332 (name "python-gridmap")
5333 (version "0.13.0")
5334 (source
5335 (origin
5336 (method url-fetch)
5337 (uri (string-append
5338 "https://github.com/pygridtools/gridmap/archive/v"
5339 version ".tar.gz"))
5340 (file-name (string-append name "-" version ".tar.gz"))
5341 (sha256
5342 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
5343 (build-system python-build-system)
5344 (arguments
5345 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
5346 (propagated-inputs
5347 `(("python-psutil" ,python-psutil)
5348 ("python-drmaa" ,python-drmaa)
5349 ("python-pyzmq" ,python-pyzmq)))
5350 (home-page "https://github.com/pygridtools/gridmap")
5351 (synopsis "Create jobs on a cluster directly from Python")
5352 (description
5353 "Gridmap is a Python package to allow you to easily create jobs on the
5354 cluster directly from Python. You can directly map Python functions onto the
5355 cluster without needing to write any wrapper code yourself.")
5356 (license license:gpl3+)))
5357
5358 (define-public python2-gridmap
5359 (package-with-python2 python-gridmap))
5360
5361 (define-public python-honcho
5362 (package
5363 (name "python-honcho")
5364 (version "1.0.1")
5365 (source
5366 (origin
5367 (method url-fetch)
5368 (uri (string-append
5369 "https://github.com/nickstenning/honcho/archive/v"
5370 version ".tar.gz"))
5371 (file-name (string-append name "-" version ".tar.gz"))
5372 (sha256
5373 (base32 "0zizn61n5z5hq421hkypk9pw8s6fpxw30f4hsg7k4ivwzy3gjw9j"))))
5374 (build-system python-build-system)
5375 (native-inputs
5376 `(("python-pytest" ,python-pytest-3.0)
5377 ("python-mock" ,python-mock)
5378 ("python-tox" ,python-tox)
5379 ("which" ,which))) ;for tests
5380 (propagated-inputs
5381 `(("python-jinja2" ,python-jinja2)))
5382 (arguments
5383 `(#:phases
5384 (modify-phases %standard-phases
5385 (delete 'check)
5386 (add-after 'install 'check
5387 (lambda* (#:key outputs inputs #:allow-other-keys)
5388 ;; fix honcho path in testsuite
5389 (substitute* "tests/conftest.py"
5390 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
5391 "/bin/honcho" "'")))
5392 ;; It's easier to run tests after install.
5393 ;; Make installed package available for running the tests
5394 (add-installed-pythonpath inputs outputs)
5395 (zero? (system* "py.test" "-v")))))))
5396 (home-page "https://github.com/nickstenning/honcho")
5397 (synopsis "Manage Procfile-based applications")
5398 (description
5399 "A Procfile is a file which describes how to run an application
5400 consisting of serveral processes. honcho starts all listed processes.
5401 The output of all running processes is collected by honcho and
5402 displayed.")
5403 (license license:expat)))
5404
5405 (define-public python2-honcho
5406 (package-with-python2 python-honcho))
5407
5408 (define-public python-pexpect
5409 (package
5410 (name "python-pexpect")
5411 (version "4.2.1")
5412 (source
5413 (origin
5414 (method url-fetch)
5415 (uri (pypi-uri "pexpect" version))
5416 (sha256
5417 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
5418 (build-system python-build-system)
5419 (arguments
5420 `(#:phases
5421 (modify-phases %standard-phases
5422 (add-before 'check 'prepare-tests
5423 (lambda _
5424 (substitute* (find-files "tests")
5425 (("/bin/ls") (which "ls"))
5426 (("/bin/echo") (which "echo"))
5427 (("/bin/which") (which "which"))
5428 ;; Many tests try to use the /bin directory which
5429 ;; is not present in the build environment.
5430 ;; Use one that's non-empty and unlikely to change.
5431 (("/bin'") "/dev'"))
5432 ;; XXX: Socket connection test gets "Connection reset by peer".
5433 ;; Why does it not work? Delete for now.
5434 (delete-file "tests/test_socket.py")
5435 #t))
5436 (replace 'check (lambda _ (zero? (system* "nosetests" "-v")))))))
5437 (native-inputs
5438 `(("python-nose" ,python-nose)
5439 ("python-pytest" ,python-pytest-3.0)
5440 ("man-db" ,man-db)
5441 ("which" ,which)
5442 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
5443 (propagated-inputs
5444 `(("python-ptyprocess" ,python-ptyprocess)))
5445 (home-page "http://pexpect.readthedocs.org/")
5446 (synopsis "Controlling interactive console applications")
5447 (description
5448 "Pexpect is a pure Python module for spawning child applications;
5449 controlling them; and responding to expected patterns in their output.
5450 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5451 child application and control it as if a human were typing commands.")
5452 (license license:isc)))
5453
5454 (define-public python2-pexpect
5455 (package-with-python2 python-pexpect))
5456
5457 (define-public python-setuptools-scm
5458 (package
5459 (name "python-setuptools-scm")
5460 (version "1.15.0")
5461 (source (origin
5462 (method url-fetch)
5463 (uri (pypi-uri "setuptools_scm" version))
5464 (sha256
5465 (base32
5466 "0bwyc5markib0i7i2qlyhdzxhiywzxbkfiapldma8m91m82jvwfs"))))
5467 (build-system python-build-system)
5468 (home-page "https://github.com/pypa/setuptools_scm/")
5469 (synopsis "Manage Python package versions in SCM metadata")
5470 (description
5471 "Setuptools_scm handles managing your Python package versions in
5472 @dfn{software configuration management} (SCM) metadata instead of declaring
5473 them as the version argument or in a SCM managed file.")
5474 (license license:expat)))
5475
5476 (define-public python2-setuptools-scm
5477 (package-with-python2 python-setuptools-scm))
5478
5479 (define-public python-pathpy
5480 (package
5481 (name "python-pathpy")
5482 (version "8.1.1")
5483 (source
5484 (origin
5485 (method url-fetch)
5486 (uri (string-append "https://pypi.python.org/packages/source/p/"
5487 "path.py/path.py-" version ".tar.gz"))
5488 (sha256
5489 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
5490 (outputs '("out" "doc"))
5491 (build-system python-build-system)
5492 (propagated-inputs
5493 `(("python-appdirs" ,python-appdirs)))
5494 (native-inputs
5495 `(("python-setuptools-scm" ,python-setuptools-scm)
5496 ("python-sphinx" ,python-sphinx)
5497 ("python-rst.linker" ,python-rst.linker)
5498 ("python-pytest" ,python-pytest)
5499 ("python-pytest-runner" ,python-pytest-runner)))
5500 (arguments
5501 `(#:phases
5502 (modify-phases %standard-phases
5503 (add-after 'build 'build-doc
5504 (lambda _
5505 (setenv "LANG" "en_US.UTF-8")
5506 (zero? (system* "python" "setup.py" "build_sphinx"))))
5507 (add-after 'install 'install-doc
5508 (lambda* (#:key 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 (mkdir-p html)
5513 (for-each (lambda (file)
5514 (copy-file file (string-append doc "/" file)))
5515 '("README.rst" "CHANGES.rst"))
5516 (copy-recursively "build/sphinx/html" html)))))))
5517 (home-page "https://github.com/jaraco/path.py")
5518 (synopsis "Python module wrapper for built-in os.path")
5519 (description
5520 "@code{path.py} implements path objects as first-class entities, allowing
5521 common operations on files to be invoked on those path objects directly.")
5522 (license license:expat)))
5523
5524 (define-public python2-pathpy
5525 (package-with-python2 python-pathpy))
5526
5527 (define-public python-pickleshare
5528 (package
5529 (name "python-pickleshare")
5530 (version "0.5")
5531 (source
5532 (origin
5533 (method url-fetch)
5534 (uri (string-append "https://pypi.python.org/packages/source/p/"
5535 "pickleshare/pickleshare-" version ".tar.gz"))
5536 (sha256
5537 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
5538 (build-system python-build-system)
5539 (propagated-inputs
5540 `(("python-pathpy" ,python-pathpy)))
5541 (home-page "https://github.com/vivainio/pickleshare")
5542 (synopsis "Tiny key value database with concurrency support")
5543 (description
5544 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
5545 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
5546 shelve, many processes can access the database simultaneously. Changing a
5547 value in database is immediately visible to other processes accessing the same
5548 database. Concurrency is possible because the values are stored in separate
5549 files. Hence the “database” is a directory where all files are governed by
5550 PickleShare.")
5551 (license license:expat)))
5552
5553 (define-public python2-pickleshare
5554 (package-with-python2 python-pickleshare))
5555
5556 (define-public python-simplegeneric
5557 (package
5558 (name "python-simplegeneric")
5559 (version "0.8.1")
5560 (source
5561 (origin
5562 (method url-fetch)
5563 (uri (string-append "https://pypi.python.org/packages/source/s/"
5564 "simplegeneric/simplegeneric-" version ".zip"))
5565 (sha256
5566 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5567 (build-system python-build-system)
5568 (native-inputs
5569 `(("unzip" ,unzip)))
5570 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5571 (synopsis "Python module for simple generic functions")
5572 (description
5573 "The simplegeneric module lets you define simple single-dispatch generic
5574 functions, akin to Python’s built-in generic functions like @code{len()},
5575 @code{iter()} and so on. However, instead of using specially-named methods,
5576 these generic functions use simple lookup tables, akin to those used by
5577 e.g. @code{pickle.dump()} and other generic functions found in the Python
5578 standard library.")
5579 (license license:zpl2.1)))
5580
5581 (define-public python2-simplegeneric
5582 (package-with-python2 python-simplegeneric))
5583
5584 (define-public python-ipython-genutils
5585 ;; TODO: This package is retired, check if can be removed, see description.
5586 (package
5587 (name "python-ipython-genutils")
5588 (version "0.1.0")
5589 (source
5590 (origin
5591 (method url-fetch)
5592 (uri (string-append "https://pypi.python.org/packages/source/i/"
5593 "ipython_genutils/ipython_genutils-"
5594 version ".tar.gz"))
5595 (sha256
5596 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5597 (build-system python-build-system)
5598 (arguments `(#:tests? #f)) ; no tests
5599 (home-page "http://ipython.org")
5600 (synopsis "Vestigial utilities from IPython")
5601 (description
5602 "This package provides retired utilities from IPython. No packages
5603 outside IPython/Jupyter should depend on it.
5604
5605 This package shouldn't exist. It contains some common utilities shared by
5606 Jupyter and IPython projects during The Big Split. As soon as possible, those
5607 packages will remove their dependency on this, and this package will go
5608 away.")
5609 (license license:bsd-3)))
5610
5611 (define-public python2-ipython-genutils
5612 (package-with-python2 python-ipython-genutils))
5613
5614 (define-public python-traitlets
5615 (package
5616 (name "python-traitlets")
5617 (version "4.2.0")
5618 (source
5619 (origin
5620 (method url-fetch)
5621 (uri (pypi-uri "traitlets" version))
5622 (sha256
5623 (base32
5624 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
5625 (build-system python-build-system)
5626 (arguments
5627 `(#:phases
5628 (modify-phases %standard-phases
5629 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5630 (propagated-inputs
5631 `(("python-ipython-genutils" ,python-ipython-genutils)
5632 ("python-decorator" ,python-decorator)))
5633 (native-inputs
5634 `(("python-mock" ,python-mock)
5635 ("python-nose" ,python-nose)))
5636 (home-page "http://ipython.org")
5637 (synopsis "Configuration system for Python applications")
5638 (description
5639 "Traitlets is a framework that lets Python classes have attributes with
5640 type checking, dynamically calculated default values, and ‘on change’
5641 callbacks. The package also includes a mechanism to use traitlets for
5642 configuration, loading values from files or from command line arguments. This
5643 is a distinct layer on top of traitlets, so you can use traitlets in your code
5644 without using the configuration machinery.")
5645 (license license:bsd-3)))
5646
5647 (define-public python2-traitlets
5648 (package-with-python2 python-traitlets))
5649
5650 (define-public python-jupyter-core
5651 (package
5652 (name "python-jupyter-core")
5653 (version "4.2.1")
5654 (source
5655 (origin
5656 (method url-fetch)
5657 (uri (string-append (pypi-uri "jupyter_core" version)))
5658 (sha256
5659 (base32
5660 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
5661 (build-system python-build-system)
5662 ;; FIXME: not sure how to run the tests
5663 (arguments `(#:tests? #f))
5664 (propagated-inputs
5665 `(("python-traitlets" ,python-traitlets)))
5666 (home-page "http://jupyter.org/")
5667 (synopsis "Jupyter base package")
5668 (description
5669 "Jupyter core is the base package on which Jupyter projects rely.")
5670 (license license:bsd-3)))
5671
5672 (define-public python2-jupyter-core
5673 (package-with-python2 python-jupyter-core))
5674
5675 (define-public python-jupyter-client
5676 (package
5677 (name "python-jupyter-client")
5678 (version "4.4.0")
5679 (source
5680 (origin
5681 (method url-fetch)
5682 (uri (pypi-uri "jupyter_client" version))
5683 (sha256
5684 (base32
5685 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
5686 (build-system python-build-system)
5687 ;; Tests fail because of missing native python kernel which I assume is
5688 ;; provided by the ipython package, which we cannot use because it would
5689 ;; cause a dependency cycle.
5690 (arguments `(#:tests? #f))
5691 (propagated-inputs
5692 `(("python-pyzmq" ,python-pyzmq)
5693 ("python-traitlets" ,python-traitlets)
5694 ("python-jupyter-core" ,python-jupyter-core)))
5695 (home-page "http://jupyter.org/")
5696 (synopsis "Jupyter protocol implementation and client libraries")
5697 (description
5698 "The @code{jupyter_client} package contains the reference implementation
5699 of the Jupyter protocol. It also provides client and kernel management APIs
5700 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5701 installing @code{kernelspec}s for use with Jupyter frontends.")
5702 (license license:bsd-3)))
5703
5704 (define-public python2-jupyter-client
5705 (package-with-python2 python-jupyter-client))
5706
5707 (define-public python-ipykernel
5708 (package
5709 (name "python-ipykernel")
5710 (version "4.5.2")
5711 (source
5712 (origin
5713 (method url-fetch)
5714 (uri (pypi-uri "ipykernel" version))
5715 (sha256
5716 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
5717 (build-system python-build-system)
5718 ;; The tests load a submodule of IPython. However, IPython itself depends
5719 ;; on ipykernel.
5720 (arguments `(#:tests? #f))
5721 (propagated-inputs
5722 ;; imported at runtime during connect
5723 `(("python-jupyter-client" ,python-jupyter-client)))
5724 (home-page "http://ipython.org")
5725 (synopsis "IPython Kernel for Jupyter")
5726 (description
5727 "This package provides the IPython kernel for Jupyter.")
5728 (license license:bsd-3)))
5729
5730 (define-public python2-ipykernel
5731 (package-with-python2 python-ipykernel))
5732
5733 (define-public python-testpath
5734 (package
5735 (name "python-testpath")
5736 (version "0.2")
5737 (source
5738 (origin
5739 (method url-fetch)
5740 (uri (string-append "https://github.com/jupyter/testpath/archive/"
5741 version ".tar.gz"))
5742 (file-name (string-append name "-" version ".tar.gz"))
5743 (sha256
5744 (base32
5745 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
5746 (build-system python-build-system)
5747 (arguments
5748 `(#:tests? #f ; this package does not even have a setup.py
5749 #:modules ((guix build python-build-system)
5750 (guix build utils)
5751 (srfi srfi-1))
5752 #:imported-modules (,@%python-build-system-modules
5753 (srfi srfi-1))
5754 #:phases
5755 (modify-phases %standard-phases
5756 (delete 'install)
5757 (replace 'build
5758 (lambda* (#:key inputs outputs #:allow-other-keys)
5759 (let* ((version (last
5760 (string-split (assoc-ref inputs "python") #\-)))
5761 (x.y (string-join (take (string-split version #\.) 2)
5762 "."))
5763 (dir (string-append
5764 (assoc-ref outputs "out")
5765 "/lib/python" x.y "/site-packages/testpath")))
5766 (mkdir-p dir)
5767 (copy-recursively "testpath" dir))
5768 #t)))))
5769 (home-page "https://github.com/takluyver/testpath")
5770 (synopsis "Test utilities for code working with files and commands")
5771 (description
5772 "Testpath is a collection of utilities for Python code working with files
5773 and commands. It contains functions to check things on the filesystem, and
5774 tools for mocking system commands and recording calls to those.")
5775 (license license:expat)))
5776
5777 (define-public python2-testpath
5778 (package-with-python2 python-testpath))
5779
5780 (define-public python-ipython
5781 (package
5782 (name "python-ipython")
5783 (version "5.2.2")
5784 (source
5785 (origin
5786 (method url-fetch)
5787 (uri (pypi-uri "ipython" version ".tar.gz"))
5788 (sha256
5789 (base32 "1qhjwa9cyz1np7rhv3p4ip13lkgbqsad62l24xkwiq1ic2gwiqbf"))))
5790 (build-system python-build-system)
5791 (outputs '("out" "doc"))
5792 (propagated-inputs
5793 `(("python-pyzmq" ,python-pyzmq)
5794 ("python-prompt-toolkit" ,python-prompt-toolkit)
5795 ("python-terminado" ,python-terminado)
5796 ("python-matplotlib" ,python-matplotlib)
5797 ("python-numpy" ,python-numpy)
5798 ("python-numpydoc" ,python-numpydoc)
5799 ("python-jinja2" ,python-jinja2)
5800 ("python-mistune" ,python-mistune)
5801 ("python-pexpect" ,python-pexpect)
5802 ("python-pickleshare" ,python-pickleshare)
5803 ("python-simplegeneric" ,python-simplegeneric)
5804 ("python-jsonschema" ,python-jsonschema)
5805 ("python-traitlets" ,python-traitlets)
5806 ("python-ipykernel" ,python-ipykernel)
5807 ("python-nbformat" ,python-nbformat)
5808 ("python-pygments" ,python-pygments)))
5809 (inputs
5810 `(("readline" ,readline)
5811 ("which" ,which)))
5812 (native-inputs
5813 `(("graphviz" ,graphviz)
5814 ("pkg-config" ,pkg-config)
5815 ("python-requests" ,python-requests) ;; for tests
5816 ("python-testpath" ,python-testpath)
5817 ("python-nose" ,python-nose)
5818 ("python-sphinx" ,python-sphinx)
5819 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
5820 ;; FIXME: It's possible that a smaller union would work just as well.
5821 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
5822 texlive-fonts-ec
5823 texlive-generic-ifxetex
5824 texlive-generic-pdftex
5825 texlive-latex-amsfonts
5826 texlive-latex-capt-of
5827 texlive-latex-cmap
5828 texlive-latex-environ
5829 texlive-latex-eqparbox
5830 texlive-latex-etoolbox
5831 texlive-latex-expdlist
5832 texlive-latex-fancyhdr
5833 texlive-latex-fancyvrb
5834 texlive-latex-fncychap
5835 texlive-latex-float
5836 texlive-latex-framed
5837 texlive-latex-geometry
5838 texlive-latex-graphics
5839 texlive-latex-hyperref
5840 texlive-latex-mdwtools
5841 texlive-latex-multirow
5842 texlive-latex-oberdiek
5843 texlive-latex-parskip
5844 texlive-latex-preview
5845 texlive-latex-tabulary
5846 texlive-latex-threeparttable
5847 texlive-latex-titlesec
5848 texlive-latex-trimspaces
5849 texlive-latex-ucs
5850 texlive-latex-upquote
5851 texlive-latex-url
5852 texlive-latex-varwidth
5853 texlive-latex-wrapfig)))
5854 ("texinfo" ,texinfo)))
5855 (arguments
5856 `(#:phases
5857 (modify-phases %standard-phases
5858 (add-after
5859 'install 'install-doc
5860 (lambda* (#:key inputs outputs #:allow-other-keys)
5861 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5862 (doc (string-append data "/doc/" ,name "-" ,version))
5863 (html (string-append doc "/html"))
5864 (man1 (string-append data "/man/man1"))
5865 (info (string-append data "/info"))
5866 (examples (string-append doc "/examples"))
5867 (python-arg (string-append "PYTHON=" (which "python"))))
5868 (setenv "LANG" "en_US.utf8")
5869 ;; Make installed package available for running the tests
5870 (add-installed-pythonpath inputs outputs)
5871 (with-directory-excursion "docs"
5872 ;; FIXME: pdf fails to build
5873 ;;(system* "make" "pdf" "PAPER=a4")
5874 (system* "make" python-arg "html")
5875 (system* "make" python-arg "info"))
5876 (copy-recursively "docs/man" man1)
5877 (copy-recursively "examples" examples)
5878 (copy-recursively "docs/build/html" html)
5879 ;; (copy-file "docs/build/latex/ipython.pdf"
5880 ;; (string-append doc "/ipython.pdf"))
5881 (mkdir-p info)
5882 (copy-file "docs/build/texinfo/ipython.info"
5883 (string-append info "/ipython.info"))
5884 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
5885 ;; Tests can only be run after the library has been installed and not
5886 ;; within the source directory.
5887 (delete 'check)
5888 (add-after
5889 'install 'check
5890 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5891 (if tests?
5892 (with-directory-excursion "/tmp"
5893 ;; Make installed package available for running the tests
5894 (add-installed-pythonpath inputs outputs)
5895 (setenv "HOME" "/tmp/") ;; required by a test
5896 (zero? (system* (string-append (assoc-ref outputs "out")
5897 "/bin/iptest"))))
5898 #t)))
5899 (add-before
5900 'install 'fix-tests
5901 (lambda* (#:key inputs #:allow-other-keys)
5902 (substitute* "./IPython/utils/_process_posix.py"
5903 (("/usr/bin/env', 'which") (which "which")))
5904 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5905 (("#!/usr/bin/env python")
5906 (string-append "#!" (which "python"))))
5907 ;; Disable 1 failing test
5908 (substitute* "./IPython/core/tests/test_magic.py"
5909 (("def test_dirops\\(\\):" all)
5910 (string-append "@dec.skipif(True)\n" all))))))))
5911 (home-page "http://ipython.org")
5912 (synopsis "IPython is a tool for interactive computing in Python")
5913 (description
5914 "IPython provides a rich architecture for interactive computing with:
5915 Powerful interactive shells, a browser-based notebook, support for interactive
5916 data visualization, embeddable interpreters and tools for parallel
5917 computing.")
5918 (license license:bsd-3)
5919 (properties `((python2-variant . ,(delay python2-ipython))))))
5920
5921 (define-public python2-ipython
5922 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
5923 (package
5924 (inherit ipython)
5925 ;; FIXME: add pyreadline once available.
5926 (propagated-inputs
5927 `(("python2-backports-shutil-get-terminal-size"
5928 ,python2-backports-shutil-get-terminal-size)
5929 ("python2-pathlib2" ,python2-pathlib2)
5930 ,@(package-propagated-inputs ipython)))
5931 (native-inputs
5932 `(("python2-mock" ,python2-mock)
5933 ,@(package-native-inputs ipython))))))
5934
5935 (define-public python-isodate
5936 (package
5937 (name "python-isodate")
5938 (version "0.5.4")
5939 (source
5940 (origin
5941 (method url-fetch)
5942 (uri (pypi-uri "isodate" version))
5943 (sha256
5944 (base32
5945 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
5946 (build-system python-build-system)
5947 (home-page
5948 "http://cheeseshop.python.org/pypi/isodate")
5949 (synopsis
5950 "Python date parser and formatter")
5951 (description
5952 "Python-isodate is a python module for parsing and formatting
5953 ISO 8601 dates, time and duration.")
5954 (license license:bsd-3)))
5955
5956 (define-public python2-isodate
5957 (package-with-python2 python-isodate))
5958
5959 (define-public python-html5lib
5960 (package
5961 (name "python-html5lib")
5962 (version "1.0b10")
5963 (source
5964 (origin
5965 (method url-fetch)
5966 (uri (pypi-uri "html5lib" version))
5967 (sha256
5968 (base32
5969 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
5970 (build-system python-build-system)
5971 (propagated-inputs
5972 `(("python-six" ,python-six)
5973 ("python-webencodings" ,python-webencodings)))
5974 (arguments
5975 `(#:test-target "check"))
5976 (home-page
5977 "https://github.com/html5lib/html5lib-python")
5978 (synopsis
5979 "Python HTML parser based on the WHATWG HTML specifcation")
5980 (description
5981 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
5982 and written in Python.")
5983 (license license:expat)))
5984
5985 (define-public python2-html5lib
5986 (package-with-python2 python-html5lib))
5987
5988 ;; Needed for python-bleach, a dependency of python-notebook
5989 (define-public python-html5lib-0.9
5990 (package
5991 (inherit python-html5lib)
5992 (version "0.999")
5993 (source
5994 (origin
5995 (method url-fetch)
5996 (uri (pypi-uri "html5lib" version))
5997 (sha256
5998 (base32
5999 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
6000
6001 (define-public python2-html5lib-0.9
6002 (package-with-python2 python-html5lib-0.9))
6003
6004 (define-public python-html5-parser
6005 (package
6006 (name "python-html5-parser")
6007 (version "0.4.4")
6008 (source (origin
6009 (method url-fetch)
6010 (uri (pypi-uri "html5-parser" version))
6011 (sha256
6012 (base32
6013 "1d8sxhl41ffh7qlk7wlsy17xw6slzx5v1yna9s72wx5qrpaa3wxr"))))
6014 (build-system python-build-system)
6015 (native-inputs
6016 `(("pkg-config" ,pkg-config)))
6017 (inputs
6018 `(("libxml2" ,libxml2)))
6019 (propagated-inputs
6020 `(("python-lxml" ,python-lxml)
6021 ("python-beautifulsoup4" ,python-beautifulsoup4)))
6022 (home-page "https://html5-parser.readthedocs.io")
6023 (synopsis "Fast C-based HTML5 parsing for Python")
6024 (description "This package provides a fast implementation of the HTML5
6025 parsing spec for Python. Parsing is done in C using a variant of the gumbo
6026 parser. The gumbo parse tree is then transformed into an lxml tree, also in
6027 C, yielding parse times that can be a thirtieth of the html5lib parse times.")
6028 ;; src/as-python-tree.[c|h] are licensed GPL3. The other files
6029 ;; indicate ASL2.0, including the LICENSE file for the whole project.
6030 (license (list license:asl2.0 license:gpl3))))
6031
6032 (define-public python2-html5-parser
6033 (package-with-python2 python-html5-parser))
6034
6035 (define-public python-webencodings
6036 (package
6037 (name "python-webencodings")
6038 (version "0.5")
6039 (source (origin
6040 (method url-fetch)
6041 (uri (pypi-uri "webencodings" version))
6042 (sha256
6043 (base32
6044 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
6045 (build-system python-build-system)
6046 (arguments
6047 '(#:phases
6048 (modify-phases %standard-phases
6049 (replace 'check
6050 (lambda _
6051 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
6052 (native-inputs
6053 `(("python-pytest" ,python-pytest)))
6054 (home-page "https://github.com/SimonSapin/python-webencodings")
6055 (synopsis "Character encoding aliases for legacy web content")
6056 (description
6057 "In order to be compatible with legacy web content when interpreting
6058 something like @code{Content-Type: text/html; charset=latin1}, tools need
6059 to use a particular set of aliases for encoding labels as well as some
6060 overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
6061 the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
6062 or @code{UTF-16} BOM takes precedence over any other encoding declaration.
6063 The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
6064 defines all such details so that implementations do not have to
6065 reverse-engineer each other.
6066
6067 This module implements the Encoding standard and has encoding labels and
6068 BOM detection, but the actual implementation for encoders and decoders
6069 is Python’s.")
6070 (license license:bsd-3)))
6071
6072 (define-public python2-webencodings
6073 (package-with-python2 python-webencodings))
6074
6075 (define-public python-urwid
6076 (package
6077 (name "python-urwid")
6078 (version "1.3.1")
6079 (source
6080 (origin
6081 (method url-fetch)
6082 (uri (pypi-uri "urwid" version))
6083 (sha256
6084 (base32
6085 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
6086 (build-system python-build-system)
6087 (arguments
6088 `(#:phases
6089 (modify-phases %standard-phases
6090 ;; Disable failing test. Bug filed upstream:
6091 ;; https://github.com/wardi/urwid/issues/164
6092 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
6093 (add-after 'unpack 'disable-failing-test
6094 (lambda _
6095 (substitute* "urwid/tests/test_event_loops.py"
6096 (("test_remove_watch_file")
6097 "disable_remove_watch_file")))))))
6098 (home-page "http://urwid.org")
6099 (synopsis "Console user interface library for Python")
6100 (description
6101 "Urwid is a curses-based UI/widget library for Python. It includes many
6102 features useful for text console applications.")
6103 (license license:lgpl2.1+)))
6104
6105 (define-public python2-urwid
6106 (let ((python2-urwid (package-with-python2 python-urwid)))
6107 (package
6108 (inherit python2-urwid)
6109 (arguments
6110 (append
6111 `(;; Explicitly using Python 2 is necessary due the argument list being
6112 ;; built from only the 'delete-test_vterm.py' phase and python-urwid's
6113 ;; package arguments, which by default assumes the use of Python 3.
6114 #:python ,python-2
6115 #:phases
6116 (modify-phases %standard-phases
6117 ;; Disable the vterm tests because of non-deterministic failures
6118 ;; with Python 2. See https://github.com/urwid/urwid/issues/230.
6119 (add-after 'unpack 'delete-test_vterm.py
6120 (delete-file "urwid/tests/test_vterm.py"))))
6121 (package-arguments python-urwid))))))
6122
6123 (define-public python-openid
6124 (package
6125 (name "python-openid")
6126 (version "3.0.10")
6127 (source
6128 (origin
6129 (method url-fetch)
6130 (uri (pypi-uri "python3-openid" version))
6131 (sha256
6132 (base32
6133 "1x3nh3fycqfn43jp5j5pb4q4y2jxp4mdka4absaa3bc0078qd758"))))
6134 (build-system python-build-system)
6135 (arguments
6136 `(#:phases
6137 (modify-phases %standard-phases
6138 (replace 'check
6139 (lambda _
6140 (zero? (system* "./admin/runtests")))))))
6141 (properties `((python2-variant . ,(delay python2-openid))))
6142 (propagated-inputs
6143 `(("python-defusedxml" ,python-defusedxml)))
6144 (native-inputs
6145 `(("python-psycopg2" ,python-psycopg2)
6146 ("python-django" ,python-django)))
6147 (home-page "https://github.com/necaris/python3-openid")
6148 (synopsis "OpenID support for servers and consumers")
6149 (description "This library provides OpenID authentication for Python, both
6150 for clients and servers.")
6151 (license license:asl2.0)))
6152
6153 (define-public python2-openid
6154 (package
6155 (name "python2-openid")
6156 (version "2.2.5")
6157 (source
6158 (origin
6159 (method url-fetch)
6160 (uri (pypi-uri "python-openid" version))
6161 (sha256
6162 (base32
6163 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
6164 (build-system python-build-system)
6165 (arguments
6166 ;; Python 3 support is in `python3-openid`, a separate package.
6167 `(#:python ,python-2))
6168 (home-page "https://github.com/openid/python-openid")
6169 (synopsis "OpenID support for servers and consumers")
6170 (description "This library provides OpenID authentication for Python, both
6171 for clients and servers.")
6172 (license license:asl2.0)))
6173
6174 (define-public python-urwidtrees
6175 (package
6176 (name "python-urwidtrees")
6177 (version "1.0.2")
6178 (source
6179 (origin
6180 (method url-fetch)
6181 ;; package author intends on distributing via github rather than pypi:
6182 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
6183 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
6184 version ".tar.gz"))
6185 (file-name (string-append name "-" version ".tar.gz"))
6186 (sha256
6187 (base32
6188 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
6189 (build-system python-build-system)
6190 (arguments
6191 '(#:tests? #f)) ; no tests
6192 (propagated-inputs `(("python-urwid" ,python-urwid)))
6193 (home-page "https://github.com/pazz/urwidtrees")
6194 (synopsis "Tree widgets for urwid")
6195 (description "Urwidtrees is a Widget Container API for the @code{urwid}
6196 toolkit. Use it to build trees of widgets.")
6197 (license license:gpl3+)))
6198
6199 (define-public python2-urwidtrees
6200 (package-with-python2 python-urwidtrees))
6201
6202 (define-public python-dbus
6203 (package
6204 (name "python-dbus")
6205 (version "1.2.0")
6206 (source
6207 (origin
6208 (method url-fetch)
6209 (uri (string-append
6210 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
6211 version ".tar.gz"))
6212 (sha256
6213 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
6214 (build-system gnu-build-system)
6215 (arguments
6216 '(#:phases
6217 (modify-phases %standard-phases
6218 (add-before
6219 'check 'pre-check
6220 (lambda _
6221 ;; XXX: For the missing '/etc/machine-id'.
6222 (substitute* "test/run-test.sh"
6223 (("DBUS_FATAL_WARNINGS=1")
6224 "DBUS_FATAL_WARNINGS=0"))
6225 #t)))))
6226 (native-inputs
6227 `(("pkg-config" ,pkg-config)))
6228 (inputs
6229 `(("python" ,python)
6230 ("dbus-glib" ,dbus-glib)))
6231 (synopsis "Python bindings for D-bus")
6232 (description "python-dbus provides bindings for libdbus, the reference
6233 implementation of D-Bus.")
6234 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
6235 (license license:expat)))
6236
6237 (define-public python2-dbus
6238 (package (inherit python-dbus)
6239 (name "python2-dbus")
6240 (inputs `(("python" ,python-2)
6241 ,@(alist-delete "python"
6242 (package-inputs python-dbus)
6243 equal?)))
6244 ;; FIXME: on Python 2, the test_utf8 fails with:
6245 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
6246 (arguments `(#:tests? #f))))
6247
6248 (define-public python-apsw
6249 (package
6250 (name "python-apsw")
6251 (version "3.9.2-r1")
6252 (source
6253 (origin
6254 (method url-fetch)
6255 (uri (pypi-uri "apsw" version))
6256 (sha256
6257 (base32
6258 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
6259 (build-system python-build-system)
6260 (inputs
6261 `(("sqlite" ,sqlite)))
6262 (arguments
6263 `(#:phases
6264 (modify-phases %standard-phases
6265 (replace 'build
6266 (lambda _
6267 (zero?
6268 (system* "python" "setup.py" "build" "--enable-all-extensions"))))
6269 (add-after 'build 'build-test-helper
6270 (lambda _
6271 (zero?
6272 (system
6273 (string-append "gcc -fPIC -shared -o ./testextension.sqlext "
6274 "-I. -Isqlite3 src/testextension.c") ))))
6275 (delete 'check)
6276 (add-after 'install 'check
6277 (lambda* (#:key inputs outputs #:allow-other-keys)
6278 (add-installed-pythonpath inputs outputs)
6279 (zero? (system* "python" "setup.py" "test")))))))
6280 (home-page "https://github.com/rogerbinns/apsw/")
6281 (synopsis "Another Python SQLite Wrapper")
6282 (description "APSW is a Python wrapper for the SQLite
6283 embedded relational database engine. In contrast to other wrappers such as
6284 pysqlite it focuses on being a minimal layer over SQLite attempting just to
6285 translate the complete SQLite API into Python.")
6286 (license license:zlib)))
6287
6288 (define-public python2-apsw
6289 (package-with-python2 python-apsw))
6290
6291 (define-public python-lxml
6292 (package
6293 (name "python-lxml")
6294 (version "3.8.0")
6295 (source
6296 (origin
6297 (method url-fetch)
6298 (uri (pypi-uri "lxml" version))
6299 (sha256
6300 (base32
6301 "15nvf6n285n282682qyw3wihsncb0x5amdhyi4b83bfa2nz74vvk"))))
6302 (build-system python-build-system)
6303 (inputs
6304 `(("libxml2" ,libxml2)
6305 ("libxslt" ,libxslt)))
6306 (home-page "http://lxml.de/")
6307 (synopsis
6308 "Python XML processing library")
6309 (description
6310 "The lxml XML toolkit is a Pythonic binding for the C libraries
6311 libxml2 and libxslt.")
6312 (license license:bsd-3))) ; and a few more, see LICENSES.txt
6313
6314 (define-public python2-lxml
6315 (package-with-python2 python-lxml))
6316
6317 ;; beautifulsoup4 has a totally different namespace than 3.x,
6318 ;; and pypi seems to put it under its own name, so I guess we should too
6319 (define-public python-beautifulsoup4
6320 (package
6321 (name "python-beautifulsoup4")
6322 (version "4.5.3")
6323 (source
6324 (origin
6325 (method url-fetch)
6326 (uri (pypi-uri "beautifulsoup4" version))
6327 (sha256
6328 (base32
6329 "0glaw1vyxnbp03fni7h5496n6iib0n5iim4gax1n0ngscs9s075j"))))
6330 (build-system python-build-system)
6331 (arguments
6332 `(#:phases
6333 (modify-phases %standard-phases
6334 ;; The Python 2 source is the definitive source of beautifulsoup4. We
6335 ;; must use this conversion script when building with Python 3. The
6336 ;; conversion script also runs the tests.
6337 ;; For more information, see the file 'convert-py3k' in the source
6338 ;; distribution.
6339 (replace 'check
6340 (lambda _ (zero? (system* "./convert-py3k")))))))
6341 (home-page
6342 "http://www.crummy.com/software/BeautifulSoup/bs4/")
6343 (synopsis
6344 "Python screen-scraping library")
6345 (description
6346 "Beautiful Soup is a Python library designed for rapidly setting up
6347 screen-scraping projects. It offers Pythonic idioms for navigating,
6348 searching, and modifying a parse tree, providing a toolkit for
6349 dissecting a document and extracting what you need. It automatically
6350 converts incoming documents to Unicode and outgoing documents to UTF-8.")
6351 (license license:expat)
6352 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
6353
6354 (define-public python2-beautifulsoup4
6355 (package
6356 (inherit (package-with-python2
6357 (strip-python2-variant python-beautifulsoup4)))
6358 (arguments `(#:python ,python-2))))
6359
6360 (define-public python-cssutils
6361 (package
6362 (name "python-cssutils")
6363 (version "1.0.1")
6364 (source
6365 (origin
6366 (method url-fetch)
6367 (uri (pypi-uri "cssutils" version))
6368 (sha256
6369 (base32
6370 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
6371 (build-system python-build-system)
6372 (native-inputs
6373 `(("unzip" ,unzip))) ; for unpacking the source
6374 (arguments
6375 `(#:tests? #f)) ;tests require python-pbr < 1.7.0
6376 (home-page "http://cthedot.de/cssutils/")
6377 (synopsis
6378 "CSS Cascading Style Sheets library for Python")
6379 (description
6380 "Cssutils is a Python package for parsing and building CSS
6381 Cascading Style Sheets. Currently it provides a DOM only and no rendering
6382 options.")
6383 (license license:lgpl3+)))
6384
6385 (define-public python2-cssutils
6386 (package-with-python2 python-cssutils))
6387
6388 (define-public python-cssselect
6389 (package
6390 (name "python-cssselect")
6391 (version "0.9.2")
6392 (source
6393 (origin
6394 (method url-fetch)
6395 (uri (pypi-uri "cssselect" version))
6396 (sha256
6397 (base32
6398 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
6399 (build-system python-build-system)
6400 (arguments
6401 ;; tests fail with message
6402 ;; AttributeError: 'module' object has no attribute 'tests'
6403 `(#:tests? #f))
6404 (home-page
6405 "https://pythonhosted.org/cssselect/")
6406 (synopsis
6407 "CSS3 selector parser and translator to XPath 1.0")
6408 (description
6409 "Cssselect ia a Python module that parses CSS3 Selectors and translates
6410 them to XPath 1.0 expressions. Such expressions can be used in lxml or
6411 another XPath engine to find the matching elements in an XML or HTML document.")
6412 (license license:bsd-3)))
6413
6414 (define-public python2-cssselect
6415 (package-with-python2 python-cssselect))
6416
6417 (define-public python-openid-cla
6418 (package
6419 (name "python-openid-cla")
6420 (version "1.2")
6421 (source
6422 (origin
6423 (method url-fetch)
6424 (uri (pypi-uri "python-openid-cla" version))
6425 (sha256
6426 (base32
6427 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
6428 (build-system python-build-system)
6429 (arguments '(#:tests? #f)) ; No tests.
6430 (home-page "https://github.com/puiterwijk/python-openid-cla/")
6431 (synopsis "Implementation of the OpenID CLA extension for python-openid")
6432 (description "@code{openid-cla} is an implementation of the OpenID
6433 contributor license agreement extension for python-openid.")
6434 (license license:bsd-3)))
6435
6436 (define-public python2-openid-cla
6437 (package-with-python2 python-openid-cla))
6438
6439 (define-public python-openid-teams
6440 (package
6441 (name "python-openid-teams")
6442 (version "1.1")
6443 (source
6444 (origin
6445 (method url-fetch)
6446 (uri (pypi-uri "python-openid-teams" version))
6447 (sha256
6448 (base32
6449 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
6450 (build-system python-build-system)
6451 (arguments '(#:tests? #f)) ; No tests.
6452 (home-page "https://github.com/puiterwijk/python-openid-teams/")
6453 (synopsis "Implementation of the OpenID teams extension for python-openid")
6454 (description
6455 "@code{openid-teams} is an implementation of the OpenID
6456 teams extension for python-openid.")
6457 (license license:bsd-3)))
6458
6459 (define-public python2-openid-teams
6460 (package-with-python2 python-openid-teams))
6461
6462 (define-public python-netifaces
6463 (package
6464 (name "python-netifaces")
6465 (version "0.10.4")
6466 (source
6467 (origin
6468 (method url-fetch)
6469 (uri (string-append
6470 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
6471 version
6472 ".tar.gz"))
6473 (sha256
6474 (base32
6475 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
6476 (build-system python-build-system)
6477 (home-page
6478 "https://bitbucket.org/al45tair/netifaces")
6479 (synopsis
6480 "Python module for portable network interface information")
6481 (description
6482 "Netifaces is a Python module providing information on network
6483 interfaces in an easy and portable manner.")
6484 (license license:expat)))
6485
6486 (define-public python2-netifaces
6487 (package-with-python2 python-netifaces))
6488
6489 (define-public python-networkx
6490 (package
6491 (name "python-networkx")
6492 (version "1.11")
6493 (source
6494 (origin
6495 (method url-fetch)
6496 (uri (pypi-uri "networkx" version))
6497 (sha256
6498 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
6499 (build-system python-build-system)
6500 ;; python-decorator is needed at runtime
6501 (propagated-inputs
6502 `(("python-decorator" ,python-decorator)))
6503 (native-inputs
6504 `(("python-nose" ,python-nose)))
6505 (home-page "http://networkx.github.io/")
6506 (synopsis "Python module for creating and manipulating graphs and networks")
6507 (description
6508 "NetworkX is a Python package for the creation, manipulation, and study
6509 of the structure, dynamics, and functions of complex networks.")
6510 (license license:bsd-3)))
6511
6512 (define-public python2-networkx
6513 (package-with-python2 python-networkx))
6514
6515 (define-public snakemake
6516 (package
6517 (name "snakemake")
6518 (version "3.13.3")
6519 (source
6520 (origin
6521 (method url-fetch)
6522 (uri (pypi-uri "snakemake" version))
6523 (sha256
6524 (base32 "1nixb944r4hlskwkzc4wjs34b40xpxpw9gmhhm5p09gvmm22ap5d"))))
6525 (build-system python-build-system)
6526 (arguments
6527 ;; TODO: Package missing test dependencies.
6528 '(#:tests? #f
6529 #:phases
6530 (modify-phases %standard-phases
6531 ;; For cluster execution Snakemake will call Python. Since there is
6532 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6533 ;; this by calling the snakemake wrapper instead.
6534 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6535 (lambda* (#:key outputs #:allow-other-keys)
6536 (substitute* "snakemake/executors.py"
6537 (("\\{sys.executable\\} -m snakemake")
6538 (string-append (assoc-ref outputs "out")
6539 "/bin/snakemake")))
6540 #t)))))
6541 (propagated-inputs
6542 `(("python-wrapt" ,python-wrapt)
6543 ("python-requests" ,python-requests)))
6544 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
6545 (synopsis "Python-based execution environment for make-like workflows")
6546 (description
6547 "Snakemake aims to reduce the complexity of creating workflows by
6548 providing a clean and modern domain specific specification language (DSL) in
6549 Python style, together with a fast and comfortable execution environment.")
6550 (license license:expat)))
6551
6552 (define-public python-seaborn
6553 (package
6554 (name "python-seaborn")
6555 (version "0.7.1")
6556 (source
6557 (origin
6558 (method url-fetch)
6559 (uri (pypi-uri "seaborn" version))
6560 (sha256
6561 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
6562 (build-system python-build-system)
6563 (arguments
6564 '(#:tests? #f)) ; Tests requires a running X11 server.
6565 (propagated-inputs
6566 `(("python-pandas" ,python-pandas)
6567 ("python-matplotlib" ,python-matplotlib)
6568 ("python-scipy" ,python-scipy)))
6569 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6570 (synopsis "Statistical data visualization")
6571 (description
6572 "Seaborn is a library for making attractive and informative statistical
6573 graphics in Python. It is built on top of matplotlib and tightly integrated
6574 with the PyData stack, including support for numpy and pandas data structures
6575 and statistical routines from scipy and statsmodels.")
6576 (license license:bsd-3)
6577 (properties `((python2-variant . ,(delay python2-seaborn))))))
6578
6579 (define-public python2-seaborn
6580 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
6581 (package
6582 (inherit base)
6583 (propagated-inputs `(("python2-pytz" ,python2-pytz)
6584 ,@(package-propagated-inputs base))))))
6585
6586 (define-public python-mpmath
6587 (package
6588 (name "python-mpmath")
6589 (version "0.19")
6590 (source (origin
6591 (method url-fetch)
6592 (uri (string-append "http://mpmath.org/files/mpmath-"
6593 version ".tar.gz"))
6594 (sha256
6595 (base32
6596 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6597 (build-system python-build-system)
6598 (arguments
6599 '(#:phases
6600 (modify-phases %standard-phases
6601 (replace 'check
6602 (lambda _
6603 (zero?
6604 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
6605 (home-page "http://mpmath.org")
6606 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6607 (description
6608 "@code{mpmath} can be used as an arbitrary-precision substitute for
6609 Python's float/complex types and math/cmath modules, but also does much
6610 more advanced mathematics.")
6611 (license license:bsd-3)))
6612
6613 (define-public python2-mpmath
6614 (package-with-python2 python-mpmath))
6615
6616 (define-public python-sympy
6617 (package
6618 (name "python-sympy")
6619 (version "1.0")
6620 (source
6621 (origin
6622 (method url-fetch)
6623 (uri (string-append
6624 "https://github.com/sympy/sympy/releases/download/sympy-"
6625 version "/sympy-" version ".tar.gz"))
6626 (sha256
6627 (base32 "1bpzjwr9hrr7w88v4vgnj9lr6vxcldc94si13n8xpr1rv08d5b1y"))))
6628 (build-system python-build-system)
6629 (propagated-inputs
6630 `(("python-mpmath" ,python-mpmath)))
6631 (home-page "http://www.sympy.org/")
6632 (synopsis "Python library for symbolic mathematics")
6633 (description
6634 "SymPy is a Python library for symbolic mathematics. It aims to become a
6635 full-featured computer algebra system (CAS) while keeping the code as simple
6636 as possible in order to be comprehensible and easily extensible.")
6637 (license license:bsd-3)))
6638
6639 (define-public python2-sympy
6640 (package-with-python2 python-sympy))
6641
6642 (define-public python-q
6643 (package
6644 (name "python-q")
6645 (version "2.6")
6646 (source
6647 (origin
6648 (method url-fetch)
6649 (uri (pypi-uri "q" version))
6650 (sha256
6651 (base32
6652 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6653 (build-system python-build-system)
6654 (home-page "https://github.com/zestyping/q")
6655 (synopsis "Quick-and-dirty debugging output for tired programmers")
6656 (description
6657 "q is a Python module for \"print\" style of debugging Python code. It
6658 provides convenient short API for print out of values, tracebacks, and
6659 falling into the Python interpreter.")
6660 (license license:asl2.0)))
6661
6662 (define-public python2-q
6663 (package-with-python2 python-q))
6664
6665 (define-public python-testlib
6666 (package
6667 (name "python-testlib")
6668 (version "0.6.5")
6669 (source
6670 (origin
6671 (method url-fetch)
6672 (uri (string-append
6673 "https://pypi.python.org/packages/source/t/testlib/testlib-"
6674 version ".zip"))
6675 (sha256
6676 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
6677 (build-system python-build-system)
6678 (native-inputs
6679 `(("unzip" ,unzip))) ; for unpacking the source
6680 (synopsis "Python micro test suite harness")
6681 (description "A micro unittest suite harness for Python.")
6682 (home-page "https://github.com/trentm/testlib")
6683 (license license:expat)))
6684
6685 (define-public python2-testlib
6686 (package-with-python2 python-testlib))
6687
6688 (define-public python2-xlib
6689 (package
6690 (name "python2-xlib")
6691 (version "0.14")
6692 (source (origin
6693 (method url-fetch)
6694 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6695 "/" version "/"
6696 "python-xlib-" version ".tar.gz"))
6697 (sha256
6698 (base32
6699 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6700 (build-system python-build-system)
6701 (arguments
6702 `(#:python ,python-2 ;Python 2 only
6703 #:tests? #f)) ;no tests
6704 (home-page "http://python-xlib.sourceforge.net/")
6705 (synopsis "Python X11 client library")
6706 (description
6707 "The Python X Library is intended to be a fully functional X client
6708 library for Python programs. It is useful to implement low-level X clients.
6709 It is written entirely in Python.")
6710 (license license:gpl2+)))
6711
6712 (define-public python-singledispatch
6713 (package
6714 (name "python-singledispatch")
6715 (version "3.4.0.3")
6716 (source
6717 (origin
6718 (method url-fetch)
6719 (uri (pypi-uri "singledispatch" version))
6720 (sha256
6721 (base32
6722 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6723 (build-system python-build-system)
6724 (native-inputs
6725 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6726 (home-page
6727 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6728 (synopsis "Backport of singledispatch feature from Python 3.4")
6729 (description
6730 "This library brings functools.singledispatch from Python 3.4 to Python
6731 2.6-3.3.")
6732 (license license:expat)))
6733
6734 (define-public python2-singledispatch
6735 (package-with-python2 python-singledispatch))
6736
6737 (define-public python-tornado
6738 (package
6739 (name "python-tornado")
6740 (version "4.5.1")
6741 (source
6742 (origin
6743 (method url-fetch)
6744 (uri (pypi-uri "tornado" version))
6745 (sha256
6746 (base32 "1zbkgcdfq81k298awrm8p0xwbwwn2p3nbizdglzfbkskhai082fv"))))
6747 (build-system python-build-system)
6748 (arguments
6749 '(;; FIXME: Two tests error out with:
6750 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
6751 ;; #:phases
6752 ;; (modify-phases %standard-phases
6753 ;; (replace 'check
6754 ;; (lambda _
6755 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
6756 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
6757 ;; (zero? (system* "python" "-m" "tornado.test")))))
6758 #:tests? #f))
6759 (native-inputs
6760 `(("python-certifi" ,python-certifi)))
6761 (propagated-inputs
6762 `(("python-backports-abc" ,python-backports-abc)))
6763 (home-page "http://www.tornadoweb.org/")
6764 (synopsis "Python web framework and asynchronous networking library")
6765 (description
6766 "Tornado is a Python web framework and asynchronous networking library,
6767 originally developed at FriendFeed. By using non-blocking network I/O,
6768 Tornado can scale to tens of thousands of open connections, making it ideal
6769 for long polling, WebSockets, and other applications that require a long-lived
6770 connection to each user.")
6771 (license license:asl2.0)
6772 (properties `((python2-variant . ,(delay python2-tornado))))))
6773
6774 (define-public python2-tornado
6775 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
6776 (package (inherit tornado)
6777 (propagated-inputs
6778 `(("python2-backport-ssl-match-hostname"
6779 ,python2-backport-ssl-match-hostname)
6780 ("python2-singledispatch" ,python2-singledispatch)
6781 ,@(package-propagated-inputs tornado))))))
6782
6783 (define-public python-tornado-http-auth
6784 (package
6785 (name "python-tornado-http-auth")
6786 (version "1.1.0")
6787 (source
6788 (origin
6789 (method url-fetch)
6790 (uri (pypi-uri "tornado-http-auth" version))
6791 (sha256
6792 (base32
6793 "0znrgqd7k2s4ia474xizi6h3061zj4sn5n6cq76bkwl3wwshifn5"))))
6794 (build-system python-build-system)
6795 (propagated-inputs
6796 `(("python-tornado" ,python-tornado)))
6797 (home-page
6798 "https://github.com/gvalkov/tornado-http-auth")
6799 (synopsis
6800 "Digest and basic authentication module for Tornado")
6801 (description
6802 "Provides support for adding authentication to services using the Tornado
6803 web framework, either via the basic or digest authentication schemes.")
6804 (license license:asl2.0)))
6805
6806 ;; the python- version can be removed with python-3.5
6807 (define-public python-backports-abc
6808 (package
6809 (name "python-backports-abc")
6810 (version "0.5")
6811 (source
6812 (origin
6813 (method url-fetch)
6814 (uri (pypi-uri "backports_abc" version))
6815 (sha256
6816 (base32
6817 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6818 (build-system python-build-system)
6819 (home-page "https://github.com/cython/backports_abc")
6820 (synopsis "Backport of additions to the 'collections.abc' module")
6821 (description
6822 "Python-backports-abc provides a backport of additions to the
6823 'collections.abc' module in Python-3.5.")
6824 (license license:psfl)))
6825
6826 (define-public python2-backports-abc
6827 (package-with-python2 python-backports-abc))
6828
6829 (define-public python-backports-csv
6830 (package
6831 (name "python-backports-csv")
6832 (version "1.0.5")
6833 (source
6834 (origin
6835 (method url-fetch)
6836 (uri (pypi-uri "backports.csv" version))
6837 (sha256
6838 (base32
6839 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6840 (build-system python-build-system)
6841 (home-page "https://github.com/ryanhiebert/backports.csv")
6842 (synopsis "Backport of Python 3's csv module for Python 2")
6843 (description
6844 "Provides a backport of Python 3's @code{csv} module for parsing
6845 comma separated values. The API of the @code{csv} module in Python 2
6846 is drastically different from the @code{csv} module in Python 3.
6847 This is due, for the most part, to the difference between str in
6848 Python 2 and Python 3.")
6849 (license license:psfl)))
6850
6851 (define-public python2-backports-csv
6852 (package-with-python2 python-backports-csv))
6853
6854 (define-public python2-backports-shutil-get-terminal-size
6855 (package
6856 (name "python2-backports-shutil-get-terminal-size")
6857 (version "1.0.0")
6858 (source
6859 (origin
6860 (method url-fetch)
6861 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6862 (sha256
6863 (base32
6864 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6865 (build-system python-build-system)
6866 (arguments
6867 `(#:python ,python-2
6868 #:phases
6869 (modify-phases %standard-phases
6870 (replace 'check
6871 (lambda _
6872 (zero? (system* "py.test" "-v")))))))
6873 (native-inputs
6874 `(("python2-pytest" ,python2-pytest)))
6875 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6876 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6877 (description
6878 "This package provides a backport of the @code{get_terminal_size
6879 function} from Python 3.3's @code{shutil}.
6880 Unlike the original version it is written in pure Python rather than C,
6881 so it might be a tiny bit slower.")
6882 (license license:expat)))
6883
6884 (define-public python-waf
6885 (package
6886 (name "python-waf")
6887 (version "1.9.8")
6888 (source (origin
6889 (method url-fetch)
6890 (uri (string-append "https://waf.io/"
6891 "waf-" version ".tar.bz2"))
6892 (sha256
6893 (base32
6894 "0wl4cnmp06lfxqjxaan58bqxn27smhydz0sg5prrfbl3bsw4gv6q"))))
6895 (build-system python-build-system)
6896 (arguments
6897 '(#:phases
6898 (modify-phases %standard-phases
6899 (replace 'build
6900 (lambda _
6901 (zero? (system* "python" "waf-light" "configure" "build"))))
6902 (replace 'check
6903 (lambda _
6904 (zero? (system* "python" "waf" "--version"))))
6905 (replace 'install
6906 (lambda _
6907 (copy-file "waf" %output))))))
6908 (home-page "https://waf.io/")
6909 (synopsis "Python-based build system")
6910 (description
6911 "Waf is a Python-based framework for configuring, compiling and installing
6912 applications.")
6913 (license license:bsd-3)))
6914
6915 (define-public python2-waf
6916 (package-with-python2 python-waf))
6917
6918 (define-public python-pyzmq
6919 (package
6920 (name "python-pyzmq")
6921 (version "15.1.0")
6922 (source
6923 (origin
6924 (method url-fetch)
6925 (uri (pypi-uri "pyzmq" version))
6926 (sha256
6927 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
6928 (build-system python-build-system)
6929 (arguments
6930 `(#:configure-flags
6931 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6932 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6933 ;; --inplace' for 'python setup.py test' to work.
6934 #:tests? #f))
6935 (inputs
6936 `(("zeromq" ,zeromq)))
6937 (native-inputs
6938 `(("pkg-config" ,pkg-config)
6939 ("python-nose" ,python-nose)))
6940 (home-page "https://github.com/zeromq/pyzmq")
6941 (synopsis "Python bindings for 0MQ")
6942 (description
6943 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6944 (license license:bsd-4)))
6945
6946 (define-public python2-pyzmq
6947 (package-with-python2 python-pyzmq))
6948
6949 (define-public python-pep8
6950 (package
6951 (name "python-pep8")
6952 (version "1.7.0")
6953 (source
6954 (origin
6955 (method url-fetch)
6956 (uri (pypi-uri "pep8" version))
6957 (sha256
6958 (base32
6959 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
6960 (build-system python-build-system)
6961 (home-page "http://pep8.readthedocs.org/")
6962 (synopsis "Python style guide checker")
6963 (description
6964 "This tools checks Python code against some of the style conventions in
6965 PEP 8.")
6966 (license license:expat)))
6967
6968 (define-public python2-pep8
6969 (package-with-python2 python-pep8))
6970
6971 (define-public python-pyflakes
6972 (package
6973 (name "python-pyflakes")
6974 (version "1.0.0")
6975 (source
6976 (origin
6977 (method url-fetch)
6978 (uri (pypi-uri "pyflakes" version))
6979 (sha256
6980 (base32
6981 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
6982 (build-system python-build-system)
6983 (home-page
6984 "https://github.com/pyflakes/pyflakes")
6985 (synopsis "Passive checker of Python programs")
6986 (description
6987 "Pyflakes statically checks Python source code for common errors.")
6988 (license license:expat)))
6989
6990 (define-public python2-pyflakes
6991 (package-with-python2 python-pyflakes))
6992
6993 (define-public python-mccabe
6994 (package
6995 (name "python-mccabe")
6996 (version "0.4.0")
6997 (source
6998 (origin
6999 (method url-fetch)
7000 (uri (pypi-uri "mccabe" version))
7001 (sha256
7002 (base32
7003 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
7004 (build-system python-build-system)
7005 (native-inputs
7006 `(("python-pytest" ,python-pytest)
7007 ("python-pytest-runner" ,python-pytest-runner)))
7008 (home-page "https://github.com/flintwork/mccabe")
7009 (synopsis "McCabe checker, plugin for flake8")
7010 (description
7011 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
7012 complexity of Python source code.")
7013 (license license:expat)))
7014
7015 (define-public python2-mccabe
7016 (package-with-python2 python-mccabe))
7017
7018 (define-public python-mccabe-0.2.1
7019 (package (inherit python-mccabe)
7020 (version "0.2.1")
7021 (source
7022 (origin
7023 (method url-fetch)
7024 (uri (pypi-uri "mccabe" version))
7025 (sha256
7026 (base32
7027 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
7028
7029 (define-public python2-mccabe-0.2.1
7030 (package-with-python2 python-mccabe-0.2.1))
7031
7032 ;; Flake8 2.4.1 requires an older version of pep8.
7033 ;; This should be removed ASAP.
7034 (define-public python-pep8-1.5.7
7035 (package (inherit python-pep8)
7036 (version "1.5.7")
7037 (source
7038 (origin
7039 (method url-fetch)
7040 (uri (string-append
7041 "https://pypi.python.org/packages/source/p/pep8/pep8-"
7042 version
7043 ".tar.gz"))
7044 (sha256
7045 (base32
7046 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
7047 (arguments
7048 ;; XXX Tests not compatible with Python 3.5.
7049 '(#:tests? #f))))
7050
7051 (define-public python2-pep8-1.5.7
7052 (package-with-python2 python-pep8-1.5.7))
7053
7054 ;; Flake8 2.4.1 requires an older version of pyflakes.
7055 ;; This should be removed ASAP.
7056 (define-public python-pyflakes-0.8.1
7057 (package (inherit python-pyflakes)
7058 (version "0.8.1")
7059 (source
7060 (origin
7061 (method url-fetch)
7062 (uri (string-append
7063 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
7064 version
7065 ".tar.gz"))
7066 (sha256
7067 (base32
7068 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
7069 (arguments
7070 ;; XXX Tests not compatible with Python 3.5.
7071 '(#:tests? #f))))
7072
7073 (define-public python2-pyflakes-0.8.1
7074 (package-with-python2 python-pyflakes-0.8.1))
7075
7076 (define-public python-flake8
7077 (package
7078 (name "python-flake8")
7079 (version "2.5.4")
7080 (source
7081 (origin
7082 (method url-fetch)
7083 (uri (pypi-uri "flake8" version))
7084 (sha256
7085 (base32
7086 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
7087 (modules '((guix build utils)))
7088 (snippet
7089 '(begin
7090 ;; Remove pre-compiled .pyc files from source.
7091 (for-each delete-file-recursively
7092 (find-files "." "__pycache__" #:directories? #t))
7093 (for-each delete-file (find-files "." "\\.pyc$"))
7094 #t))))
7095 (build-system python-build-system)
7096 (propagated-inputs
7097 `(("python-pep8" ,python-pep8)
7098 ("python-pyflakes" ,python-pyflakes)
7099 ("python-mccabe" ,python-mccabe)))
7100 (native-inputs
7101 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
7102 ("python-nose" ,python-nose)))
7103 (home-page "https://gitlab.com/pycqa/flake8")
7104 (synopsis
7105 "The modular source code checker: pep8, pyflakes and co")
7106 (description
7107 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
7108 (license license:expat)))
7109
7110 (define-public python2-flake8
7111 (package-with-python2 python-flake8))
7112
7113 (define-public python-flake8-polyfill
7114 (package
7115 (name "python-flake8-polyfill")
7116 (version "1.0.1")
7117 (source
7118 (origin
7119 (method url-fetch)
7120 (uri (pypi-uri "flake8-polyfill" version))
7121 (sha256
7122 (base32
7123 "02gn2wxvh9vnf7m7dld7ca4l60mg5c370hv3swwppkngwaqmcw67"))))
7124 (build-system python-build-system)
7125 (arguments
7126 '(#:phases
7127 (modify-phases %standard-phases
7128 (replace 'check
7129 (lambda _
7130 (setenv "PYTHONPATH"
7131 (string-append (getcwd) "/build/lib:"
7132 (getenv "PYTHONPATH")))
7133 (zero? (system* "py.test" "-v")))))))
7134 (native-inputs
7135 `(("python-flake8" ,python-flake8)
7136 ("python-mock" ,python-mock)
7137 ("python-pycodestyle" ,python-pycodestyle)
7138 ("python-pytest" ,python-pytest)))
7139 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
7140 (synopsis "Polyfill package for Flake8 plugins")
7141 (description
7142 "This package that provides some compatibility helpers for Flake8
7143 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
7144 (license license:expat)))
7145
7146 (define-public python2-flake8-polyfill
7147 (package-with-python2 python-flake8-polyfill))
7148
7149 (define-public python-mistune
7150 (package
7151 (name "python-mistune")
7152 (version "0.7.3")
7153 (source
7154 (origin
7155 (method url-fetch)
7156 (uri (pypi-uri "mistune" version))
7157 (sha256
7158 (base32
7159 "04xpk1zvslhq3xpnf01g3ag0dy9wfv4z28p093r8k49vvxlyil11"))))
7160 (build-system python-build-system)
7161 (native-inputs
7162 `(("python-nose" ,python-nose)
7163 ("python-cython" ,python-cython)))
7164 (home-page "https://github.com/lepture/mistune")
7165 (synopsis "Markdown parser in pure Python")
7166 (description "This package provides a fast markdown parser in pure
7167 Python.")
7168 (license license:bsd-3)))
7169
7170 (define-public python2-mistune
7171 (package-with-python2 python-mistune))
7172
7173 (define-public python-markdown
7174 (package
7175 (name "python-markdown")
7176 (version "2.6.8")
7177 (source
7178 (origin
7179 (method url-fetch)
7180 (uri (pypi-uri "Markdown" version))
7181 (sha256
7182 (base32
7183 "0cqfhr1km2s5d8jm6hbwgkrrj9hvkjf2gab3s2axlrw1clgaij0a"))))
7184 (build-system python-build-system)
7185 (arguments
7186 `(#:phases
7187 (modify-phases %standard-phases
7188 (replace 'check
7189 (lambda _
7190 (zero? (system* "python" "run-tests.py")))))))
7191 (native-inputs
7192 `(("python-nose" ,python-nose)
7193 ("python-pyyaml" ,python-pyyaml)))
7194 (home-page "https://pythonhosted.org/Markdown/")
7195 (synopsis "Python implementation of Markdown")
7196 (description
7197 "This package provides a Python implementation of John Gruber's
7198 Markdown. The library features international input, various Markdown
7199 extensions, and several HTML output formats. A command line wrapper
7200 markdown_py is also provided to convert Markdown files to HTML.")
7201 (license license:bsd-3)))
7202
7203 (define-public python2-markdown
7204 (package-with-python2 python-markdown))
7205
7206 (define-public python-ptyprocess
7207 (package
7208 (name "python-ptyprocess")
7209 (version "0.5.1")
7210 (source
7211 (origin
7212 (method url-fetch)
7213 (uri (string-append
7214 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
7215 version ".tar.gz"))
7216 (sha256
7217 (base32
7218 "19l1xrjn4l9gjz01s3vg92gn2dd9d8mw1v86ppkzlnr9m5iwwc05"))))
7219 (build-system python-build-system)
7220 (native-inputs
7221 `(("python-nose" ,python-nose)))
7222 (arguments
7223 `(#:phases
7224 (modify-phases %standard-phases
7225 (replace 'check
7226 (lambda _
7227 (zero? (system* "nosetests")))))))
7228 (home-page "https://github.com/pexpect/ptyprocess")
7229 (synopsis "Run a subprocess in a pseudo terminal")
7230 (description
7231 "This package provides a Python library used to launch a subprocess in a
7232 pseudo terminal (pty), and interact with both the process and its pty.")
7233 (license license:isc)))
7234
7235 (define-public python2-ptyprocess
7236 (package-with-python2 python-ptyprocess))
7237
7238 (define-public python-cram
7239 (package
7240 (name "python-cram")
7241 (version "0.7")
7242 (home-page "https://bitheap.org/cram/")
7243 (source (origin
7244 (method url-fetch)
7245 (uri (list (string-append home-page "cram-"
7246 version ".tar.gz")
7247 (pypi-uri "cram" version)))
7248 (sha256
7249 (base32
7250 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
7251 (arguments
7252 '(#:phases
7253 (modify-phases %standard-phases
7254 (add-after 'unpack 'patch-source
7255 (lambda _
7256 (substitute* (find-files "cram" ".*\\.py$")
7257 ;; Replace default shell path.
7258 (("/bin/sh") (which "sh")))
7259 (substitute* (find-files "tests" ".*\\.t$")
7260 (("md5") "md5sum")
7261 (("/bin/bash") (which "bash"))
7262 (("/bin/sh") (which "sh")))
7263 (substitute* "cram/_test.py"
7264 ;; This hack works around a bug triggered by substituting
7265 ;; the /bin/sh paths. "tests/usage.t" compares the output of
7266 ;; "cram -h", which breaks the output at 80 characters. This
7267 ;; causes the line showing the default shell to break into two
7268 ;; lines, but the test expects a single line...
7269 (("env\\['COLUMNS'\\] = '80'")
7270 "env['COLUMNS'] = '160'"))
7271 #t))
7272 (delete 'check)
7273 (add-after 'install 'check
7274 ;; The test phase uses the built library and executable.
7275 ;; It's easier to run it after install since the build
7276 ;; directory contains version-specific PATH.
7277 (lambda* (#:key inputs outputs #:allow-other-keys)
7278 (add-installed-pythonpath inputs outputs)
7279 (setenv "PATH" (string-append (getenv "PATH") ":"
7280 (assoc-ref outputs "out") "/bin"))
7281 (zero? (system* "make" "test")))))))
7282 (build-system python-build-system)
7283 (native-inputs
7284 `(("python-coverage" ,python-coverage)
7285 ("which" ,which)))
7286 (synopsis "Simple testing framework for command line applications")
7287 (description
7288 "Cram is a functional testing framework for command line applications.
7289 Cram tests look like snippets of interactive shell sessions. Cram runs each
7290 command and compares the command output in the test with the command’s actual
7291 output.")
7292 (license license:gpl2+)))
7293
7294 (define-public python2-cram
7295 (package-with-python2 python-cram))
7296
7297 (define-public python-terminado
7298 (package
7299 (name "python-terminado")
7300 (version "0.6")
7301 (source
7302 (origin
7303 (method url-fetch)
7304 (uri (pypi-uri "terminado" version))
7305 (sha256
7306 (base32
7307 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
7308 (build-system python-build-system)
7309 (propagated-inputs
7310 `(("python-tornado" ,python-tornado)
7311 ("python-ptyprocess" ,python-ptyprocess)))
7312 (native-inputs
7313 `(("python-nose" ,python-nose)))
7314 (arguments
7315 `(#:phases
7316 (modify-phases %standard-phases
7317 (replace 'check
7318 (lambda _
7319 (zero? (system* "nosetests")))))))
7320 (home-page "https://github.com/takluyver/terminado")
7321 (synopsis "Terminals served to term.js using Tornado websockets")
7322 (description "This package provides a Tornado websocket backend for the
7323 term.js Javascript terminal emulator library.")
7324 (license license:bsd-2)
7325 (properties `((python2-variant . ,(delay python2-terminado))))))
7326
7327 (define-public python2-terminado
7328 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
7329 (package (inherit terminado)
7330 (propagated-inputs
7331 `(("python2-backport-ssl-match-hostname"
7332 ,python2-backport-ssl-match-hostname)
7333 ,@(package-propagated-inputs terminado))))))
7334
7335 (define-public python-straight-plugin
7336 (package
7337 (name "python-straight-plugin")
7338 (version "1.4.1")
7339 (source
7340 (origin
7341 (method url-fetch)
7342 (uri (pypi-uri "straight.plugin" version))
7343 (sha256
7344 (base32
7345 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
7346 (build-system python-build-system)
7347 (home-page "https://github.com/ironfroggy/straight.plugin")
7348 (synopsis "Simple namespaced plugin facility")
7349 (description "Straight Plugin provides a type of plugin you can create from
7350 almost any existing Python modules, and an easy way for outside developers to
7351 add functionality and customization to your projects with their own plugins.")
7352 (license license:expat)))
7353
7354 (define-public python2-straight-plugin
7355 (package-with-python2 python-straight-plugin))
7356
7357 (define-public python-fonttools
7358 (package
7359 (name "python-fonttools")
7360 (version "2.5")
7361 (source (origin
7362 (method url-fetch)
7363 (uri (string-append
7364 "https://pypi.python.org/packages/source/F/FontTools/"
7365 "fonttools-" version ".tar.gz"))
7366 (sha256
7367 (base32
7368 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
7369 (build-system python-build-system)
7370 (arguments
7371 '(#:test-target "check"
7372 #:phases
7373 (modify-phases %standard-phases
7374 (add-after 'unpack 'patch-setuppy
7375 ;; Remove the undocumented "extra_path" argument, which adds an
7376 ;; intervening directories between site-packages and the package
7377 ;; directory.
7378 (lambda _
7379 (substitute* "setup.py"
7380 (("^[ \t]*extra_path *= *'FontTools',") ""))
7381 #t)))))
7382 (home-page "https://github.com/behdad/fonttools")
7383 (synopsis "Tools to manipulate font files")
7384 (description
7385 "FontTools/TTX is a library to manipulate font files from Python. It
7386 supports reading and writing of TrueType/OpenType fonts, reading and writing
7387 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
7388 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
7389 from an XML-based format.")
7390 (license (license:non-copyleft
7391 "file://LICENSE.txt"
7392 "See LICENSE.txt in the distribution."))))
7393
7394 (define-public python2-fonttools
7395 (package-with-python2 python-fonttools))
7396
7397 (define-public python-ly
7398 (package
7399 (name "python-ly")
7400 (version "0.9.4")
7401 (source
7402 (origin
7403 (method url-fetch)
7404 (uri (string-append "https://pypi.python.org/packages/57/4f/"
7405 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
7406 "/python-ly-" version ".tar.gz"))
7407 (sha256
7408 (base32
7409 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
7410 (build-system python-build-system)
7411 (arguments
7412 ;; FIXME: Some tests need network access.
7413 '(#:tests? #f))
7414 (synopsis "Tool and library for manipulating LilyPond files")
7415 (description "This package provides a Python library to parse, manipulate
7416 or create documents in LilyPond format. A command line program ly is also
7417 provided that can be used to do various manipulations with LilyPond files.")
7418 (home-page "https://pypi.python.org/pypi/python-ly")
7419 (license license:gpl2+)))
7420
7421 (define-public python-appdirs
7422 (package
7423 (name "python-appdirs")
7424 (version "1.4.3")
7425 (source
7426 (origin
7427 (method url-fetch)
7428 (uri (pypi-uri "appdirs" version))
7429 (sha256
7430 (base32
7431 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
7432 (build-system python-build-system)
7433 (home-page "https://github.com/ActiveState/appdirs")
7434 (synopsis
7435 "Determine platform-specific dirs, e.g. a \"user data dir\"")
7436 (description
7437 "This module provides a portable way of finding out where user data
7438 should be stored on various operating systems.")
7439 (license license:expat)))
7440
7441 (define-public python2-appdirs
7442 (package-with-python2 python-appdirs))
7443
7444 (define-public python-llfuse
7445 (package
7446 (name "python-llfuse")
7447 (version "1.2")
7448 (source (origin
7449 (method url-fetch)
7450 (uri (string-append
7451 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7452 "llfuse-" version ".tar.bz2"))
7453 (sha256
7454 (base32
7455 "11hms1x68bf1bqbqy7w3wpffqsd3jkgricmzrc1hrnwkswfzzlr4"))))
7456 (build-system python-build-system)
7457 (inputs
7458 `(("fuse" ,fuse)
7459 ("attr" ,attr)))
7460 (native-inputs
7461 `(("pkg-config" ,pkg-config)))
7462 (synopsis "Python bindings for FUSE")
7463 (description
7464 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
7465 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
7466 (license license:lgpl2.0+)
7467 (properties `((python2-variant . ,(delay python2-llfuse))))))
7468
7469 (define-public python2-llfuse
7470 (package (inherit (package-with-python2
7471 (strip-python2-variant python-llfuse)))
7472 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
7473
7474 ;; For attic-0.16
7475 (define-public python-llfuse-0.41
7476 (package (inherit python-llfuse)
7477 (version "0.41.1")
7478 (source (origin
7479 (method url-fetch)
7480 (uri (string-append
7481 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7482 "llfuse-" version ".tar.bz2"))
7483 (sha256
7484 (base32
7485 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
7486 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
7487 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
7488 (license (list license:expat license:lgpl2.0+))))
7489
7490 (define-public python-msgpack
7491 (package
7492 (name "python-msgpack")
7493 (version "0.4.8")
7494 (source (origin
7495 (method url-fetch)
7496 (uri (pypi-uri "msgpack-python" version))
7497 (sha256
7498 (base32
7499 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
7500 (build-system python-build-system)
7501 (synopsis "MessagePack (de)serializer")
7502 (description "MessagePack is a fast, compact binary serialization format,
7503 suitable for similar data to JSON. This package provides CPython bindings for
7504 reading and writing MessagePack data.")
7505 (home-page "https://pypi.python.org/pypi/msgpack-python/")
7506 (license license:asl2.0)))
7507
7508 (define-public python2-msgpack
7509 (package-with-python2 python-msgpack))
7510
7511 (define-public python-netaddr
7512 (package
7513 (name "python-netaddr")
7514 (version "0.7.19")
7515 (source
7516 (origin
7517 (method url-fetch)
7518 (uri (string-append
7519 "https://pypi.python.org/packages/source/n/netaddr/netaddr-"
7520 version
7521 ".tar.gz"))
7522 (sha256
7523 (base32
7524 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7525 (build-system python-build-system)
7526 (arguments `(#:tests? #f)) ;; No tests.
7527 (home-page "https://github.com/drkjam/netaddr/")
7528 (synopsis "Pythonic manipulation of network addresses")
7529 (description
7530 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7531 and MAC network addresses.")
7532 (license license:bsd-3)))
7533
7534 (define-public python2-netaddr
7535 (package-with-python2 python-netaddr))
7536
7537 (define-public python-wrapt
7538 (package
7539 (name "python-wrapt")
7540 (version "1.10.8")
7541 (source
7542 (origin
7543 (method url-fetch)
7544 (uri (pypi-uri "wrapt" version))
7545 (sha256
7546 (base32
7547 "0wrcm1mydvfivbkzz0h81ygzdchnscshi6xvy5n3r21r9s0px8af"))))
7548 (build-system python-build-system)
7549 (arguments
7550 ;; Tests are not included in the tarball, they are only available in the
7551 ;; git repository.
7552 `(#:tests? #f))
7553 (home-page "https://github.com/GrahamDumpleton/wrapt")
7554 (synopsis "Module for decorators, wrappers and monkey patching")
7555 (description
7556 "The aim of the wrapt module is to provide a transparent object proxy for
7557 Python, which can be used as the basis for the construction of function
7558 wrappers and decorator functions.")
7559 (license license:bsd-2)))
7560
7561 (define-public python2-wrapt
7562 (package-with-python2 python-wrapt))
7563
7564 (define-public python-iso8601
7565 (package
7566 (name "python-iso8601")
7567 (version "0.1.11")
7568 (source
7569 (origin
7570 (method url-fetch)
7571 (uri (pypi-uri "iso8601" version))
7572 (sha256
7573 (base32
7574 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
7575 (build-system python-build-system)
7576 (native-inputs
7577 `(("python-pytest" ,python-pytest)))
7578 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
7579 (synopsis "Module to parse ISO 8601 dates")
7580 (description
7581 "This module parses the most common forms of ISO 8601 date strings (e.g.
7582 @code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
7583 (license license:expat)))
7584
7585 (define-public python2-iso8601
7586 (package-with-python2 python-iso8601))
7587
7588 (define-public python-monotonic
7589 (package
7590 (name "python-monotonic")
7591 (version "0.3")
7592 (source
7593 (origin
7594 (method url-fetch)
7595 (uri (string-append
7596 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
7597 version
7598 ".tar.gz"))
7599 (sha256
7600 (base32
7601 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
7602 (build-system python-build-system)
7603 (home-page "https://github.com/atdt/monotonic")
7604 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
7605 (description
7606 "This module provides a monotonic() function which returns the value (in
7607 fractional seconds) of a clock which never goes backwards.")
7608 (license license:asl2.0)))
7609
7610 (define-public python2-monotonic
7611 (package-with-python2 python-monotonic))
7612
7613 (define-public python-webob
7614 (package
7615 (name "python-webob")
7616 (version "1.5.1")
7617 (source
7618 (origin
7619 (method url-fetch)
7620 (uri (pypi-uri "WebOb" version))
7621 (sha256
7622 (base32
7623 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
7624 (build-system python-build-system)
7625 (native-inputs
7626 `(("python-nose" ,python-nose)))
7627 (home-page "http://webob.org/")
7628 (synopsis "WSGI request and response object")
7629 (description
7630 "WebOb provides wrappers around the WSGI request environment, and an
7631 object to help create WSGI responses.")
7632 (license license:expat)))
7633
7634 (define-public python2-webob
7635 (package-with-python2 python-webob))
7636
7637 (define-public python-xlrd
7638 (package
7639 (name "python-xlrd")
7640 (version "1.0.0")
7641 (source (origin
7642 (method url-fetch)
7643 (uri (pypi-uri "xlrd" version))
7644 (sha256
7645 (base32
7646 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7647 (build-system python-build-system)
7648 (arguments
7649 `(#:phases
7650 (modify-phases %standard-phases
7651 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7652 ;; run tests instead for now.
7653 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
7654 (native-inputs `(("python-nose" ,python-nose)))
7655 (home-page "http://www.python-excel.org/")
7656 (synopsis "Library for extracting data from Excel files")
7657 (description "This packages provides a library to extract data from
7658 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7659 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7660 Unicode-aware. It is not intended as an end-user tool.")
7661 (license license:bsd-3)))
7662
7663 (define-public python2-xlrd
7664 (package-with-python2 python-xlrd))
7665
7666 (define-public python-prettytable
7667 (package
7668 (name "python-prettytable")
7669 (version "0.7.2")
7670 (source
7671 (origin
7672 (method url-fetch)
7673 (uri (string-append
7674 "https://pypi.python.org/packages/source/P/PrettyTable/"
7675 "prettytable-" version ".tar.bz2"))
7676 (sha256
7677 (base32
7678 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7679 (build-system python-build-system)
7680 (home-page "http://code.google.com/p/prettytable/")
7681 (synopsis "Display tabular data in an ASCII table format")
7682 (description
7683 "A library designed to represent tabular data in visually appealing ASCII
7684 tables. PrettyTable allows for selection of which columns are to be printed,
7685 independent alignment of columns (left or right justified or centred) and
7686 printing of sub-tables by specifying a row range.")
7687 (license license:bsd-3)))
7688
7689 (define-public python2-prettytable
7690 (package-with-python2 python-prettytable))
7691
7692 (define-public python-tables
7693 (package
7694 (name "python-tables")
7695 (version "3.2.2")
7696 (source
7697 (origin
7698 (method url-fetch)
7699 (uri (pypi-uri "tables" version))
7700 (sha256
7701 (base32
7702 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
7703 (modules '((guix build utils)))
7704 (snippet
7705 '(begin
7706 ;; Remove pre-compiled .pyc files from source.
7707 (for-each delete-file-recursively
7708 (find-files "." "__pycache__" #:directories? #t))
7709 (for-each delete-file (find-files "." "\\.pyc$"))
7710 #t))))
7711 (build-system python-build-system)
7712 (arguments
7713 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7714 ;; or "check", so we must override the build and check phases.
7715 #:phases
7716 (modify-phases %standard-phases
7717 (add-after 'unpack 'use-gcc
7718 (lambda _
7719 (substitute* "setup.py"
7720 (("compiler = new_compiler\\(\\)" line)
7721 (string-append line
7722 "\ncompiler.set_executables(compiler='gcc',"
7723 "compiler_so='gcc',"
7724 "linker_exe='gcc',"
7725 "linker_so='gcc -shared')")))
7726 #t))
7727 (replace 'build
7728 (lambda* (#:key inputs #:allow-other-keys)
7729 (zero? (system* "python" "setup.py" "build"
7730 (string-append "--hdf5="
7731 (assoc-ref inputs "hdf5"))))))
7732 (replace 'check
7733 (lambda* (#:key inputs #:allow-other-keys)
7734 (zero? (system* "python" "setup.py" "check"
7735 (string-append "--hdf5="
7736 (assoc-ref inputs "hdf5")))))))))
7737 (propagated-inputs
7738 `(("python-numexpr" ,python-numexpr)
7739 ("python-numpy" ,python-numpy)))
7740 (native-inputs
7741 `(("python-cython" ,python-cython)
7742 ("pkg-config" ,pkg-config)))
7743 (inputs
7744 `(("hdf5" ,hdf5)
7745 ("bzip2" ,bzip2)
7746 ("zlib" ,zlib)))
7747 (home-page "http://www.pytables.org/")
7748 (synopsis "Hierarchical datasets for Python")
7749 (description "PyTables is a package for managing hierarchical datasets and
7750 designed to efficiently cope with extremely large amounts of data.")
7751 (license license:bsd-3)))
7752
7753 (define-public python2-tables
7754 (package-with-python2 python-tables))
7755
7756 (define-public python-pyasn1
7757 (package
7758 (name "python-pyasn1")
7759 (version "0.2.3")
7760 (source
7761 (origin
7762 (method url-fetch)
7763 (uri (pypi-uri "pyasn1" version))
7764 (sha256
7765 (base32
7766 "1b86yx23c1x74clai05a5ma8c8nfmhlx3j1mxq0ff657i2ylx33k"))))
7767 (build-system python-build-system)
7768 (home-page "http://pyasn1.sourceforge.net/")
7769 (synopsis "ASN.1 types and codecs")
7770 (description
7771 "This is an implementation of ASN.1 types and codecs in Python. It is
7772 suitable for a wide range of protocols based on the ASN.1 specification.")
7773 (license license:bsd-2)))
7774
7775 (define-public python2-pyasn1
7776 (package-with-python2 python-pyasn1))
7777
7778 (define-public python-pyasn1-modules
7779 (package
7780 (name "python-pyasn1-modules")
7781 (version "0.0.8")
7782 (source
7783 (origin
7784 (method url-fetch)
7785 (uri (pypi-uri "pyasn1-modules" version))
7786 (sha256
7787 (base32
7788 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
7789 (build-system python-build-system)
7790 (propagated-inputs
7791 `(("python-pyasn1" ,python-pyasn1)))
7792 (home-page "https://sourceforge.net/projects/pyasn1/")
7793 (synopsis "ASN.1 codec implementations")
7794 (description
7795 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7796 implementations of ASN.1-based codecs and protocols.")
7797 (license license:bsd-3)))
7798
7799 (define-public python2-pyasn1-modules
7800 (package-with-python2 python-pyasn1-modules))
7801
7802 (define-public python-ipaddress
7803 (package
7804 (name "python-ipaddress")
7805 (version "1.0.18")
7806 (source (origin
7807 (method url-fetch)
7808 (uri (pypi-uri "ipaddress" version))
7809 (sha256
7810 (base32
7811 "1q8klj9d84cmxgz66073x1j35cplr3r77vx1znhxiwl5w74391ax"))))
7812 (build-system python-build-system)
7813 (home-page "https://github.com/phihag/ipaddress")
7814 (synopsis "IP address manipulation library")
7815 (description
7816 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7817 in Python. This library is used to create, poke at, and manipulate IPv4 and
7818 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7819 module to older versions of Python.")
7820 (license license:psfl)))
7821
7822 (define-public python2-ipaddress
7823 (package-with-python2 python-ipaddress))
7824
7825 (define-public python2-ipaddr
7826 (package
7827 (name "python2-ipaddr")
7828 (version "2.1.11")
7829 (source
7830 (origin
7831 (method url-fetch)
7832 (uri (pypi-uri "ipaddr" version))
7833 (sha256
7834 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7835 (build-system python-build-system)
7836 (arguments
7837 `(#:python ,python-2 ;version 2 only
7838 #:phases
7839 (modify-phases %standard-phases
7840 (replace 'check
7841 (lambda* _
7842 (zero? (system* "python" "ipaddr_test.py")))))))
7843 (home-page "https://github.com/google/ipaddr-py")
7844 (synopsis "IP address manipulation library")
7845 (description
7846 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7847 IPv6 addresses and networks.
7848
7849 For new implementations you may prefer to use the standard module
7850 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7851 versions of Python.")
7852 (license license:asl2.0)))
7853
7854 (define-public python-idna
7855 (package
7856 (name "python-idna")
7857 (version "2.5")
7858 (source
7859 (origin
7860 (method url-fetch)
7861 (uri (pypi-uri "idna" version))
7862 (sha256
7863 (base32
7864 "1ara12a7k2zc69msa0arrvw00gn61a6i6by01xb3lkkc0h4cxd9w"))))
7865 (build-system python-build-system)
7866 (home-page "https://github.com/kjd/idna")
7867 (synopsis "Internationalized domain names in applications")
7868 (description
7869 "This is a library to support the Internationalised Domain Names in
7870 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7871 protocol is often referred to as “IDNA2008” and can produce different results
7872 from the earlier standard from 2003. The library is also intended to act as a
7873 suitable drop-in replacement for the “encodings.idna” module that comes with
7874 the Python standard library but currently only supports the older 2003
7875 specification.")
7876 (license license:bsd-4)))
7877
7878 (define-public python2-idna
7879 (package-with-python2 python-idna))
7880
7881 (define-public python-pretend
7882 (package
7883 (name "python-pretend")
7884 (version "1.0.8")
7885 (source
7886 (origin
7887 (method url-fetch)
7888 (uri (string-append "https://pypi.python.org/packages/source/p/"
7889 "pretend/pretend-" version ".tar.gz"))
7890 (sha256
7891 (base32
7892 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
7893 (build-system python-build-system)
7894 (home-page "https://github.com/alex/pretend")
7895 (synopsis "Library for stubbing in Python")
7896 (description
7897 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7898 technique for writing tests. You may hear the term mixed up with mocks,
7899 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7900 responses, rather than doing any computation.")
7901 (license license:bsd-3)))
7902
7903 (define-public python2-pretend
7904 (package-with-python2 python-pretend))
7905
7906 (define-public python-cryptography-vectors
7907 (package
7908 (name "python-cryptography-vectors")
7909 (version "2.0.3")
7910 (source
7911 (origin
7912 (method url-fetch)
7913 (uri (pypi-uri "cryptography_vectors" version))
7914 (sha256
7915 (base32
7916 "1qa117fs1yd50zn2cfxh7d9l999ds0z4h83m9m7j4fk6ffm33f5y"))))
7917 (build-system python-build-system)
7918 (home-page "https://github.com/pyca/cryptography")
7919 (synopsis "Test vectors for the cryptography package")
7920 (description
7921 "This package contains test vectors for the cryptography package.")
7922 ;; Distributed under either BSD-3 or ASL2.0
7923 (license (list license:bsd-3 license:asl2.0))))
7924
7925 (define-public python2-cryptography-vectors
7926 (package-with-python2 python-cryptography-vectors))
7927
7928 (define-public python-cryptography
7929 (package
7930 (name "python-cryptography")
7931 (version "2.0.3")
7932 (source
7933 (origin
7934 (method url-fetch)
7935 (uri (pypi-uri "cryptography" version))
7936 (sha256
7937 (base32
7938 "0fnck37zyvbzmccbp7w3jy27jgmij1992j5wyy3gxhw6a11b4jyh"))))
7939 (build-system python-build-system)
7940 (inputs
7941 `(("openssl" ,openssl)))
7942 (propagated-inputs
7943 `(("python-asn1crypto" ,python-asn1crypto)
7944 ("python-cffi" ,python-cffi)
7945 ("python-six" ,python-six)
7946 ("python-idna" ,python-idna)
7947 ("python-iso8601" ,python-iso8601)))
7948 (native-inputs
7949 `(("python-cryptography-vectors" ,python-cryptography-vectors)
7950 ("python-hypothesis" ,python-hypothesis)
7951 ("python-pretend" ,python-pretend)
7952 ("python-pytz" ,python-pytz)
7953 ("python-pytest" ,python-pytest-3.0)))
7954 (home-page "https://github.com/pyca/cryptography")
7955 (synopsis "Cryptographic recipes and primitives for Python")
7956 (description
7957 "cryptography is a package which provides cryptographic recipes and
7958 primitives to Python developers. It aims to be the “cryptographic standard
7959 library” for Python. The package includes both high level recipes, and low
7960 level interfaces to common cryptographic algorithms such as symmetric ciphers,
7961 message digests and key derivation functions.")
7962 ;; Distributed under either BSD-3 or ASL2.0
7963 (license (list license:bsd-3 license:asl2.0))
7964 (properties `((python2-variant . ,(delay python2-cryptography))))))
7965
7966 (define-public python2-cryptography
7967 (let ((crypto (package-with-python2
7968 (strip-python2-variant python-cryptography))))
7969 (package (inherit crypto)
7970 (propagated-inputs
7971 `(("python2-ipaddress" ,python2-ipaddress)
7972 ("python2-backport-ssl-match-hostname"
7973 ,python2-backport-ssl-match-hostname)
7974 ("python2-enum34" ,python2-enum34)
7975 ,@(package-propagated-inputs crypto))))))
7976
7977 (define-public python-pyopenssl
7978 (package
7979 (name "python-pyopenssl")
7980 (version "17.3.0")
7981 (source
7982 (origin
7983 (method url-fetch)
7984 (uri (pypi-uri "pyOpenSSL" version))
7985 (sha256
7986 (base32
7987 "0xkc1wfnpg6abzllivg3ylhc63npjdy1v81f4kc08bm8cj80nqr9"))))
7988 (build-system python-build-system)
7989 (arguments
7990 '(#:phases
7991 (modify-phases %standard-phases
7992 (delete 'check)
7993 (add-after 'install 'check
7994 (lambda* (#:key inputs outputs #:allow-other-keys)
7995 (add-installed-pythonpath inputs outputs)
7996 (zero? (system* "py.test" "-v" "-k"
7997 (string-append
7998 ;; This test tries to look up certificates from
7999 ;; the compiled-in default path in OpenSSL, which
8000 ;; does not exist in the build environment.
8001 "not test_fallback_default_verify_paths "
8002 ;; This test attempts to make a connection to
8003 ;; an external web service.
8004 "and not test_set_default_verify_paths"))))))))
8005 (propagated-inputs
8006 `(("python-cryptography" ,python-cryptography)
8007 ("python-six" ,python-six)))
8008 (inputs
8009 `(("openssl" ,openssl)))
8010 (native-inputs
8011 `(("python-flaky" ,python-flaky)
8012 ("python-pretend" ,python-pretend)
8013 ("python-pytest" ,python-pytest-3.0)))
8014 (home-page "https://github.com/pyca/pyopenssl")
8015 (synopsis "Python wrapper module around the OpenSSL library")
8016 (description
8017 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
8018 library.")
8019 (license license:asl2.0)))
8020
8021 (define-public python2-pyopenssl
8022 (package-with-python2 python-pyopenssl))
8023
8024 (define-public python-pip
8025 (package
8026 (name "python-pip")
8027 (version "9.0.1")
8028 (source
8029 (origin
8030 (method url-fetch)
8031 (uri (pypi-uri "pip" version))
8032 (sha256
8033 (base32
8034 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
8035 (build-system python-build-system)
8036 (arguments
8037 '(#:tests? #f)) ; there are no tests in the pypi archive.
8038 (home-page "https://pip.pypa.io/")
8039 (synopsis "Package manager for Python software")
8040 (description
8041 "Pip is a package manager for Python software, that finds packages on the
8042 Python Package Index (PyPI).")
8043 (license license:expat)))
8044
8045 (define-public python2-pip
8046 (package-with-python2 python-pip))
8047
8048 (define-public python-tlsh
8049 (package
8050 (name "python-tlsh")
8051 (version "3.4.4")
8052 (home-page "https://github.com/trendmicro/tlsh")
8053 (source (origin
8054 (method url-fetch)
8055 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
8056 version ".tar.gz"))
8057 (sha256
8058 (base32
8059 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
8060 (file-name (string-append name "-" version ".tar.gz"))))
8061 (build-system cmake-build-system)
8062 (arguments
8063 '(#:out-of-source? #f
8064 #:phases (modify-phases %standard-phases
8065 (replace
8066 'install
8067 (lambda* (#:key outputs #:allow-other-keys)
8068 ;; Build and install the Python bindings. The underlying
8069 ;; C++ library is apparently not meant to be installed.
8070 (let ((out (assoc-ref outputs "out")))
8071 (with-directory-excursion "py_ext"
8072 (and (system* "python" "setup.py" "build")
8073 (system* "python" "setup.py" "install"
8074 (string-append "--prefix=" out))))))))))
8075 (inputs `(("python" ,python-wrapper))) ;for the bindings
8076 (synopsis "Fuzzy matching library for Python")
8077 (description
8078 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
8079 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
8080 value which can be used for similarity comparisons. Similar objects have
8081 similar hash values, which allows for the detection of similar objects by
8082 comparing their hash values. The byte stream should have a sufficient amount
8083 of complexity; for example, a byte stream of identical bytes will not generate
8084 a hash value.")
8085 (license license:asl2.0)))
8086
8087 (define-public python2-tlsh
8088 (package
8089 (inherit python-tlsh)
8090 (name "python2-tlsh")
8091 (inputs `(("python" ,python-2)))))
8092
8093 (define-public python-termcolor
8094 (package
8095 (name "python-termcolor")
8096 (version "1.1.0")
8097 (source
8098 (origin
8099 (method url-fetch)
8100 (uri (pypi-uri "termcolor" version))
8101 (sha256
8102 (base32
8103 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
8104 (build-system python-build-system)
8105 (arguments
8106 ;; There are no tests.
8107 `(#:tests? #f))
8108 (home-page "http://pypi.python.org/pypi/termcolor")
8109 (synopsis "ANSII Color formatting for terminal output")
8110 (description
8111 "This package provides ANSII Color formatting for output in terminals.")
8112 (license license:expat)))
8113
8114 (define-public python2-termcolor
8115 (package-with-python2 python-termcolor))
8116
8117 (define-public python-libarchive-c
8118 (package
8119 (name "python-libarchive-c")
8120 (version "2.2")
8121 (source (origin
8122 (method url-fetch)
8123 (uri (pypi-uri "libarchive-c" version))
8124 (sha256
8125 (base32
8126 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
8127 (build-system python-build-system)
8128 (arguments
8129 '(#:phases (modify-phases %standard-phases
8130 (add-before
8131 'build 'reference-libarchive
8132 (lambda* (#:key inputs #:allow-other-keys)
8133 ;; Retain the absolute file name of libarchive.so.
8134 (let ((libarchive (assoc-ref inputs "libarchive")))
8135 (substitute* "libarchive/ffi.py"
8136 (("find_library\\('archive'\\)")
8137 (string-append "'" libarchive
8138 "/lib/libarchive.so'")))))))))
8139 (inputs
8140 `(("libarchive" ,libarchive)))
8141 (home-page "https://github.com/Changaco/python-libarchive-c")
8142 (synopsis "Python interface to libarchive")
8143 (description
8144 "This package provides Python bindings to libarchive, a C library to
8145 access possibly compressed archives in many different formats. It uses
8146 Python's @code{ctypes} foreign function interface (FFI).")
8147 (license license:lgpl2.0+)))
8148
8149 (define-public python2-libarchive-c
8150 (package-with-python2 python-libarchive-c))
8151
8152 (define-public python-file
8153 (package
8154 (inherit file)
8155 (name "python-file")
8156 (build-system python-build-system)
8157 (arguments
8158 '(#:tests? #f ;no tests
8159 #:configure-flags '("--single-version-externally-managed" "--root=/")
8160 #:phases (modify-phases %standard-phases
8161 (add-before 'build 'change-directory
8162 (lambda _
8163 (chdir "python")
8164 #t))
8165 (add-before 'build 'set-library-file-name
8166 (lambda* (#:key inputs #:allow-other-keys)
8167 (let ((file (assoc-ref inputs "file")))
8168 (substitute* "magic.py"
8169 (("find_library\\('magic'\\)")
8170 (string-append "'" file "/lib/libmagic.so'")))
8171 #t))))))
8172 (inputs `(("file" ,file)))
8173 (self-native-input? #f)
8174 (synopsis "Python bindings to the libmagic file type guesser. Note that
8175 this module and the python-magic module both provide a \"magic.py\" file;
8176 these two modules, which are different and were developed separately, both
8177 serve the same purpose: provide Python bindings for libmagic.")))
8178
8179 (define-public python2-file
8180 (package-with-python2 python-file))
8181
8182 (define-public python-debian
8183 (package
8184 (name "python-debian")
8185 (version "0.1.28")
8186 (source
8187 (origin
8188 (method url-fetch)
8189 (uri (pypi-uri name version))
8190 (sha256
8191 (base32
8192 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
8193 (build-system python-build-system)
8194 (propagated-inputs
8195 `(("python-six" ,python-six)))
8196 (home-page "http://packages.debian.org/sid/python-debian")
8197 (synopsis "Debian package related modules")
8198 (description
8199 ;; XXX: Use @enumerate instead of @itemize to work around
8200 ;; <http://bugs.gnu.org/21772>.
8201 "This package provides Python modules that abstract many formats of
8202 Debian-related files, such as:
8203
8204 @enumerate
8205 @item Debtags information;
8206 @item @file{debian/changelog} files;
8207 @item packages files, pdiffs;
8208 @item control files of single or multiple RFC822-style paragraphs---e.g.
8209 @file{debian/control}, @file{.changes}, @file{.dsc};
8210 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
8211 contained files and meta-information.
8212 @end enumerate\n")
8213
8214 ;; Modules are either GPLv2+ or GPLv3+.
8215 (license license:gpl3+)))
8216
8217 (define-public python2-debian
8218 (package-with-python2 python-debian))
8219
8220 (define-public python-nbformat
8221 (package
8222 (name "python-nbformat")
8223 (version "4.3.0")
8224 (source
8225 (origin
8226 (method url-fetch)
8227 (uri (pypi-uri "nbformat" version))
8228 (sha256
8229 (base32
8230 "12s7j4qja8b5bs1kyw5dzmrqbjxxj8wk52cyasbiqbv7fblcrssz"))))
8231 (build-system python-build-system)
8232 (arguments `(#:tests? #f)) ; no test target
8233 (propagated-inputs
8234 `(("python-ipython-genutils" ,python-ipython-genutils)
8235 ("python-jsonschema" ,python-jsonschema)
8236 ("python-jupyter-core" ,python-jupyter-core)
8237 ("python-traitlets" ,python-traitlets)))
8238 (home-page "http://jupyter.org")
8239 (synopsis "Jupyter Notebook format")
8240 (description "This package provides the reference implementation of the
8241 Jupyter Notebook format and Python APIs for working with notebooks.")
8242 (license license:bsd-3)))
8243
8244 (define-public python2-nbformat
8245 (package-with-python2 python-nbformat))
8246
8247 (define-public python-bleach
8248 (package
8249 (name "python-bleach")
8250 (version "1.4.3")
8251 (source
8252 (origin
8253 (method url-fetch)
8254 (uri (pypi-uri "bleach" version))
8255 (sha256
8256 (base32
8257 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
8258 (build-system python-build-system)
8259 (propagated-inputs
8260 `(("python-html5lib" ,python-html5lib-0.9)
8261 ("python-six" ,python-six)))
8262 (native-inputs
8263 `(("python-nose" ,python-nose)))
8264 (home-page "https://github.com/jsocol/bleach")
8265 (synopsis "Whitelist-based HTML-sanitizing tool")
8266 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
8267 (license license:asl2.0)))
8268
8269 (define-public python2-bleach
8270 (package-with-python2 python-bleach))
8271
8272 (define-public python-entrypoints
8273 (package
8274 (name "python-entrypoints")
8275 (version "0.2.2")
8276 (source
8277 (origin
8278 (method url-fetch)
8279 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
8280 version ".tar.gz"))
8281 (file-name (string-append name "-" version ".tar.gz"))
8282 (sha256
8283 (base32
8284 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
8285 (build-system python-build-system)
8286 ;; The package does not come with a setup.py file, so we have to generate
8287 ;; one ourselves.
8288 (arguments
8289 `(#:tests? #f
8290 #:phases
8291 (modify-phases %standard-phases
8292 (add-after 'unpack 'create-setup.py
8293 (lambda _
8294 (call-with-output-file "setup.py"
8295 (lambda (port)
8296 (format port "\
8297 from setuptools import setup
8298 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
8299 " ,version))))))))
8300 (home-page "https://github.com/takluyver/entrypoints")
8301 (synopsis "Discover and load entry points from installed Python packages")
8302 (description "Entry points are a way for Python packages to advertise
8303 objects with some common interface. The most common examples are
8304 @code{console_scripts} entry points, which define shell commands by
8305 identifying a Python function to run. The @code{entrypoints} module contains
8306 functions to find and load entry points.")
8307 (license license:expat)))
8308
8309 (define-public python2-entrypoints
8310 (package-with-python2 python-entrypoints))
8311
8312 (define-public python-nbconvert
8313 (package
8314 (name "python-nbconvert")
8315 (version "5.0.0b1")
8316 (source
8317 (origin
8318 (method url-fetch)
8319 (uri (pypi-uri "nbconvert" version))
8320 (sha256
8321 (base32
8322 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
8323 (build-system python-build-system)
8324 (arguments
8325 `(;; The "bdist_egg" target is disabled by default, causing the installation
8326 ;; to fail.
8327 #:configure-flags (list "bdist_egg")
8328 ;; FIXME: 5 failures, 40 errors.
8329 #:tests? #f))
8330 ;; #:phases
8331 ;; (modify-phases %standard-phases
8332 ;; (replace 'check
8333 ;; (lambda _
8334 ;; (zero? (system* "py.test" "-v")))))
8335 (native-inputs
8336 `(("python-pytest" ,python-pytest)))
8337 (propagated-inputs
8338 `(("python-bleach" ,python-bleach)
8339 ("python-entrypoints" ,python-entrypoints)
8340 ("python-jinja2" ,python-jinja2)
8341 ("python-jupyter-core" ,python-jupyter-core)
8342 ("python-mistune" ,python-mistune)
8343 ("python-nbformat" ,python-nbformat)
8344 ("python-pygments" ,python-pygments)
8345 ("python-traitlets" ,python-traitlets)))
8346 (home-page "http://jupyter.org")
8347 (synopsis "Converting Jupyter Notebooks")
8348 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
8349 notebooks to various other formats via Jinja templates. It allows you to
8350 convert an @code{.ipynb} notebook file into various static formats including:
8351
8352 @enumerate
8353 @item HTML
8354 @item LaTeX
8355 @item PDF
8356 @item Reveal JS
8357 @item Markdown (md)
8358 @item ReStructured Text (rst)
8359 @item executable script
8360 @end enumerate\n")
8361 (license license:bsd-3)))
8362
8363 (define-public python2-nbconvert
8364 (package-with-python2 python-nbconvert))
8365
8366 (define-public python-notebook
8367 (package
8368 (name "python-notebook")
8369 (version "4.2.3")
8370 (source (origin
8371 (method url-fetch)
8372 (uri (pypi-uri "notebook" version))
8373 (sha256
8374 (base32
8375 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
8376 (build-system python-build-system)
8377 (arguments
8378 `(#:phases
8379 (modify-phases %standard-phases
8380 (replace 'check
8381 (lambda _
8382 ;; HOME must be set for tests
8383 (setenv "HOME" "/tmp")
8384 (zero? (system* "nosetests")))))))
8385 (propagated-inputs
8386 `(("python-jupyter-core" ,python-jupyter-core)
8387 ("python-nbformat" ,python-nbformat)
8388 ("python-nbconvert" ,python-nbconvert)
8389 ("python-ipython" ,python-ipython)))
8390 (native-inputs
8391 `(("python-nose" ,python-nose)
8392 ("python-sphinx" ,python-sphinx)
8393 ("python-requests" ,python-requests)))
8394 (home-page "http://jupyter.org/")
8395 (synopsis "Web-based notebook environment for interactive computing")
8396 (description
8397 "The Jupyter HTML notebook is a web-based notebook environment for
8398 interactive computing.")
8399 (properties `((python2-variant . ,(delay python2-notebook))))
8400 (license license:bsd-3)))
8401
8402 (define-public python2-notebook
8403 (let ((base (package-with-python2
8404 (strip-python2-variant python-notebook))))
8405 (package (inherit base)
8406 (native-inputs
8407 `(("python2-mock" ,python2-mock)
8408 ,@(package-native-inputs base)))
8409 (arguments
8410 (substitute-keyword-arguments (package-arguments base)
8411 ((#:phases phases)
8412 `(modify-phases ,phases
8413 (add-before 'check 'disable-test-case
8414 ;; The test requires network access to localhost. Curiously it
8415 ;; fails with Python 2 only. Simply make the test-case return
8416 ;; immediately.
8417 (lambda _
8418 (substitute*
8419 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
8420 (("formats = self.nbconvert_api") "return #")))))))))))
8421
8422 (define-public python-widgetsnbextension
8423 (package
8424 (name "python-widgetsnbextension")
8425 (version "1.2.6")
8426 (source
8427 (origin
8428 (method url-fetch)
8429 (uri (pypi-uri "widgetsnbextension" version))
8430 (sha256
8431 (base32
8432 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
8433 (build-system python-build-system)
8434 (propagated-inputs
8435 `(("python-notebook" ,python-notebook)))
8436 (native-inputs
8437 `(("python-certifi" ,python-certifi)
8438 ("python-nose" ,python-nose)))
8439 (home-page "http://ipython.org")
8440 (synopsis "IPython HTML widgets for Jupyter")
8441 (description "This package provides interactive HTML widgets for Jupyter
8442 notebooks.")
8443 (license license:bsd-3)))
8444
8445 (define-public python2-widgetsnbextension
8446 (package-with-python2 python-widgetsnbextension))
8447
8448 (define-public python-ipywidgets
8449 (package
8450 (name "python-ipywidgets")
8451 (version "5.2.2")
8452 (source
8453 (origin
8454 (method url-fetch)
8455 (uri (pypi-uri "ipywidgets" version))
8456 (sha256
8457 (base32
8458 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
8459 (build-system python-build-system)
8460 ;; FIXME: it's not clear how to run the tests.
8461 (arguments `(#:tests? #f))
8462 (propagated-inputs
8463 `(("python-ipykernel" ,python-ipykernel)
8464 ("python-ipython" ,python-ipython)
8465 ("python-traitlets" ,python-traitlets)
8466 ("python-widgetsnbextension" ,python-widgetsnbextension)))
8467 (home-page "http://ipython.org")
8468 (synopsis "IPython HTML widgets for Jupyter")
8469 (description "Ipywidgets are interactive HTML widgets for Jupyter
8470 notebooks and the IPython kernel. Notebooks come alive when interactive
8471 widgets are used. Users gain control of their data and can visualize changes
8472 in the data.")
8473 (license license:bsd-3)))
8474
8475 (define-public python2-ipywidgets
8476 (package-with-python2 python-ipywidgets))
8477
8478 (define-public python-jupyter-console
8479 (package
8480 (name "python-jupyter-console")
8481 (version "5.0.0")
8482 (source
8483 (origin
8484 (method url-fetch)
8485 (uri (pypi-uri "jupyter_console" version))
8486 (sha256
8487 (base32
8488 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
8489 (build-system python-build-system)
8490 ;; FIXME: it's not clear how to run the tests.
8491 (arguments `(#:tests? #f))
8492 (propagated-inputs
8493 `(("python-ipykernel" ,python-ipykernel)
8494 ("python-ipython" ,python-ipython)
8495 ("python-jupyter-client" ,python-jupyter-client)
8496 ("python-prompt-toolkit" ,python-prompt-toolkit)
8497 ("python-pygments" ,python-pygments)))
8498 (home-page "https://jupyter.org")
8499 (synopsis "Jupyter terminal console")
8500 (description "This package provides a terminal-based console frontend for
8501 Jupyter kernels. It also allows for console-based interaction with non-Python
8502 Jupyter kernels such as IJulia and IRKernel.")
8503 (license license:bsd-3)))
8504
8505 (define-public python2-jupyter-console
8506 (package-with-python2 python-jupyter-console))
8507
8508 (define-public jupyter
8509 (package
8510 (name "jupyter")
8511 (version "1.0.0")
8512 (source
8513 (origin
8514 (method url-fetch)
8515 (uri (pypi-uri "jupyter" version))
8516 (sha256
8517 (base32
8518 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8519 (build-system python-build-system)
8520 ;; FIXME: it's not clear how to run the tests.
8521 (arguments `(#:tests? #f))
8522 (propagated-inputs
8523 `(("python-ipykernel" ,python-ipykernel)
8524 ("python-ipywidgets" ,python-ipywidgets)
8525 ("python-jupyter-console" ,python-jupyter-console)
8526 ("python-nbconvert" ,python-nbconvert)
8527 ("python-notebook" ,python-notebook)))
8528 (home-page "http://jupyter.org")
8529 (synopsis "Web application for interactive documents")
8530 (description
8531 "The Jupyter Notebook is a web application that allows you to create and
8532 share documents that contain live code, equations, visualizations and
8533 explanatory text. Uses include: data cleaning and transformation, numerical
8534 simulation, statistical modeling, machine learning and much more.")
8535 (license license:bsd-3)))
8536
8537 (define-public python-chardet
8538 (package
8539 (name "python-chardet")
8540 (version "2.3.0")
8541 (source
8542 (origin
8543 (method url-fetch)
8544 (uri (string-append
8545 "https://pypi.python.org/packages/source/c/chardet/chardet-"
8546 version
8547 ".tar.gz"))
8548 (sha256
8549 (base32
8550 "1ak87ikcw34fivcgiz2xvi938dmclh078az65l9x3rmgljrkhgp5"))))
8551 (build-system python-build-system)
8552 (home-page "https://github.com/chardet/chardet")
8553 (synopsis "Universal encoding detector for Python 2 and 3")
8554 (description
8555 "This package provides @code{chardet}, a Python module that can
8556 automatically detect a wide range of file encodings.")
8557 (license license:lgpl2.1+)))
8558
8559 (define-public python2-chardet
8560 (package-with-python2 python-chardet))
8561
8562 (define-public python-docopt
8563 (package
8564 (name "python-docopt")
8565 (version "0.6.2")
8566 (source
8567 (origin
8568 (method url-fetch)
8569 ;; The release on PyPI does not include tests.
8570 (uri (string-append
8571 "https://github.com/docopt/docopt/archive/"
8572 version ".tar.gz"))
8573 (file-name (string-append name "-" version ".tar.gz"))
8574 (sha256
8575 (base32
8576 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8577 (build-system python-build-system)
8578 (native-inputs
8579 `(("python-pytest" ,python-pytest)))
8580 (arguments
8581 `(#:phases
8582 (modify-phases %standard-phases
8583 (replace 'check
8584 (lambda _ (zero? (system* "py.test")))))))
8585 (home-page "http://docopt.org")
8586 (synopsis "Command-line interface description language for Python")
8587 (description "This library allows the user to define a command-line
8588 interface from a program's help message rather than specifying it
8589 programatically with command-line parsers like @code{getopt} and
8590 @code{argparse}.")
8591 (license license:expat)))
8592
8593 (define-public python2-docopt
8594 (package-with-python2 python-docopt))
8595
8596 (define-public python-zope-event
8597 (package
8598 (name "python-zope-event")
8599 (version "4.1.0")
8600 (source
8601 (origin
8602 (method url-fetch)
8603 (uri (string-append "https://pypi.python.org/packages/source/z"
8604 "/zope.event/zope.event-" version ".tar.gz"))
8605 (sha256
8606 (base32
8607 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
8608 (build-system python-build-system)
8609 (home-page "http://pypi.python.org/pypi/zope.event")
8610 (synopsis "Event publishing system for Python")
8611 (description "Zope.event provides an event publishing API, intended for
8612 use by applications which are unaware of any subscribers to their events. It
8613 is a simple event-dispatching system on which more sophisticated event
8614 dispatching systems can be built.")
8615 (license license:zpl2.1)))
8616
8617 (define-public python2-zope-event
8618 (package-with-python2 python-zope-event))
8619
8620 (define-public python-zope-interface
8621 (package
8622 (name "python-zope-interface")
8623 (version "4.1.3")
8624 (source
8625 (origin
8626 (method url-fetch)
8627 (uri (string-append "https://pypi.python.org/packages/source/z"
8628 "/zope.interface/zope.interface-" version ".tar.gz"))
8629 (sha256
8630 (base32
8631 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
8632 (build-system python-build-system)
8633 (native-inputs
8634 `(("python-zope-event" ,python-zope-event)))
8635 (home-page "https://github.com/zopefoundation/zope.interface")
8636 (synopsis "Python implementation of the \"design by contract\"
8637 methodology")
8638 (description "Zope.interface provides an implementation of \"object
8639 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
8640 conforming to a given API or contract.")
8641 (license license:zpl2.1)))
8642
8643 (define-public python2-zope-interface
8644 (package-with-python2 python-zope-interface))
8645
8646 (define-public python-zope-exceptions
8647 (package
8648 (name "python-zope-exceptions")
8649 (version "4.0.8")
8650 (source
8651 (origin
8652 (method url-fetch)
8653 (uri (string-append "https://pypi.python.org/packages/source/z"
8654 "/zope.exceptions/zope.exceptions-"
8655 version ".tar.gz"))
8656 (sha256
8657 (base32
8658 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
8659 (build-system python-build-system)
8660 (arguments
8661 '(#:tests? #f)) ; circular dependency with zope.testrunner
8662 (propagated-inputs
8663 `(("python-zope-interface" ,python-zope-interface)))
8664 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
8665 (synopsis "Zope exceptions")
8666 (description "Zope.exceptions provides general-purpose exception types
8667 that have uses outside of the Zope framework.")
8668 (license license:zpl2.1)))
8669
8670 (define-public python2-zope-exceptions
8671 (package-with-python2 python-zope-exceptions))
8672
8673 (define-public python-zope-testing
8674 (package
8675 (name "python-zope-testing")
8676 (version "4.5.0")
8677 (source
8678 (origin
8679 (method url-fetch)
8680 (uri (string-append "https://pypi.python.org/packages/source/z"
8681 "/zope.testing/zope.testing-" version ".tar.gz"))
8682 (sha256
8683 (base32
8684 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
8685 (modules '((guix build utils)))
8686 (snippet
8687 '(begin
8688 ;; Remove pre-compiled .pyc files backup files from source.
8689 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
8690 #t))))
8691 (build-system python-build-system)
8692 (native-inputs
8693 `(("python-zope-exceptions" ,python-zope-exceptions)))
8694 (propagated-inputs
8695 `(("python-zope-interface" ,python-zope-interface)))
8696 (home-page "http://pypi.python.org/pypi/zope.testing")
8697 (synopsis "Zope testing helpers")
8698 (description "Zope.testing provides a number of testing utilities for HTML
8699 forms, HTTP servers, regular expressions, and more.")
8700 (license license:zpl2.1)))
8701
8702 (define-public python2-zope-testing
8703 (package-with-python2 python-zope-testing))
8704
8705 (define-public python-zope-testrunner
8706 (package
8707 (name "python-zope-testrunner")
8708 (version "4.4.9")
8709 (source
8710 (origin
8711 (method url-fetch)
8712 (uri (string-append "https://pypi.python.org/packages/source/z"
8713 "/zope.testrunner/zope.testrunner-"
8714 version ".zip"))
8715 (sha256
8716 (base32
8717 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
8718 (build-system python-build-system)
8719 (arguments
8720 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8721 (native-inputs
8722 `(("python-six" ,python-six)
8723 ;("python-zope-interface" ,python-zope-interface)
8724 ("python-zope-exceptions" ,python-zope-exceptions)
8725 ("python-zope-testing" ,python-zope-testing)
8726 ("unzip" ,unzip)))
8727 (propagated-inputs
8728 `(("python-zope-interface" ,python-zope-interface)))
8729 (home-page "http://pypi.python.org/pypi/zope.testrunner")
8730 (synopsis "Zope testrunner script")
8731 (description "Zope.testrunner provides a script for running Python
8732 tests.")
8733 (license license:zpl2.1)))
8734
8735 (define-public python2-zope-testrunner
8736 (let ((base (package-with-python2 python-zope-testrunner)))
8737 (package
8738 (inherit base)
8739 (native-inputs
8740 (append (package-native-inputs base)
8741 `(("python2-subunit" ,python2-subunit)
8742 ("python2-mimeparse" ,python2-mimeparse)))))))
8743
8744 (define-public python-zope-i18nmessageid
8745 (package
8746 (name "python-zope-i18nmessageid")
8747 (version "4.0.3")
8748 (source
8749 (origin
8750 (method url-fetch)
8751 (uri (string-append
8752 "https://pypi.python.org/packages/source/z"
8753 "/zope.i18nmessageid/zope.i18nmessageid-"
8754 version ".tar.gz"))
8755 (sha256
8756 (base32
8757 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
8758 (build-system python-build-system)
8759 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
8760 (synopsis "Message identifiers for internationalization")
8761 (description "Zope.i18nmessageid provides facilities for declaring
8762 internationalized messages within program source text.")
8763 (license license:zpl2.1)))
8764
8765 (define-public python2-zope-i18nmessageid
8766 (package-with-python2 python-zope-i18nmessageid))
8767
8768 (define-public python-zope-schema
8769 (package
8770 (name "python-zope-schema")
8771 (version "4.4.2")
8772 (source
8773 (origin
8774 (method url-fetch)
8775 (uri (string-append "https://pypi.python.org/packages/source/z"
8776 "/zope.schema/zope.schema-" version ".tar.gz"))
8777 (sha256
8778 (base32
8779 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
8780 (build-system python-build-system)
8781 (arguments
8782 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
8783 (propagated-inputs
8784 `(("python-zope-event" ,python-zope-event)
8785 ("python-zope-exceptions", python-zope-exceptions)
8786 ("python-zope-interface" ,python-zope-interface)))
8787 (native-inputs
8788 `(("python-zope-testing" ,python-zope-testing)
8789 ("python-coverage" ,python-coverage)
8790 ("python-nose" ,python-nose)))
8791 (home-page "http://pypi.python.org/pypi/zope.schema")
8792 (synopsis "Zope data schemas")
8793 (description "Zope.scheme provides extensions to zope.interface for
8794 defining data schemas.")
8795 (license license:zpl2.1)))
8796
8797 (define-public python2-zope-schema
8798 (package-with-python2 python-zope-schema))
8799
8800 (define-public python-zope-configuration
8801 (package
8802 (name "python-zope-configuration")
8803 (version "4.0.3")
8804 (source (origin
8805 (method url-fetch)
8806 (uri (string-append "https://pypi.python.org/packages/source/z"
8807 "/zope.configuration/zope.configuration-"
8808 version ".tar.gz"))
8809 (sha256
8810 (base32
8811 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
8812 (build-system python-build-system)
8813 (arguments
8814 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8815 (propagated-inputs
8816 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8817 ("python-zope-schema" ,python-zope-schema)))
8818 (home-page "http://pypi.python.org/pypi/zope.configuration")
8819 (synopsis "Zope Configuration Markup Language")
8820 (description "Zope.configuration implements ZCML, the Zope Configuration
8821 Markup Language.")
8822 (license license:zpl2.1)))
8823
8824 (define-public python2-zope-configuration
8825 (package-with-python2 python-zope-configuration))
8826
8827 (define-public python-zope-proxy
8828 (package
8829 (name "python-zope-proxy")
8830 (version "4.1.6")
8831 (source
8832 (origin
8833 (method url-fetch)
8834 (uri (string-append "https://pypi.python.org/packages/source/z"
8835 "/zope.proxy/zope.proxy-" version ".tar.gz"))
8836 (sha256
8837 (base32
8838 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
8839 (build-system python-build-system)
8840 (arguments
8841 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8842 (propagated-inputs
8843 `(("python-zope-interface" ,python-zope-interface)))
8844 (home-page "http://pypi.python.org/pypi/zope.proxy")
8845 (synopsis "Generic, transparent proxies")
8846 (description "Zope.proxy provides generic, transparent proxies for Python.
8847 Proxies are special objects which serve as mostly-transparent wrappers around
8848 another object, intervening in the apparent behavior of the wrapped object
8849 only when necessary to apply the policy (e.g., access checking, location
8850 brokering, etc.) for which the proxy is responsible.")
8851 (license license:zpl2.1)))
8852
8853 (define-public python2-zope-proxy
8854 (package-with-python2 python-zope-proxy))
8855
8856 (define-public python-zope-location
8857 (package
8858 (name "python-zope-location")
8859 (version "4.0.3")
8860 (source
8861 (origin
8862 (method url-fetch)
8863 (uri (string-append "https://pypi.python.org/packages/source/z"
8864 "/zope.location/zope.location-" version ".tar.gz"))
8865 (sha256
8866 (base32
8867 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
8868 (build-system python-build-system)
8869 (arguments
8870 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8871 (propagated-inputs
8872 `(("python-zope-proxy" ,python-zope-proxy)
8873 ("python-zope-schema" ,python-zope-schema)))
8874 (home-page "http://pypi.python.org/pypi/zope.location/")
8875 (synopsis "Zope location library")
8876 (description "Zope.location implements the concept of \"locations\" in
8877 Zope3, which are are special objects that have a structural location.")
8878 (license license:zpl2.1)))
8879
8880 (define-public python2-zope-location
8881 (package-with-python2 python-zope-location))
8882
8883 (define-public python-zope-security
8884 (package
8885 (name "python-zope-security")
8886 (version "4.0.3")
8887 (source
8888 (origin
8889 (method url-fetch)
8890 (uri (string-append "https://pypi.python.org/packages/source/z"
8891 "/zope.security/zope.security-" version ".tar.gz"))
8892 (sha256
8893 (base32
8894 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
8895 (build-system python-build-system)
8896 (arguments
8897 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
8898 (propagated-inputs
8899 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8900 ("python-zope-proxy" ,python-zope-proxy)
8901 ("python-zope-schema" ,python-zope-schema)))
8902 (native-inputs
8903 `(("python-six" ,python-six)
8904 ("python-zope-component" ,python-zope-component)
8905 ("python-zope-configuration" ,python-zope-configuration)
8906 ("python-zope-location" ,python-zope-location)
8907 ("python-zope-testrunner" ,python-zope-testrunner)
8908 ("python-zope-testing" ,python-zope-testing)))
8909 (home-page "http://pypi.python.org/pypi/zope.security")
8910 (synopsis "Zope security framework")
8911 (description "Zope.security provides a generic mechanism to implement
8912 security policies on Python objects.")
8913 (license license:zpl2.1)))
8914
8915 (define-public python2-zope-security
8916 (let ((zope-security (package-with-python2 python-zope-security)))
8917 (package (inherit zope-security)
8918 (propagated-inputs
8919 `(("python2-zope-testrunner" ,python2-zope-testrunner)
8920 ,@(alist-delete
8921 "python-zope-testrunner"
8922 (package-propagated-inputs zope-security)))))))
8923
8924 (define-public python-zope-component
8925 (package
8926 (name "python-zope-component")
8927 (version "4.3.0")
8928 (source
8929 (origin
8930 (method url-fetch)
8931 (uri (pypi-uri "zope.component" version))
8932 (sha256
8933 (base32
8934 "1hlvzwj1kcfz1qms1dzhwsshpsf38z9clmyksb1gh41n8k3kchdv"))))
8935 (build-system python-build-system)
8936 (arguments
8937 ;; Skip tests due to circular dependency with python-zope-security.
8938 '(#:tests? #f))
8939 (native-inputs
8940 `(("python-zope-testing" ,python-zope-testing)))
8941 (propagated-inputs
8942 `(("python-zope-event" ,python-zope-event)
8943 ("python-zope-interface" ,python-zope-interface)
8944 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
8945 ("python-zope-configuration" ,python-zope-configuration)))
8946 (home-page "https://github.com/zopefoundation/zope.component")
8947 (synopsis "Zope Component Architecture")
8948 (description "Zope.component represents the core of the Zope Component
8949 Architecture. Together with the zope.interface package, it provides
8950 facilities for defining, registering and looking up components.")
8951 (license license:zpl2.1)))
8952
8953 (define-public python2-zope-component
8954 (package-with-python2 python-zope-component))
8955
8956 (define-public python-pythondialog
8957 (package
8958 (name "python-pythondialog")
8959 (version "3.4.0")
8960 (source
8961 (origin
8962 (method url-fetch)
8963 (uri (pypi-uri "pythondialog" version))
8964 (sha256
8965 (base32
8966 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8967 (build-system python-build-system)
8968 (arguments
8969 `(#:phases
8970 (modify-phases %standard-phases
8971 (add-after 'unpack 'patch-path
8972 (lambda* (#:key inputs #:allow-other-keys)
8973 (let* ((dialog (assoc-ref inputs "dialog")))
8974 ;; Since this library really wants to grovel the search path, we
8975 ;; must hardcode dialog's store path into it.
8976 (substitute* "dialog.py"
8977 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8978 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8979 #t))))
8980 #:tests? #f)) ; no test suite
8981 (propagated-inputs
8982 `(("dialog" ,dialog)))
8983 (home-page "http://pythondialog.sourceforge.net/")
8984 (synopsis "Python interface to the UNIX dialog utility")
8985 (description "A Python wrapper for the dialog utility. Its purpose is to
8986 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8987 This allows one to make simple text-mode user interfaces on Unix-like systems")
8988 (license license:lgpl2.1)
8989 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8990
8991 (define-public python2-pythondialog
8992 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8993 (package
8994 (inherit base)
8995 (version (package-version python-pythondialog))
8996 (source (origin
8997 (method url-fetch)
8998 (uri (pypi-uri "python2-pythondialog" version))
8999 (sha256
9000 (base32
9001 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
9002
9003 (define-public python-pyrfc3339
9004 (package
9005 (name "python-pyrfc3339")
9006 (version "1.0")
9007 (source
9008 (origin
9009 (method url-fetch)
9010 (uri (pypi-uri "pyRFC3339" version))
9011 (sha256
9012 (base32
9013 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
9014 (build-system python-build-system)
9015 (propagated-inputs
9016 `(("python-pytz" ,python-pytz)))
9017 (native-inputs
9018 `(("python-nose" ,python-nose)))
9019 (home-page "https://github.com/kurtraschke/pyRFC3339")
9020 (synopsis "Python timestamp library")
9021 (description "Python library for generating and parsing RFC 3339-compliant
9022 timestamps.")
9023 (license license:expat)))
9024
9025 (define-public python2-pyrfc3339
9026 (package-with-python2 python-pyrfc3339))
9027
9028 (define-public python-werkzeug
9029 (package
9030 (name "python-werkzeug")
9031 (version "0.11.15")
9032 (source
9033 (origin
9034 (method url-fetch)
9035 (uri (pypi-uri "Werkzeug" version))
9036 (sha256
9037 (base32
9038 "1h5wycw8yj7q0grqsjnsqflmrlsdagvl2j4dsgdncci6mjc7fpa5"))))
9039 (build-system python-build-system)
9040 (native-inputs
9041 `(("python-pytest" ,python-pytest)))
9042 (home-page "http://werkzeug.pocoo.org/")
9043 (synopsis "Utilities for WSGI applications")
9044 (description "One of the most advanced WSGI utility modules. It includes a
9045 powerful debugger, full-featured request and response objects, HTTP utilities to
9046 handle entity tags, cache control headers, HTTP dates, cookie handling, file
9047 uploads, a powerful URL routing system and a bunch of community-contributed
9048 addon modules.")
9049 (license license:x11)))
9050
9051 (define-public python2-werkzeug
9052 (package-with-python2 python-werkzeug))
9053
9054 (define-public python-configobj
9055 (package
9056 (name "python-configobj")
9057 (version "5.0.6")
9058 (source (origin
9059 (method url-fetch)
9060 (uri (string-append
9061 "https://pypi.python.org/packages/source/c/configobj/"
9062 "configobj-" version ".tar.gz"))
9063 (sha256
9064 (base32
9065 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
9066 ;; Patch setup.py so it looks for python-setuptools, which is
9067 ;; required to parse the keyword 'install_requires' in setup.py.
9068 (patches (search-patches "python-configobj-setuptools.patch"))))
9069 (build-system python-build-system)
9070 (propagated-inputs
9071 `(("python-six" ,python-six)))
9072 (synopsis "Config file reading, writing and validation")
9073 (description "ConfigObj is a simple but powerful config file reader and
9074 writer: an ini file round tripper. Its main feature is that it is very easy to
9075 use, with a straightforward programmer’s interface and a simple syntax for
9076 config files.")
9077 (home-page "https://github.com/DiffSK/configobj")
9078 (license license:bsd-3)))
9079
9080 (define-public python2-configobj
9081 (package-with-python2 python-configobj))
9082
9083 (define-public python-configargparse
9084 (package
9085 (name "python-configargparse")
9086 (version "0.10.0")
9087 (source (origin
9088 (method url-fetch)
9089 (uri (string-append
9090 "https://pypi.python.org/packages/source/C/ConfigArgParse/"
9091 "ConfigArgParse-" version ".tar.gz"))
9092 (sha256
9093 (base32
9094 "19wh919gbdbzxzpagg52q3lm62yicm95ddlcx77dyjc1slyshl1v"))))
9095 (build-system python-build-system)
9096 (arguments
9097 ;; FIXME: Bug in test suite filed upstream:
9098 ;; https://github.com/bw2/ConfigArgParse/issues/32
9099 '(#:tests? #f))
9100 (synopsis "Replacement for argparse")
9101 (description "A drop-in replacement for argparse that allows options to also
9102 be set via config files and/or environment variables.")
9103 (home-page "https://github.com/bw2/ConfigArgParse")
9104 (license license:expat)))
9105
9106 (define-public python2-configargparse
9107 (package-with-python2 python-configargparse))
9108
9109 (define-public python-ndg-httpsclient
9110 (package
9111 (name "python-ndg-httpsclient")
9112 (version "0.4.2")
9113 (source (origin
9114 (method url-fetch)
9115 (uri (pypi-uri "ndg_httpsclient" version))
9116 (sha256
9117 (base32
9118 "1b5qirv46v4dpnmfqviwq42mdwfcby4dxmz0i41wad2337pqf2aq"))))
9119 (build-system python-build-system)
9120 (arguments
9121 '(;; The tests appear to require networking.
9122 #:tests? #f))
9123 (propagated-inputs
9124 `(("python-pyopenssl" ,python-pyopenssl)))
9125 (synopsis "HTTPS support for Python's httplib and urllib2")
9126 (description "This is a HTTPS client implementation for httplib and urllib2
9127 based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
9128 over the default provided with Python and importantly enables full verification
9129 of the SSL peer.")
9130 (home-page "https://github.com/cedadev/ndg_httpsclient/")
9131 (license license:bsd-3)))
9132
9133 ;; python2-openssl requires special care, so package-with-python2 is
9134 ;; insufficient.
9135 (define-public python2-ndg-httpsclient
9136 (package (inherit python-ndg-httpsclient)
9137 (name "python2-ndg-httpsclient")
9138 (arguments `(#:python ,python-2))
9139 (propagated-inputs
9140 `(("python2-pyopenssl" ,python2-pyopenssl)))))
9141
9142 (define-public python-contextlib2
9143 (package
9144 (name "python-contextlib2")
9145 (version "0.4.0")
9146 (source
9147 (origin
9148 (method url-fetch)
9149 (uri (pypi-uri "contextlib2" version))
9150 (sha256
9151 (base32
9152 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
9153 (build-system python-build-system)
9154 (arguments
9155 `(#:phases
9156 (modify-phases %standard-phases
9157 (replace 'check
9158 (lambda _ (zero?
9159 (system*
9160 "python" "test_contextlib2.py" "-v")))))))
9161 (home-page "http://contextlib2.readthedocs.org/")
9162 (synopsis "Tools for decorators and context managers")
9163 (description "This module is primarily a backport of the Python
9164 3.2 contextlib to earlier Python versions. Like contextlib, it
9165 provides utilities for common tasks involving decorators and context
9166 managers. It also contains additional features that are not part of
9167 the standard library.")
9168 (license license:psfl)))
9169
9170 (define-public python2-contextlib2
9171 (package-with-python2 python-contextlib2))
9172
9173 (define-public python-texttable
9174 (package
9175 (name "python-texttable")
9176 (version "0.8.7")
9177 (source
9178 (origin
9179 (method url-fetch)
9180 (uri (pypi-uri "texttable" version))
9181 (sha256
9182 (base32
9183 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
9184 (build-system python-build-system)
9185 (arguments '(#:tests? #f)) ; no tests
9186 (home-page "https://github.com/foutaise/texttable/")
9187 (synopsis "Python module for creating simple ASCII tables")
9188 (description "Texttable is a Python module for creating simple ASCII
9189 tables.")
9190 (license license:lgpl2.1+)))
9191
9192 (define-public python2-texttable
9193 (package-with-python2 python-texttable))
9194
9195 (define-public python-websocket-client
9196 (package
9197 (name "python-websocket-client")
9198 (version "0.37.0")
9199 (source
9200 (origin
9201 (method url-fetch)
9202 (uri (pypi-uri "websocket_client" version))
9203 (sha256
9204 (base32
9205 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
9206 (build-system python-build-system)
9207 (propagated-inputs
9208 `(("python-six" ,python-six)))
9209 (home-page "https://github.com/liris/websocket-client")
9210 (synopsis "WebSocket client for Python")
9211 (description "The Websocket-client module provides the low level APIs for
9212 WebSocket usage in Python programs.")
9213 (license license:lgpl2.1+)))
9214
9215 (define-public python2-websocket-client
9216 (package-with-python2 python-websocket-client))
9217
9218 (define-public python-atomicwrites
9219 (package
9220 (name "python-atomicwrites")
9221 (version "1.1.5")
9222 (source (origin
9223 (method url-fetch)
9224 (uri (pypi-uri "atomicwrites" version))
9225 (sha256
9226 (base32
9227 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
9228 (build-system python-build-system)
9229 (synopsis "Atomic file writes in Python")
9230 (description "Library for atomic file writes using platform dependent tools
9231 for atomic file system operations.")
9232 (home-page "https://github.com/untitaker/python-atomicwrites")
9233 (license license:expat)))
9234
9235 (define-public python2-atomicwrites
9236 (package-with-python2 python-atomicwrites))
9237
9238 (define-public python-requests-toolbelt
9239 (package
9240 (name "python-requests-toolbelt")
9241 (version "0.6.2")
9242 (source (origin
9243 (method url-fetch)
9244 (uri (string-append
9245 "https://pypi.python.org/packages/"
9246 "e1/a4/a94c037bc72ad70441aff1403d3243510d2542ddca7759faaeffeb11aefe/"
9247 "requests-toolbelt-" version ".tar.gz"))
9248 (sha256
9249 (base32
9250 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6"))))
9251 (build-system python-build-system)
9252 (native-inputs
9253 `(("python-betamax" ,python-betamax)
9254 ("python-mock" ,python-mock)
9255 ("python-pytest" ,python-pytest)))
9256 (propagated-inputs
9257 `(("python-requests" ,python-requests)))
9258 (synopsis "Extensions to python-requests")
9259 (description "This is a toolbelt of useful classes and functions to be used
9260 with python-requests.")
9261 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
9262 (license license:asl2.0)))
9263
9264 (define-public python-click-threading
9265 (package
9266 (name "python-click-threading")
9267 (version "0.4.3")
9268 (source (origin
9269 (method url-fetch)
9270 (uri (pypi-uri "click-threading" version))
9271 (sha256
9272 (base32
9273 "0xs4bg2ws0zgyiplk312l049hi23c2zqf1g771rjhh5vr2msk4cg"))))
9274 (build-system python-build-system)
9275 (propagated-inputs
9276 `(("python-click" ,python-click)))
9277 (synopsis "Utilities for multithreading in Click")
9278 (description "This package provides utilities for multithreading in Click
9279 applications.")
9280 (home-page "https://github.com/click-contrib/click-threading")
9281 (license license:expat)))
9282
9283 (define-public python-click-log
9284 (package
9285 (name "python-click-log")
9286 (version "0.2.0")
9287 (source (origin
9288 (method url-fetch)
9289 (uri (pypi-uri "click-log" version))
9290 (sha256
9291 (base32
9292 "1bjrfxji1yv4fj0g78ri2yfgn2wbivn8g69fxfinxvxpmighhshp"))))
9293 (build-system python-build-system)
9294 (propagated-inputs
9295 `(("python-click" ,python-click)))
9296 (synopsis "Logging for click applications")
9297 (description "This package provides a Python library for logging Click
9298 applications.")
9299 (home-page "https://github.com/click-contrib/click-log")
9300 (license license:expat)))
9301
9302 (define-public python-apipkg
9303 (package
9304 (name "python-apipkg")
9305 (version "1.4")
9306 (source (origin
9307 (method url-fetch)
9308 (uri (pypi-uri "apipkg" version))
9309 (sha256
9310 (base32
9311 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
9312 (build-system python-build-system)
9313 (native-inputs
9314 `(("python-pytest" ,python-pytest)))
9315 (synopsis "Namespace control and lazy-import mechanism")
9316 (description "With apipkg you can control the exported namespace of a Python
9317 package and greatly reduce the number of imports for your users. It is a small
9318 pure Python module that works on virtually all Python versions.")
9319 (home-page "https://bitbucket.org/hpk42/apipkg")
9320 (license license:expat)))
9321
9322 (define-public python2-apipkg
9323 (package-with-python2 python-apipkg))
9324
9325 (define-public python-execnet
9326 (package
9327 (name "python-execnet")
9328 (version "1.4.1")
9329 (source (origin
9330 (method url-fetch)
9331 (uri (pypi-uri "execnet" version))
9332 (sha256
9333 (base32
9334 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
9335 (build-system python-build-system)
9336 (arguments
9337 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
9338 ;; The two test failures are caused by the lack of an `ssh` executable.
9339 ;; The test suite can be run with pytest after the 'install' phase.
9340 #:tests? #f))
9341 (native-inputs
9342 `(("python-pytest" ,python-pytest)
9343 ("python-setuptools-scm" ,python-setuptools-scm)))
9344 (propagated-inputs
9345 `(("python-apipkg" ,python-apipkg)))
9346 (synopsis "Rapid multi-Python deployment")
9347 (description "Execnet provides a share-nothing model with
9348 channel-send/receive communication for distributing execution across many
9349 Python interpreters across version, platform and network barriers. It has a
9350 minimal and fast API targeting the following uses:
9351 @enumerate
9352 @item distribute tasks to (many) local or remote CPUs
9353 @item write and deploy hybrid multi-process applications
9354 @item write scripts to administer multiple environments
9355 @end enumerate")
9356 (home-page "http://codespeak.net/execnet/")
9357 (license license:expat)))
9358
9359 (define-public python2-execnet
9360 (package-with-python2 python-execnet))
9361
9362 (define-public python-trollius-redis
9363 (package
9364 (name "python-trollius-redis")
9365 (version "0.1.4")
9366 (source
9367 (origin
9368 (method url-fetch)
9369 (uri (pypi-uri "trollius_redis" version))
9370 (sha256
9371 (base32
9372 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
9373 (build-system python-build-system)
9374 ;; TODO: Tests require packaging 'hiredis'.
9375 (arguments '(#:tests? #f))
9376 (home-page "https://github.com/benjolitz/trollius-redis")
9377 (synopsis "Port of asyncio-redis to trollius")
9378 (description "@code{trollius-redis} is a Redis client for Python
9379 trollius. It is an asynchronious IO (PEP 3156) implementation of the
9380 Redis protocol.")
9381 (license license:bsd-2)))
9382
9383 (define-public python2-trollius-redis
9384 (package-with-python2 python-trollius-redis))
9385
9386 ;;; The software provided by this package was integrated into pytest 2.8.
9387 (define-public python-pytest-cache
9388 (package
9389 (name "python-pytest-cache")
9390 (version "1.0")
9391 (source (origin
9392 (method url-fetch)
9393 (uri (pypi-uri "pytest-cache" version))
9394 (sha256
9395 (base32
9396 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
9397 (build-system python-build-system)
9398 (propagated-inputs
9399 `(("python-apipkg" ,python-apipkg)
9400 ("python-execnet" ,python-execnet)
9401 ("python-py" ,python-py)
9402 ("python-pytest" ,python-pytest)))
9403 (synopsis "Py.test plugin with mechanisms for caching across test runs")
9404 (description "The pytest-cache plugin provides tools to rerun failures from
9405 the last py.test invocation.")
9406 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
9407 (license license:expat)))
9408
9409 (define-public python2-pytest-cache
9410 (package-with-python2 python-pytest-cache))
9411
9412 (define-public python-pytest-localserver
9413 (package
9414 (name "python-pytest-localserver")
9415 (version "0.3.5")
9416 (source (origin
9417 (method url-fetch)
9418 (uri (pypi-uri "pytest-localserver" version))
9419 (sha256
9420 (base32
9421 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
9422 (build-system python-build-system)
9423 (arguments
9424 `(#:phases (modify-phases %standard-phases
9425 (replace 'check
9426 (lambda _
9427 (zero? (system* "py.test" "--genscript=runtests.py"))
9428 (zero? (system* "py.test")))))))
9429 (native-inputs
9430 `(("python-pytest" ,python-pytest)
9431 ("python-requests" ,python-requests)
9432 ("python-six" ,python-six)))
9433 (propagated-inputs
9434 `(("python-werkzeug" ,python-werkzeug)))
9435 (synopsis "Py.test plugin to test server connections locally")
9436 (description "Pytest-localserver is a plugin for the pytest testing
9437 framework which enables you to test server connections locally.")
9438 (home-page "https://pypi.python.org/pypi/pytest-localserver")
9439 (license license:expat)))
9440
9441 (define-public python-wsgi-intercept
9442 (package
9443 (name "python-wsgi-intercept")
9444 (version "1.2.2")
9445 (source (origin
9446 (method url-fetch)
9447 (uri (string-append
9448 "https://pypi.python.org/packages/"
9449 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
9450 "wsgi_intercept-" version ".tar.gz"))
9451 (sha256
9452 (base32
9453 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
9454 (build-system python-build-system)
9455 (propagated-inputs
9456 `(("python-six" ,python-six)))
9457 (native-inputs
9458 `(("python-pytest" ,python-pytest)
9459 ("python-httplib2" ,python-httplib2)
9460 ("python-requests" ,python-requests)
9461 ("python-urllib3" ,python-urllib3)))
9462 (synopsis "Puts a WSGI application in place of a real URI for testing")
9463 (description "Wsgi_intercept installs a WSGI application in place of a real
9464 URI for testing. Testing a WSGI application normally involves starting a
9465 server at a local host and port, then pointing your test code to that address.
9466 Instead, this library lets you intercept calls to any specific host/port
9467 combination and redirect them into a WSGI application importable by your test
9468 program. Thus, you can avoid spawning multiple processes or threads to test
9469 your Web app.")
9470 (home-page "https://github.com/cdent/wsgi-intercept")
9471 (license license:expat)))
9472
9473 (define-public python-pytest-xprocess
9474 (package
9475 (name "python-pytest-xprocess")
9476 (version "0.9.1")
9477 (source (origin
9478 (method url-fetch)
9479 (uri (pypi-uri "pytest-xprocess" version))
9480 (sha256
9481 (base32
9482 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
9483 (build-system python-build-system)
9484 (propagated-inputs
9485 `(("python-pytest" ,python-pytest)
9486 ("python-pytest-cache" ,python-pytest-cache)
9487 ("python-psutil" ,python-psutil)))
9488 (synopsis "Pytest plugin to manage external processes across test runs")
9489 (description "Pytest-xprocess is an experimental py.test plugin for managing
9490 processes across test runs.")
9491 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
9492 (license license:expat)))
9493
9494 (define-public python-icalendar
9495 (package
9496 (name "python-icalendar")
9497 (version "3.11.7")
9498 (source (origin
9499 (method url-fetch)
9500 (uri (pypi-uri "icalendar" version))
9501 (sha256
9502 (base32
9503 "0ahf1i98wjizhld2qd7v2vmvzsmdw08mmins82bf3fpbnp2sxbgc"))))
9504 (build-system python-build-system)
9505 (propagated-inputs
9506 `(("python-dateutil" ,python-dateutil)
9507 ("python-pytz" ,python-pytz)))
9508 (synopsis "Python library for parsing iCalendar files")
9509 (description "The icalendar package is a parser/generator of iCalendar
9510 files for use with Python.")
9511 (home-page "https://github.com/collective/icalendar")
9512 (license license:bsd-2)))
9513
9514 (define-public python-sphinxcontrib-newsfeed
9515 (package
9516 (name "python-sphinxcontrib-newsfeed")
9517 (version "0.1.4")
9518 (source (origin
9519 (method url-fetch)
9520 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
9521 (sha256
9522 (base32
9523 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
9524 (arguments '(#:tests? #f)) ; No tests.
9525 (build-system python-build-system)
9526 (propagated-inputs
9527 `(("python-sphinx" ,python-sphinx)))
9528 (synopsis "News Feed extension for Sphinx")
9529 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
9530 Blog, News or Announcements section to a Sphinx website.")
9531 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
9532 (license license:bsd-2)))
9533
9534 (define-public python-args
9535 (package
9536 (name "python-args")
9537 (version "0.1.0")
9538 (source (origin
9539 (method url-fetch)
9540 (uri (pypi-uri "args" version))
9541 (sha256
9542 (base32
9543 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
9544 (build-system python-build-system)
9545 (home-page "https://github.com/kennethreitz/args")
9546 (synopsis "Command-line argument parser")
9547 (description
9548 "This library provides a Python module to parse command-line arguments.")
9549 (license license:bsd-3)))
9550
9551 (define-public python2-args
9552 (package-with-python2 python-args))
9553
9554 (define-public python-clint
9555 (package
9556 (name "python-clint")
9557 (version "0.5.1")
9558 (source (origin
9559 (method url-fetch)
9560 (uri (pypi-uri "clint" version))
9561 (sha256
9562 (base32
9563 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
9564 (build-system python-build-system)
9565 (arguments
9566 '(#:phases
9567 (modify-phases %standard-phases
9568 (replace 'check
9569 (lambda _
9570 (zero? (system* "py.test" "-v")))))))
9571 (native-inputs
9572 `(("python-pytest" ,python-pytest)))
9573 (propagated-inputs
9574 `(("python-args" ,python-args)))
9575 (home-page "https://github.com/kennethreitz/clint")
9576 (synopsis "Command-line interface tools")
9577 (description
9578 "Clint is a Python module filled with a set of tools for developing
9579 command-line applications, including tools for colored and indented
9580 output, progress bar display, and pipes.")
9581 (license license:isc)))
9582
9583 (define-public python2-clint
9584 (package-with-python2 python-clint))
9585
9586 (define-public python-astor
9587 (package
9588 (name "python-astor")
9589 (version "0.5")
9590 (source (origin
9591 (method url-fetch)
9592 (uri (pypi-uri "astor" version))
9593 (sha256
9594 (base32
9595 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
9596 (build-system python-build-system)
9597 (home-page "https://github.com/berkerpeksag/astor")
9598 (synopsis "Read and write Python ASTs")
9599 (description
9600 "Astor is designed to allow easy manipulation of Python source via the
9601 Abstract Syntax Tree.")
9602 (license license:bsd-3)))
9603
9604 (define-public python2-astor
9605 (package-with-python2 python-astor))
9606
9607 (define-public python-rply
9608 (package
9609 (name "python-rply")
9610 (version "0.7.4")
9611 (source (origin
9612 (method url-fetch)
9613 (uri (pypi-uri "rply" version))
9614 (sha256
9615 (base32
9616 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
9617 (build-system python-build-system)
9618 (propagated-inputs
9619 `(("python-appdirs" ,python-appdirs)))
9620 (home-page "https://github.com/alex/rply")
9621 (synopsis "Parser generator for Python")
9622 (description
9623 "This package provides a pure Python based parser generator, that also
9624 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
9625 with a new public API, and RPython support.")
9626 (license license:bsd-3)))
9627
9628 (define-public python2-rply
9629 (package-with-python2 python-rply))
9630
9631 (define-public python-hy
9632 (package
9633 (name "python-hy")
9634 (version "0.11.1")
9635 (source (origin
9636 (method url-fetch)
9637 (uri (pypi-uri "hy" version))
9638 (sha256
9639 (base32
9640 "1msqv747iz12r73mz4qvsmlwkddwjvrahlrk7ysrcz07h7dsscxs"))))
9641 (build-system python-build-system)
9642 (arguments
9643 '(#:phases
9644 (modify-phases %standard-phases
9645 (replace 'check
9646 (lambda _
9647 ;; Tests require write access to HOME.
9648 (setenv "HOME" "/tmp")
9649 (zero? (system* "nosetests")))))))
9650 (native-inputs
9651 `(("python-coverage" ,python-coverage)
9652 ("python-nose" ,python-nose)))
9653 (propagated-inputs
9654 `(("python-astor" ,python-astor)
9655 ("python-clint" ,python-clint)
9656 ("python-rply" ,python-rply)))
9657 (home-page "http://hylang.org/")
9658 (synopsis "Lisp frontend to Python")
9659 (description
9660 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
9661 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
9662 Python at your fingertips, in Lisp form.")
9663 (license license:expat)))
9664
9665 (define-public python2-hy
9666 (package-with-python2 python-hy))
9667
9668 (define-public python-rauth
9669 (package
9670 (name "python-rauth")
9671 (version "0.7.3")
9672 (source
9673 (origin
9674 (method url-fetch)
9675 (uri (pypi-uri "rauth" version))
9676 (sha256
9677 (base32
9678 "02kv8w8l98ky223avyq7vw7x1f2ya9chrm59r77ylq45qb0xnk2j"))))
9679 (build-system python-build-system)
9680 (arguments
9681 `(#:test-target "check"))
9682 (propagated-inputs
9683 `(("python-requests" ,python-requests)))
9684 (home-page "https://github.com/litl/rauth")
9685 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
9686 (description
9687 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
9688 provides service wrappers for convenient connection initialization and
9689 authenticated session objects providing things like keep-alive.")
9690 (license license:expat)
9691 (properties `((python2-variant . ,(delay python2-rauth))))))
9692
9693 (define-public python2-rauth
9694 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
9695 (package
9696 (inherit base)
9697 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9698 ,@(package-native-inputs base))))))
9699
9700 (define-public python2-functools32
9701 (package
9702 (name "python2-functools32")
9703 (version "3.2.3-2")
9704 (source
9705 (origin
9706 (method url-fetch)
9707 (uri (pypi-uri "functools32" version))
9708 (sha256
9709 (base32
9710 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
9711 (build-system python-build-system)
9712 (arguments
9713 `(#:python ,python-2
9714 #:tests? #f)) ; no test target
9715 (home-page "https://github.com/MiCHiLU/python-functools32")
9716 (synopsis
9717 "Backport of the functools module from Python 3.2.3")
9718 (description
9719 "This package is a backport of the @code{functools} module from Python
9720 3.2.3 for use with older versions of Python and PyPy.")
9721 (license license:expat)))
9722
9723 (define-public python2-subprocess32
9724 (package
9725 (name "python2-subprocess32")
9726 (version "3.2.7")
9727 (source (origin
9728 (method url-fetch)
9729 (uri (pypi-uri "subprocess32" version))
9730 (sha256
9731 (base32
9732 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
9733 (patches
9734 (search-patches "python2-subprocess32-disable-input-test.patch"))))
9735 (build-system python-build-system)
9736 (arguments
9737 `(#:python ,python-2
9738 #:phases
9739 (modify-phases %standard-phases
9740 (add-after 'unpack 'patch-/bin/sh
9741 (lambda _
9742 (substitute* '("subprocess32.py"
9743 "test_subprocess32.py")
9744 (("/bin/sh") (which "sh")))
9745 #t))
9746 (delete 'check)
9747 (add-after 'install 'check
9748 (lambda* (#:key inputs outputs #:allow-other-keys)
9749 ;; For some reason this package fails to import
9750 ;; _posixsubprocess.so when PYTHONPATH is set to the build
9751 ;; directory. Running tests after install is easier.
9752 (add-installed-pythonpath inputs outputs)
9753 (zero? (system* "python" "test_subprocess32.py")))))))
9754 (home-page "https://github.com/google/python-subprocess32")
9755 (synopsis "Backport of the subprocess module from Python 3.2")
9756 (description
9757 "This is a backport of the @code{subprocess} standard library module
9758 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
9759 new features. On POSIX systems it is guaranteed to be reliable when used
9760 in threaded applications. It includes timeout support from Python 3.3 but
9761 otherwise matches 3.2’s API.")
9762 (license license:psfl)))
9763
9764 (define-public python2-futures
9765 (package
9766 (name "python2-futures")
9767 (version "3.0.5")
9768 (source
9769 (origin
9770 (method url-fetch)
9771 (uri (pypi-uri "futures" version))
9772 (sha256
9773 (base32
9774 "1pw1z4329xvlabdpwqa6b7v2fxf7hl64m4cgr22ckbym8m8m4hh5"))))
9775 (build-system python-build-system)
9776 (arguments `(#:python ,python-2))
9777 (home-page "https://github.com/agronholm/pythonfutures")
9778 (synopsis
9779 "Backport of the concurrent.futures package from Python 3.2")
9780 (description
9781 "The concurrent.futures module provides a high-level interface for
9782 asynchronously executing callables. This package backports the
9783 concurrent.futures package from Python 3.2")
9784 (license license:bsd-3)))
9785
9786 (define-public python-promise
9787 (package
9788 (name "python-promise")
9789 (version "0.4.2")
9790 (source
9791 (origin
9792 (method url-fetch)
9793 (uri (pypi-uri "promise" version))
9794 (sha256
9795 (base32
9796 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
9797 (build-system python-build-system)
9798 ;; Tests wants python-futures, which is a python2 only program, and
9799 ;; can't be found by python-promise at test time.
9800 (arguments `(#:tests? #f))
9801 (home-page "https://github.com/syrusakbary/promise")
9802 (synopsis "Promises/A+ implementation for Python")
9803 (description
9804 "Promises/A+ implementation for Python")
9805 (properties `((python2-variant . ,(delay python2-promise))))
9806 (license license:expat)))
9807
9808 (define-public python2-promise
9809 (let ((promise (package-with-python2
9810 (strip-python2-variant python-promise))))
9811 (package (inherit promise)
9812 (arguments (substitute-keyword-arguments (package-arguments promise)
9813 ((#:tests? _) #t)))
9814 (native-inputs
9815 `(("python2-futures" ,python2-futures)
9816 ("python2-pytest" ,python2-pytest)
9817 ,@(package-native-inputs promise))))))
9818
9819 (define-public python-urllib3
9820 (package
9821 (name "python-urllib3")
9822 (version "1.18.1")
9823 (source
9824 (origin
9825 (method url-fetch)
9826 (uri (pypi-uri "urllib3" version))
9827 (sha256
9828 (base32
9829 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
9830 (build-system python-build-system)
9831 (arguments `(#:tests? #f))
9832 (native-inputs
9833 `(;; some packages for tests
9834 ("python-nose" ,python-nose)
9835 ("python-mock" ,python-mock)
9836 ("python-tornado" ,python-tornado)))
9837 (propagated-inputs
9838 `(;; extra packages for https security
9839 ("python-certifi" ,python-certifi)
9840 ("python-ndg-httpsclient" ,python-ndg-httpsclient)
9841 ("python-pyasn1" ,python-pyasn1)
9842 ("python-pyopenssl" ,python-pyopenssl)))
9843 (home-page "https://urllib3.readthedocs.org/")
9844 (synopsis "HTTP library with thread-safe connection pooling")
9845 (description
9846 "Urllib3 supports features left out of urllib and urllib2 libraries. It
9847 can reuse the same socket connection for multiple requests, it can POST files,
9848 supports url redirection and retries, and also gzip and deflate decoding.")
9849 (license license:expat)))
9850
9851 (define-public python2-urllib3
9852 (package-with-python2 python-urllib3))
9853
9854 (define-public python-colorama
9855 (package
9856 (name "python-colorama")
9857 (version "0.3.7")
9858 (source
9859 (origin
9860 (method url-fetch)
9861 (uri (pypi-uri "colorama" version))
9862 (sha256
9863 (base32
9864 "0avqkn6362v7k2kg3afb35g4sfdvixjgy890clip4q174p9whhz0"))))
9865 (build-system python-build-system)
9866 (synopsis "Colored terminal text rendering for Python")
9867 (description "Colorama is a Python library for rendering colored terminal
9868 text.")
9869 (home-page "https://pypi.python.org/pypi/colorama")
9870 (license license:bsd-3)))
9871
9872 (define-public python2-colorama
9873 (package-with-python2 python-colorama))
9874
9875 (define-public python-rsa
9876 (package
9877 (name "python-rsa")
9878 (version "3.4.2")
9879 (source
9880 (origin
9881 (method url-fetch)
9882 (uri (pypi-uri "rsa" version))
9883 (sha256
9884 (base32
9885 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
9886 (build-system python-build-system)
9887 (propagated-inputs
9888 `(("python-pyasn1" ,python-pyasn1)))
9889 (synopsis "Pure-Python RSA implementation")
9890 (description "Python-RSA is a pure-Python RSA implementation. It supports
9891 encryption and decryption, signing and verifying signatures, and key
9892 generation according to PKCS#1 version 1.5. It can be used as a Python
9893 library as well as on the command line.")
9894 (home-page "http://stuvel.eu/rsa")
9895 (license license:asl2.0)))
9896
9897 (define-public python2-rsa
9898 (package-with-python2 python-rsa))
9899
9900 (define-public python-pluggy
9901 (package
9902 (name "python-pluggy")
9903 (version "0.3.1")
9904 (source
9905 (origin
9906 (method url-fetch)
9907 (uri (pypi-uri "pluggy" version))
9908 (sha256
9909 (base32
9910 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
9911 (build-system python-build-system)
9912 (synopsis "Plugin and hook calling mechanism for Python")
9913 (description "Pluggy is an extraction of the plugin manager as used by
9914 Pytest but stripped of Pytest specific details.")
9915 (home-page "https://pypi.python.org/pypi/pluggy")
9916 (license license:expat)))
9917
9918 (define-public python2-pluggy
9919 (package-with-python2 python-pluggy))
9920
9921 (define-public python-tox
9922 (package
9923 (name "python-tox")
9924 (version "2.8.0")
9925 (source
9926 (origin
9927 (method url-fetch)
9928 (uri (pypi-uri "tox" version))
9929 (sha256
9930 (base32
9931 "00lrql2cfzhb712v70inac6mrgdv8s8fmvz7qpggkk623hkm2pgc"))))
9932 (build-system python-build-system)
9933 (arguments
9934 ;; FIXME: Tests require pytest-timeout, which itself requires
9935 ;; pytest>=2.8.0 for installation.
9936 '(#:tests? #f))
9937 (propagated-inputs
9938 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
9939 ("python-py" ,python-py)
9940 ("python-virtualenv" ,python-virtualenv)))
9941 (native-inputs
9942 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
9943 ("python-pytest" ,python-pytest) ; >= 2.3.5
9944 ("python-setuptools-scm" ,python-setuptools-scm)))
9945 (home-page "http://tox.testrun.org/")
9946 (synopsis "Virtualenv-based automation of test activities")
9947 (description "Tox is a generic virtualenv management and test command line
9948 tool. It can be used to check that a package installs correctly with
9949 different Python versions and interpreters, or run tests in each type of
9950 supported environment, or act as a frontend to continuous integration
9951 servers.")
9952 (license license:expat)))
9953
9954 (define-public python2-tox
9955 (package-with-python2 python-tox))
9956
9957 (define-public python-jmespath
9958 (package
9959 (name "python-jmespath")
9960 (version "0.9.0")
9961 (source
9962 (origin
9963 (method url-fetch)
9964 (uri (pypi-uri "jmespath" version))
9965 (sha256
9966 (base32
9967 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
9968 (build-system python-build-system)
9969 (native-inputs
9970 `(("python-nose" ,python-nose)))
9971 (synopsis "JSON Matching Expressions")
9972 (description "JMESPath (pronounced “james path”) is a Python library that
9973 allows one to declaratively specify how to extract elements from a JSON
9974 document.")
9975 (home-page "https://github.com/jmespath/jmespath.py")
9976 (license license:expat)))
9977
9978 (define-public python2-jmespath
9979 (package-with-python2 python-jmespath))
9980
9981 (define-public python-botocore
9982 (package
9983 (name "python-botocore")
9984 (version "1.7.9")
9985 (source
9986 (origin
9987 (method url-fetch)
9988 (uri (pypi-uri "botocore" version))
9989 (sha256
9990 (base32
9991 "02b1bw25r1wdjs5yppb1h9igf11wj092biriv2yg8hzp5r0wrkmg"))))
9992 (build-system python-build-system)
9993 (arguments
9994 ;; FIXME: Many tests are failing.
9995 '(#:tests? #f))
9996 (propagated-inputs
9997 `(("python-dateutil" ,python-dateutil)
9998 ("python-docutils" ,python-docutils)
9999 ("python-jmespath" ,python-jmespath)))
10000 (native-inputs
10001 `(("python-mock" ,python-mock)
10002 ("python-nose" ,python-nose)
10003 ("behave" ,behave)
10004 ("python-tox" ,python-tox)
10005 ("python-wheel" ,python-wheel)))
10006 (home-page "https://github.com/boto/botocore")
10007 (synopsis "Low-level interface to AWS")
10008 (description "Botocore is a Python library that provides a low-level
10009 interface to the Amazon Web Services (AWS) API.")
10010 (license license:asl2.0)))
10011
10012 (define-public python2-botocore
10013 (package-with-python2 python-botocore))
10014
10015 (define-public awscli
10016 (package
10017 (name "awscli")
10018 (version "1.11.151")
10019 (source
10020 (origin
10021 (method url-fetch)
10022 (uri (pypi-uri name version))
10023 (sha256
10024 (base32
10025 "0h6rirbfy0f9cxm7ikll0kr720dircfmxf2vslmhn4n325831wsp"))))
10026 (build-system python-build-system)
10027 (propagated-inputs
10028 `(("python-colorama" ,python-colorama)
10029 ("python-botocore" ,python-botocore)
10030 ("python-s3transfer" ,python-s3transfer)
10031 ("python-docutils" ,python-docutils)
10032 ("python-pyyaml" ,python-pyyaml)
10033 ("python-rsa" ,python-rsa)))
10034 (arguments
10035 ;; FIXME: The 'pypi' release does not contain tests.
10036 '(#:tests? #f))
10037 (home-page "https://aws.amazon.com/cli/")
10038 (synopsis "Command line client for AWS")
10039 (description "AWS CLI provides a unified command line interface to the
10040 Amazon Web Services (AWS) API.")
10041 (license license:asl2.0)))
10042
10043 (define-public python-hypothesis
10044 (package
10045 (name "python-hypothesis")
10046 (version "3.1.0")
10047 (source (origin
10048 (method url-fetch)
10049 (uri (pypi-uri "hypothesis" version))
10050 (sha256
10051 (base32
10052 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
10053 (build-system python-build-system)
10054 (native-inputs
10055 `(("python-flake8" ,python-flake8)
10056 ("python-pytest" ,python-pytest)))
10057 (synopsis "Library for property based testing")
10058 (description "Hypothesis is a library for testing your Python code against a
10059 much larger range of examples than you would ever want to write by hand. It’s
10060 based on the Haskell library, Quickcheck, and is designed to integrate
10061 seamlessly into your existing Python unit testing work flow.")
10062 (home-page "https://github.com/DRMacIver/hypothesis")
10063 (license license:mpl2.0)
10064 (properties `((python2-variant . ,(delay python2-hypothesis))))))
10065
10066 (define-public python2-hypothesis
10067 (let ((hypothesis (package-with-python2
10068 (strip-python2-variant python-hypothesis))))
10069 (package (inherit hypothesis)
10070 (native-inputs
10071 `(("python2-enum34" ,python2-enum34)
10072 ,@(package-native-inputs hypothesis))))))
10073
10074 (define-public python-pytest-subtesthack
10075 (package
10076 (name "python-pytest-subtesthack")
10077 (version "0.1.1")
10078 (source (origin
10079 (method url-fetch)
10080 (uri (pypi-uri "pytest-subtesthack" version))
10081 (sha256
10082 (base32
10083 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
10084 (build-system python-build-system)
10085 (propagated-inputs
10086 `(("python-pytest" ,python-pytest)))
10087 (synopsis "Set-up and tear-down fixtures for unit tests")
10088 (description "This plugin allows you to set up and tear down fixtures within
10089 unit test functions that use @code{py.test}. This is useful for using
10090 @command{hypothesis} inside py.test, as @command{hypothesis} will call the test
10091 function multiple times, without setting up or tearing down fixture state as is
10092 normally the case.")
10093 (home-page "https://github.com/untitaker/pytest-subtesthack/")
10094 (license license:unlicense)))
10095
10096 (define-public python2-pytest-subtesthack
10097 (package-with-python2 python-pytest-subtesthack))
10098
10099 (define-public python-xdo
10100 (package
10101 (name "python-xdo")
10102 (version "0.3")
10103 (source (origin
10104 (method url-fetch)
10105 (uri (string-append
10106 "http://http.debian.net/debian/pool/main/p/python-xdo/"
10107 "python-xdo_" version ".orig.tar.gz"))
10108 (sha256
10109 (base32
10110 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
10111 (build-system python-build-system)
10112 (arguments
10113 '(#:phases
10114 (modify-phases %standard-phases
10115 (add-before 'install 'patch-libxdo-path
10116 ;; Hardcode the path of dynamically loaded libxdo library.
10117 (lambda* (#:key inputs #:allow-other-keys)
10118 (let ((libxdo (string-append
10119 (assoc-ref inputs "xdotool")
10120 "/lib/libxdo.so")))
10121 (substitute* "xdo/_xdo.py"
10122 (("find_library\\(\"xdo\"\\)")
10123 (simple-format #f "\"~a\"" libxdo)))
10124 #t))))
10125 #:tests? #f)) ; no tests provided
10126 (propagated-inputs
10127 `(("python-six" ,python-six)))
10128 (inputs
10129 `(("xdotool" ,xdotool)
10130 ("libX11" ,libx11)))
10131 (home-page "https://tracker.debian.org/pkg/python-xdo")
10132 (synopsis "Python library for simulating X11 keyboard/mouse input")
10133 (description "Provides bindings to libxdo for manipulating X11 via simulated
10134 input. (Note that this is mostly a legacy library; you may wish to look at
10135 python-xdo for newer bindings.)")
10136 (license license:bsd-3)))
10137
10138 (define-public python2-xdo
10139 (package-with-python2 python-xdo))
10140
10141 (define-public python-wtforms
10142 (package
10143 (name "python-wtforms")
10144 (version "2.1")
10145 (source
10146 (origin
10147 (method url-fetch)
10148 (uri (pypi-uri "WTForms" version ".zip"))
10149 (sha256
10150 (base32
10151 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
10152 (build-system python-build-system)
10153 (arguments
10154 '(#:phases
10155 (modify-phases %standard-phases
10156 (add-after 'unpack 'remove-django-test
10157 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
10158 (lambda _
10159 (substitute*
10160 "tests/runtests.py"
10161 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
10162 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
10163 #t)))))
10164 (native-inputs
10165 `(("unzip" ,unzip)))
10166 (home-page "http://wtforms.simplecodes.com/")
10167 (synopsis
10168 "Form validation and rendering library for Python web development")
10169 (description
10170 "WTForms is a flexible forms validation and rendering library
10171 for Python web development. It is very similar to the web form API
10172 available in Django, but is a standalone package.")
10173 (license license:bsd-3)))
10174
10175 (define-public python2-wtforms
10176 (package-with-python2 python-wtforms))
10177
10178 (define-public python-mako
10179 (package
10180 (name "python-mako")
10181 (version "1.0.6")
10182 (source
10183 (origin
10184 (method url-fetch)
10185 (uri (pypi-uri "Mako" version))
10186 (sha256
10187 (base32
10188 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
10189 (build-system python-build-system)
10190 (propagated-inputs
10191 `(("python-markupsafe" ,python-markupsafe)))
10192 (native-inputs
10193 `(("python-mock" ,python-mock)
10194 ("python-nose" ,python-nose)
10195 ("python-pytest" ,python-pytest)))
10196 (home-page "http://www.makotemplates.org/")
10197 (synopsis "Templating language for Python")
10198 (description "Mako is a templating language for Python that compiles
10199 templates into Python modules.")
10200 (license license:expat)))
10201
10202 (define-public python2-mako
10203 (package-with-python2 python-mako))
10204
10205 (define-public python-waitress
10206 (package
10207 (name "python-waitress")
10208 (version "0.8.10")
10209 (source
10210 (origin
10211 (method url-fetch)
10212 (uri (pypi-uri "waitress" version))
10213 (sha256
10214 (base32
10215 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
10216 (build-system python-build-system)
10217 (home-page "https://github.com/Pylons/waitress")
10218 (synopsis "Waitress WSGI server")
10219 (description "Waitress is meant to be a production-quality pure-Python WSGI
10220 server with very acceptable performance.")
10221 (license license:zpl2.1)))
10222
10223 (define-public python2-waitress
10224 (package-with-python2 python-waitress))
10225
10226 (define-public python-wsgiproxy2
10227 (package
10228 (name "python-wsgiproxy2")
10229 (version "0.4.2")
10230 (source
10231 (origin
10232 (method url-fetch)
10233 (uri (pypi-uri "WSGIProxy2" version ".zip"))
10234 (sha256
10235 (base32
10236 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
10237 (build-system python-build-system)
10238 (arguments
10239 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
10240 ;; support Python 3:
10241 ;; https://github.com/benoitc/restkit/issues/140
10242 #:tests? #f))
10243 (native-inputs
10244 `(("unzip" ,unzip)
10245 ("python-nose" ,python-nose)
10246 ("python-coverage" ,python-coverage)))
10247 (propagated-inputs
10248 `(("python-six" ,python-six)
10249 ("python-webob" ,python-webob)))
10250 (home-page
10251 "https://github.com/gawel/WSGIProxy2/")
10252 (synopsis "WSGI Proxy with various http client backends")
10253 (description "WSGI turns HTTP requests into WSGI function calls.
10254 WSGIProxy turns WSGI function calls into HTTP requests.
10255 It also includes code to sign requests and pass private data,
10256 and to spawn subprocesses to handle requests.")
10257 (license license:expat)))
10258
10259 (define-public python2-wsgiproxy2
10260 (package-with-python2 python-wsgiproxy2))
10261
10262 (define-public python-pastedeploy
10263 (package
10264 (name "python-pastedeploy")
10265 (version "1.5.2")
10266 (source
10267 (origin
10268 (method url-fetch)
10269 (uri (pypi-uri "PasteDeploy" version))
10270 (sha256
10271 (base32
10272 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
10273 (build-system python-build-system)
10274 (native-inputs
10275 `(("python-nose" ,python-nose)))
10276 (home-page "http://pythonpaste.org/deploy/")
10277 (synopsis
10278 "Load, configure, and compose WSGI applications and servers")
10279 (description
10280 "This tool provides code to load WSGI applications and servers from URIs;
10281 these URIs can refer to Python Eggs for INI-style configuration files. Paste
10282 Script provides commands to serve applications based on this configuration
10283 file.")
10284 (license license:expat)))
10285
10286 (define-public python2-pastedeploy
10287 (package-with-python2 python-pastedeploy))
10288
10289 (define-public python-paste
10290 (package
10291 (name "python-paste")
10292 (version "2.0.3")
10293 (source
10294 (origin
10295 (method url-fetch)
10296 (uri (pypi-uri "Paste" version))
10297 (sha256
10298 (base32
10299 "062jk0nlxf6lb2wwj6zc20rlvrwsnikpkh90y0dn8cjch93s6ii3"))
10300 (patches (search-patches "python-paste-remove-website-test.patch"
10301 "python-paste-remove-timing-test.patch"))))
10302 (build-system python-build-system)
10303 (native-inputs
10304 `(("python-nose" ,python-nose)))
10305 (propagated-inputs
10306 `(("python-six" ,python-six)))
10307 (home-page "http://pythonpaste.org")
10308 (synopsis
10309 "Python web development tools, focusing on WSGI")
10310 (description
10311 "Paste provides a variety of web development tools and middleware which
10312 can be nested together to build web applications. Paste's design closely
10313 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
10314 (license license:expat)))
10315
10316 (define-public python2-paste
10317 (package-with-python2 python-paste))
10318
10319 (define-public python-pastescript
10320 (package
10321 (name "python-pastescript")
10322 (version "2.0.2")
10323 (source
10324 (origin
10325 (method url-fetch)
10326 (uri (pypi-uri "PasteScript" version))
10327 (sha256
10328 (base32
10329 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
10330 (build-system python-build-system)
10331 (native-inputs
10332 `(("python-nose" ,python-nose)))
10333 (propagated-inputs
10334 `(("python-paste" ,python-paste)
10335 ("python-pastedeploy" ,python-pastedeploy)))
10336 (home-page "http://pythonpaste.org/script/")
10337 (arguments
10338 '(;; Unfortunately, this requires the latest unittest2,
10339 ;; but that requires traceback2 which requires linecache2 which requires
10340 ;; unittest2. So we're skipping tests for now.
10341 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
10342 ;; so in theory we could get around this situation somehow.)
10343 #:tests? #f))
10344 (synopsis
10345 "Pluggable command line tool for serving web applications and more")
10346 (description
10347 "PasteScript is a plugin-friendly command line tool which provides a
10348 variety of features, from launching web applications to bootstrapping project
10349 layouts.")
10350 (license license:expat)))
10351
10352 (define-public python2-pastescript
10353 (package-with-python2 python-pastescript))
10354
10355 (define-public python-pyquery
10356 (package
10357 (name "python-pyquery")
10358 (version "1.2.17")
10359 (source
10360 (origin
10361 (method url-fetch)
10362 (uri (pypi-uri "pyquery" version))
10363 (sha256
10364 (base32
10365 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
10366 (build-system python-build-system)
10367 (native-inputs
10368 `(("python-webob" ,python-webob)
10369 ("python-webtest" ,python-webtest)))
10370 (propagated-inputs
10371 `(("python-lxml" ,python-lxml)
10372 ("python-cssselect" ,python-cssselect)))
10373 (home-page "https://github.com/gawel/pyquery")
10374 (synopsis "Make jQuery-like queries on xml documents")
10375 (description "pyquery allows you to make jQuery queries on xml documents.
10376 The API is as much as possible the similar to jQuery. pyquery uses lxml for
10377 fast xml and html manipulation.")
10378 (license license:bsd-3)))
10379
10380 (define-public python2-pyquery
10381 (package-with-python2 python-pyquery))
10382
10383 (define-public python-webtest
10384 (package
10385 (name "python-webtest")
10386 (version "2.0.20")
10387 (source
10388 (origin
10389 (method url-fetch)
10390 (uri (pypi-uri "WebTest" version))
10391 (sha256
10392 (base32
10393 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
10394 (build-system python-build-system)
10395 (arguments
10396 `(;; Unfortunately we have to disable tests!
10397 ;; This release of WebTest is pinned to python-nose < 1.3,
10398 ;; but older versions of python-nose are plagued with the following
10399 ;; bug(s), which rears its ugly head during test execution:
10400 ;; https://github.com/nose-devs/nose/issues/759
10401 ;; https://github.com/nose-devs/nose/pull/811
10402 #:tests? #f))
10403 ;; Commented out code is no good, but in this case, once tests
10404 ;; are ready to be enabled again, we should put the following
10405 ;; in place:
10406 ;; (native-inputs
10407 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
10408 ;; ; but see above comment
10409 ;; ("python-coverage" ,python-coverage)
10410 ;; ("python-mock" ,python-mock)
10411 ;; ("python-pastedeploy" ,python-pastedeploy)
10412 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
10413 ;; ("python-pyquery" ,python-pyquery)))
10414 (propagated-inputs
10415 `(("python-waitress" ,python-waitress)
10416 ("python-webob" ,python-webob)
10417 ("python-six" ,python-six)
10418 ("python-beautifulsoup4" ,python-beautifulsoup4)))
10419 (home-page "http://webtest.pythonpaste.org/")
10420 (synopsis "Helper to test WSGI applications")
10421 (description "Webtest allows you to test your Python web applications
10422 without starting an HTTP server. It supports anything that supports the
10423 minimum of WSGI.")
10424 (license license:expat)))
10425
10426 (define-public python2-webtest
10427 (package-with-python2 python-webtest))
10428
10429 (define-public python-anyjson
10430 (package
10431 (name "python-anyjson")
10432 (version "0.3.3")
10433 (source
10434 (origin
10435 (method url-fetch)
10436 (uri (pypi-uri "anyjson" version))
10437 (sha256
10438 (base32
10439 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
10440 (build-system python-build-system)
10441 (arguments
10442 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
10443 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
10444 ;; whatever) so this transformation needs to be done before the tests
10445 ;; can be run. Maybe we could add a build step to transform beforehand
10446 ;; but it could be annoying/difficult.
10447 ;; We can enable tests for the Python 2 version, though, and do below.
10448 #:tests? #f))
10449 (home-page "http://bitbucket.org/runeh/anyjson/")
10450 (synopsis
10451 "Wraps best available JSON implementation in a common interface")
10452 (description
10453 "Anyjson loads whichever is the fastest JSON module installed
10454 and provides a uniform API regardless of which JSON implementation is used.")
10455 (license license:bsd-3)
10456 (properties `((python2-variant . ,(delay python2-anyjson))))))
10457
10458 (define-public python2-anyjson
10459 (let ((anyjson (package-with-python2
10460 (strip-python2-variant python-anyjson))))
10461 (package
10462 (inherit anyjson)
10463 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
10464 #:tests? #t
10465 ,@(package-arguments anyjson)))
10466 (native-inputs `(("python2-nose" ,python2-nose))))))
10467
10468 (define-public python-amqp
10469 (package
10470 (name "python-amqp")
10471 (version "1.4.9")
10472 (source
10473 (origin
10474 (method url-fetch)
10475 (uri (pypi-uri "amqp" version))
10476 (sha256
10477 (base32
10478 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
10479 (build-system python-build-system)
10480 (native-inputs
10481 `(("python-nose" ,python-nose)
10482 ("python-mock" ,python-mock)))
10483 (home-page "https://github.com/celery/py-amqp")
10484 (synopsis
10485 "Low-level AMQP client for Python (fork of amqplib)")
10486 (description
10487 "This is a fork of amqplib which was originally written by Barry Pederson.
10488 It is maintained by the Celery project, and used by kombu as a pure python
10489 alternative when librabbitmq is not available.")
10490 (license license:lgpl2.1+)
10491 (properties `((python2-variant . ,(delay python2-amqp))))))
10492
10493 (define-public python2-amqp
10494 (let ((amqp (package-with-python2
10495 (strip-python2-variant python-amqp))))
10496 (package
10497 (inherit amqp)
10498 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
10499 ;; unmaintained. Weirdly, does not do this on the python 3
10500 ;; version?
10501 #:tests? #f
10502 ,@(package-arguments amqp))))))
10503
10504 (define-public python-kombu
10505 (package
10506 (name "python-kombu")
10507 (version "3.0.37")
10508 (source
10509 (origin
10510 (method url-fetch)
10511 (uri (pypi-uri "kombu" version))
10512 (sha256
10513 (base32
10514 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
10515 (build-system python-build-system)
10516 (native-inputs
10517 `(("python-mock" ,python-mock)
10518 ("python-nose" ,python-nose)))
10519 (propagated-inputs
10520 `(("python-anyjson" ,python-anyjson)
10521 ("python-amqp" ,python-amqp)
10522 ("python-redis" ,python-redis)))
10523 (home-page "http://kombu.readthedocs.org")
10524 (synopsis "Message passing library for Python")
10525 (description "The aim of Kombu is to make messaging in Python as easy as
10526 possible by providing an idiomatic high-level interface for the AMQ protocol,
10527 and also provide proven and tested solutions to common messaging problems.
10528 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
10529 message orientation, queuing, routing, reliability and security, for which the
10530 RabbitMQ messaging server is the most popular implementation.")
10531 (license license:bsd-3)
10532 (properties `((python2-variant . ,(delay python2-kombu))))))
10533
10534 (define-public python2-kombu
10535 (let ((kombu (package-with-python2
10536 (strip-python2-variant python-kombu))))
10537 (package
10538 (inherit kombu)
10539 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
10540 ;; It works fine on the python3 variant.
10541 #:tests? #f
10542 ,@(package-arguments kombu)))
10543 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10544 ,@(package-native-inputs kombu))))))
10545
10546 (define-public python-billiard
10547 (package
10548 (name "python-billiard")
10549 (version "3.3.0.23")
10550 (source
10551 (origin
10552 (method url-fetch)
10553 (uri (pypi-uri "billiard" version))
10554 (sha256
10555 (base32
10556 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
10557 (build-system python-build-system)
10558 (native-inputs
10559 `(("python-nose" ,python-nose)))
10560 (home-page "https://github.com/celery/billiard")
10561 (synopsis
10562 "Python multiprocessing fork with improvements and bugfixes")
10563 (description
10564 "Billiard is a fork of the Python 2.7 multiprocessing package. The
10565 multiprocessing package itself is a renamed and updated version of R Oudkerk's
10566 pyprocessing package. This standalone variant is intended to be compatible with
10567 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
10568 (license license:bsd-3)
10569 (properties `((python2-variant . ,(delay python2-billiard))))))
10570
10571 (define-public python2-billiard
10572 (let ((billiard (package-with-python2
10573 (strip-python2-variant python-billiard))))
10574 (package
10575 (inherit billiard)
10576 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10577 ("python2-mock" ,python2-mock)
10578 ,@(package-native-inputs billiard))))))
10579
10580 (define-public python-celery
10581 (package
10582 (name "python-celery")
10583 (version "3.1.24")
10584 (source
10585 (origin
10586 (method url-fetch)
10587 (uri (pypi-uri "celery" version))
10588 (sha256
10589 (base32
10590 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
10591 (build-system python-build-system)
10592 (arguments
10593 `(#:phases
10594 (modify-phases %standard-phases
10595 ;; These tests break with Python 3.5:
10596 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
10597 (replace 'check
10598 (lambda _
10599 (zero?
10600 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
10601 (native-inputs
10602 `(("python-nose" ,python-nose)))
10603 (propagated-inputs
10604 `(("python-pytz" ,python-pytz)
10605 ("python-billiard" ,python-billiard)
10606 ("python-kombu" ,python-kombu)))
10607 (home-page "http://celeryproject.org")
10608 (synopsis "Distributed Task Queue")
10609 (description "Celery is an asynchronous task queue/job queue based on
10610 distributed message passing. It is focused on real-time operation, but
10611 supports scheduling as well. The execution units, called tasks, are executed
10612 concurrently on a single or more worker servers using multiprocessing,
10613 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
10614 synchronously (wait until ready).")
10615 (license license:bsd-3)
10616 (properties `((python2-variant . ,(delay python2-celery))))))
10617
10618 (define-public python2-celery
10619 (let ((celery (package-with-python2
10620 (strip-python2-variant python-celery))))
10621 (package
10622 (inherit celery)
10623 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10624 ("python2-mock" ,python2-mock)
10625 ,@(package-native-inputs celery))))))
10626
10627 (define-public python-translitcodec
10628 (package
10629 (name "python-translitcodec")
10630 (version "0.4.0")
10631 (source
10632 (origin
10633 (method url-fetch)
10634 (uri (pypi-uri "translitcodec" version))
10635 (sha256
10636 (base32
10637 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
10638 (build-system python-build-system)
10639 (arguments
10640 `(#:tests? #f)) ; no tests provided
10641 (home-page
10642 "https://github.com/claudep/translitcodec")
10643 (synopsis
10644 "Unicode to 8-bit charset transliteration codec")
10645 (description
10646 "This package contains codecs for transliterating ISO 10646 texts into
10647 best-effort representations using smaller coded character sets (ASCII,
10648 ISO 8859, etc.).")
10649 (license license:expat)))
10650
10651 (define-public python2-translitcodec
10652 (package-with-python2 python-translitcodec))
10653
10654 (define-public python-editor
10655 (package
10656 (name "python-editor")
10657 (version "0.5")
10658 (source
10659 (origin
10660 (method url-fetch)
10661 (uri (pypi-uri "python-editor" version))
10662 (sha256
10663 (base32
10664 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
10665 (build-system python-build-system)
10666 (home-page
10667 "https://github.com/fmoo/python-editor")
10668 (synopsis
10669 "Programmatically open an editor, capture the result")
10670 (description
10671 "python-editor is a library that provides the editor module for
10672 programmatically interfacing with your system's $EDITOR.")
10673 (license license:asl2.0)))
10674
10675 (define-public python2-editor
10676 (package-with-python2 python-editor))
10677
10678 (define-public python-sphinxcontrib-programoutput
10679 (package
10680 (name "python-sphinxcontrib-programoutput")
10681 (version "0.10")
10682 (source (origin
10683 (method url-fetch)
10684 (uri (pypi-uri "sphinxcontrib-programoutput" version))
10685 (sha256
10686 (base32
10687 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
10688 (build-system python-build-system)
10689 (arguments
10690 ;; FIXME: Many tests are failing and the upstream is gone.
10691 '(#:tests? #f))
10692 (propagated-inputs
10693 `(("python-sphinx" ,python-sphinx)))
10694 (synopsis "Sphinx extension to include program output")
10695 (description "A Sphinx extension to literally insert the output of arbitrary
10696 commands into documents, helping you to keep your command examples up to date.")
10697 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
10698 (license license:bsd-2)))
10699
10700 (define-public python2-sphinxcontrib-programoutput
10701 (package-with-python2 python-sphinxcontrib-programoutput))
10702
10703 (define-public python-sphinx-repoze-autointerface
10704 (package
10705 (name "python-sphinx-repoze-autointerface")
10706 (version "0.8")
10707 (source (origin
10708 (method url-fetch)
10709 (uri (pypi-uri "repoze.sphinx.autointerface" version))
10710 (sha256
10711 (base32
10712 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
10713 (build-system python-build-system)
10714 (arguments '(#:tests? #f)) ; No tests.
10715 (propagated-inputs
10716 `(("python-sphinx" ,python-sphinx)
10717 ("python-zope-interface" ,python-zope-interface)))
10718 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
10719 (description "This package defines an extension for the Sphinx documentation
10720 system. The extension allows generation of API documentation by
10721 introspection of @code{zope.interface} instances in code.")
10722 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
10723 (license license:repoze)))
10724
10725 (define-public python2-sphinx-repoze-autointerface
10726 (package-with-python2 python-sphinx-repoze-autointerface))
10727
10728 (define-public python-psycopg2
10729 (package
10730 (name "python-psycopg2")
10731 (version "2.6.2")
10732 (source
10733 (origin
10734 (method url-fetch)
10735 (uri (pypi-uri "psycopg2" version))
10736 (sha256
10737 (base32
10738 "0p60z2gwfcal30y2w8gprflchp1kcg9qblc5rn782p4wxl90wjbh"))))
10739 (build-system python-build-system)
10740 (arguments
10741 ;; Tests would require a postgresql database "psycopg2_test"
10742 ;; and a running postgresql database management service.
10743 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
10744 (inputs
10745 `(("postgresql" ,postgresql))) ; libpq
10746 (home-page "http://initd.org/psycopg/")
10747 (synopsis "Python PostgreSQL adapter")
10748 (description
10749 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
10750 (license license:lgpl3+)))
10751
10752 (define-public python2-psycopg2
10753 (package-with-python2 python-psycopg2))
10754
10755 (define-public python-vobject
10756 (package
10757 (name "python-vobject")
10758 (version "0.9.5")
10759 (source (origin
10760 (method url-fetch)
10761 (uri (pypi-uri "vobject" version))
10762 (sha256
10763 (base32
10764 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
10765 (build-system python-build-system)
10766 (arguments
10767 '(;; The test suite relies on some non-portable Windows interfaces.
10768 #:tests? #f))
10769 (propagated-inputs
10770 `(("python-dateutil" ,python-dateutil)
10771 ("python-pyicu" ,python-pyicu)))
10772 (synopsis "Parse and generate vCard and vCalendar files")
10773 (description "Vobject is intended to be a full featured Python package for
10774 parsing and generating vCard and vCalendar files. Currently, iCalendar files
10775 are supported and well tested. vCard 3.0 files are supported, and all data
10776 should be imported, but only a few components are understood in a sophisticated
10777 way.")
10778 (home-page "http://eventable.github.io/vobject/")
10779 (license license:asl2.0)))
10780
10781 (define-public python2-vobject
10782 (package-with-python2 python-vobject))
10783
10784 (define-public python-munkres
10785 (package
10786 (name "python-munkres")
10787 (version "1.0.8")
10788 (source (origin
10789 (method url-fetch)
10790 (uri (pypi-uri "munkres" version))
10791 (sha256
10792 (base32
10793 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
10794 (build-system python-build-system)
10795 (arguments
10796 '(#:tests? #f)) ; no test suite
10797 (home-page "http://software.clapper.org/munkres/")
10798 (synopsis "Implementation of the Munkres algorithm")
10799 (description "The Munkres module provides an implementation of the Munkres
10800 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
10801 useful for solving the Assignment Problem.")
10802 (license license:bsd-3)))
10803
10804 (define-public python2-munkres
10805 (package-with-python2 python-munkres))
10806
10807 (define-public python-flask
10808 (package
10809 (name "python-flask")
10810 (version "0.11.1")
10811 (source (origin
10812 (method url-fetch)
10813 (uri (pypi-uri "Flask" version))
10814 (sha256
10815 (base32
10816 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
10817 (build-system python-build-system)
10818 (propagated-inputs
10819 `(("python-itsdangerous" ,python-itsdangerous)
10820 ("python-jinja2" ,python-jinja2)
10821 ("python-click" ,python-click)
10822 ("python-werkzeug" ,python-werkzeug)))
10823 (home-page "https://github.com/mitsuhiko/flask/")
10824 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
10825 (description "Flask is a micro web framework based on the Werkzeug toolkit
10826 and Jinja2 template engine. It is called a micro framework because it does not
10827 presume or force a developer to use a particular tool or library.")
10828 (license license:bsd-3)))
10829
10830 (define-public python2-flask
10831 (package-with-python2 python-flask))
10832
10833 (define-public python-flask-wtf
10834 (package
10835 (name "python-flask-wtf")
10836 (version "0.13.1")
10837 (source
10838 (origin
10839 (method url-fetch)
10840 (uri (pypi-uri "Flask-WTF" version))
10841 (sha256
10842 (base32
10843 "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
10844 (build-system python-build-system)
10845 (arguments
10846 '(#:phases
10847 (modify-phases %standard-phases
10848 (add-before 'check 'drop-failing-test
10849 (lambda _
10850 ;; FIXME: This file tries resolving an external server, which
10851 ;; fails. Try to patch out the offending section instead of
10852 ;; deleting the whole thing.
10853 (delete-file "tests/test_recaptcha.py")
10854 #t)))))
10855 (propagated-inputs
10856 `(("python-flask-babel" ,python-flask-babel)
10857 ("python-babel" ,python-babel)
10858 ("python-wtforms" ,python-wtforms)))
10859 (native-inputs
10860 `(("python-nose" ,python-nose)))
10861 (home-page "https://github.com/lepture/flask-wtf")
10862 (synopsis "Simple integration of Flask and WTForms")
10863 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
10864 upload, and reCAPTCHA.")
10865 (license license:bsd-3)))
10866
10867 (define-public python2-flask-wtf
10868 (package-with-python2 python-flask-wtf))
10869
10870 (define-public python-flask-multistatic
10871 (package
10872 (name "python-flask-multistatic")
10873 (version "1.0")
10874 (source
10875 (origin
10876 (method url-fetch)
10877 (uri (pypi-uri "flask-multistatic" version))
10878 (sha256
10879 (base32
10880 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
10881 (build-system python-build-system)
10882 (propagated-inputs
10883 `(("python-flask" ,python-flask)))
10884 (home-page "https://pagure.io/flask-multistatic")
10885 (synopsis "Flask plugin to allow overriding static files")
10886 (description "@code{flask-multistatic} is a flask plugin that adds support
10887 for overriding static files.")
10888 (license license:gpl3+)))
10889
10890 (define-public python2-flask-multistatic
10891 (package-with-python2 python-flask-multistatic))
10892
10893 (define-public python-cookies
10894 (package
10895 (name "python-cookies")
10896 (version "2.2.1")
10897 (source (origin
10898 (method url-fetch)
10899 (uri (pypi-uri "cookies" version))
10900 (sha256
10901 (base32
10902 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
10903 (build-system python-build-system)
10904 (arguments
10905 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
10906 #:tests? #f))
10907 (native-inputs
10908 `(("python-pytest" ,python2-pytest)))
10909 (synopsis "HTTP cookie parser and renderer")
10910 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
10911 Python.")
10912 (home-page "https://gitlab.com/sashahart/cookies")
10913 (license license:expat)))
10914
10915 (define-public python2-cookies
10916 (package-with-python2 python-cookies))
10917
10918 (define-public python-responses
10919 (package
10920 (name "python-responses")
10921 (version "0.5.1")
10922 (source (origin
10923 (method url-fetch)
10924 (uri (pypi-uri "responses" version))
10925 (sha256
10926 (base32
10927 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
10928 (build-system python-build-system)
10929 (arguments
10930 `(;; Test suite is not distributed:
10931 ;; https://github.com/getsentry/responses/issues/38
10932 #:tests? #f))
10933 (native-inputs
10934 `(("python-mock" ,python-mock)))
10935 (propagated-inputs
10936 `(("python-requests" ,python-requests)
10937 ("python-cookies" ,python-cookies)
10938 ("python-six" ,python-six)))
10939 (home-page "https://github.com/getsentry/responses")
10940 (synopsis "Utility for mocking out the `requests` Python library")
10941 (description "A utility library for mocking out the `requests` Python
10942 library.")
10943 (license license:asl2.0)))
10944
10945 (define-public python2-responses
10946 (package-with-python2 python-responses))
10947
10948 (define-public python-whoosh
10949 (package
10950 (name "python-whoosh")
10951 (version "2.7.4")
10952 (source
10953 (origin
10954 (method url-fetch)
10955 (uri (pypi-uri "Whoosh" version))
10956 (sha256
10957 (base32
10958 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
10959 (build-system python-build-system)
10960 (native-inputs
10961 `(("python-pytest" ,python-pytest)))
10962 (home-page "http://bitbucket.org/mchaput/whoosh")
10963 (synopsis "Full text indexing, search, and spell checking library")
10964 (description
10965 "Whoosh is a fast, pure-Python full text indexing, search, and spell
10966 checking library.")
10967 (license license:bsd-2)))
10968
10969 (define-public python2-whoosh
10970 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
10971 (package (inherit whoosh)
10972 (propagated-inputs
10973 `(("python2-backport-ssl-match-hostname"
10974 ,python2-backport-ssl-match-hostname)
10975 ,@(package-propagated-inputs whoosh))))))
10976
10977 (define-public python-pathlib
10978 (package
10979 (name "python-pathlib")
10980 (version "1.0.1")
10981 (source (origin
10982 (method url-fetch)
10983 (uri (pypi-uri "pathlib" version))
10984 (sha256
10985 (base32
10986 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
10987 (build-system python-build-system)
10988 ;; The tests depend on the internal "test" module, which does not provide
10989 ;; a stable interface.
10990 (arguments `(#:tests? #f))
10991 (home-page "https://pathlib.readthedocs.org/")
10992 (synopsis "Object-oriented file system paths")
10993 (description "Pathlib offers a set of classes to handle file system paths.
10994 It offers the following advantages over using string objects:
10995
10996 @enumerate
10997 @item No more cumbersome use of os and os.path functions. Everything can
10998 be done easily through operators, attribute accesses, and method calls.
10999 @item Embodies the semantics of different path types. For example,
11000 comparing Windows paths ignores casing.
11001 @item Well-defined semantics, eliminating any inconsistencies or
11002 ambiguities (forward vs. backward slashes, etc.).
11003 @end enumerate
11004
11005 Note: In Python 3.4, pathlib is now part of the standard library. For other
11006 Python versions please consider python-pathlib2 instead, which tracks the
11007 standard library module. This module (python-pathlib) isn't maintained
11008 anymore.")
11009 (license license:expat)))
11010
11011 (define-public python2-pathlib
11012 (package-with-python2 python-pathlib))
11013
11014 (define-public python2-pathlib2
11015 (package
11016 (name "python2-pathlib2")
11017 (version "2.1.0")
11018 (source (origin
11019 (method url-fetch)
11020 (uri (pypi-uri "pathlib2" version))
11021 (sha256
11022 (base32
11023 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
11024 (build-system python-build-system)
11025 ;; We only need the the Python 2 variant, since for Python 3 our minimum
11026 ;; version is 3.4 which already includes this package as part of the
11027 ;; standard library.
11028 (arguments
11029 `(#:python ,python-2))
11030 (native-inputs
11031 `(("python2-six" ,python2-six)))
11032 (home-page "http://pypi.python.org/pypi/pathlib2/")
11033 (synopsis "Object-oriented file system paths - backport of standard
11034 pathlib module")
11035 (description "The goal of pathlib2 is to provide a backport of standard
11036 pathlib module which tracks the standard library module, so all the newest
11037 features of the standard pathlib can be used also on older Python versions.
11038
11039 Pathlib offers a set of classes to handle file system paths. It offers the
11040 following advantages over using string objects:
11041
11042 @enumerate
11043 @item No more cumbersome use of os and os.path functions. Everything can
11044 be done easily through operators, attribute accesses, and method calls.
11045 @item Embodies the semantics of different path types. For example,
11046 comparing Windows paths ignores casing.
11047 @item Well-defined semantics, eliminating any inconsistencies or
11048 ambiguities (forward vs. backward slashes, etc.).
11049 @end enumerate")
11050 (license license:expat)))
11051
11052 (define-public python-jellyfish
11053 (package
11054 (name "python-jellyfish")
11055 (version "0.5.6")
11056 (source (origin
11057 (method url-fetch)
11058 (uri (pypi-uri "jellyfish" version))
11059 (sha256
11060 (base32
11061 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
11062 (build-system python-build-system)
11063 (native-inputs
11064 `(("python-pytest" ,python-pytest)))
11065 (home-page "https://github.com/jamesturk/jellyfish")
11066 (synopsis "Approximate and phonetic matching of strings")
11067 (description "Jellyfish uses a variety of string comparison and phonetic
11068 encoding algorithms to do fuzzy string matching.")
11069 (license license:bsd-2)
11070 (properties `((python2-variant . ,(delay python2-jellyfish))))))
11071
11072 (define-public python2-jellyfish
11073 (let ((jellyfish (package-with-python2
11074 (strip-python2-variant python-jellyfish))))
11075 (package (inherit jellyfish)
11076 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
11077 ,@(package-native-inputs jellyfish))))))
11078
11079 (define-public python2-unicodecsv
11080 (package
11081 (name "python2-unicodecsv")
11082 (version "0.14.1")
11083 (source (origin
11084 (method url-fetch)
11085 ;; The test suite is not included in the PyPi release.
11086 ;; https://github.com/jdunck/python-unicodecsv/issues/19
11087 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
11088 "archive/" version ".tar.gz"))
11089 (file-name (string-append name "-" version ".tar.gz"))
11090 (sha256
11091 (base32
11092 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
11093 (build-system python-build-system)
11094 (arguments
11095 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
11096 #:python ,python-2))
11097 (native-inputs
11098 `(("python2-unittest2" ,python2-unittest2)))
11099 (home-page "https://github.com/jdunck/python-unicodecsv")
11100 (synopsis "Unicode CSV module for Python 2")
11101 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
11102 module, adding support for Unicode strings.")
11103 (license license:bsd-2)))
11104
11105 (define-public python-rarfile
11106 (package
11107 (name "python-rarfile")
11108 (version "2.8")
11109 (source (origin
11110 (method url-fetch)
11111 (uri (pypi-uri "rarfile" version))
11112 (sha256
11113 (base32
11114 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
11115 (build-system python-build-system)
11116 (arguments
11117 '(#:phases
11118 (modify-phases %standard-phases
11119 (replace 'check
11120 ;; Many tests fail, but the installation proceeds.
11121 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
11122 (native-inputs
11123 `(("which" ,which))) ; required for tests
11124 (propagated-inputs
11125 `(("libarchive" ,libarchive)))
11126 (home-page "https://github.com/markokr/rarfile")
11127 (synopsis "RAR archive reader for Python")
11128 (description "This is Python module for RAR archive reading. The interface
11129 is made as zipfile like as possible.")
11130 (license license:isc)))
11131
11132 (define-public python2-rarfile
11133 (package-with-python2 python-rarfile))
11134
11135 (define-public python-magic
11136 (package
11137 (name "python-magic")
11138 (version "0.4.3")
11139 (source
11140 (origin
11141 (method url-fetch)
11142 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
11143 version ".tar.gz"))
11144 (sha256
11145 (base32
11146 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
11147 (file-name (string-append name "-" version "-checkout"))))
11148 (build-system python-build-system)
11149 (arguments
11150 ;; The tests are unreliable, so don't run them. The tests fail
11151 ;; under Python3 because they were written for Python2 and
11152 ;; contain import statements that do not work in Python3. One of
11153 ;; the tests fails under Python2 because its assertions are
11154 ;; overly stringent; it relies on comparing output strings which
11155 ;; are brittle and can change depending on the version of
11156 ;; libmagic being used and the system on which the test is
11157 ;; running. In my case, under GuixSD 0.10.0, only one test
11158 ;; failed, and it seems to have failed only because the version
11159 ;; of libmagic that is packaged in Guix outputs a slightly
11160 ;; different (but not wrong) string than the one that the test
11161 ;; expected.
11162 '(#:tests? #f
11163 #:phases (modify-phases %standard-phases
11164 ;; Replace a specific method call with a hard-coded
11165 ;; path to the necessary libmagic.so file in the
11166 ;; store. If we don't do this, then the method call
11167 ;; will fail to find the libmagic.so file, which in
11168 ;; turn will cause any application using
11169 ;; python-magic to fail.
11170 (add-before 'build 'hard-code-path-to-libmagic
11171 (lambda* (#:key inputs #:allow-other-keys)
11172 (let ((file (assoc-ref inputs "file")))
11173 (substitute* "magic.py"
11174 (("ctypes.util.find_library\\('magic'\\)")
11175 (string-append "'" file "/lib/libmagic.so'")))
11176 #t)))
11177 (add-before 'install 'disable-egg-compression
11178 (lambda _
11179 (let ((port (open-file "setup.cfg" "a")))
11180 (display "\n[easy_install]\nzip_ok = 0\n"
11181 port)
11182 (close-port port)
11183 #t))))))
11184 (inputs
11185 ;; python-magic needs to be able to find libmagic.so.
11186 `(("file" ,file)))
11187 (home-page "https://github.com/ahupp/python-magic")
11188 (synopsis "File type identification using libmagic")
11189 (description
11190 "This module uses ctypes to access the libmagic file type
11191 identification library. It makes use of the local magic database and
11192 supports both textual and MIME-type output. Note that this module and
11193 the python-file module both provide a \"magic.py\" file; these two
11194 modules, which are different and were developed separately, both serve
11195 the same purpose: to provide Python bindings for libmagic.")
11196 (license license:expat)))
11197
11198 (define-public python2-magic
11199 (package-with-python2 python-magic))
11200
11201 (define-public python2-s3cmd
11202 (package
11203 (name "python2-s3cmd")
11204 (version "1.6.1")
11205 (source
11206 (origin
11207 (method url-fetch)
11208 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
11209 "s3cmd-" version ".tar.gz"))
11210 (sha256
11211 (base32
11212 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
11213 (build-system python-build-system)
11214 (arguments
11215 ;; s3cmd is written for python2 only and contains no tests.
11216 `(#:python ,python-2
11217 #:tests? #f))
11218 (propagated-inputs
11219 `(("python2-dateutil" ,python2-dateutil)
11220 ;; The python-file package also provides a magic.py module.
11221 ;; This is an unfortunate state of affairs; however, s3cmd
11222 ;; fails to install if it cannot find specifically the
11223 ;; python-magic package. Thus we include it, instead of using
11224 ;; python-file. Ironically, s3cmd sometimes works better
11225 ;; without libmagic bindings at all:
11226 ;; https://github.com/s3tools/s3cmd/issues/198
11227 ("python2-magic" ,python2-magic)))
11228 (home-page "http://s3tools.org/s3cmd")
11229 (synopsis "Command line tool for S3-compatible storage services")
11230 (description
11231 "S3cmd is a command line tool for uploading, retrieving and managing data
11232 in storage services that are compatible with the Amazon Simple Storage
11233 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
11234 GnuPG encryption, and more. It also supports management of Amazon's
11235 CloudFront content delivery network.")
11236 (license license:gpl2+)))
11237
11238 (define-public python-pkgconfig
11239 (package
11240 (name "python-pkgconfig")
11241 (version "1.1.0")
11242 (source
11243 (origin
11244 (method url-fetch)
11245 (uri (pypi-uri "pkgconfig" version))
11246 (sha256
11247 (base32
11248 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
11249 (build-system python-build-system)
11250 (native-inputs
11251 `(("python-nose" ,python-nose)))
11252 (inputs
11253 `(("pkg-config" ,pkg-config)))
11254 (arguments
11255 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
11256 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
11257 #:tests? #f
11258 ;; Hard-code the path to pkg-config.
11259 #:phases
11260 (modify-phases %standard-phases
11261 (add-before
11262 'build 'patch
11263 (lambda _
11264 (substitute* "pkgconfig/pkgconfig.py"
11265 (("cmd = 'pkg-config")
11266 (string-append "cmd = '" (which "pkg-config"))))
11267 #t)))))
11268 (home-page "https://github.com/matze/pkgconfig")
11269 (synopsis "Python interface for pkg-config")
11270 (description "This module provides a Python interface to pkg-config. It
11271 can be used to find all pkg-config packages, check if a package exists,
11272 check if a package meets certain version requirements, query CFLAGS and
11273 LDFLAGS and parse the output to build extensions with setup.py.")
11274 (license license:expat)))
11275
11276 (define-public python2-pkgconfig
11277 (package-with-python2 python-pkgconfig))
11278
11279 (define-public python-bz2file
11280 (package
11281 (name "python-bz2file")
11282 (version "0.98")
11283 (source
11284 (origin
11285 (method url-fetch)
11286 (uri (pypi-uri "bz2file" version))
11287 (sha256
11288 (base32
11289 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
11290 (build-system python-build-system)
11291 (arguments
11292 `(#:tests? #f)) ; Tests use deprecated python modules.
11293 (home-page "https://github.com/nvawda/bz2file")
11294 (synopsis "Read and write bzip2-compressed files")
11295 (description
11296 "Bz2file is a Python library for reading and writing bzip2-compressed
11297 files. It contains a drop-in replacement for the I/O interface in the
11298 standard library's @code{bz2} module, including features from the latest
11299 development version of CPython that are not available in older releases.")
11300 (license license:asl2.0)
11301 (properties `((python2-variant . ,(delay python2-bz2file))))))
11302
11303 (define-public python2-bz2file
11304 (let ((base (package-with-python2
11305 (strip-python2-variant python-bz2file))))
11306 (package
11307 (inherit base)
11308 (arguments
11309 `(#:python ,python-2
11310 #:phases
11311 (modify-phases %standard-phases
11312 ;; 'python setup.py test' does not work as of 0.98.
11313 ;; There is only the one test file, so we run it directly.
11314 (replace 'check
11315 (lambda _ (zero? (system* "python"
11316 "test_bz2file.py"))))))))))
11317
11318 (define-public python-future
11319 (package
11320 (name "python-future")
11321 (version "0.16.0")
11322 (source
11323 (origin
11324 (method url-fetch)
11325 (uri (pypi-uri "future" version))
11326 (sha256
11327 (base32
11328 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
11329 (build-system python-build-system)
11330 ;; Many tests connect to the network or are otherwise flawed.
11331 ;; https://github.com/PythonCharmers/python-future/issues/210
11332 (arguments
11333 `(#:tests? #f))
11334 (home-page "http://python-future.org")
11335 (synopsis "Single-source support for Python 3 and 2")
11336 (description
11337 "@code{python-future} is the missing compatibility layer between Python 2 and
11338 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
11339 to support both Python 2 and Python 3 with minimal overhead.")
11340 (license license:expat)))
11341
11342 (define-public python2-future
11343 (package-with-python2 python-future))
11344
11345 (define-public python-cysignals
11346 (package
11347 (name "python-cysignals")
11348 (version "1.1.0")
11349 (source
11350 (origin
11351 (method url-fetch)
11352 (uri (pypi-uri "cysignals" version ".tar.bz2"))
11353 (sha256
11354 (base32
11355 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
11356 (build-system python-build-system)
11357 (native-inputs
11358 `(("python-cython" ,python-cython)
11359 ("python-sphinx" ,python-sphinx)))
11360 (inputs
11361 `(("pari-gp" ,pari-gp)))
11362 (arguments
11363 `(#:modules ((guix build python-build-system)
11364 ((guix build gnu-build-system) #:prefix gnu:)
11365 (guix build utils))
11366 ;; FIXME: Tests are executed after installation and currently fail
11367 ;; when not installing into standard locations; the author is working
11368 ;; on a fix.
11369 #:tests? #f
11370 #:phases
11371 (modify-phases %standard-phases
11372 (add-before
11373 'build 'configure
11374 (assoc-ref gnu:%standard-phases 'configure)))))
11375 (home-page
11376 "https://github.com/sagemath/cysignals")
11377 (synopsis
11378 "Handling of interrupts and signals for Cython")
11379 (description
11380 "The cysignals package provides mechanisms to handle interrupts (and
11381 other signals and errors) in Cython code, using two related approaches,
11382 for mixed Cython/Python code or external C libraries and pure Cython code,
11383 respectively.")
11384 (license license:lgpl3+)))
11385
11386 (define-public python2-cysignals
11387 (package-with-python2 python-cysignals))
11388
11389 (define-public python2-shedskin
11390 (package
11391 (name "python2-shedskin")
11392 (version "0.9.4")
11393 (source
11394 (origin
11395 (method url-fetch)
11396 (uri (string-append "https://github.com/shedskin/shedskin/"
11397 "releases/download/v" version
11398 "/shedskin-" version ".tgz"))
11399 (sha256
11400 (base32
11401 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
11402 (build-system python-build-system)
11403 (arguments
11404 `(#:python ,python-2
11405 #:phases (modify-phases %standard-phases
11406 (add-after 'unpack 'fix-resulting-include-libs
11407 (lambda* (#:key inputs #:allow-other-keys)
11408 (let ((libgc (assoc-ref inputs "libgc"))
11409 (pcre (assoc-ref inputs "pcre")))
11410 (substitute* "shedskin/makefile.py"
11411 (("variable == 'CCFLAGS':[ ]*")
11412 (string-append "variable == 'CCFLAGS':\n"
11413 " line += ' -I " pcre "/include"
11414 " -I " libgc "/include'"))
11415 (("variable == 'LFLAGS':[ ]*")
11416 (string-append "variable == 'LFLAGS':\n"
11417 " line += ' -L" pcre "/lib"
11418 " -L " libgc "/lib'")))
11419 #t))))))
11420 (inputs `(("pcre" ,pcre)
11421 ("libgc" ,libgc)))
11422 (home-page "https://shedskin.github.io/")
11423 (synopsis "Experimental Python-2 to C++ Compiler")
11424 (description (string-append "This is an experimental compiler for a subset of
11425 Python. It generates C++ code and a Makefile."))
11426 (license (list license:gpl3 license:bsd-3 license:expat))))
11427
11428 (define-public python2-rope
11429 (package
11430 (name "python2-rope")
11431 (version "0.10.3")
11432 (source
11433 (origin
11434 (method url-fetch)
11435 (uri (pypi-uri "rope" version))
11436 (sha256
11437 (base32
11438 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
11439 (arguments
11440 ;; Rope is currently python-2 only.
11441 ;; https://github.com/python-rope/rope/issues/57
11442 `(#:python ,python-2))
11443 (build-system python-build-system)
11444 (native-inputs
11445 `(("python2-unittest2" ,python2-unittest2)))
11446 (home-page "https://github.com/python-rope/rope")
11447 (synopsis "Refactoring library for Python")
11448 (description "Rope is a refactoring library for Python. It facilitates
11449 the renaming, moving and extracting of attributes, functions, modules, fields
11450 and parameters in Python 2 source code. These refactorings can also be applied
11451 to occurrences in strings and comments.")
11452 (license license:gpl2)))
11453
11454 (define-public python-py3status
11455 (package
11456 (name "python-py3status")
11457 (version "3.1")
11458 (source
11459 (origin
11460 (method url-fetch)
11461 (uri (pypi-uri "py3status" version))
11462 (sha256
11463 (base32
11464 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
11465 (build-system python-build-system)
11466 (arguments
11467 '(#:tests? #f)) ; TODO: Requires many libraries not in Guix.
11468 (home-page "https://github.com/ultrabug/py3status")
11469 (synopsis "Extensible i3status wrapper written in Python")
11470 (description "py3status is an i3status wrapper which extends i3status
11471 functionality in a modular way, allowing you to extend your panel with your
11472 own code, responding to click events and updating clock every second.")
11473 (license license:bsd-3)))
11474
11475 (define-public python-tblib
11476 (package
11477 (name "python-tblib")
11478 (version "1.3.0")
11479 (source (origin
11480 (method url-fetch)
11481 (uri (pypi-uri "tblib" version))
11482 (sha256 (base32
11483 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
11484 (build-system python-build-system)
11485 (arguments
11486 `(#:phases
11487 (modify-phases %standard-phases
11488 (replace 'check
11489 (lambda _
11490 ;; Upstream runs tests after installation and the package itself
11491 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
11492 ;; found.
11493 (setenv "PYTHONPATH"
11494 (string-append (getcwd) "/build/lib:"
11495 (getenv "PYTHONPATH")))
11496 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
11497 (native-inputs
11498 `(("python-pytest" ,python-pytest)
11499 ("python-six" ,python-six)))
11500 (home-page "https://github.com/ionelmc/python-tblib")
11501 (synopsis "Traceback serialization library")
11502 (description
11503 "Traceback serialization allows you to:
11504
11505 @enumerate
11506 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
11507 different processes. This allows better error handling when running code over
11508 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
11509
11510 @item Parse traceback strings and raise with the parsed tracebacks.
11511 @end enumerate\n")
11512 (license license:bsd-3)))
11513
11514 (define-public python2-tblib
11515 (package-with-python2 python-tblib))
11516
11517 (define-public python-sqlparse
11518 (package
11519 (name "python-sqlparse")
11520 (version "0.1.19")
11521 (source (origin
11522 (method url-fetch)
11523 (uri (pypi-uri "sqlparse" version))
11524 (sha256
11525 (base32
11526 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
11527 (build-system python-build-system)
11528 (arguments
11529 `(#:phases
11530 (modify-phases %standard-phases
11531 (replace 'check
11532 (lambda* _
11533 ;; setup.py-integrated 2to3 only affects the build files, but
11534 ;; py.test is using the source files. So we need to convert them
11535 ;; manually.
11536 (when (zero? (system* "python3"))
11537 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
11538 (zero? (system* "py.test")))))))
11539 (native-inputs
11540 `(("python-pytest" ,python-pytest)))
11541 (home-page "https://github.com/andialbrecht/sqlparse")
11542 (synopsis "Non-validating SQL parser")
11543 (description "Sqlparse is a non-validating SQL parser for Python. It
11544 provides support for parsing, splitting and formatting SQL statements.")
11545 (license license:bsd-3)))
11546
11547 (define-public python2-sqlparse
11548 (package-with-python2 python-sqlparse))
11549
11550 (define-public python-greenlet
11551 (package
11552 (name "python-greenlet")
11553 (version "0.4.11")
11554 (source (origin
11555 (method url-fetch)
11556 (uri (pypi-uri "greenlet" version))
11557 (sha256
11558 (base32
11559 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
11560 (build-system python-build-system)
11561 (home-page "https://greenlet.readthedocs.io/")
11562 (synopsis "Lightweight in-process concurrent programming")
11563 (description
11564 "Greenlet package is a spin-off of Stackless, a version of CPython
11565 that supports micro-threads called \"tasklets\". Tasklets run
11566 pseudo-concurrently (typically in a single or a few OS-level threads) and
11567 are synchronized with data exchanges on \"channels\".")
11568 (license (list license:psfl license:expat))))
11569
11570 (define-public python2-greenlet
11571 (package-with-python2 python-greenlet))
11572
11573 (define-public python-gevent
11574 (package
11575 (name "python-gevent")
11576 (version "1.1.1")
11577 (source (origin
11578 (method url-fetch)
11579 (uri (pypi-uri "gevent" version))
11580 (sha256
11581 (base32
11582 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
11583 (modules '((guix build utils)))
11584 (snippet
11585 '(begin
11586 ;; unbunding libev and c-ares
11587 (for-each delete-file-recursively '("libev" "c-ares"))
11588 ;; fixing testsuite
11589 (call-with-output-file "greentest/__init__.py" noop)
11590 (substitute* "greentest/testrunner.py"
11591 (("import util") "from . import util")
11592 (("from util import log") "from .util import log"))))))
11593 (build-system python-build-system)
11594 (propagated-inputs
11595 `(("python-greenlet" ,python-greenlet)))
11596 (native-inputs
11597 `(("python-six" ,python-six)))
11598 (inputs
11599 `(("c-ares" ,c-ares)
11600 ("libev" ,libev)))
11601 (home-page "http://www.gevent.org/")
11602 (synopsis "Coroutine-based network library")
11603 (description
11604 "gevent is a coroutine-based Python networking library that uses greenlet
11605 to provide a high-level synchronous API on top of the libev event loop.")
11606 (license license:expat)))
11607
11608 (define-public python2-gevent
11609 (package-with-python2 python-gevent))
11610
11611 (define-public python-geventhttpclient
11612 (package
11613 (name "python-geventhttpclient")
11614 (version "1.3.1")
11615 (source (origin
11616 (method url-fetch)
11617 (uri (pypi-uri "geventhttpclient" version))
11618 (sha256
11619 (base32
11620 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
11621 (modules '((guix build utils)))
11622 (snippet
11623 '(begin
11624 ;; Delete pre-compiled files.
11625 (for-each delete-file (find-files "src/geventhttpclient"
11626 ".*\\.pyc"))
11627 #t))))
11628 (build-system python-build-system)
11629 (arguments
11630 '(#:phases
11631 (modify-phases %standard-phases
11632 (add-after 'unpack 'delete-network-tests
11633 (lambda _
11634 (delete-file "src/geventhttpclient/tests/test_client.py")
11635 #t))
11636 (delete 'check)
11637 (add-after 'install 'check
11638 (lambda* (#:key inputs outputs #:allow-other-keys)
11639 (add-installed-pythonpath inputs outputs)
11640 (zero? (system* "py.test" "src/geventhttpclient/tests" "-v")))))))
11641 (native-inputs
11642 `(("python-pytest" ,python-pytest)))
11643 (propagated-inputs
11644 `(("python-certifi" ,python-certifi)
11645 ("python-gevent" ,python-gevent)
11646 ("python-six" ,python-six)))
11647 (home-page "https://github.com/gwik/geventhttpclient")
11648 (synopsis "HTTP client library for gevent")
11649 (description "@code{python-geventhttpclient} is a high performance,
11650 concurrent HTTP client library for python using @code{gevent}.")
11651 (license license:expat)))
11652
11653 (define-public python2-geventhttpclient
11654 (package-with-python2 python-geventhttpclient))
11655
11656 (define-public python-fastimport
11657 (package
11658 (name "python-fastimport")
11659 (version "0.9.6")
11660 (source
11661 (origin
11662 (method url-fetch)
11663 (uri (pypi-uri "fastimport" version))
11664 (sha256
11665 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
11666 (build-system python-build-system)
11667 (home-page "https://github.com/jelmer/python-fastimport")
11668 (synopsis "VCS fastimport parser and generator in Python")
11669 (description "This package provides a parser for and generator of the Git
11670 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
11671 format.")
11672 (license license:gpl2+)))
11673
11674 (define-public python2-fastimport
11675 (package-with-python2 python-fastimport))
11676
11677 (define-public python-twisted
11678 (package
11679 (name "python-twisted")
11680 (version "16.2.0")
11681 (source (origin
11682 (method url-fetch)
11683 (uri (pypi-uri "Twisted" version ".tar.bz2"))
11684 (sha256
11685 (base32
11686 "0ydxrp9myw1mvsz3qfzx5579y5llmqa82pxvqchgp5syczffi450"))))
11687 (build-system python-build-system)
11688 (arguments
11689 '(#:tests? #f)) ; FIXME: Some tests are failing.
11690 ;; #:phases
11691 ;; (modify-phases %standard-phases
11692 ;; (replace 'check
11693 ;; (lambda _
11694 ;; (zero? (system* "./bin/trial" "twisted")))))
11695 (propagated-inputs
11696 `(("python-zope-interface" ,python-zope-interface)))
11697 (home-page "https://twistedmatrix.com/")
11698 (synopsis "Asynchronous networking framework written in Python")
11699 (description
11700 "Twisted is an extensible framework for Python programming, with special
11701 focus on event-based network programming and multiprotocol integration.")
11702 (license license:expat)))
11703
11704 (define-public python2-twisted
11705 (package-with-python2 python-twisted))
11706
11707 (define-public python-pika
11708 (package
11709 (name "python-pika")
11710 (version "0.10.0")
11711 (source
11712 (origin
11713 (method url-fetch)
11714 (uri (pypi-uri "pika" version))
11715 (sha256
11716 (base32
11717 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
11718 (build-system python-build-system)
11719 (native-inputs
11720 `(("python-pyev" ,python-pyev)
11721 ("python-tornado" ,python-tornado)
11722 ("python-twisted" ,python-twisted)))
11723 (home-page "https://pika.readthedocs.org")
11724 (synopsis "Pure Python AMQP Client Library")
11725 (description
11726 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
11727 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
11728 network support library.")
11729 (license license:bsd-3)))
11730
11731 (define-public python2-pika
11732 (package-with-python2 python-pika))
11733
11734 (define-public python-ply
11735 (package
11736 (name "python-ply")
11737 (version "3.9")
11738 (source
11739 (origin
11740 (method url-fetch)
11741 (uri (pypi-uri "ply" version))
11742 (sha256
11743 (base32
11744 "0gpl0yli3w03ipyqfrp3w5nf0iawhsq65anf5wwm2wf5p502jzhd"))))
11745 (build-system python-build-system)
11746 (home-page "http://www.dabeaz.com/ply/")
11747 (synopsis "Python Lex & Yacc")
11748 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
11749 It uses LR parsing and does extensive error checking.")
11750 (license license:bsd-3)))
11751
11752 (define-public python2-ply
11753 (package-with-python2 python-ply))
11754
11755 (define-public python-tabulate
11756 (package
11757 (name "python-tabulate")
11758 (version "0.7.7")
11759 (source (origin
11760 (method url-fetch)
11761 (uri (pypi-uri "tabulate" version))
11762 (sha256
11763 (base32
11764 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
11765 (build-system python-build-system)
11766 (arguments
11767 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
11768 ;; and the latest release is not tagged in the upstream repository.
11769 '(#:tests? #f))
11770 (home-page "https://bitbucket.org/astanin/python-tabulate")
11771 (synopsis "Pretty-print tabular data")
11772 (description
11773 "Tabulate is a library and command-line utility to pretty-print tabular
11774 data in Python.")
11775 (license license:expat)))
11776
11777 (define-public python2-tabulate
11778 (package-with-python2 python-tabulate))
11779
11780 (define-public python-kazoo
11781 (package
11782 (name "python-kazoo")
11783 (version "2.2.1")
11784 (source
11785 (origin
11786 (method url-fetch)
11787 (uri (pypi-uri "kazoo" version))
11788 (sha256
11789 (base32
11790 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
11791 (build-system python-build-system)
11792 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
11793 (propagated-inputs
11794 `(("python-six" ,python-six)))
11795 (home-page "https://kazoo.readthedocs.org")
11796 (synopsis "High-level Zookeeper client library")
11797 (description
11798 "Kazoo is a Python client library for the Apache Zookeeper distributed
11799 application service. It is designed to be easy to use and to avoid common
11800 programming errors.")
11801 (license license:asl2.0)))
11802
11803 (define-public python2-kazoo
11804 (package-with-python2 python-kazoo))
11805
11806 (define-public python-pykafka
11807 (package
11808 (name "python-pykafka")
11809 (version "2.4.0")
11810 (source (origin
11811 (method url-fetch)
11812 (uri (string-append
11813 "https://pypi.python.org/packages/8b/3e/"
11814 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
11815 "pykafka-" version ".tar.gz"))
11816 (sha256
11817 (base32
11818 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
11819 (build-system python-build-system)
11820 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
11821 (propagated-inputs
11822 `(("python-gevent" ,python-gevent)
11823 ("python-kazoo" ,python-kazoo)
11824 ("python-tabulate" ,python-tabulate)))
11825 (inputs
11826 `(("librdkafka" ,librdkafka)))
11827 (home-page "https://pykafka.readthedocs.io/")
11828 (synopsis "Apache Kafka client for Python")
11829 (description
11830 "PyKafka is a client for the Apache Kafka distributed messaging system.
11831 It includes Python implementations of Kafka producers and consumers, which
11832 are optionally backed by a C extension built on librdkafka.")
11833 (license license:asl2.0)))
11834
11835 (define-public python2-pykafka
11836 (package-with-python2 python-pykafka))
11837
11838 (define-public python-wcwidth
11839 (package
11840 (name "python-wcwidth")
11841 (version "0.1.7")
11842 (source
11843 (origin
11844 (method url-fetch)
11845 (uri (pypi-uri "wcwidth" version))
11846 (sha256
11847 (base32
11848 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
11849 (build-system python-build-system)
11850 (home-page "https://github.com/jquast/wcwidth")
11851 (synopsis "Measure number of terminal column cells of wide-character codes")
11852 (description "Wcwidth measures the number of terminal column cells of
11853 wide-character codes. It is useful for those implementing a terminal emulator,
11854 or programs that carefully produce output to be interpreted by one. It is a
11855 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
11856 specified in POSIX.1-2001 and POSIX.1-2008.")
11857 (license license:expat)))
11858
11859 (define-public python2-wcwidth
11860 (package-with-python2 python-wcwidth))
11861
11862 (define-public python2-jsonrpclib
11863 (package
11864 (name "python2-jsonrpclib")
11865 (version "0.1.7")
11866 (source (origin
11867 (method url-fetch)
11868 (uri (string-append
11869 "https://pypi.python.org/packages/source/j/jsonrpclib/"
11870 "jsonrpclib-" version ".tar.gz"))
11871 (sha256
11872 (base32
11873 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
11874 (build-system python-build-system)
11875 (arguments
11876 `(#:tests? #f
11877 #:python ,python-2))
11878 (home-page "https://github.com/joshmarshall/jsonrpclib/")
11879 (synopsis "Implementation of JSON-RPC specification for Python")
11880 (description
11881 "This library is an implementation of the JSON-RPC specification.
11882 It supports both the original 1.0 specification, as well as the
11883 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
11884 etc.")
11885 (license license:asl2.0)))
11886
11887 (define-public python-chai
11888 (package
11889 (name "python-chai")
11890 (version "1.1.1")
11891 (source (origin
11892 (method url-fetch)
11893 (uri (pypi-uri "chai" version))
11894 (sha256
11895 (base32
11896 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
11897 (build-system python-build-system)
11898 (home-page "https://github.com/agoragames/chai")
11899 (synopsis "Mocking framework for Python")
11900 (description
11901 "Chai provides an api for mocking, stubbing and spying your python
11902 objects, patterned after the Mocha library for Ruby.")
11903 (license license:bsd-3)))
11904
11905 (define-public python2-chai
11906 (package-with-python2 python-chai))
11907
11908 (define-public python-arrow
11909 (package
11910 (name "python-arrow")
11911 (version "0.8.0")
11912 (source (origin
11913 (method url-fetch)
11914 (uri (pypi-uri "arrow" version))
11915 (sha256
11916 (base32
11917 "1bz7hkdgpqcjs866y58z8jywpy7al0f4rxdr00bh2l5qddyw245j"))))
11918 (build-system python-build-system)
11919 (native-inputs
11920 `(;; For testing
11921 ("python-chai" ,python-chai)
11922 ("python-simplejson" ,python-simplejson)))
11923 (propagated-inputs
11924 `(("python-dateutil" ,python-dateutil)))
11925 (home-page "https://github.com/crsmithdev/arrow/")
11926 (synopsis "Dates and times for Python")
11927 (description
11928 "Arrow is a Python library to creating, manipulating, formatting and
11929 converting dates, times, and timestamps. It implements and updates the
11930 datetime type.")
11931 (license license:asl2.0)))
11932
11933 (define-public python2-arrow
11934 (package-with-python2 python-arrow))
11935
11936 (define-public python-inflection
11937 (package
11938 (name "python-inflection")
11939 (version "0.3.1")
11940 (source
11941 (origin (method url-fetch)
11942 (uri (pypi-uri "inflection" version))
11943 (sha256
11944 (base32
11945 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
11946 (build-system python-build-system)
11947 (native-inputs
11948 `(("python-pytest" ,python-pytest)))
11949 (home-page "https://github.com/jpvanhal/inflection")
11950 (synopsis "Python string transformation library")
11951 (description
11952 "Inflection is a string transformation library. It singularizes
11953 and pluralizes English words, and transforms strings from CamelCase to
11954 underscored string.")
11955 (license license:expat)))
11956
11957 (define-public python2-inflection
11958 (package-with-python2 python-inflection))
11959
11960 (define-public python-pylev
11961 (package
11962 (name "python-pylev")
11963 (version "1.3.0")
11964 (source (origin
11965 (method url-fetch)
11966 (uri (pypi-uri "pylev" version))
11967 (sha256
11968 (base32
11969 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
11970 (build-system python-build-system)
11971 (home-page "https://github.com/toastdriven/pylev")
11972 (synopsis "Levenshtein distance implementation in Python")
11973 (description "Pure Python Levenshtein implementation, based off the
11974 Wikipedia code samples at
11975 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
11976 (license license:bsd-3)))
11977
11978 (define-public python2-pylev
11979 (package-with-python2 python-pylev))
11980
11981 (define-public python-cleo
11982 (package
11983 (name "python-cleo")
11984 (version "0.6.1")
11985 (source (origin
11986 (method url-fetch)
11987 (uri (pypi-uri "cleo" version))
11988 (sha256
11989 (base32
11990 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
11991 (build-system python-build-system)
11992 (native-inputs
11993 `(;; For testing
11994 ("python-mock" ,python-mock)
11995 ("python-pytest-mock" ,python-pytest-mock)
11996 ("python-pytest" ,python-pytest)))
11997 (propagated-inputs
11998 `(("python-backpack" ,python-backpack)
11999 ("python-pastel" ,python-pastel)
12000 ("python-pylev" ,python-pylev)))
12001 (home-page "https://github.com/sdispater/cleo")
12002 (synopsis "Command-line arguments library for Python")
12003 (description
12004 "Cleo allows you to create command-line commands with signature in
12005 docstring and colored output.")
12006 (license license:expat)))
12007
12008 (define-public python2-cleo
12009 (package-with-python2 python-cleo))
12010
12011 (define-public python-lazy-object-proxy
12012 (package
12013 (name "python-lazy-object-proxy")
12014 (version "1.2.2")
12015 (source (origin
12016 (method url-fetch)
12017 (uri (pypi-uri "lazy-object-proxy" version))
12018 (sha256
12019 (base32
12020 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
12021 (build-system python-build-system)
12022 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
12023 (synopsis "Lazy object proxy for python")
12024 (description
12025 "Lazy object proxy is an object that wraps a callable but defers the call
12026 until the object is actually required, and caches the result of said call.")
12027 (license license:bsd-2)))
12028
12029 (define-public python2-lazy-object-proxy
12030 (package-with-python2 python-lazy-object-proxy))
12031
12032 (define-public python-dnspython
12033 (package
12034 (name "python-dnspython")
12035 (version "1.15.0")
12036 (source (origin
12037 (method url-fetch)
12038 (uri (string-append "http://www.dnspython.org/kits/"
12039 version "/dnspython-" version ".tar.gz"))
12040 (sha256
12041 (base32
12042 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
12043 (build-system python-build-system)
12044 (arguments '(#:tests? #f)) ; XXX: requires internet access
12045 (home-page "http://www.dnspython.org")
12046 (synopsis "DNS toolkit for Python")
12047 (description
12048 "dnspython is a DNS toolkit for Python. It supports almost all record
12049 types. It can be used for queries, zone transfers, and dynamic updates.
12050 It supports TSIG authenticated messages and EDNS0.")
12051 (license license:expat)))
12052
12053 (define-public python2-dnspython
12054 (package-with-python2 python-dnspython))
12055
12056 (define-public python-email-validator
12057 (package
12058 (name "python-email-validator")
12059 (version "1.0.2")
12060 (source
12061 (origin (method url-fetch)
12062 (uri (pypi-uri "email_validator" version))
12063 (sha256
12064 (base32
12065 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
12066 (build-system python-build-system)
12067 (arguments
12068 '(#:phases
12069 (modify-phases %standard-phases
12070 (add-before 'build 'use-dnspython
12071 (lambda _
12072 (substitute* "setup.py"
12073 (("dnspython3") "dnspython"))
12074 #t)))))
12075 (propagated-inputs
12076 `(("python-dnspython" ,python-dnspython)
12077 ("python-idna" ,python-idna)))
12078 (home-page "https://github.com/JoshData/python-email-validator")
12079 (synopsis "Email address validation library for Python")
12080 (description
12081 "This library validates email address syntax and deliverability.")
12082 (license license:cc0)))
12083
12084 (define-public python2-email-validator
12085 (package-with-python2 python-email-validator))
12086
12087 (define-public python-ukpostcodeparser
12088 (package
12089 (name "python-ukpostcodeparser")
12090 (version "1.0.3")
12091 (source (origin
12092 (method url-fetch)
12093 (uri (pypi-uri "UkPostcodeParser" version))
12094 (sha256
12095 (base32
12096 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
12097 (build-system python-build-system)
12098 (home-page "https://github.com/hamstah/ukpostcodeparser")
12099 (synopsis "UK Postcode parser for Python")
12100 (description
12101 "This library provides the @code{parse_uk_postcode} function for
12102 parsing UK postcodes.")
12103 (license license:expat)))
12104
12105 (define-public python2-ukpostcodeparser
12106 (package-with-python2 python-ukpostcodeparser))
12107
12108 (define-public python-faker
12109 (package
12110 (name "python-faker")
12111 (version "0.7.9")
12112 (source (origin
12113 (method url-fetch)
12114 (uri (pypi-uri "Faker" version))
12115 (sha256
12116 (base32
12117 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
12118 (patches
12119 (search-patches "python-faker-fix-build-32bit.patch"))
12120 (modules '((guix build utils)))
12121 (snippet
12122 '(begin
12123 (for-each delete-file (find-files "." "\\.pyc$"))
12124 #t))))
12125 (build-system python-build-system)
12126 (arguments
12127 '(#:phases
12128 (modify-phases %standard-phases
12129 (replace 'check
12130 (lambda _
12131 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
12132 (native-inputs
12133 `(;; For testing
12134 ("python-email-validator" ,python-email-validator)
12135 ("python-mock" ,python-mock)
12136 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
12137 (propagated-inputs
12138 `(("python-dateutil" ,python-dateutil)
12139 ("python-six" ,python-six)))
12140 (home-page "https://github.com/joke2k/faker")
12141 (synopsis "Python package that generates fake data")
12142 (description
12143 "Faker is a Python package that generates fake data such as names,
12144 addresses, and phone numbers.")
12145 (license license:expat)
12146 (properties `((python2-variant . ,(delay python2-faker))))))
12147
12148 (define-public python2-faker
12149 (let ((base (package-with-python2 (strip-python2-variant
12150 python-faker))))
12151 (package
12152 (inherit base)
12153 (propagated-inputs
12154 `(("python2-ipaddress" ,python2-ipaddress)
12155 ,@(package-propagated-inputs base))))))
12156
12157 (define-public python-pyaml
12158 (package
12159 (name "python-pyaml")
12160 (version "17.7.2")
12161 (source (origin
12162 (method url-fetch)
12163 (uri (pypi-uri "pyaml" version))
12164 (sha256
12165 (base32
12166 "132grrw0ajq4nrappi3ldbkb952k7yn9b6c7csi2rmvzm1g6ppp2"))))
12167 (build-system python-build-system)
12168 (native-inputs
12169 `(("python-unidecode" ,python-unidecode)))
12170 (propagated-inputs
12171 `(("python-pyyaml" ,python-pyyaml)))
12172 (home-page "https://github.com/mk-fg/pretty-yaml")
12173 (synopsis "YAML pretty-print library for Python")
12174 (description
12175 "pyaml is a PyYAML based python module to produce pretty and readable
12176 YAML-serialized data.")
12177 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
12178
12179 (define-public python2-pyaml
12180 (package-with-python2 python-pyaml))
12181
12182 (define-public python-backpack
12183 (package
12184 (name "python-backpack")
12185 (version "0.1")
12186 (source
12187 (origin
12188 (method url-fetch)
12189 (uri (pypi-uri "backpack" version))
12190 (sha256
12191 (base32
12192 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
12193 (build-system python-build-system)
12194 (native-inputs
12195 `(("python-pytest" ,python-pytest)
12196 ("python-nose" ,python-nose)))
12197 (propagated-inputs
12198 `(("python-simplejson" ,python-simplejson)))
12199 (home-page "https://github.com/sdispater/backpack")
12200 (synopsis "Utilities for working with Python collections")
12201 (description "Backpack provides some useful utilities for working with
12202 collections of data.")
12203 (license license:expat)))
12204
12205 (define-public python2-backpack
12206 (package-with-python2 python-backpack))
12207
12208 (define-public python-flexmock
12209 (package
12210 (name "python-flexmock")
12211 (version "0.10.2")
12212 (source (origin
12213 (method url-fetch)
12214 (uri (pypi-uri "flexmock" version))
12215 (sha256
12216 (base32
12217 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
12218 (build-system python-build-system)
12219 (home-page "https://flexmock.readthedocs.org")
12220 (synopsis "Testing library for Python")
12221 (description
12222 "flexmock is a testing library for Python that makes it easy to create
12223 mocks, stubs and fakes.")
12224 (license license:bsd-3)))
12225
12226 (define-public python2-flexmock
12227 (package-with-python2 python-flexmock))
12228
12229 (define-public python-prompt-toolkit
12230 (package
12231 (name "python-prompt-toolkit")
12232 (version "1.0.9")
12233 (source
12234 (origin
12235 (method url-fetch)
12236 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
12237 (sha256
12238 (base32
12239 "172r15k9kwdw2lnajvpz1632dd16nqz1kcal1p0lq5ywdarj6rfd"))))
12240 (build-system python-build-system)
12241 (arguments
12242 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
12243 (propagated-inputs
12244 `(("python-wcwidth" ,python-wcwidth)
12245 ("python-six" ,python-six)
12246 ("python-pygments" ,python-pygments)))
12247 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
12248 (synopsis "Library for building command line interfaces in Python")
12249 (description
12250 "Prompt-Toolkit is a library for building interactive command line
12251 interfaces in Python. It's like GNU Readline but it also features syntax
12252 highlighting while typing, out-of-the-box multi-line input editing, advanced
12253 code completion, incremental search, support for Chinese double-width
12254 characters, mouse support, and auto suggestions.")
12255 (license license:bsd-3)))
12256
12257 (define-public python2-prompt-toolkit
12258 (package-with-python2 python-prompt-toolkit))
12259
12260 (define-public python-jedi
12261 (package
12262 (name "python-jedi")
12263 (version "0.9.0")
12264 (source
12265 (origin
12266 (method url-fetch)
12267 (uri (pypi-uri "jedi" version))
12268 (sha256
12269 (base32
12270 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
12271 (build-system python-build-system)
12272 (arguments
12273 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
12274 '(#:tests? #f))
12275 (native-inputs
12276 `(("python-pytest" ,python-pytest)))
12277 (home-page "https://github.com/davidhalter/jedi")
12278 (synopsis
12279 "Autocompletion for Python that can be used for text editors")
12280 (description
12281 "Jedi is an autocompletion tool for Python that can be used for text editors.")
12282 (license license:expat)))
12283
12284 (define-public python2-jedi
12285 (package-with-python2 python-jedi))
12286
12287 (define-public ptpython
12288 (package
12289 (name "ptpython")
12290 (version "0.34")
12291 (source (origin
12292 (method url-fetch)
12293 (uri (pypi-uri "ptpython" version))
12294 (sha256
12295 (base32
12296 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
12297 (build-system python-build-system)
12298 (arguments
12299 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
12300 (propagated-inputs
12301 `(("python-docopt" ,python-docopt)
12302 ("python-jedi" ,python-jedi)
12303 ("python-prompt-toolkit" ,python-prompt-toolkit)
12304 ("python-pygments" ,python-pygments)))
12305 (home-page "https://github.com/jonathanslenders/ptpython")
12306 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
12307 (description
12308 "ptpython is a Python read-eval-print loop with IDE-like features.
12309 It supports syntax highlighting, multiline editing, autocompletion, mouse,
12310 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
12311 etc.")
12312 (license license:bsd-3)
12313 (properties `((python2-variant . ,(delay ptpython-2))))))
12314
12315 (define-public ptpython-2
12316 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
12317 (package
12318 (inherit base)
12319 (name "ptpython2"))))
12320
12321 (define-public python-requests-oauthlib
12322 (package
12323 (name "python-requests-oauthlib")
12324 (version "0.6.2")
12325 (source
12326 (origin
12327 (method url-fetch)
12328 (uri (pypi-uri "requests-oauthlib" version))
12329 (sha256
12330 (base32
12331 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
12332 (build-system python-build-system)
12333 (arguments
12334 `(#:phases
12335 (modify-phases %standard-phases
12336 ;; removes tests that require network access
12337 (add-before 'check 'pre-check
12338 (lambda _
12339 (delete-file "tests/test_core.py")
12340 #t)))))
12341 (native-inputs
12342 `(("python-requests-mock" ,python-requests-mock)
12343 ("python-mock" ,python-mock)))
12344 (propagated-inputs
12345 `(("python-oauthlib" ,python-oauthlib)
12346 ("python-requests" ,python-requests)))
12347 (home-page
12348 "https://github.com/requests/requests-oauthlib")
12349 (synopsis
12350 "OAuthlib authentication support for Requests")
12351 (description
12352 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
12353 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
12354 (license license:isc)))
12355
12356 (define-public python2-requests-oauthlib
12357 (package-with-python2 python-requests-oauthlib))
12358
12359 (define-public python-stem
12360 (package
12361 (name "python-stem")
12362 (version "1.5.4")
12363 (source
12364 (origin
12365 (method url-fetch)
12366 (uri (pypi-uri "stem" version))
12367 (sha256
12368 (base32
12369 "1j7pnblrn0yr6jmxvsq6y0ihmxmj5x50jl2n2606w67f6wq16j9n"))))
12370 (build-system python-build-system)
12371 (arguments
12372 `(#:phases
12373 (modify-phases %standard-phases
12374 (replace 'check
12375 (lambda _
12376 (zero? (system* "./run_tests.py" "--unit")))))))
12377 (native-inputs
12378 `(("python-mock" ,python-mock)
12379 ("python-pep8" ,python-pep8)
12380 ("python-pyflakes" ,python-pyflakes)))
12381 (home-page "https://stem.torproject.org/")
12382 (synopsis
12383 "Python controller library that allows applications to interact with Tor")
12384 (description
12385 "Stem is a Python controller library for Tor. With it you can use Tor's
12386 control protocol to script against the Tor process and read descriptor data
12387 relays publish about themselves.")
12388 (license license:lgpl3)))
12389
12390 (define-public python2-stem
12391 (package-with-python2 python-stem))
12392
12393 (define-public python-pyserial
12394 (package
12395 (name "python-pyserial")
12396 (version "3.1.1")
12397 (source
12398 (origin
12399 (method url-fetch)
12400 (uri (pypi-uri "pyserial" version))
12401 (sha256
12402 (base32
12403 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
12404 (build-system python-build-system)
12405 (arguments
12406 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
12407 ;; #:phases
12408 ;; (modify-phases %standard-phases
12409 ;; (replace 'check
12410 ;; (lambda _
12411 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
12412 (home-page
12413 "https://github.com/pyserial/pyserial")
12414 (synopsis "Python Serial Port Bindings")
12415 (description "@code{pyserial} provide serial port bindings for Python. It
12416 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
12417 and/or Xon/Xoff. The port is accessed in RAW mode.")
12418 (license license:bsd-3)))
12419
12420 (define-public python2-pyserial
12421 (package-with-python2 python-pyserial))
12422
12423 (define-public python-kivy
12424 (package
12425 (name "python-kivy")
12426 (version "1.9.1")
12427 (source
12428 (origin
12429 (method url-fetch)
12430 (uri (pypi-uri "kivy" version))
12431 (file-name (string-append name "-" version ".tar.gz"))
12432 (sha256
12433 (base32
12434 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
12435 (build-system python-build-system)
12436 (arguments
12437 `(#:tests? #f ; Tests require many optional packages
12438 #:phases
12439 (modify-phases %standard-phases
12440 (replace 'build (lambda _ (zero? (system* "make" "force"))))
12441 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
12442 (lambda* (#:key inputs #:allow-other-keys)
12443 (setenv "KIVY_SDL2_PATH"
12444 (string-append (assoc-ref inputs "sdl-union")
12445 "/include/SDL2"))
12446 #t)))))
12447 (native-inputs
12448 `(("pkg-config" ,pkg-config)
12449 ("python-cython" ,python-cython)))
12450 (inputs
12451 `(("gstreamer" ,gstreamer)
12452 ("mesa" ,mesa)
12453 ("sdl-union"
12454 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
12455 (home-page "http://kivy.org")
12456 (synopsis
12457 "Multitouch application framework")
12458 (description
12459 "A software library for rapid development of
12460 hardware-accelerated multitouch applications.")
12461 (license license:expat)))
12462
12463 (define-public python2-kivy
12464 (package-with-python2 python-kivy))
12465
12466 (define-public python-kivy-next
12467 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
12468 (revision "1"))
12469 (package (inherit python-kivy)
12470 (name "python-kivy-next")
12471 (version (string-append "1.9.1-" revision "."
12472 (string-take commit 7)))
12473 (source
12474 (origin
12475 (method git-fetch)
12476 (uri (git-reference
12477 (url "https://github.com/kivy/kivy")
12478 (commit commit)))
12479 (file-name (string-append name "-" version "-checkout"))
12480 (sha256
12481 (base32
12482 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
12483
12484 (define-public python2-kivy-next
12485 (package-with-python2 python-kivy-next))
12486
12487 (define-public python-binaryornot
12488 (package
12489 (name "python-binaryornot")
12490 (version "0.4.0")
12491 (source (origin
12492 (method url-fetch)
12493 (uri (pypi-uri "binaryornot" version))
12494 (sha256
12495 (base32
12496 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
12497 (build-system python-build-system)
12498 (propagated-inputs
12499 `(("python-chardet" ,python-chardet)
12500 ("python-hypothesis" ,python-hypothesis)))
12501 (home-page "https://github.com/audreyr/binaryornot")
12502 (synopsis "Package to check if a file is binary or text")
12503 (description "Ultra-lightweight pure Python package to check if a file is
12504 binary or text.")
12505 (license license:bsd-3)
12506 (properties `((python2-variant . ,(delay python2-binaryornot))))))
12507
12508 (define-public python2-binaryornot
12509 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
12510 (package (inherit base)
12511 (propagated-inputs
12512 `(("python2-enum34" ,python2-enum34)
12513 ,@(package-propagated-inputs base))))))
12514
12515 (define-public python-nltk
12516 (package
12517 (name "python-nltk")
12518 (version "3.2.1")
12519 (source (origin
12520 (method url-fetch)
12521 (uri (pypi-uri "nltk" version))
12522 (sha256
12523 (base32
12524 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
12525 (build-system python-build-system)
12526 (arguments
12527 '(;; The tests require some extra resources to be downloaded.
12528 ;; TODO Try packaging these resources.
12529 #:tests? #f))
12530 (home-page "http://nltk.org/")
12531 (synopsis "Natural Language Toolkit")
12532 (description "It provides interfaces to over 50 corpora and lexical
12533 resources such as WordNet, along with a suite of text processing libraries
12534 for classification, tokenization, stemming, tagging, parsing, and semantic
12535 reasoning, wrappers for natural language processing libraries.")
12536 (license license:asl2.0)))
12537
12538 (define-public python2-nltk
12539 (package-with-python2 python-nltk))
12540
12541 (define-public python-pymongo
12542 (package
12543 (name "python-pymongo")
12544 (version "3.3.0")
12545 (source (origin
12546 (method url-fetch)
12547 (uri (pypi-uri "pymongo" version))
12548 (sha256
12549 (base32
12550 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
12551 (build-system python-build-system)
12552 (propagated-inputs
12553 `(("python-certifi" ,python-certifi)))
12554 (home-page "https://github.com/mongodb/mongo-python-driver")
12555 (synopsis "Python driver for MongoDB")
12556 (description "Python driver for MongoDB.")
12557 (license license:asl2.0)))
12558
12559 (define-public python2-pymongo
12560 (package-with-python2 python-pymongo))
12561
12562 (define-public python-sh
12563 (package
12564 (name "python-sh")
12565 (version "1.11")
12566 (source (origin
12567 (method url-fetch)
12568 (uri (pypi-uri "sh" version))
12569 (sha256
12570 (base32
12571 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
12572 (build-system python-build-system)
12573 (arguments
12574 `(#:tests? #f)) ; no tests
12575 (home-page "https://github.com/amoffat/sh")
12576 (synopsis "Python subprocess interface")
12577 (description "Abstracts process invocation by providing a function
12578 interface for programs.")
12579 (license license:expat)))
12580
12581 (define-public python2-sh
12582 (package-with-python2 python-sh))
12583
12584 (define-public python-consul
12585 (package
12586 (name "python-consul")
12587 (version "0.6.1")
12588 (source
12589 (origin
12590 (method url-fetch)
12591 (uri (pypi-uri "python-consul" version))
12592 (sha256
12593 (base32
12594 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
12595 (build-system python-build-system)
12596 (native-inputs
12597 `(("python-pytest" ,python-pytest)))
12598 (propagated-inputs
12599 `(("python-requests" ,python-requests)
12600 ("python-six" ,python-six)))
12601 (home-page "https://github.com/cablehead/python-consul")
12602 (synopsis "Python client for Consul")
12603 (description
12604 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
12605 discovery, monitoring and configuration.")
12606 (license license:expat)))
12607
12608 (define-public python2-consul
12609 (package-with-python2 python-consul))
12610
12611 (define-public python-schematics
12612 (package
12613 (name "python-schematics")
12614 (version "1.1.1")
12615 (source
12616 (origin
12617 (method url-fetch)
12618 (uri (string-append
12619 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
12620 (file-name (string-append name "-" version ".tar.gz"))
12621 (sha256
12622 (base32
12623 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
12624 (build-system python-build-system)
12625 (propagated-inputs
12626 `(("python-six" ,python-six)))
12627 (arguments
12628 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
12629 ; version requirements (eg python-coveralls)
12630 (home-page "https://github.com/schematics/schematics")
12631 (synopsis "Python Data Structures for Humans")
12632 (description "Python Data Structures for Humans.")
12633 (license license:bsd-3)))
12634
12635 (define-public python2-schematics
12636 (package-with-python2 python-schematics))
12637
12638 (define-public python-publicsuffix
12639 (package
12640 (name "python-publicsuffix")
12641 (version "1.1.0")
12642 (source (origin
12643 (method url-fetch)
12644 (uri (pypi-uri "publicsuffix" version))
12645 (sha256
12646 (base32
12647 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
12648 (build-system python-build-system)
12649 (arguments
12650 `(#:tests? #f)) ; tests use the internet
12651 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
12652 (synopsis "Get suffix for a domain name")
12653 (description "Get a public suffix for a domain name using the Public Suffix
12654 List.")
12655 (license license:expat)))
12656
12657 (define-public python2-publicsuffix
12658 (package-with-python2 python-publicsuffix))
12659
12660 (define-public python-publicsuffix2
12661 (package
12662 (name "python-publicsuffix2")
12663 (version "2.20160818")
12664 (source
12665 (origin
12666 (method url-fetch)
12667 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
12668 (sha256
12669 (base32
12670 "1bb55yka9vkn7i6y1kjzxa516kh6v4gsrxa90w5wdz5p5n968r68"))))
12671 (build-system python-build-system)
12672 (arguments
12673 '(#:tests? #f)) ; The test suite requires network access.
12674 (home-page "https://github.com/pombredanne/python-publicsuffix2")
12675 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
12676 (description "Get a public suffix for a domain name using the Public Suffix
12677 List. Forked from and using the same API as the publicsuffix package.")
12678 (license (list license:expat license:mpl2.0))))
12679
12680 (define-public python2-publicsuffix2
12681 (package-with-python2 python-publicsuffix2))
12682
12683 (define-public python-url
12684 (package
12685 (name "python-url")
12686 (version "0.2.0")
12687 (source (origin
12688 (method url-fetch)
12689 (uri (pypi-uri "url" version))
12690 (sha256
12691 (base32
12692 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
12693 (build-system python-build-system)
12694 (propagated-inputs
12695 `(("python-publicsuffix" ,python-publicsuffix)))
12696 (native-inputs
12697 `(("python-coverage" ,python-coverage)
12698 ("python-nose" ,python-nose)))
12699 (arguments
12700 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
12701 (home-page "https://github.com/seomoz/url-py")
12702 (synopsis "URL Parsing")
12703 (description "Library for parsing urls.")
12704 (license license:expat)
12705 (properties `((python2-variant . ,(delay python2-url))))))
12706
12707 (define-public python2-url
12708 (let ((base (package-with-python2 (strip-python2-variant python-url))))
12709 (package (inherit base)
12710 (propagated-inputs
12711 `(("python2-publicsuffix" ,python2-publicsuffix))))))
12712
12713 (define-public python-freezegun
12714 (package
12715 (name "python-freezegun")
12716 (version "0.3.8")
12717 (source
12718 (origin
12719 (method url-fetch)
12720 (uri (pypi-uri "freezegun" version))
12721 (sha256
12722 (base32
12723 "1sf38d3ibv1jhhvr52x7dhrsiyqk1hm165dfv8w8wh0fhmgxg151"))))
12724 (build-system python-build-system)
12725 (native-inputs
12726 `(("python-mock" ,python-mock)
12727 ("python-nose" ,python-nose)
12728 ("python-coverage" ,python-coverage)))
12729 (propagated-inputs
12730 `(("python-six" ,python-six)
12731 ("python-dateutil" ,python-dateutil)))
12732 (arguments
12733 `(#:phases (modify-phases %standard-phases
12734 ;; The tests are normally executed via `make test`, but the PyPi
12735 ;; package does not include the Makefile.
12736 (replace 'check
12737 (lambda _
12738 (zero? (system* "nosetests" "./tests/")))))))
12739 (home-page "https://github.com/spulec/freezegun")
12740 (synopsis "Test utility for mocking the datetime module")
12741 (description
12742 "FreezeGun is a library that allows your python tests to travel through
12743 time by mocking the datetime module.")
12744 (license license:asl2.0)))
12745
12746 (define-public python2-freezegun
12747 (package-with-python2 python-freezegun))
12748
12749
12750 (define-public python-odfpy
12751 (package
12752 (name "python-odfpy")
12753 (version "1.3.3")
12754 (source (origin
12755 (method url-fetch)
12756 (uri (pypi-uri "odfpy" version))
12757 (sha256
12758 (base32
12759 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
12760 (arguments
12761 `(#:modules ((srfi srfi-1)
12762 (guix build python-build-system)
12763 (guix build utils))
12764 #:phases
12765 (modify-phases %standard-phases
12766 (replace 'check
12767 ;; The test runner invokes python2 and python3 for test*.py.
12768 ;; To avoid having both in inputs, we replicate it here.
12769 (lambda _
12770 (every (lambda (test-file)
12771 (zero? (system* "python" test-file)))
12772 (find-files "tests" "^test.*\\.py$")))))))
12773 (build-system python-build-system)
12774 (home-page "https://github.com/eea/odfpy")
12775 (synopsis "Python API and tools to manipulate OpenDocument files")
12776 (description "Collection of libraries and utility programs written in
12777 Python to manipulate OpenDocument 1.2 files.")
12778 (license
12779 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
12780 ;; number of files with other licenses.
12781 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
12782
12783 (define-public python2-odfpy
12784 (package-with-python2 python-odfpy))
12785
12786 (define-public python-cachecontrol
12787 (package
12788 (name "python-cachecontrol")
12789 (version "0.11.6")
12790 (source
12791 (origin
12792 (method url-fetch)
12793 ;; Pypi does not have tests.
12794 (uri (string-append
12795 "https://github.com/ionrock/cachecontrol/archive/v"
12796 version ".tar.gz"))
12797 (file-name (string-append name "-" version ".tar.gz"))
12798 (sha256
12799 (base32
12800 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
12801 (build-system python-build-system)
12802 (arguments
12803 `(#:phases
12804 (modify-phases %standard-phases
12805 (replace 'check
12806 (lambda _
12807 ;; Drop test that requires internet access.
12808 (delete-file "tests/test_regressions.py")
12809 (setenv "PYTHONPATH"
12810 (string-append (getcwd) "/build/lib:"
12811 (getenv "PYTHONPATH")))
12812 (zero? (system* "py.test" "-vv")))))))
12813 (native-inputs
12814 `(("python-pytest" ,python-pytest)
12815 ("python-redis" ,python-redis)
12816 ("python-webtest" ,python-webtest)
12817 ("python-mock" ,python-mock)))
12818 (propagated-inputs
12819 `(("python-requests" ,python-requests)
12820 ("python-lockfile" ,python-lockfile)))
12821 (home-page "https://github.com/ionrock/cachecontrol")
12822 (synopsis "The httplib2 caching algorithms for use with requests")
12823 (description "CacheControl is a port of the caching algorithms in
12824 @code{httplib2} for use with @code{requests} session objects.")
12825 (license license:asl2.0)))
12826
12827 (define-public python2-cachecontrol
12828 (package-with-python2 python-cachecontrol))
12829
12830 (define-public python-lit
12831 (package
12832 (name "python-lit")
12833 (version "0.5.0")
12834 (source
12835 (origin
12836 (method url-fetch)
12837 (uri (pypi-uri "lit" version))
12838 (sha256
12839 (base32
12840 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
12841 (build-system python-build-system)
12842 (home-page "http://llvm.org/")
12843 (synopsis "LLVM Software Testing Tool")
12844 (description "@code{lit} is a portable tool for executing LLVM and Clang
12845 style test suites, summarizing their results, and providing indication of
12846 failures.")
12847 (license license:ncsa)))
12848
12849 (define-public python2-lit
12850 (package-with-python2 python-lit))
12851
12852 (define-public python-pytest-pep8
12853 (package
12854 (name "python-pytest-pep8")
12855 (version "1.0.6")
12856 (source (origin
12857 (method url-fetch)
12858 (uri (pypi-uri "pytest-pep8" version))
12859 (sha256
12860 (base32
12861 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
12862 (build-system python-build-system)
12863 (arguments
12864 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
12865 (native-inputs
12866 `(("python-pytest" ,python-pytest)))
12867 (propagated-inputs
12868 `(("python-pep8" ,python-pep8)))
12869 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
12870 (synopsis "Py.test plugin to check PEP8 requirements")
12871 (description "Pytest plugin for checking PEP8 compliance.")
12872 (license license:expat)))
12873
12874 (define-public python2-pytest-pep8
12875 (package-with-python2 python-pytest-pep8))
12876
12877 (define-public python-pytest-flakes
12878 (package
12879 (name "python-pytest-flakes")
12880 (version "1.0.1")
12881 (source (origin
12882 (method url-fetch)
12883 (uri (pypi-uri "pytest-flakes" version))
12884 (sha256
12885 (base32
12886 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
12887 (build-system python-build-system)
12888 (arguments
12889 `(#:phases
12890 (modify-phases %standard-phases
12891 (delete 'check)
12892 (add-after 'install 'check
12893 (lambda* (#:key outputs inputs #:allow-other-keys)
12894 ;; It's easier to run tests after install.
12895 ;; Make installed package available for running the tests
12896 (add-installed-pythonpath inputs outputs)
12897 (zero? (system* "py.test" "-vv")))))))
12898 (native-inputs
12899 `(("python-coverage" ,python-coverage)
12900 ("python-pytest" ,python-pytest)
12901 ("python-pytest-cache" ,python-pytest-cache)
12902 ("python-pytest-pep8" ,python-pytest-pep8)))
12903 (propagated-inputs
12904 `(("python-pyflakes" ,python-pyflakes)))
12905 (home-page "https://github.com/fschulze/pytest-flakes")
12906 (synopsis "Py.test plugin to check source code with pyflakes")
12907 (description "Pytest plugin for checking Python source code with pyflakes.")
12908 (license license:expat)))
12909
12910 (define-public python2-pytest-flakes
12911 (package-with-python2 python-pytest-flakes))
12912
12913 (define-public python-natsort
12914 (package
12915 (name "python-natsort")
12916 (version "5.0.2")
12917 (source (origin
12918 (method url-fetch)
12919 (uri (pypi-uri "natsort" version))
12920 (sha256
12921 (base32
12922 "0bh6j0l8iapjnsgg3bs6q075cnzjl6zw1vlgqyv3qrygm2cxypkn"))))
12923 (build-system python-build-system)
12924 (arguments
12925 `(#:phases
12926 (modify-phases %standard-phases
12927 (add-before 'check 'set-cachedir
12928 ;; Tests require write access to $HOME by default
12929 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
12930 (native-inputs
12931 `(("python-hypothesis" ,python-hypothesis)
12932 ("python-pytest-cache" ,python-pytest-cache)
12933 ("python-pytest-cov" ,python-pytest-cov)
12934 ("python-pytest-flakes" ,python-pytest-flakes)
12935 ("python-pytest-pep8" ,python-pytest-pep8)))
12936 (propagated-inputs ; TODO: Add python-fastnumbers.
12937 `(("python-pyicu" ,python-pyicu)))
12938 (home-page "https://github.com/SethMMorton/natsort")
12939 (synopsis "Natural sorting for python and shell")
12940 (description
12941 "Natsort lets you apply natural sorting on lists instead of
12942 lexicographical. If you use the built-in @code{sorted} method in python
12943 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
12944 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
12945 function @code{natsorted} that identifies numbers and sorts them separately
12946 from strings. It can also sort version numbers, real numbers, mixed types
12947 and more, and comes with a shell command @command{natsort} that exposes this
12948 functionality in the command line.")
12949 (license license:expat)
12950 (properties `((python2-variant . ,(delay python2-natsort))))))
12951
12952 (define-public python2-natsort
12953 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
12954 (package (inherit base)
12955 (native-inputs
12956 `(("python2-pathlib" ,python2-pathlib)
12957 ("python2-mock" ,python2-mock)
12958 ("python2-enum34" ,python2-enum34)
12959 ,@(package-native-inputs base))))))
12960
12961 (define-public python-glances
12962 (package
12963 (name "python-glances")
12964 (version "2.7.1")
12965 (source
12966 (origin
12967 (method url-fetch)
12968 (uri (pypi-uri "Glances" version))
12969 (sha256
12970 (base32
12971 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
12972 (build-system python-build-system)
12973 (propagated-inputs
12974 `(("python-psutil" ,python-psutil)))
12975 (home-page
12976 "https://github.com/nicolargo/glances")
12977 (synopsis
12978 "A cross-platform curses-based monitoring tool")
12979 (description
12980 "Glances is a curses-based monitoring tool for a wide variety of platforms.
12981 Glances uses the PsUtil library to get information from your system. It monitors
12982 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
12983 (license license:lgpl3+)))
12984
12985 (define-public python2-glances
12986 (package-with-python2 python-glances))
12987
12988 (define-public python-graphql-core
12989 (package
12990 (name "python-graphql-core")
12991 (version "0.5.3")
12992 (source
12993 (origin
12994 (method url-fetch)
12995 (uri (pypi-uri "graphql-core" version))
12996 (sha256
12997 (base32
12998 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
12999 (build-system python-build-system)
13000 (arguments
13001 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
13002 #:phases
13003 (modify-phases %standard-phases
13004 (add-after 'unpack 'patch-hardcoded-version
13005 (lambda _ (substitute*
13006 "setup.py"
13007 (("'gevent==1.1rc1'") "'gevent'"))
13008 #t)))))
13009 (native-inputs
13010 `(("python-gevent" ,python-gevent)
13011 ("python-mock" ,python-mock)
13012 ("python-pytest-mock" ,python-pytest-mock)))
13013 (propagated-inputs
13014 `(("python-promise" ,python-promise)
13015 ("python-six" ,python-six)))
13016 (home-page "https://github.com/graphql-python/graphql-core")
13017 (synopsis "GraphQL implementation for Python")
13018 (description
13019 "GraphQL implementation for Python. GraphQL is a data query language and
13020 runtime designed and used to request and deliver data to mobile and web apps.
13021 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
13022 to Python.")
13023 (license license:expat)))
13024
13025 (define-public python2-graphql-core
13026 (package-with-python2 python-graphql-core))
13027
13028 (define-public python-graphql-relay
13029 (package
13030 (name "python-graphql-relay")
13031 (version "0.4.5")
13032 (source
13033 (origin
13034 (method url-fetch)
13035 (uri (pypi-uri "graphql-relay" version))
13036 (sha256
13037 (base32
13038 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
13039 (build-system python-build-system)
13040 (native-inputs
13041 `(("python-pytest" ,python-pytest)))
13042 (propagated-inputs
13043 `(("python-graphql-core" ,python-graphql-core)
13044 ("python-promise" ,python-promise)
13045 ("python-six" ,python-six)))
13046 (home-page "https://github.com/graphql-python/graphql-relay-py")
13047 (synopsis "Relay implementation for Python")
13048 (description
13049 "This is a library to allow the easy creation of Relay-compliant servers
13050 using the GraphQL Python reference implementation of a GraphQL server. It
13051 should be noted that the code is a exact port of the original
13052 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
13053 from Facebook.")
13054 (license license:expat)))
13055
13056 (define-public python2-graphql-relay
13057 (package-with-python2 python-graphql-relay))
13058
13059 (define-public python-graphene
13060 (package
13061 (name "python-graphene")
13062 (version "0.10.2")
13063 (source
13064 (origin
13065 (method url-fetch)
13066 (uri (pypi-uri "graphene" version))
13067 (sha256
13068 (base32
13069 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
13070 (build-system python-build-system)
13071 (native-inputs
13072 `(("python-django-filter" ,python-django-filter)
13073 ("python-mock" ,python-mock)
13074 ("python-psycopg2" ,python-psycopg2)
13075 ("python-pytest-django" ,python-pytest-django)
13076 ("python-sqlalchemy-utils" ,python-sqlalchemy-utils)))
13077 (propagated-inputs
13078 `(("python-graphql-core" ,python-graphql-core)
13079 ("python-graphql-relay" ,python-graphql-relay)
13080 ("python-iso8601" ,python-iso8601)
13081 ("python-promise" ,python-promise)
13082 ("python-six" ,python-six)))
13083 (home-page "http://graphene-python.org/")
13084 (synopsis "GraphQL Framework for Python")
13085 (description
13086 "Graphene is a Python library for building GraphQL schemas/types.
13087 A GraphQL schema describes your data model, and provides a GraphQL server
13088 with an associated set of resolve methods that know how to fetch data.")
13089 (properties `((python2-variant . ,(delay python2-graphene))))
13090 (license license:expat)))
13091
13092 (define-public python2-graphene
13093 (let ((base (package-with-python2
13094 (strip-python2-variant python-graphene))))
13095 (package (inherit base)
13096 (native-inputs
13097 `(("python2-sqlalchemy" ,python2-sqlalchemy)
13098 ,@(package-native-inputs base))))))
13099
13100 (define-public python-nautilus
13101 (package
13102 (name "python-nautilus")
13103 (version "0.4.9")
13104 (source
13105 (origin
13106 (method url-fetch)
13107 (uri (pypi-uri "nautilus" version))
13108 (sha256
13109 (base32
13110 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
13111 (build-system python-build-system)
13112 (arguments `(#:tests? #f)) ; fails to import test modules
13113 (propagated-inputs
13114 `(("python-bcrypt" ,python-bcrypt)
13115 ("python-click" ,python-click)
13116 ("python-consul" ,python-consul)
13117 ("python-graphene" ,python-graphene)
13118 ("python-jinja2" ,python-jinja2)
13119 ("python-peewee" ,python-peewee)
13120 ("python-pika" ,python-pika)
13121 ("python-tornado" ,python-tornado)
13122 ("python-wtforms" ,python-wtforms)))
13123 (native-inputs
13124 `(("python-nose2" ,python-nose2)))
13125 (home-page "https://github.com/AlecAivazis/nautilus")
13126 (synopsis "Library for creating microservice applications")
13127 (description
13128 "Nautilus is a framework for flux based microservices that looks to
13129 provide extendible implementations of common aspects of a cloud so that you can
13130 focus on building massively scalable web applications.")
13131 (license license:expat)))
13132
13133 (define-public python-snowballstemmer
13134 (package
13135 (name "python-snowballstemmer")
13136 (version "1.2.1")
13137 (source (origin
13138 (method url-fetch)
13139 (uri (pypi-uri "snowballstemmer" version))
13140 (sha256
13141 (base32
13142 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
13143 (build-system python-build-system)
13144 (arguments
13145 `(;; No tests exist
13146 #:tests? #f))
13147 (home-page "https://github.com/shibukawa/snowball_py")
13148 (synopsis "Snowball stemming library collection for Python")
13149 (description "This package provides 16 word stemmer algorithms generated
13150 from Snowball algorithms. It includes the 15 original ones plus the Poerter
13151 English stemmer.")
13152 (license license:bsd-3)))
13153
13154 (define-public python2-snowballstemmer
13155 (package-with-python2 python-snowballstemmer))
13156
13157 (define-public python-sphinx-cloud-sptheme
13158 (package
13159 (name "python-sphinx-cloud-sptheme")
13160 (version "1.8.0")
13161 (source (origin
13162 (method url-fetch)
13163 (uri (pypi-uri "cloud_sptheme" version))
13164 (sha256
13165 (base32
13166 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
13167 (build-system python-build-system)
13168 ;; FIXME: The 'pypi' release archive does not contain tests.
13169 (arguments '(#:tests? #f))
13170 (native-inputs
13171 `(("python-sphinx" ,python-sphinx)))
13172 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
13173 (synopsis "'Cloud' theme for Sphinx documenter")
13174 (description "This package contains the \"Cloud\" theme for Sphinx and some
13175 related extensions.")
13176 (license license:bsd-3)))
13177
13178 (define-public python2-sphinx-cloud-sptheme
13179 (package-with-python2 python-sphinx-cloud-sptheme))
13180
13181 (define-public python-sphinx-alabaster-theme
13182 (package
13183 (name "python-sphinx-alabaster-theme")
13184 (version "0.7.9")
13185 (source (origin
13186 (method url-fetch)
13187 (uri (pypi-uri "alabaster" version))
13188 (sha256
13189 (base32
13190 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
13191 (build-system python-build-system)
13192 (propagated-inputs
13193 `(("python-pygments" ,python-pygments)))
13194 (home-page "https://alabaster.readthedocs.io/")
13195 (synopsis "Configurable sidebar-enabled Sphinx theme")
13196 (description "Alabaster is a visually (c)lean, responsive, configurable
13197 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
13198 (license license:bsd-3)))
13199
13200 (define-public python2-sphinx-alabaster-theme
13201 (package-with-python2 python-sphinx-alabaster-theme))
13202
13203 (define-public python-betamax
13204 (package
13205 (name "python-betamax")
13206 (version "0.8.0")
13207 (source
13208 (origin
13209 (method url-fetch)
13210 (uri (pypi-uri "betamax" version))
13211 (sha256
13212 (base32
13213 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
13214 (build-system python-build-system)
13215 (arguments
13216 '(;; Many tests fail because they require networking.
13217 #:tests? #f))
13218 (propagated-inputs
13219 `(("python-requests" ,python-requests)))
13220 (home-page "https://github.com/sigmavirus24/betamax")
13221 (synopsis "Record HTTP interactions with python-requests")
13222 (description "Betamax will record your test suite's HTTP interactions and
13223 replay them during future tests. It is designed to work with python-requests.")
13224 (license license:expat)))
13225
13226 (define-public python2-betamax
13227 (package-with-python2 python-betamax))
13228
13229 (define-public python-betamax-matchers
13230 (package
13231 (name "python-betamax-matchers")
13232 (version "0.4.0")
13233 (source
13234 (origin
13235 (method url-fetch)
13236 (uri (pypi-uri "betamax-matchers" version))
13237 (sha256
13238 (base32
13239 "07qpwjyq2i2aqhz5iwghnj4pqr2ys5n45v1vmpcfx9r5mhwrsq43"))))
13240 (build-system python-build-system)
13241 (propagated-inputs
13242 `(("python-betamax" ,python-betamax)
13243 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13244 (home-page "https://github.com/sigmavirus24/betamax_matchers")
13245 (synopsis "VCR imitation for python-requests")
13246 (description "@code{betamax-matchers} provides a set of Matchers for
13247 Betamax.")
13248 (license license:asl2.0)))
13249
13250 (define-public python2-betamax-matchers
13251 (package-with-python2 python-betamax-matchers))
13252
13253 (define-public python-s3transfer
13254 (package
13255 (name "python-s3transfer")
13256 (version "0.1.11")
13257 (source (origin
13258 (method url-fetch)
13259 (uri (pypi-uri "s3transfer" version))
13260 (sha256
13261 (base32
13262 "0yfrfnf404cxzn3iswibqjxklsl0b1lwgqiml6pwiqj79a7zbwbn"))))
13263 (build-system python-build-system)
13264 (arguments
13265 `(#:phases
13266 (modify-phases %standard-phases
13267 (replace 'check
13268 (lambda _
13269 ;; 7 of the 'integration' tests require network access or login
13270 ;; credentials.
13271 (zero? (system* "nosetests" "--exclude=integration")))))))
13272 (native-inputs
13273 `(("python-docutils" ,python-docutils)
13274 ("python-mock" ,python-mock)
13275 ("python-nose" ,python-nose)))
13276 (propagated-inputs
13277 `(("python-botocore" ,python-botocore)))
13278 (synopsis "Amazon S3 Transfer Manager")
13279 (description "S3transfer is a Python library for managing Amazon S3
13280 transfers.")
13281 (home-page "https://github.com/boto/s3transfer")
13282 (license license:asl2.0)
13283 (properties `((python2-variant . ,(delay python2-s3transfer))))))
13284
13285 (define-public python2-s3transfer
13286 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
13287 (package
13288 (inherit base)
13289 (native-inputs
13290 `(("python2-futures" ,python2-futures)
13291 ,@(package-native-inputs base))))))
13292
13293 (define-public python-setproctitle
13294 (package
13295 (name "python-setproctitle")
13296 (version "1.1.10")
13297 (source
13298 (origin
13299 (method url-fetch)
13300 (uri (pypi-uri "setproctitle" version))
13301 (sha256
13302 (base32
13303 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
13304 (build-system python-build-system)
13305 (arguments
13306 '(#:phases
13307 (modify-phases %standard-phases
13308 (add-before 'check 'patch-Makefile
13309 ;; Stricly this is only required for the python2 variant.
13310 ;; But adding a phase in an inherited package seems to be
13311 ;; cumbersum. So we patch even for python3.
13312 (lambda _
13313 (let ((nose (assoc-ref %build-inputs "python2-nose")))
13314 (when nose
13315 (substitute* "Makefile"
13316 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
13317 (string-append nose "/bin/nosetests "))))
13318 #t)))
13319 (replace 'check
13320 (lambda _
13321 (setenv "PYTHON" (or (which "python3") (which "python")))
13322 (setenv "PYCONFIG" (or (which "python3-config")
13323 (which "python-config")))
13324 (setenv "CC" "gcc")
13325 ;; No need to extend PYTHONPATH to find the built package, since
13326 ;; the Makefile will build anyway
13327 (zero? (system* "make" "check")))))))
13328 (native-inputs
13329 `(("procps" ,procps))) ; required for tests
13330 (home-page
13331 "https://github.com/dvarrazzo/py-setproctitle")
13332 (synopsis
13333 "Setproctitle implementation for Python to customize the process title")
13334 (description "The library allows a process to change its title (as displayed
13335 by system tools such as ps and top).
13336
13337 Changing the title is mostly useful in multi-process systems, for
13338 example when a master process is forked: changing the children's title
13339 allows to identify the task each process is busy with. The technique
13340 is used by PostgreSQL and the OpenSSH Server for example.")
13341 (license license:bsd-3)
13342 (properties `((python2-variant . ,(delay python2-setproctitle))))))
13343
13344 (define-public python2-setproctitle
13345 (let ((base (package-with-python2
13346 (strip-python2-variant python-setproctitle))))
13347 (package
13348 (inherit base)
13349 (native-inputs `(("python2-nose" ,python2-nose)
13350 ,@(package-native-inputs base))))))
13351
13352 (define-public python-validictory
13353 (package
13354 (name "python-validictory")
13355 (version "1.0.1")
13356 (source
13357 (origin
13358 (method url-fetch)
13359 (uri (pypi-uri "validictory" version))
13360 (sha256
13361 (base32
13362 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
13363 (build-system python-build-system)
13364 (arguments
13365 '(#:phases
13366 (modify-phases %standard-phases
13367 (add-after 'unpack 'bootstrap
13368 ;; Move the tests out of the package directory to avoid
13369 ;; packaging them.
13370 (lambda* _
13371 (rename-file "validictory/tests" "tests")
13372 (delete-file "tests/__init__.py")))
13373 (replace 'check
13374 (lambda _
13375 ;; Extend PYTHONPATH so the built package will be found.
13376 (setenv "PYTHONPATH"
13377 (string-append (getcwd) "/build/lib:"
13378 (getenv "PYTHONPATH")))
13379 (zero? (system* "py.test" "-vv" )))))))
13380 (native-inputs
13381 `(("python-pytest" ,python-pytest)))
13382 (home-page
13383 "https://github.com/jamesturk/validictory")
13384 (synopsis "General purpose Python data validator")
13385 (description "It allows validation of arbitrary Python data structures.
13386
13387 The schema format is based on the JSON Schema
13388 proposal (http://json-schema.org), so combined with json the library is also
13389 useful as a validator for JSON data.")
13390 (license license:expat)))
13391
13392 (define-public python2-validictory
13393 (package-with-python2 python-validictory))
13394
13395 (define-public python-aniso8601
13396 (package
13397 (name "python-aniso8601")
13398 (version "1.1.0")
13399 (source
13400 (origin
13401 (method url-fetch)
13402 (uri (pypi-uri "aniso8601" version))
13403 (sha256
13404 (base32
13405 "1k5mjg9iqbjfslb5prrsfz7dhlvi6s35p1jxq8dm87w1b7dn5i2g"))))
13406 (build-system python-build-system)
13407 (propagated-inputs
13408 `(("python-dateutil" ,python-dateutil)))
13409 (home-page
13410 "https://bitbucket.org/nielsenb/aniso8601")
13411 (synopsis
13412 "Python library for parsing ISO 8601 strings")
13413 (description
13414 "This package contains a library for parsing ISO 8601 datetime strings.")
13415 (license license:bsd-3)))
13416
13417 (define-public python-flask-restful
13418 (package
13419 (name "python-flask-restful")
13420 (version "0.3.5")
13421 (source
13422 (origin
13423 (method url-fetch)
13424 (uri (pypi-uri "Flask-RESTful" version))
13425 (sha256
13426 (base32
13427 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
13428 (build-system python-build-system)
13429 (propagated-inputs
13430 `(("python-aniso8601" ,python-aniso8601)
13431 ("python-flask" ,python-flask)
13432 ("python-pycrypto" ,python-pycrypto)
13433 ("python-pytz" ,python-pytz)))
13434 (native-inputs
13435 `(;; Optional dependency of Flask. Tests need it.
13436 ("python-blinker" ,python-blinker)
13437 ("python-mock" ,python-mock) ; For tests
13438 ("python-nose" ,python-nose) ; For tests
13439 ("python-sphinx" ,python-sphinx)))
13440 (home-page
13441 "https://www.github.com/flask-restful/flask-restful/")
13442 (synopsis
13443 "Flask module for creating REST APIs")
13444 (description
13445 "This package contains a Flask module for creating REST APIs.")
13446 (license license:bsd-3)))
13447
13448 (define-public python-flask-basicauth
13449 (package
13450 (name "python-flask-basicauth")
13451 (version "0.2.0")
13452 (source
13453 (origin
13454 (method url-fetch)
13455 (uri (pypi-uri "Flask-BasicAuth" version))
13456 (sha256
13457 (base32
13458 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
13459 (build-system python-build-system)
13460 (propagated-inputs
13461 `(("python-flask" ,python-flask)))
13462 (home-page
13463 "https://github.com/jpvanhal/flask-basicauth")
13464 (synopsis
13465 "HTTP basic access authentication for Flask")
13466 (description
13467 "This package provides HTTP basic access authentication for Flask.")
13468 (license license:bsd-3)))
13469
13470 (define-public python-flask-sqlalchemy
13471 (package
13472 (name "python-flask-sqlalchemy")
13473 (version "2.1")
13474 (source
13475 (origin
13476 (method url-fetch)
13477 (uri (pypi-uri "Flask-SQLAlchemy" version))
13478 (sha256
13479 (base32
13480 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
13481 (build-system python-build-system)
13482 (propagated-inputs
13483 `(("python-flask" ,python-flask)
13484 ("python-sqlalchemy" ,python-sqlalchemy)))
13485 (home-page
13486 "https://github.com/mitsuhiko/flask-sqlalchemy")
13487 (synopsis
13488 "Module adding SQLAlchemy support to your Flask application")
13489 (description
13490 "This package adds SQLAlchemy support to your Flask application.")
13491 (license license:bsd-3)))
13492
13493 (define-public python-pyev
13494 (package
13495 (name "python-pyev")
13496 (version "0.9.0")
13497 (source
13498 (origin
13499 (method url-fetch)
13500 (uri (pypi-uri "pyev" version))
13501 (sha256
13502 (base32
13503 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
13504 (build-system python-build-system)
13505 (arguments
13506 `(#:tests? #f ; no test suite
13507 #:phases
13508 (modify-phases %standard-phases
13509 (add-after 'unpack 'patch
13510 (lambda* (#:key inputs #:allow-other-keys)
13511 (let ((libev (string-append (assoc-ref inputs "libev")
13512 "/lib/libev.so.4")))
13513 (substitute* "setup.py"
13514 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
13515 (string-append "libev_dll_name = \"" libev "\"")))))))))
13516 (inputs
13517 `(("libev" ,libev)))
13518 (home-page "http://pythonhosted.org/pyev/")
13519 (synopsis "Python libev interface")
13520 (description "Pyev provides a Python interface to libev.")
13521 (license license:gpl3)))
13522
13523 (define-public python2-pyev
13524 (package-with-python2 python-pyev))
13525
13526 (define-public python-imagesize
13527 (package
13528 (name "python-imagesize")
13529 (version "0.7.1")
13530 (source
13531 (origin
13532 (method url-fetch)
13533 (uri (pypi-uri "imagesize" version))
13534 (sha256
13535 (base32
13536 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
13537 (build-system python-build-system)
13538 (arguments
13539 '(;; Test files are not distributed on PyPi:
13540 ;; https://github.com/shibukawa/imagesize_py/issues/7
13541 #:tests? #f))
13542 (home-page "https://github.com/shibukawa/imagesize_py")
13543 (synopsis "Gets image size of files in variaous formats in Python")
13544 (description
13545 "This package allows determination of image size from
13546 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
13547 (license license:expat)))
13548
13549 (define-public python2-imagesize
13550 (package-with-python2 python-imagesize))
13551
13552 (define-public python-axolotl-curve25519
13553 (package
13554 (name "python-axolotl-curve25519")
13555 (version "0.1")
13556 (source
13557 (origin
13558 (method git-fetch)
13559 (uri (git-reference
13560 (url "https://github.com/tgalal/python-axolotl-curve25519")
13561 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
13562 (file-name (string-append name "-" version "-checkout"))
13563 (sha256
13564 (base32
13565 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
13566 (build-system python-build-system)
13567 (arguments
13568 `(;; Prevent creation of the egg. This works around
13569 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
13570 #:configure-flags '("--root=/")))
13571 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
13572 (synopsis "Python wrapper for curve25519 library")
13573 (description "This is a python wrapper for the curve25519 library
13574 with ed25519 signatures. The C code was pulled from
13575 libaxolotl-android. At the moment this wrapper is meant for use by
13576 python-axolotl.")
13577 (license (list license:gpl3 ; Most files
13578 license:bsd-3)))) ; curve/curve25519-donna.c
13579
13580 (define-public python2-axolotl-curve25519
13581 (package-with-python2 python-axolotl-curve25519))
13582
13583 (define-public python-axolotl
13584 (package
13585 (name "python-axolotl")
13586 (version "0.1.35")
13587 (source
13588 (origin
13589 (method url-fetch)
13590 (uri (string-append
13591 "https://github.com/tgalal/python-axolotl/archive/"
13592 version ".tar.gz"))
13593 (file-name (string-append name "-" version ".tar.gz"))
13594 (sha256
13595 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
13596 (build-system python-build-system)
13597 (arguments
13598 `(#:phases
13599 (modify-phases %standard-phases
13600 ;; Don't install tests
13601 (add-before 'install 'remove-tests
13602 (lambda _
13603 (for-each delete-file-recursively
13604 '("axolotl/tests" "build/lib/axolotl/tests"))
13605 #t)))))
13606 (propagated-inputs
13607 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
13608 ("python-dateutil" ,python-dateutil)
13609 ("python-protobuf" ,python-protobuf)
13610 ("python-pycrypto" ,python-pycrypto)))
13611 (home-page "https://github.com/tgalal/python-axolotl")
13612 (synopsis "Python port of libaxolotl-android")
13613 (description "This is a python port of libaxolotl-android. This
13614 is a ratcheting forward secrecy protocol that works in synchronous and
13615 asynchronous messaging environments.")
13616 (license license:gpl3)))
13617
13618 (define-public python2-axolotl
13619 (package-with-python2 python-axolotl))
13620
13621 (define-public python-termstyle
13622 (package
13623 (name "python-termstyle")
13624 (version "0.1.11")
13625 (source
13626 (origin
13627 (method url-fetch)
13628 (uri (pypi-uri "termstyle" version))
13629 (sha256
13630 (base32
13631 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
13632 (build-system python-build-system)
13633 (arguments
13634 '(#:phases
13635 (modify-phases %standard-phases
13636 (replace 'check
13637 (lambda _
13638 (zero? (system* "python" "test3.py")))))))
13639 (home-page "https://github.com/gfxmonk/termstyle")
13640 (synopsis "Console text coloring for Python")
13641 (description "This package provides console text coloring for Python.")
13642 (license license:bsd-3)))
13643
13644 (define-public python-rednose
13645 (package
13646 (name "python-rednose")
13647 (version "1.2.1")
13648 (source
13649 (origin
13650 (method url-fetch)
13651 (uri (pypi-uri "rednose" version))
13652 (sha256
13653 (base32
13654 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
13655 (build-system python-build-system)
13656 (arguments
13657 `(#:phases
13658 (modify-phases %standard-phases
13659 (add-after 'unpack 'fix-deps
13660 (lambda _
13661 ;; See <https://github.com/JBKahn/rednose/issues/12>
13662 (substitute* "setup.py"
13663 (("python-termstyle") "termstyle"))
13664 #t)))))
13665 (propagated-inputs
13666 `(("python-colorama" ,python-colorama)
13667 ("python-termstyle" ,python-termstyle)))
13668 (native-inputs
13669 `(("python-six" ,python-six)
13670 ("python-nose" ,python-nose)))
13671 (home-page "https://github.com/JBKahn/rednose")
13672 (synopsis "Colored output for Python nosetests")
13673 (description "This package provides colored output for the
13674 @command{nosetests} command of the Python Nose unit test framework.")
13675 (license license:bsd-3)))
13676
13677 (define-public python2-rednose
13678 (package-with-python2 python-rednose))
13679
13680 (define-public python-flask-restplus
13681 (package
13682 (name "python-flask-restplus")
13683 (version "0.9.2")
13684 (source
13685 (origin
13686 (method url-fetch)
13687 (uri (pypi-uri "flask-restplus" version))
13688 (sha256
13689 (base32
13690 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
13691 (build-system python-build-system)
13692 (arguments
13693 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
13694 ;; #:phases
13695 ;; (modify-phases %standard-phases
13696 ;; (replace 'check
13697 ;; (lambda _
13698 ;; (zero? (system* "nosetests")))))))
13699 (propagated-inputs
13700 `(("python-aniso8601" ,python-aniso8601)
13701 ("python-flask" ,python-flask)
13702 ("python-jsonschema" ,python-jsonschema)
13703 ("python-pytz" ,python-pytz)
13704 ("python-six" ,python-six)))
13705 (native-inputs
13706 `(("python-tzlocal" ,python-tzlocal)
13707 ("python-blinker" ,python-blinker)
13708 ("python-nose" ,python-nose)
13709 ("python-rednose" ,python-rednose)))
13710 (home-page "https://github.com/noirbizarre/flask-restplus")
13711 (synopsis "Framework for documented API development with Flask")
13712 (description "This package provides a framework for API development with
13713 the Flask web framework in Python. It is similar to package
13714 @code{python-flask-restful} but supports the @code{python-swagger}
13715 documentation builder.")
13716 (license license:expat)))
13717
13718 (define-public python-sadisplay
13719 (package
13720 (name "python-sadisplay")
13721 (version "0.4.6")
13722 (source
13723 (origin
13724 (method url-fetch)
13725 (uri (pypi-uri "sadisplay" version))
13726 (sha256
13727 (base32
13728 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
13729 (build-system python-build-system)
13730 (propagated-inputs
13731 `(("python-sqlalchemy" ,python-sqlalchemy)))
13732 (native-inputs
13733 `(("python-nose" ,python-nose)))
13734 (home-page "https://bitbucket.org/estin/sadisplay")
13735 (synopsis "SQLAlchemy schema displayer")
13736 (description "This package provides a program to build Entity
13737 Relationship diagrams from a SQLAlchemy model (or directly from the
13738 database).")
13739 (license license:bsd-3)))
13740
13741 (define-public python2-sadisplay
13742 (package-with-python2 python-sadisplay))
13743
13744 (define-public python-flask-restful-swagger
13745 (package
13746 (name "python-flask-restful-swagger")
13747 (version "0.19")
13748 (source
13749 (origin
13750 (method url-fetch)
13751 (uri (pypi-uri "flask-restful-swagger" version))
13752 (sha256
13753 (base32
13754 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
13755 (build-system python-build-system)
13756 (propagated-inputs
13757 `(("python-flask-restful" ,python-flask-restful)))
13758 (home-page "https://github.com/rantav/flask-restful-swagger")
13759 (synopsis "Extract Swagger specs from Flask-Restful projects")
13760 (description "This package lets you extract Swagger API documentation
13761 specs from your Flask-Restful projects.")
13762 (license license:expat)))
13763
13764 (define-public python2-flask-restful-swagger
13765 (package-with-python2 python-flask-restful-swagger))
13766
13767 (define-public python-argcomplete
13768 (package
13769 (name "python-argcomplete")
13770 (version "1.7.0")
13771 (source
13772 (origin
13773 (method url-fetch)
13774 (uri (pypi-uri "argcomplete" version))
13775 (sha256
13776 (base32
13777 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
13778 (build-system python-build-system)
13779 (native-inputs
13780 `(("python-pexpect" ,python-pexpect)
13781 ("tcsh" ,tcsh)
13782 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
13783 (home-page "https://github.com/kislyuk/argcomplete")
13784 (synopsis "Shell tab completion for Python argparse")
13785 (description "argcomplete provides extensible command line tab completion
13786 of arguments and options for Python scripts using @code{argparse}. It's
13787 particularly useful for programs with many options or sub-parsers that can
13788 dynamically suggest completions; for example, when browsing resources over the
13789 network.")
13790 (license license:asl2.0)))
13791
13792 (define-public python2-argcomplete
13793 (package-with-python2 python-argcomplete))
13794
13795 (define-public python-xopen
13796 (package
13797 (name "python-xopen")
13798 (version "0.1.1")
13799 (source
13800 (origin
13801 (method url-fetch)
13802 (uri (pypi-uri "xopen" version))
13803 (sha256
13804 (base32
13805 "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
13806 (file-name (string-append name "-" version ".tar.gz"))))
13807 (build-system python-build-system)
13808 (home-page "https://github.com/marcelm/xopen/")
13809 (synopsis "Open compressed files transparently")
13810 (description "This module provides an @code{xopen} function that works like
13811 Python's built-in @code{open} function, but can also deal with compressed files.
13812 Supported compression formats are gzip, bzip2 and, xz, and are automatically
13813 recognized by their file extensions. The focus is on being as efficient as
13814 possible on all supported Python versions.")
13815 (license license:expat)))
13816
13817 (define-public python2-xopen
13818 (package-with-python2 python-xopen))
13819
13820 (define-public python2-cheetah
13821 (package
13822 (name "python2-cheetah")
13823 (version "2.4.4")
13824 (source
13825 (origin
13826 (method url-fetch)
13827 (uri (pypi-uri "Cheetah" version))
13828 (sha256
13829 (base32
13830 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
13831 (build-system python-build-system)
13832 (arguments
13833 `(#:python ,python-2))
13834 (propagated-inputs
13835 `(("python2-markdown" ,python2-markdown)))
13836 (home-page "https://pythonhosted.org/Cheetah/")
13837 (synopsis "Template engine")
13838 (description "Cheetah is a text-based template engine and Python code
13839 generator.
13840
13841 Cheetah can be used as a standalone templating utility or referenced as
13842 a library from other Python applications. It has many potential uses,
13843 but web developers looking for a viable alternative to ASP, JSP, PHP and
13844 PSP are expected to be its principle user group.
13845
13846 Features:
13847 @enumerate
13848 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
13849 text-based format.
13850 @item Cleanly separates content, graphic design, and program code.
13851 @item Blends the power and flexibility of Python with a simple template language
13852 that non-programmers can understand.
13853 @item Gives template writers full access to any Python data structure, module,
13854 function, object, or method in their templates.
13855 @item Makes code reuse easy by providing an object-orientated interface to
13856 templates that is accessible from Python code or other Cheetah templates.
13857 One template can subclass another and selectively reimplement sections of it.
13858 @item Provides a simple, yet powerful, caching mechanism that can dramatically
13859 improve the performance of a dynamic website.
13860 @item Compiles templates into optimized, yet readable, Python code.
13861 @end enumerate")
13862 (license (license:x11-style "file://LICENSE"))))
13863
13864 (define-public python-dulwich
13865 (package
13866 (name "python-dulwich")
13867 (version "0.16.3")
13868 (source
13869 (origin
13870 (method url-fetch)
13871 (uri (list (string-append "https://www.dulwich.io/releases/"
13872 "dulwich-" version ".tar.gz")
13873 (pypi-uri "dulwich" version)))
13874 (sha256
13875 (base32 "0fl47vzfgc3w3rmhn8naii905cjqcp0vc68iyvymxp7567hh6als"))))
13876 (build-system python-build-system)
13877 (arguments
13878 `(#:phases
13879 (modify-phases %standard-phases
13880 (add-before 'check 'fix-tests
13881 (lambda* (#:key inputs #:allow-other-keys)
13882 ;; The tests use Popen with a custom environment which doesn't
13883 ;; include PATH.
13884 (substitute* "dulwich/tests/compat/utils.py"
13885 (("'git'") (string-append "'"
13886 (which "git")
13887 "'")))
13888 (substitute* '("dulwich/tests/test_repository.py"
13889 "dulwich/tests/test_hooks.py")
13890 (("#!/bin/sh") (string-append "#!" (which "sh"))))
13891 (setenv "TEST_RUNNER" "unittest")
13892 (setenv "PYTHONHASHSEED" "random")
13893 #t)))))
13894 (propagated-inputs
13895 `(("python-fastimport" ,python-fastimport)))
13896 (native-inputs
13897 `(("python-mock" ,python-mock)
13898 ("python-geventhttpclient" ,python-geventhttpclient)
13899 ("git" ,git)))
13900 (home-page "https://www.dulwich.io/")
13901 (synopsis "Git implementation in Python")
13902 (description "Dulwich is an implementation of the Git file formats and
13903 protocols written in pure Python.")
13904 ;; Can be used with either license.
13905 (license (list license:asl2.0 license:gpl2+))))
13906
13907 (define-public python2-dulwich
13908 (package-with-python2 python-dulwich))
13909
13910 (define-public python-pbkdf2
13911 (package
13912 (name "python-pbkdf2")
13913 (version "1.3")
13914 (source
13915 (origin
13916 (method url-fetch)
13917 (uri (pypi-uri "pbkdf2" version))
13918 (sha256
13919 (base32
13920 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
13921 (build-system python-build-system)
13922 (arguments
13923 '(#:phases
13924 (modify-phases %standard-phases
13925 (replace 'check
13926 (lambda _
13927 (setenv "PYTHONPATH"
13928 (string-append (getcwd) "/build/lib:"
13929 (getenv "PYTHONPATH")))
13930 (zero? (system* "python" "test/test_pbkdf2.py")))))))
13931 (propagated-inputs
13932 `(("python-pycrypto" ,python-pycrypto))) ; optional
13933 (home-page "http://www.dlitz.net/software/python-pbkdf2/")
13934 (synopsis "Password-based key derivation")
13935 (description "This module implements the password-based key derivation
13936 function, PBKDF2, specified in RSA PKCS#5 v2.0.
13937
13938 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
13939 is part of the RSA Public Key Cryptography Standards series. The provided
13940 implementation takes a password or a passphrase and a salt value (and
13941 optionally a iteration count, a digest module, and a MAC module) and provides
13942 a file-like object from which an arbitrarly-sized key can be read.")
13943 (license license:expat)))
13944
13945 (define-public python2-pbkdf2
13946 (package-with-python2 python-pbkdf2))
13947
13948 (define-public python-qrcode
13949 (package
13950 (name "python-qrcode")
13951 (version "5.3")
13952 (source
13953 (origin
13954 (method url-fetch)
13955 (uri (pypi-uri "qrcode" version))
13956 (sha256
13957 (base32
13958 "0kljfrfq0c2rmxf8am57333ia41kd0snbm2rnqbdy816hgpcq5a1"))))
13959 (build-system python-build-system)
13960 (arguments
13961 ;; FIXME: Tests require packaging 'pymaging'.
13962 '(#:tests? #f))
13963 (propagated-inputs
13964 `(("python-lxml" ,python-lxml) ; for SVG output
13965 ("python-pillow" ,python-pillow) ; for PNG output
13966 ("python-six" ,python-six)))
13967 (home-page "https://github.com/lincolnloop/python-qrcode")
13968 (synopsis "QR Code image generator")
13969 (description "This package provides a pure Python QR Code generator
13970 module. It uses the Python Imaging Library (PIL) to allow for the generation
13971 of QR Codes.
13972
13973 In addition this package provides a command line tool to generate QR codes and
13974 either write these QR codes to a file or do the output as ascii art at the
13975 console.")
13976 (license license:bsd-3)))
13977
13978 (define-public python2-qrcode
13979 (package-with-python2 python-qrcode))
13980
13981 ;; SlowAES isn't compatible with Python 3.
13982 (define-public python2-slowaes
13983 (package
13984 (name "python2-slowaes")
13985 (version "0.1a1")
13986 (source
13987 (origin
13988 (method url-fetch)
13989 (uri (pypi-uri "slowaes" version))
13990 (sha256
13991 (base32
13992 "02dzajm83a7lqgxf6r3hgj64wfmcxz8gs4nvgxpvj5n19kjqlrc3"))))
13993 (build-system python-build-system)
13994 (arguments `(#:python ,python-2))
13995 (home-page "http://code.google.com/p/slowaes/")
13996 (synopsis "Implementation of AES in Python")
13997 (description "This package contains an implementation of AES in Python.
13998 This implementation is slow (hence the project name) but still useful when
13999 faster ones are not available.")
14000 (license license:asl2.0)))
14001
14002 (define-public python-rst2ansi
14003 (package
14004 (name "python-rst2ansi")
14005 (version "0.1.5")
14006 (source
14007 (origin
14008 (method url-fetch)
14009 (uri (pypi-uri "rst2ansi" version))
14010 (sha256
14011 (base32
14012 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
14013 (build-system python-build-system)
14014 (propagated-inputs
14015 `(("python-docutils" ,python-docutils)))
14016 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
14017 (synopsis "Convert RST to ANSI-decorated console output")
14018 (description
14019 "Python module dedicated to rendering RST (reStructuredText) documents
14020 to ansi-escaped strings suitable for display in a terminal.")
14021 (license license:expat)))
14022
14023 (define-public python-ansi2html
14024 (package
14025 (name "python-ansi2html")
14026 (version "1.2.0")
14027 (source
14028 (origin
14029 (method url-fetch)
14030 (uri (pypi-uri "ansi2html" version))
14031 (sha256
14032 (base32
14033 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
14034 (build-system python-build-system)
14035 (native-inputs
14036 `(("python-mock" ,python-mock)
14037 ("python-nose" ,python-nose)))
14038 (propagated-inputs
14039 `(("python-six" ,python-six)))
14040 (home-page "http://github.com/ralphbean/ansi2html")
14041 (synopsis "Convert ANSI-decorated console output to HTML")
14042 (description
14043 "@command{ansi2html} is a Python library and command line utility for
14044 convering text with ANSI color codes to HTML or LaTeX.")
14045 (license license:gpl3+)))
14046
14047 (define-public python2-ansi2html
14048 (package-with-python2 python-ansi2html))
14049
14050 (define-public python-ddt
14051 (package
14052 (name "python-ddt")
14053 (version "1.1.1")
14054 (source
14055 (origin
14056 (method url-fetch)
14057 (uri (pypi-uri "ddt" version))
14058 (sha256
14059 (base32
14060 "1c00ikkxr7lha97c81k938bzhgd4pbwamkjn0h4nkhr3xk00zp6n"))))
14061 (build-system python-build-system)
14062 (native-inputs
14063 `(("python-mock" ,python-mock)
14064 ("python-nose" ,python-nose)))
14065 (propagated-inputs
14066 `(("python-six" ,python-six)
14067 ("python-pyyaml" ,python-pyyaml)))
14068 (home-page "https://github.com/txels/ddt")
14069 (synopsis "Data-Driven Tests")
14070 (description
14071 "DDT (Data-Driven Tests) allows you to multiply one test case by running
14072 it with different test data, and make it appear as multiple test cases.")
14073 (license license:expat)))
14074
14075 (define-public python2-ddt
14076 (package-with-python2 python-ddt))
14077
14078 (define-public python-pycosat
14079 (package
14080 (name "python-pycosat")
14081 (version "0.6.1")
14082 (source
14083 (origin
14084 (method url-fetch)
14085 (uri (pypi-uri "pycosat" version))
14086 (sha256
14087 (base32
14088 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
14089 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
14090 (build-system python-build-system)
14091 (home-page "https://github.com/ContinuumIO/pycosat")
14092 (synopsis "Bindings to picosat (a SAT solver)")
14093 (description
14094 "This package provides efficient Python bindings to @code{picosat} on
14095 the C level. When importing pycosat, the @code{picosat} solver becomes part
14096 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
14097 Problem} (SAT) solver.")
14098 (license license:expat)))
14099
14100 (define-public python2-pycosat
14101 (package-with-python2 python-pycosat))
14102
14103 (define-public python2-ruamel.ordereddict
14104 (package
14105 (name "python2-ruamel.ordereddict")
14106 (version "0.4.9")
14107 (source
14108 (origin
14109 (method url-fetch)
14110 (uri (pypi-uri "ruamel.ordereddict" version))
14111 (sha256
14112 (base32
14113 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
14114 (build-system python-build-system)
14115 (arguments
14116 `(#:python ,python-2
14117 #:phases
14118 (modify-phases %standard-phases
14119 (delete 'check)
14120 (add-after 'install 'check
14121 (lambda* (#:key inputs outputs #:allow-other-keys)
14122 (add-installed-pythonpath inputs outputs)
14123 (zero? (system* "python" "test/testordereddict.py")))))))
14124 (home-page "https://bitbucket.org/ruamel/ordereddict")
14125 (synopsis "Version of dict that keeps keys in insertion order")
14126 (description
14127 "This is an implementation of an ordered dictionary with @dfn{Key
14128 Insertion Order} (KIO: updates of values do not affect the position of the
14129 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
14130 removed and put at the back). The standard library module @code{OrderedDict},
14131 implemented later, implements a subset of @code{ordereddict} functionality.
14132 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
14133 Order} (KSO, no sorting function can be specified, but a transform can be
14134 specified to apply on the key before comparison (e.g. @code{string.lower})).")
14135 (license license:expat)))
14136
14137 (define-public python-pypeg2
14138 (package
14139 (name "python-pypeg2")
14140 (version "2.15.2")
14141 (source
14142 (origin
14143 (method url-fetch)
14144 (uri (pypi-uri "pyPEG2" version))
14145 (sha256
14146 (base32
14147 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
14148 (build-system python-build-system)
14149 (propagated-inputs `(("python-lxml" ,python-lxml)))
14150 (arguments
14151 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
14152 '(#:tests? #f))
14153 (home-page "https://fdik.org/pyPEG/")
14154 (synopsis "Parsering Expression Grammars in Python")
14155 (description "PyPEG is an intrinsic parser interpreter framework for
14156 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
14157 parse many formal languages.")
14158 (license license:gpl2)))
14159
14160 (define-public python2-cliapp
14161 (package
14162 (name "python2-cliapp")
14163 (version "1.20170823")
14164 (source
14165 (origin
14166 (method url-fetch)
14167 (uri (string-append
14168 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
14169 version ".tar.gz"))
14170 (sha256
14171 (base32
14172 "1i9gik0xrj6jmi95s5w988jl1y265baz5xm5pbqdyvsh8h9ln6yq"))))
14173 (build-system python-build-system)
14174 (arguments
14175 `(#:python ,python-2
14176 #:phases
14177 (modify-phases %standard-phases
14178 ;; check phase needs to be run before the build phase. If not,
14179 ;; coverage-test-runner looks for tests for the built source files,
14180 ;; and fails.
14181 (delete 'check)
14182 (add-before 'build 'check
14183 (lambda _
14184 ;; Disable python3 tests
14185 (substitute* "check"
14186 (("python3") "# python3"))
14187 (zero? (system* "./check")))))))
14188 (native-inputs
14189 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
14190 ("python2-pep8" ,python2-pep8)))
14191 (propagated-inputs
14192 `(("python2-pyaml" ,python2-pyaml)))
14193 (home-page "https://liw.fi/cliapp/")
14194 (synopsis "Python framework for command line programs")
14195 (description "@code{python2-cliapp} is a python framework for
14196 command line programs. It contains the typical stuff such programs
14197 need to do, such as parsing the command line for options, and
14198 iterating over input files.")
14199 (license license:gpl2+)))
14200
14201 (define-public python2-ttystatus
14202 (package
14203 (name "python2-ttystatus")
14204 (version "0.35")
14205 (source
14206 (origin
14207 (method url-fetch)
14208 (uri (string-append
14209 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
14210 version ".tar.gz"))
14211 (sha256
14212 (base32
14213 "0vivqbw7ddhsq1zj3g9cvvv4f0phl0pis2smsnwcr2szz2fk3hl6"))))
14214 (build-system python-build-system)
14215 (native-inputs
14216 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
14217 ("python2-pep8" ,python2-pep8)))
14218 (arguments
14219 `(#:python ,python-2
14220 #:phases
14221 (modify-phases %standard-phases
14222 ;; check phase needs to be run before the build phase. If not,
14223 ;; coverage-test-runner looks for tests for the built source files,
14224 ;; and fails.
14225 (delete 'check)
14226 (add-before 'build 'check
14227 (lambda _
14228 (zero? (system* "make" "check")))))))
14229 (home-page "https://liw.fi/ttystatus/")
14230 (synopsis "Python library for showing progress reporting and
14231 status updates on terminals")
14232 (description "@code{python2-ttystatus} is a python library for
14233 showing progress reporting and status updates on terminals, for
14234 command line programs. Output is automatically adapted to the width
14235 of the terminal: truncated if it does not fit, and resized if the
14236 terminal size changes.")
14237 (license license:gpl3+)))
14238
14239 (define-public python2-tracing
14240 (package
14241 (name "python2-tracing")
14242 (version "0.10")
14243 (source
14244 (origin
14245 (method url-fetch)
14246 (uri (string-append
14247 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
14248 version ".tar.gz"))
14249 (sha256
14250 (base32
14251 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
14252 (build-system python-build-system)
14253 (arguments
14254 `(#:python ,python-2))
14255 (home-page "https://liw.fi/tracing/")
14256 (synopsis "Python debug logging helper")
14257 (description "@code{python2-tracing} is a python library for
14258 logging debug messages. It provides a way to turn debugging messages
14259 on and off, based on the filename they occur in. It is much faster
14260 than using @code{logging.Filter} to accomplish the same thing, which
14261 matters when code is run in production mode. The actual logging still
14262 happens using the @code{logging} library.")
14263 (license license:gpl3+)))
14264
14265 (define-public python2-larch
14266 (package
14267 (name "python2-larch")
14268 (version "1.20151025")
14269 (source
14270 (origin
14271 (method url-fetch)
14272 (uri (string-append
14273 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
14274 version ".tar.gz"))
14275 (patches (search-patches
14276 "python2-larch-coverage-4.0a6-compatibility.patch"))
14277 (sha256
14278 (base32
14279 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
14280 (build-system python-build-system)
14281 (arguments
14282 `(#:python ,python-2
14283 #:phases
14284 (modify-phases %standard-phases
14285 ;; check phase needs to be run before the build phase. If not,
14286 ;; coverage-test-runner looks for tests for the built source files,
14287 ;; and fails.
14288 (delete 'check)
14289 (add-before 'build 'check
14290 (lambda _
14291 (zero? (system* "make" "check")))))))
14292 (native-inputs
14293 `(("cmdtest" ,cmdtest)
14294 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
14295 (propagated-inputs
14296 `(("python2-tracing" ,python2-tracing)))
14297 (home-page "https://liw.fi/larch/")
14298 (synopsis "Python copy-on-write B-tree library")
14299 (description "@code{python2-larch} is an implementation of
14300 particular kind of B-tree, based on research by Ohad Rodeh. See
14301 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
14302 on the data structure.
14303
14304 The distinctive feature of this B-tree is that a node is never
14305 (conceptually) modified. Instead, all updates are done by
14306 copy-on-write. This makes it easy to clone a tree, and modify only the
14307 clone, while other processes access the original tree.")
14308 (license license:gpl3+)))
14309
14310 (define-public python-htmlmin
14311 (package
14312 (name "python-htmlmin")
14313 (version "0.1.10")
14314 (source
14315 (origin
14316 (method url-fetch)
14317 (uri (pypi-uri "htmlmin" version))
14318 (sha256
14319 (base32
14320 "0qxa93j3p1ak32qh8d9kshqv8v3z0hkc13dwbhp5cn7sn3xmsp6a"))))
14321 (arguments
14322 `(#:tests? #f)) ;htmlmin has no tests
14323 (build-system python-build-system)
14324 (home-page "https://htmlmin.readthedocs.org/en/latest/")
14325 (synopsis "HTML minifier")
14326 (description "@code{htmlmin} is an HTML minifier that just works.
14327 It comes with safe defaults and easily configurable options.")
14328 (license license:bsd-3)))
14329
14330 (define-public python2-htmlmin
14331 (package-with-python2 python-htmlmin))
14332
14333 (define-public python-flask-htmlmin
14334 (package
14335 (name "python-flask-htmlmin")
14336 (version "1.2")
14337 (source
14338 (origin
14339 (method url-fetch)
14340 (uri (pypi-uri "Flask-HTMLmin" version))
14341 (sha256
14342 (base32
14343 "1n6zlq72kakkw0z2jpq6nh74lfsmxybm4g053pwhc14fbr809348"))))
14344 (propagated-inputs
14345 `(("python-flask" ,python-flask)
14346 ("python-htmlmin" ,python-htmlmin)))
14347 (build-system python-build-system)
14348 (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
14349 (synopsis "HTML response minifier for Flask")
14350 (description
14351 "Minify @code{text/html} MIME type responses when using @code{Flask}.")
14352 (license license:bsd-3)))
14353
14354 (define-public python2-flask-htmlmin
14355 (package-with-python2 python-flask-htmlmin))
14356
14357 (define-public python-flask-login
14358 (package
14359 (name "python-flask-login")
14360 (version "0.4.0")
14361 (source
14362 (origin
14363 (method url-fetch)
14364 (uri (string-append "https://github.com/maxcountryman/flask-login/archive/"
14365 version ".tar.gz"))
14366 (file-name (string-append name "-" version ".tar.gz"))
14367 (sha256
14368 (base32
14369 "1pdqp7a2gyb7k06xda004x0fi2w66s6kn2i0ndkqndmg12d83f9w"))))
14370 (arguments
14371 ;; Tests fail PEP8 compliance. See:
14372 ;; https://github.com/maxcountryman/flask-login/issues/340
14373 `(#:tests? #f))
14374 (build-system python-build-system)
14375 (home-page "https://github.com/maxcountryman/flask-login")
14376 (synopsis "User session management for Flask")
14377 (description
14378 "@code{Flask-Login} provides user session management for Flask. It
14379 handles the common tasks of logging in, logging out, and remembering your
14380 users' sessions over extended periods of time.")
14381 (license license:expat)))
14382
14383 (define-public python2-flask-login
14384 (package-with-python2 python-flask-login))
14385
14386 (define-public python-astroid
14387 (package
14388 (name "python-astroid")
14389 (version "1.5.3")
14390 (source
14391 (origin
14392 (method url-fetch)
14393 (uri (string-append
14394 "https://github.com/PyCQA/astroid/archive/astroid-"
14395 version ".tar.gz"))
14396 (sha256
14397 (base32
14398 "0isn5p7f9n48hmksgbrj7dkm9dyglnayzn5jngk37qywg8a74ngn"))))
14399 (build-system python-build-system)
14400 (propagated-inputs
14401 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
14402 ("python-six" ,python-six)
14403 ("python-wrapt" ,python-wrapt)))
14404 (arguments
14405 `(#:phases
14406 (modify-phases %standard-phases
14407 (replace 'check
14408 (lambda _
14409 (zero? (system* "python" "-m" "unittest" "discover"
14410 "-p" "unittest*.py")))))))
14411 (home-page "https://github.com/PyCQA/astroid")
14412 (synopsis "Common base representation of python source code for pylint and
14413 other projects")
14414 (description "@code{python-astroid} provides a common base representation
14415 of python source code for projects such as pychecker, pyreverse, pylint, etc.
14416
14417 It provides a compatible representation which comes from the _ast module. It
14418 rebuilds the tree generated by the builtin _ast module by recursively walking
14419 down the AST and building an extended ast. The new node classes have
14420 additional methods and attributes for different usages. They include some
14421 support for static inference and local name scopes. Furthermore, astroid
14422 builds partial trees by inspecting living objects.")
14423 (license license:lgpl2.1+)
14424 (properties `((python2-variant . ,(delay python2-astroid))))))
14425
14426 (define-public python2-astroid
14427 (let ((base (package-with-python2
14428 (strip-python2-variant python-astroid))))
14429 (package (inherit base)
14430 (propagated-inputs
14431 `(("python2-backports-functools-lru-cache"
14432 ,python2-backports-functools-lru-cache)
14433 ("python2-enum34" ,python2-enum34)
14434 ("python2-singledispatch" ,python2-singledispatch)
14435 ,@(package-propagated-inputs base))))))
14436
14437 (define-public python-isort
14438 (package
14439 (name "python-isort")
14440 (version "4.2.5")
14441 (source
14442 (origin
14443 (method url-fetch)
14444 (uri (string-append
14445 "https://github.com/timothycrosley/isort/archive/"
14446 version ".tar.gz"))
14447 (file-name (string-append name "-" version ".tar.gz"))
14448 (sha256
14449 (base32
14450 "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh"))))
14451 (build-system python-build-system)
14452 (native-inputs
14453 `(("python-mock" ,python-mock)
14454 ("python-pytest" ,python-pytest)))
14455 (home-page "https://github.com/timothycrosley/isort")
14456 (synopsis "Python utility/library to sort python imports")
14457 (description "@code{python-isort} is a python utility/library to sort
14458 imports alphabetically, and automatically separated into sections. It
14459 provides a command line utility, a python library and plugins for various
14460 editors.")
14461 (license license:expat)))
14462
14463 (define-public python2-isort
14464 (package-with-python2 python-isort))
14465
14466 (define-public python2-backports-functools-lru-cache
14467 (package
14468 (name "python2-backports-functools-lru-cache")
14469 (version "1.3")
14470 (source
14471 (origin
14472 (method url-fetch)
14473 ;; only the pypi tarballs contain the necessary metadata
14474 (uri (pypi-uri "backports.functools_lru_cache" version))
14475 (sha256
14476 (base32
14477 "158ysf2hb0q4p4695abfiym9x1ywg0dgh8a3apd7gqaaxjy22jj4"))))
14478 (build-system python-build-system)
14479 (native-inputs
14480 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
14481 (arguments
14482 `(#:python ,python-2))
14483 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
14484 (synopsis "Backport of functools.lru_cache from Python 3.3")
14485 (description "@code{python2-backports-functools-lru-cache} is a backport
14486 of @code{functools.lru_cache} from python 3.3.")
14487 (license license:expat)))
14488
14489 (define-public python-configparser
14490 (package
14491 (name "python-configparser")
14492 (version "3.5.0")
14493 (source
14494 (origin
14495 (method url-fetch)
14496 (uri (string-append
14497 "https://bitbucket.org/ambv/configparser/get/"
14498 version ".tar.bz2"))
14499 (file-name (string-append name "-" version ".tar.gz"))
14500 (sha256
14501 (base32
14502 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
14503 (build-system python-build-system)
14504 (home-page "http://docs.python.org/py3k/library/configparser.html")
14505 (synopsis "Backport of configparser from python 3.5")
14506 (description "@code{python-configparser} is a backport of
14507 @code{configparser} from Python 3.5 so that it can be used directly
14508 in other versions.")
14509 (license license:expat)))
14510
14511 (define-public python2-configparser
14512 (package-with-python2 python-configparser))
14513
14514 (define-public python2-coverage-test-runner
14515 (package
14516 (name "python2-coverage-test-runner")
14517 (version "1.11")
14518 (source
14519 (origin
14520 (method url-fetch)
14521 (uri (string-append
14522 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/"
14523 "coverage-test-runner/snapshot/coverage-test-runner-"
14524 version ".tar.gz"))
14525 (sha256
14526 (base32
14527 "0y1m7z3dl63kmhcmydl1mwg0hacnf6ghrx9dah17j9iasssfa3g7"))))
14528 (build-system python-build-system)
14529 (arguments
14530 `(#:python ,python-2
14531 #:phases
14532 (modify-phases %standard-phases
14533 (replace 'check
14534 (lambda _
14535 (zero? (system* "./testrun")))))))
14536 (propagated-inputs
14537 `(("python2-coverage" ,python2-coverage)))
14538 (home-page "https://liw.fi/coverage-test-runner/")
14539 (synopsis "Python module for running unit tests")
14540 (description "@code{CoverageTestRunner} is a python module for running
14541 unit tests and failing them if the unit test module does not exercise all
14542 statements in the module it tests.")
14543 (license license:gpl3+)))
14544
14545 (define-public python-pylint
14546 (package
14547 (name "python-pylint")
14548 (version "1.7.2")
14549 (source
14550 (origin
14551 (method url-fetch)
14552 (uri (string-append
14553 "https://github.com/PyCQA/pylint/archive/pylint-"
14554 version ".tar.gz"))
14555 (sha256
14556 (base32
14557 "0mzn1czhf1mgr2wiqfihb274sja02h899b85kywdpivppa9nwrmp"))))
14558 (build-system python-build-system)
14559 (native-inputs
14560 `(("python-pytest" ,python-pytest)
14561 ("python-pytest-runner" ,python-pytest-runner)
14562 ("python-tox" ,python-tox)))
14563 (propagated-inputs
14564 `(("python-astroid" ,python-astroid)
14565 ("python-isort" ,python-isort)
14566 ("python-mccabe" ,python-mccabe)
14567 ("python-six" ,python-six)))
14568 (arguments
14569 `(#:phases
14570 (modify-phases %standard-phases
14571 (replace 'check
14572 (lambda _
14573 ;; Somehow, tests for python2-pylint
14574 ;; fail if run from the build directory
14575 (let ((work "/tmp/work"))
14576 (mkdir-p work)
14577 (setenv "PYTHONPATH"
14578 (string-append (getenv "PYTHONPATH") ":" work))
14579 (copy-recursively "." work)
14580 (with-directory-excursion "/tmp"
14581 (zero? (system* "python" "-m" "unittest" "discover"
14582 "-s" (string-append work "/pylint/test")
14583 "-p" "*test_*.py")))))))))
14584 (home-page "https://github.com/PyCQA/pylint")
14585 (synopsis "Python source code analyzer which looks for coding standard
14586 errors")
14587 (description "Pylint is a Python source code analyzer which looks
14588 for programming errors, helps enforcing a coding standard and sniffs
14589 for some code smells (as defined in Martin Fowler's Refactoring book).
14590
14591 Pylint has many rules enabled by default, way too much to silence them
14592 all on a minimally sized program. It's highly configurable and handle
14593 pragmas to control it from within your code. Additionally, it is
14594 possible to write plugins to add your own checks.")
14595 (properties `((python2-variant . ,(delay python2-pylint))))
14596 (license license:gpl2+)))
14597
14598 (define-public python2-pylint
14599 (let ((pylint (package-with-python2
14600 (strip-python2-variant python-pylint))))
14601 (package (inherit pylint)
14602 (propagated-inputs
14603 `(("python2-backports-functools-lru-cache"
14604 ,python2-backports-functools-lru-cache)
14605 ("python2-configparser" ,python2-configparser)
14606 ,@(package-propagated-inputs pylint))))))
14607
14608 (define-public python-paramunittest
14609 (package
14610 (name "python-paramunittest")
14611 (version "0.2")
14612 (source
14613 (origin
14614 (method url-fetch)
14615 (uri (pypi-uri "ParamUnittest" version))
14616 (sha256
14617 (base32
14618 "0kp793hws5xv1wvycxq7jw2pwy36f35k39jg8hx5qikij5a0jid1"))))
14619 (build-system python-build-system)
14620 (home-page
14621 "https://github.com/rik0/ParamUnittest")
14622 (synopsis
14623 "Simple extension to have parametrized unit tests")
14624 (description
14625 "This package allows to create parametrized unit-tests that work with the standard
14626 unittest package. A parametrized test case is automatically converted to multiple test
14627 cases. Since they are TestCase subclasses, they work with other test suites that
14628 recognize TestCases.")
14629 (license license:bsd-2)))
14630
14631 (define-public python2-python-paramunittest
14632 (package-with-python2 python-paramunittest))
14633
14634 (define-public python-mando
14635 (package
14636 (name "python-mando")
14637 (version "0.5")
14638 (source
14639 (origin
14640 (method url-fetch)
14641 (uri (pypi-uri "mando" version))
14642 (sha256
14643 (base32
14644 "0q05h66439gqdmlk4jqm6xrwrzfdgs4mwk70barxhr2y83qbbdc0"))))
14645 (build-system python-build-system)
14646 (propagated-inputs
14647 `(("python-rst2ansi" ,python-rst2ansi)))
14648 (native-inputs
14649 `(("python-sphinx" ,python-sphinx-1.5.3)
14650 ("python-paramunittest" ,python-paramunittest)))
14651 (home-page "https://mando.readthedocs.org/")
14652 (synopsis
14653 "Wrapper around argparse, allowing creation of complete CLI applications")
14654 (description
14655 "This package is a wrapper around argparse, allowing you to write complete CLI
14656 applications in seconds while maintaining all the flexibility.")
14657 (license license:expat)))
14658
14659 (define-public python2-mando
14660 (package-with-python2 python-mando))
14661
14662 (define-public python-mando-0.3.1
14663 ;; python-radon (version 1.5.0) has a requirement
14664 ;; for mando<0.4,>=0.3
14665 (package
14666 (inherit python-mando)
14667 (name "python-mando")
14668 (version "0.3.1")
14669 (source
14670 (origin
14671 (method url-fetch)
14672 (uri (string-append "https://github.com/rubik/mando/archive/v"
14673 version
14674 ".tar.gz"))
14675 (sha256
14676 (base32
14677 "17jlkdpqw22z1nyml5ybslilqkzmnk0dxxjml8bfghav1l5hbwd2"))))))
14678
14679 (define-public python-fudge
14680 (package
14681 (name "python-fudge")
14682 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
14683 ;; package, which is currently the only use of this package.
14684 (version "0.9.6")
14685 (source
14686 (origin
14687 (method url-fetch)
14688 (uri (pypi-uri "fudge" version))
14689 (sha256
14690 (base32
14691 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
14692 (build-system python-build-system)
14693 (arguments
14694 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
14695 (home-page "https://github.com/fudge-py/fudge")
14696 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
14697 (description
14698 "Fudge is a Python module for using fake objects (mocks and stubs) to
14699 test real ones.
14700
14701 In readable Python code, you declare the methods available on your fake object
14702 and how they should be called. Then you inject that into your application and
14703 start testing. This declarative approach means you don’t have to record and
14704 playback actions and you don’t have to inspect your fakes after running code.
14705 If the fake object was used incorrectly then you’ll see an informative
14706 exception message with a traceback that points to the culprit.")
14707 (license license:expat)))
14708
14709 (define-public python2-fudge
14710 (package-with-python2 python-fudge))
14711
14712 (define-public python-oauth2client
14713 (package
14714 (name "python-oauth2client")
14715 (version "4.0.0")
14716 (source
14717 (origin
14718 (method url-fetch)
14719 (uri (pypi-uri "oauth2client" version))
14720 (sha256
14721 (base32
14722 "1irqqap2zibysf8dba8sklfqikia579srd0phm5n754ni0h59gl0"))))
14723 (build-system python-build-system)
14724 (arguments
14725 `(#:tests? #f))
14726 (propagated-inputs
14727 `(("python-httplib2" ,python-httplib2)
14728 ("python-pyasn1" ,python-pyasn1)
14729 ("python-pyasn1-modules" ,python-pyasn1-modules)
14730 ("python-rsa" ,python-rsa)
14731 ("python-six" ,python-six)))
14732 (home-page "http://github.com/google/oauth2client/")
14733 (synopsis "OAuth 2.0 client library")
14734 (description "@code{python-oauth2client} provides an OAuth 2.0 client
14735 library for Python")
14736 (license license:asl2.0)))
14737
14738 (define-public python-flask-oidc
14739 (package
14740 (name "python-flask-oidc")
14741 (version "1.1.1")
14742 (source
14743 (origin
14744 (method url-fetch)
14745 (uri (pypi-uri "flask-oidc" version))
14746 (sha256
14747 (base32
14748 "1ay5j0mf174bix7i67hclr95gv16z81fpx0dijvi0gydvdj3ddy2"))))
14749 (build-system python-build-system)
14750 (propagated-inputs
14751 `(("python-flask" ,python-flask)
14752 ("python-itsdangerous" ,python-itsdangerous)
14753 ("python-oauth2client" ,python-oauth2client)
14754 ("python-six" ,python-six)))
14755 (native-inputs
14756 `(("python-nose" ,python-nose)
14757 ("python-mock" ,python-mock)))
14758 (home-page "https://github.com/puiterwijk/flask-oidc")
14759 (synopsis "OpenID Connect extension for Flask")
14760 (description "@code{python-flask-oidc} provides an OpenID Connect extension
14761 for Flask.")
14762 (license license:bsd-2)))
14763
14764 (define-public python-mwclient
14765 (package
14766 (name "python-mwclient")
14767 (version "0.8.4")
14768 (source
14769 (origin
14770 (method url-fetch)
14771 ;; The PyPI version wouldn't contain tests.
14772 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
14773 "v" version ".tar.gz"))
14774 (sha256
14775 (base32
14776 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
14777 (build-system python-build-system)
14778 (propagated-inputs
14779 `(("python-requests" ,python-requests)
14780 ("python-requests-oauthlib"
14781 ,python-requests-oauthlib)
14782 ("python-six" ,python-six)))
14783 (native-inputs
14784 `(("python-mock" ,python-mock)
14785 ("python-pytest" ,python-pytest)
14786 ("python-pytest-pep8" ,python-pytest-pep8)
14787 ("python-pytest-cache" ,python-pytest-cache)
14788 ("python-pytest-cov" ,python-pytest-cov)
14789 ("python-responses" ,python-responses)))
14790 (home-page "https://github.com/btongminh/mwclient")
14791 (synopsis "MediaWiki API client")
14792 (description "This package provides a MediaWiki API client.")
14793 (license license:expat)))
14794
14795 (define-public python2-mwclient
14796 (package-with-python2 python-mwclient))
14797
14798 (define-public python-pytest-warnings
14799 (package
14800 (name "python-pytest-warnings")
14801 (version "0.2.0")
14802 (source
14803 (origin
14804 (method url-fetch)
14805 (uri (pypi-uri "pytest-warnings" version))
14806 (sha256
14807 (base32
14808 "0gf2dpahpl5igb7jh1sr9acj3z3gp7zahqdqb69nk6wx01c8kc1g"))))
14809 (build-system python-build-system)
14810 (propagated-inputs
14811 `(("pytest" ,python-pytest-3.0)))
14812 (home-page "https://github.com/fschulze/pytest-warnings")
14813 (synopsis "Pytest plugin to list Python warnings in pytest report")
14814 (description
14815 "Python-pytest-warnings is a pytest plugin to list Python warnings in
14816 pytest report.")
14817 (license license:expat)))
14818
14819 (define-public python2-pytest-warnings
14820 (package-with-python2 python-pytest-warnings))
14821
14822 (define-public python-pytest-capturelog
14823 (package
14824 (name "python-pytest-capturelog")
14825 (version "0.7")
14826 (source
14827 (origin
14828 (method url-fetch)
14829 (uri (pypi-uri "pytest-capturelog" version ".tar.gz"))
14830 (sha256
14831 (base32
14832 "038049nyjl7di59ycnxvc9nydivc5m8np3hqq84j2iirkccdbs5n"))))
14833 (build-system python-build-system)
14834 (propagated-inputs
14835 `(("pytest" ,python-pytest-3.0)))
14836 (home-page "http://bitbucket.org/memedough/pytest-capturelog/overview")
14837 (synopsis "Pytest plugin to catch log messages")
14838 (description
14839 "Python-pytest-catchlog is a pytest plugin to catch log messages.")
14840 (license license:expat)))
14841
14842 (define-public python2-pytest-capturelog
14843 (package-with-python2 python-pytest-capturelog))
14844
14845 (define-public python-pytest-catchlog
14846 (package
14847 (name "python-pytest-catchlog")
14848 (version "1.2.2")
14849 (source
14850 (origin
14851 (method url-fetch)
14852 (uri (pypi-uri "pytest-catchlog" version ".zip"))
14853 (sha256
14854 (base32
14855 "1w7wxh27sbqwm4jgwrjr9c2gy384aca5jzw9c0wzhl0pmk2mvqab"))))
14856 (build-system python-build-system)
14857 (native-inputs
14858 `(("unzip" ,unzip)))
14859 (propagated-inputs
14860 `(("pytest" ,python-pytest-3.0)))
14861 (home-page "https://github.com/eisensheng/pytest-catchlog")
14862 (synopsis "Pytest plugin to catch log messages")
14863 (description
14864 "Python-pytest-catchlog is a pytest plugin to catch log messages. This is
14865 a fork of pytest-capturelog.")
14866 (license license:expat)))
14867
14868 (define-public python2-pytest-catchlog
14869 (package-with-python2 python-pytest-catchlog))
14870
14871 (define-public python-utils
14872 (package
14873 (name "python-utils")
14874 (version "2.1.0")
14875 (source (origin
14876 (method url-fetch)
14877 (uri (pypi-uri "python-utils" version))
14878 (sha256
14879 (base32
14880 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
14881 (build-system python-build-system)
14882 (native-inputs
14883 `(("pytest-runner" ,python-pytest-runner)
14884 ("pytest" ,python-pytest)
14885 ("six" ,python-six)))
14886 (home-page "https://github.com/WoLpH/python-utils")
14887 (synopsis "Convenient utilities not included with the standard Python install")
14888 (description
14889 "Python Utils is a collection of small Python functions and classes which
14890 make common patterns shorter and easier.")
14891 (license license:bsd-2)))
14892
14893 (define-public python2-utils
14894 (package-with-python2 python-utils))
14895
14896 (define-public python-webassets
14897 (package
14898 (name "python-webassets")
14899 (version "0.12.1")
14900 (source
14901 (origin
14902 (method url-fetch)
14903 (uri (pypi-uri "webassets" version))
14904 (sha256
14905 (base32
14906 "1nrqkpb7z46h2b77xafxihqv3322cwqv6293ngaky4j3ff4cing7"))))
14907 (build-system python-build-system)
14908 (native-inputs
14909 `(("python-jinja2" ,python-jinja2)
14910 ("python-mock" ,python-mock)
14911 ("python-nose" ,python-nose)
14912 ("python-pytest" ,python-pytest)))
14913 (home-page "https://github.com/miracle2k/webassets")
14914 (synopsis "Media asset management")
14915 (description "Merges, minifies and compresses Javascript and CSS files,
14916 supporting a variety of different filters, including YUI, jsmin, jspacker or
14917 CSS tidy. Also supports URL rewriting in CSS files.")
14918 (license license:bsd-2)))
14919
14920 (define-public python-sphinx-me
14921 (package
14922 (name "python-sphinx-me")
14923 (version "0.3")
14924 (source
14925 (origin
14926 (method url-fetch)
14927 (uri (pypi-uri "sphinx-me" version))
14928 (sha256
14929 (base32
14930 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
14931 (build-system python-build-system)
14932 (home-page "https://github.com/stephenmcd/sphinx-me")
14933 (synopsis "Create a Sphinx documentation shell")
14934 (description
14935 "Create a Sphinx documentation shell for your project and include the
14936 README file as the documentation index. It handles extracting the required
14937 meta data such as the project name, author and version from your project for
14938 use in your Sphinx docs.")
14939 (license license:bsd-2)))
14940
14941 (define-public python2-sphinx-me
14942 (package-with-python2 python-sphinx-me))
14943
14944 (define-public python-cssmin
14945 (package
14946 (name "python-cssmin")
14947 (version "0.2.0")
14948 (source
14949 (origin
14950 (method url-fetch)
14951 (uri (pypi-uri "cssmin" version))
14952 (sha256
14953 (base32
14954 "1dk723nfm2yf8cp4pj785giqlwv42l0kj8rk40kczvq1hk6g04p0"))))
14955 (build-system python-build-system)
14956 (home-page "https://github.com/zacharyvoase/cssmin")
14957 (synopsis "Python port of the YUI CSS Compressor")
14958 (description "Python port of the YUI CSS Compressor.")
14959 (license (list license:expat license:bsd-3))))
14960
14961 (define-public python2-cssmin
14962 (package-with-python2 python-cssmin))
14963
14964 (define-public python-diff-match-patch
14965 (package
14966 (name "python-diff-match-patch")
14967 (version "20121119")
14968 (source
14969 (origin
14970 (method url-fetch)
14971 (uri (pypi-uri "diff-match-patch" version))
14972 (sha256
14973 (base32
14974 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
14975 (build-system python-build-system)
14976 (home-page "https://code.google.com/p/google-diff-match-patch")
14977 (synopsis "Synchronize plain text")
14978 (description "Diff Match and Patch libraries offer robust algorithms to
14979 perform the operations required for synchronizing plain text.")
14980 (license license:asl2.0)))
14981
14982 (define-public python2-diff-match-patch
14983 (package-with-python2 python-diff-match-patch))
14984
14985 (define-public python-dirsync
14986 (package
14987 (name "python-dirsync")
14988 (version "2.2.2")
14989 (source
14990 (origin
14991 (method url-fetch)
14992 (uri (pypi-uri "dirsync" version ".zip"))
14993 (sha256
14994 (base32
14995 "1hcdvmkwd5512zbxpin0k7bx5bkgzy3swjx7d0kj1y45af6r75v2"))))
14996 (build-system python-build-system)
14997 (native-inputs
14998 `(("unzip" ,unzip)))
14999 (propagated-inputs
15000 `(("six" ,python-six)))
15001 (home-page "https://bitbucket.org/tkhyn/dirsync")
15002 (synopsis "Advanced directory tree synchronisation tool")
15003 (description "Advanced directory tree synchronisation tool.")
15004 (license license:expat)))
15005
15006 (define-public python2-dirsync
15007 (package-with-python2 python-dirsync))
15008
15009 (define-public python-nosexcover
15010 (package
15011 (name "python-nosexcover")
15012 (version "1.0.11")
15013 (source (origin
15014 (method url-fetch)
15015 (uri (pypi-uri "nosexcover" version))
15016 (sha256
15017 (base32
15018 "10xqr12qv62k2flxwqhh8cr00cjhn7sfjrm6p35gd1x5bmjkr319"))))
15019 (build-system python-build-system)
15020 (propagated-inputs
15021 `(("python-coverage" ,python-coverage)
15022 ("python-nose" ,python-nose)))
15023 (home-page "http://github.com/cmheisel/nose-xcover")
15024 (synopsis "Extends nose.plugins.cover to add Cobertura-style XML reports")
15025 (description "Nose-xcover is a companion to the built-in
15026 @code{nose.plugins.cover}. This plugin will write out an XML coverage report
15027 to a file named coverage.xml.
15028
15029 It will honor all the options you pass to the Nose coverage plugin,
15030 especially -cover-package.")
15031 (license license:expat)))
15032
15033 (define-public python2-nosexcover
15034 (package-with-python2 python-nosexcover))
15035
15036 (define-public python-elasticsearch
15037 (package
15038 (name "python-elasticsearch")
15039 (version "1.0.0")
15040 (source
15041 (origin
15042 (method url-fetch)
15043 (uri (pypi-uri "elasticsearch" version))
15044 (sha256
15045 (base32
15046 "1sdw1r05cw7ihnmng8ra9v968fj7bq6sji8i1dikymsnkcpgc69g"))))
15047 (build-system python-build-system)
15048 (native-inputs
15049 `(("python-mock" ,python-mock)
15050 ("python-nosexcover" ,python-nosexcover)
15051 ("python-pyaml" ,python-pyaml)
15052 ("python-requests" ,python-requests)))
15053 (propagated-inputs
15054 `(("urllib3" ,python-urllib3)))
15055 (arguments
15056 ;; tests require the test_elasticsearch module but it is not distributed.
15057 `(#:tests? #f))
15058 (home-page "https://github.com/elastic/elasticsearch-py")
15059 (synopsis "Low-level client for Elasticsearch")
15060 (description "Official low-level client for Elasticsearch. Its goal is to
15061 provide common ground for all Elasticsearch-related code in Python; because of
15062 this it tries to be opinion-free and very extendable.")
15063 (license license:expat)))
15064
15065 (define-public python2-elasticsearch
15066 (package-with-python2 python-elasticsearch))
15067
15068 (define-public python-levenshtein
15069 (package
15070 (name "python-levenshtein")
15071 (version "0.12.0")
15072 (source
15073 (origin
15074 (method url-fetch)
15075 (uri (pypi-uri "python-Levenshtein" version))
15076 (sha256
15077 (base32
15078 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
15079 (build-system python-build-system)
15080 (home-page "https://github.com/ztane/python-Levenshtein")
15081 (synopsis "Fast computation of Levenshtein distance and string similarity")
15082 (description
15083 "The Levenshtein Python C extension module contains functions for fast computation of
15084 @enumerate
15085 @item Levenshtein (edit) distance, and edit operations
15086 @item string similarity
15087 @item approximate median strings, and generally string averaging
15088 @item string sequence and set similarity
15089 @end enumerate
15090 It supports both normal and Unicode strings.")
15091 (license license:gpl2+)))
15092
15093 (define-public python2-levenshtein
15094 (package-with-python2 python-levenshtein))
15095
15096 (define-public python-scandir
15097 (package
15098 (name "python-scandir")
15099 (version "1.4")
15100 (source
15101 (origin
15102 (method url-fetch)
15103 (uri (pypi-uri "scandir" version))
15104 (sha256
15105 (base32 "0yjrgp0mxp3d8bjkq2m1ac2ys8n76wykksvgyjrnil9gr3fx7a5d"))))
15106 (build-system python-build-system)
15107 (home-page "https://github.com/benhoyt/scandir")
15108 (synopsis "Directory iteration function")
15109 (description
15110 "Directory iteration function like os.listdir(), except that instead of
15111 returning a list of bare filenames, it yields DirEntry objects that include
15112 file type and stat information along with the name. Using scandir() increases
15113 the speed of os.walk() by 2-20 times (depending on the platform and file
15114 system) by avoiding unnecessary calls to os.stat() in most cases.")
15115 (license license:bsd-3)))
15116
15117 (define-public python2-scandir
15118 (package-with-python2 python-scandir))
15119
15120 (define-public python2-stemming
15121 (package
15122 (name "python2-stemming")
15123 (version "1.0.1")
15124 (source
15125 (origin
15126 (method url-fetch)
15127 (uri (pypi-uri "stemming" version))
15128 (sha256
15129 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
15130 (build-system python-build-system)
15131 (arguments
15132 `(#:python ,python-2))
15133 (home-page "https://bitbucket.org/mchaput/stemming/overview")
15134 (synopsis "Python implementations of various stemming algorithms")
15135 (description
15136 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
15137 stemming algorithms for English. These implementations are straightforward and
15138 efficient, unlike some Python versions of the same algorithms available on the
15139 Web. This package is an extraction of the stemming code included in the Whoosh
15140 search engine.")
15141 (license license:public-domain)))
15142
15143 (define-public python-factory-boy
15144 (package
15145 (name "python-factory-boy")
15146 (version "2.8.1")
15147 (source
15148 (origin
15149 (method url-fetch)
15150 (uri (pypi-uri "factory_boy" version))
15151 (sha256
15152 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
15153 (build-system python-build-system)
15154 (arguments
15155 ;; Tests are not included in the tarball.
15156 `(#:tests? #f))
15157 (propagated-inputs
15158 `(("faker" ,python-faker)))
15159 (home-page "https://github.com/benhoyt/scandir")
15160 (synopsis "Versatile test fixtures replacement")
15161 (description
15162 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
15163
15164 As a fixtures replacement tool, it aims to replace static, hard to maintain
15165 fixtures with easy-to-use factories for complex object.
15166
15167 Instead of building an exhaustive test setup with every possible combination
15168 of corner cases, factory_boy allows you to use objects customized for the
15169 current test, while only declaring the test-specific fields")
15170 (license license:expat)))
15171
15172 (define-public python2-factory-boy
15173 (package-with-python2 python-factory-boy))
15174
15175 (define-public python-translate-toolkit
15176 (package
15177 (name "python-translate-toolkit")
15178 (version "2.1.0")
15179 (source
15180 (origin
15181 (method url-fetch)
15182 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
15183 (sha256
15184 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
15185 (build-system python-build-system)
15186 (native-inputs
15187 `(("python-pytest" ,python-pytest)
15188 ("python-sphinx" ,python-sphinx)))
15189 (propagated-inputs
15190 `(("python-babel" ,python-babel)
15191 ("python-beautifulsoup4" ,python-beautifulsoup4)
15192 ("python-chardet" ,python-chardet)
15193 ("python-diff-match-patch" ,python-diff-match-patch)
15194 ("python-levenshtein" ,python-levenshtein)
15195 ("python-lxml" ,python-lxml)
15196 ("python-six" ,python-six)
15197 ("python-vobject" ,python-vobject)
15198 ("python-pyyaml" ,python-pyyaml)))
15199 (arguments
15200 ;; TODO: tests are not run, because they end with
15201 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
15202 ;; 'parse_funcs'
15203 ;; during test setup.
15204 `(#:tests? #f))
15205 (home-page "http://toolkit.translatehouse.org")
15206 (synopsis "Tools and API for translation and localization engineering")
15207 (description
15208 "Tools and API for translation and localization engineering. It contains
15209 several utilities, as well as an API for building localization tools.")
15210 (license license:gpl2+)))
15211
15212 (define-public python2-translate-toolkit
15213 (package-with-python2 python-translate-toolkit))
15214
15215 (define-public python-mysqlclient
15216 (package
15217 (name "python-mysqlclient")
15218 (version "1.3.10")
15219 (source
15220 (origin
15221 (method url-fetch)
15222 (uri (pypi-uri "mysqlclient" version))
15223 (sha256
15224 (base32
15225 "0qkj570x4rbsblji6frvsvp2v1ap32dqzj1lq62zp9515ffsyaj5"))))
15226 (build-system python-build-system)
15227 (native-inputs
15228 `(("mariadb" ,mariadb)
15229 ("nose" ,python-nose)
15230 ("mock" ,python-mock)
15231 ("py.test" ,python-pytest)))
15232 (inputs
15233 `(("mysql" ,mysql)
15234 ("libz" ,zlib)
15235 ("openssl" ,openssl)))
15236 (home-page "https://github.com/PyMySQL/mysqlclient-python")
15237 (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
15238 (description "MySQLdb is an interface to the popular MySQL database server
15239 for Python. The design goals are:
15240 @enumerate
15241 @item Compliance with Python database API version 2.0 [PEP-0249],
15242 @item Thread-safety,
15243 @item Thread-friendliness (threads will not block each other).
15244 @end enumerate")
15245 (license license:gpl2)))
15246
15247 (define-public python2-mysqlclient
15248 (package-with-python2 python-mysqlclient))
15249
15250 (define-public python-hiredis
15251 (package
15252 (name "python-hiredis")
15253 (version "0.2.0")
15254 (source
15255 (origin
15256 (method url-fetch)
15257 (uri (pypi-uri "hiredis" version))
15258 (sha256
15259 (base32
15260 "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa"))))
15261 (build-system python-build-system)
15262 (arguments
15263 ;; no tests
15264 `(#:tests? #f))
15265 (home-page "https://github.com/redis/hiredis-py")
15266 (synopsis "Python extension that wraps protocol parsing code in hiredis")
15267 (description "Python-hiredis is a python extension that wraps protocol
15268 parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.")
15269 (license license:bsd-3)))
15270
15271 (define-public python2-hiredis
15272 (package-with-python2 python-hiredis))
15273
15274 (define-public python-fakeredis
15275 (package
15276 (name "python-fakeredis")
15277 (version "0.8.2")
15278 (source
15279 (origin
15280 (method url-fetch)
15281 (uri (pypi-uri "fakeredis" version))
15282 (sha256
15283 (base32
15284 "0zncahj3byyasyfx9i7k991ph0n0lq8v3a21pqri5qxn9564bk9r"))))
15285 (build-system python-build-system)
15286 (arguments
15287 ;; no tests
15288 `(#:tests? #f))
15289 (home-page "https://github.com/jamesls/fakeredis")
15290 (synopsis "Fake implementation of redis API for testing purposes")
15291 (description "Fakeredis is a pure python implementation of the redis-py
15292 python client that simulates talking to a redis server. This was created for a
15293 single purpose: to write unittests. Setting up redis is not hard, but many time
15294 you want to write unittests that do not talk to an external server (such as
15295 redis). This module now allows tests to simply use this module as a reasonable
15296 substitute for redis.")
15297 (license license:bsd-3)))
15298
15299 (define-public python2-fakeredis
15300 (package-with-python2 python-fakeredis))
15301
15302 (define-public python-behave-web-api
15303 (package
15304 (name "python-behave-web-api")
15305 (version "1.0.6")
15306 (source
15307 (origin
15308 (method url-fetch)
15309 (uri (pypi-uri "behave-web-api" version))
15310 (sha256
15311 (base32
15312 "03kpq2xsy1gab3jy0dccbxlsg7vwfy4lagss0qldwmx3xz6b3i19"))))
15313 (build-system python-build-system)
15314 (arguments
15315 `(#:phases
15316 (modify-phases %standard-phases
15317 (add-after 'unpack 'fix-dependencies
15318 (lambda _
15319 (substitute* "setup.py"
15320 (("'wheel'") "") ; We don't use it.
15321 (("'ordereddict==1.1'") ""))))))) ; Python >= 2.7 has it built-in.
15322 (propagated-inputs
15323 `(("behave" ,behave)
15324 ("python-requests" ,python-requests)))
15325 (home-page "https://github.com/jefersondaniel/behave-web-api")
15326 (synopsis "Provides testing for JSON APIs with Behave for Python")
15327 (description "This package provides testing utility modules for testing
15328 JSON APIs with Behave.")
15329 (license license:expat)))
15330
15331 (define-public python2-behave-web-api
15332 (package-with-python2 python-behave-web-api))
15333
15334 (define-public python-flask-script
15335 (package
15336 (name "python-flask-script")
15337 (version "2.0.5")
15338 (source
15339 (origin
15340 (method url-fetch)
15341 (uri (pypi-uri "Flask-Script" version))
15342 (sha256
15343 (base32
15344 "0zqh2yq8zk7m9b4xw1ryqmrljkdigfb3hk5155a3b5hkfnn6xxyf"))))
15345 (build-system python-build-system)
15346 (propagated-inputs
15347 `(("python-flask" ,python-flask)
15348 ("python-argcomplete" ,python-argcomplete)
15349 ("python-werkzeug" ,python-werkzeug)))
15350 (native-inputs
15351 `(("python-pytest" ,python-pytest)))
15352 (home-page
15353 "http://github.com/smurfix/flask-script")
15354 (synopsis "Scripting support for Flask")
15355 (description "The Flask-Script extension provides support for writing
15356 external scripts in Flask. This includes running a development server,
15357 a customised Python shell, scripts to set up your database, cronjobs,
15358 and other command-line tasks that belong outside the web application
15359 itself.")
15360 (license license:bsd-3)))
15361
15362 (define-public python2-flask-script
15363 (package-with-python2 python-flask-script))
15364
15365 (define-public python-flask-migrate
15366 (package
15367 (name "python-flask-migrate")
15368 (version "2.0.3")
15369 (source
15370 (origin
15371 (method url-fetch)
15372 (uri (pypi-uri "Flask-Migrate" version))
15373 (sha256
15374 (base32
15375 "107x78lkqsnbg92dld3dkagg07jvchp3ib3y0sivc4ipz6n1y7rk"))))
15376 (build-system python-build-system)
15377 (propagated-inputs
15378 `(("python-flask" ,python-flask)
15379 ("python-alembic" ,python-alembic)
15380 ("python-sqlalchemy" ,python-sqlalchemy)
15381 ("python-flask-script" ,python-flask-script)
15382 ("python-flask-sqlalchemy" ,python-flask-sqlalchemy)))
15383 (home-page "http://github.com/miguelgrinberg/flask-migrate/")
15384 (synopsis "SQLAlchemy database migrations for Flask programs using
15385 Alembic")
15386 (description "This package contains SQLAlchemy database migration tools
15387 for Flask programs that are using @code{python-alembic}.")
15388 (license license:expat)))
15389
15390 (define-public python2-flask-migrate
15391 (package-with-python2 python-flask-migrate))
15392
15393 (define-public python-packaging
15394 (package
15395 (name "python-packaging")
15396 (version "16.8")
15397 (source
15398 (origin
15399 (method url-fetch)
15400 (uri (pypi-uri "packaging" version))
15401 (sha256
15402 (base32
15403 "17k1xbjshackwvbsnxqixbph8rbqhz4bf4g3al5xyzhavxgq6l2x"))))
15404 (build-system python-build-system)
15405 (native-inputs
15406 `(("python-pretend" ,python-pretend)
15407 ("python-pytest" ,python-pytest)))
15408 (propagated-inputs
15409 `(("python-pyparsing" ,python-pyparsing)
15410 ("python-six" ,python-six)))
15411 (home-page "https://github.com/pypa/packaging")
15412 (synopsis "Core utilities for Python packages")
15413 (description "Packaging is a Python module for dealing with Python packages.
15414 It offers an interface for working with package versions, names, and dependency
15415 information.")
15416 ;; From 'LICENSE': This software is made available under the terms of
15417 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
15418 ;; Contributions to this software is made under the terms of *both* these
15419 ;; licenses.
15420 (license (list license:asl2.0 license:bsd-2))))
15421
15422 (define-public python2-packaging
15423 (package-with-python2 python-packaging))
15424
15425 (define-public python-sql
15426 (package
15427 (name "python-sql")
15428 (version "0.9")
15429 (source
15430 (origin
15431 (method url-fetch)
15432 (uri (pypi-uri "python-sql" version))
15433 (sha256
15434 (base32
15435 "0p6kaqj02vz0habmdx37zjk6hjxdfm8aw737zs059vvpr70ird87"))))
15436 (build-system python-build-system)
15437 (home-page "https://python-sql.tryton.org/")
15438 (synopsis "Library to write SQL queries in a pythonic way")
15439 (description "@code{python-sql} is a library to write SQL queries, that
15440 transforms idiomatic python function calls to well-formed SQL queries.")
15441 (license license:bsd-3)))
15442
15443 (define-public python2-sql
15444 (package-with-python2 python-sql))
15445
15446 (define-public python-genshi
15447 (package
15448 (name "python-genshi")
15449 (version "0.7")
15450 (source
15451 (origin
15452 (method url-fetch)
15453 (uri (string-append
15454 "https://ftp.edgewall.org/pub/genshi/Genshi-"
15455 version ".tar.gz"))
15456 (patches
15457 (search-patches
15458 ;; The first 4 patches are in the master branch upstream.
15459 ;; See this as a reference https://genshi.edgewall.org/ticket/582
15460 ;; The last 2 are NOT in any branch.
15461 ;; They were sent as attachments to a ticket opened at
15462 ;; https://genshi.edgewall.org/ticket/602#no1
15463 "python-genshi-stripping-of-unsafe-script-tags.patch"
15464 "python-genshi-disable-speedups-on-python-3.3.patch"
15465 "python-genshi-isstring-helper.patch"
15466 "python-genshi-add-support-for-python-3.4-AST.patch"
15467 "python-genshi-fix-tests-on-python-3.5.patch"
15468 "python-genshi-buildable-on-python-2.7.patch"))
15469 (sha256
15470 (base32
15471 "0lkkbp6fbwzv0zda5iqc21rr7rdldkwh3hfabfjl9i4bwq14858x"))))
15472 (build-system python-build-system)
15473 (home-page "https://genshi.edgewall.org/")
15474 (synopsis "Toolkit for generation of output for the web")
15475 (description "Genshi is a Python library that provides an integrated set
15476 of components for parsing, generating, and processing HTML, XML or other
15477 textual content for output generation on the web.")
15478 (license license:bsd-3)))
15479
15480 ;; The linter here claims that patch file names should start with the package
15481 ;; name. But, in this case the patches are inherited from python-genshi with
15482 ;; the "python-genshi-" prefix instead of "python2-genshi-".
15483 (define-public python2-genshi
15484 (package-with-python2 python-genshi))
15485
15486 (define-public python-relatorio
15487 (package
15488 (name "python-relatorio")
15489 (version "0.6.4")
15490 (source
15491 (origin
15492 (method url-fetch)
15493 (uri (pypi-uri "relatorio" version))
15494 (sha256
15495 (base32
15496 "0lincq79mzgazwd9gh41dybjh9c3n87r83pl8nk3j79aihyfk84z"))))
15497 (build-system python-build-system)
15498 (propagated-inputs
15499 `(("python-lxml" ,python-lxml)
15500 ("python-genshi" ,python-genshi)))
15501 (home-page "https://relatorio.tryton.org/")
15502 (synopsis "Templating library able to output ODT and PDF files")
15503 (description "Relatorio is a templating library which provides a way to
15504 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
15505 for more filetypes can be easily added by creating plugins for them.")
15506 (license license:gpl3+)))
15507
15508 (define-public python2-relatorio
15509 (package-with-python2 python-relatorio))
15510
15511 (define-public python-radon
15512 (package
15513 (name "python-radon")
15514 (version "1.5.0")
15515 (source
15516 (origin
15517 (method url-fetch)
15518 (uri (pypi-uri "radon" version))
15519 (sha256
15520 (base32
15521 "1h6jv36am0i827182a04ki6291lyx4kp957xfr5njgprj4nd0qsl"))))
15522 (build-system python-build-system)
15523 (propagated-inputs
15524 `(("python-colorama" ,python-colorama)
15525 ("python-flake8-polyfill" ,python-flake8-polyfill)
15526 ("python-mando" ,python-mando-0.3.1)))
15527 (native-inputs
15528 `(("python-flake8" ,python-flake8)
15529 ("python-tox" ,python-tox)
15530 ("python-pytest" ,python-pytest)
15531 ("python-paramunittest" ,python-paramunittest)))
15532 (home-page "https://radon.readthedocs.org/")
15533 (synopsis "Code Metrics in Python")
15534 (description "Radon is a Python tool which computes various code metrics.
15535 Supported metrics are:
15536 @itemize @bullet
15537 @item raw metrics: SLOC, comment lines, blank lines, &c.
15538 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
15539 @item Halstead metrics (all of them)
15540 @item the Maintainability Index (a Visual Studio metric)
15541 @end itemize")
15542 (license license:expat)))
15543
15544 (define-public python2-radon
15545 (package-with-python2 python-radon))
15546
15547 (define-public python-sure
15548 (package
15549 (name "python-sure")
15550 (version "1.4.6")
15551 (source
15552 (origin
15553 (method url-fetch)
15554 (uri (pypi-uri "sure" version))
15555 (sha256
15556 (base32
15557 "1iyqsy2d6radi88g1qf0lziy5b39h5cpb3g5jiqyb4xi46ig3x1z"))))
15558 (build-system python-build-system)
15559 (propagated-inputs
15560 `(("python-mock" ,python-mock)
15561 ("python-six" ,python-six)))
15562 (native-inputs
15563 `(("python-nose" ,python-nose)))
15564 (home-page "https://github.com/gabrielfalcao/sure")
15565 (synopsis "Automated testing library in python for python")
15566 (description
15567 "Sure is a python library that leverages a DSL for writing assertions.
15568 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
15569 (license license:gpl3+)))
15570
15571 (define-public python2-sure
15572 (package-with-python2 python-sure))
15573
15574 (define-public python2-couleur
15575 ;; This package does not seem to support python3 at all, hence,
15576 ;; only the python2 variant definition is provided.
15577 (package
15578 (name "python2-couleur")
15579 (version "0.6.2")
15580 (source
15581 (origin
15582 (method url-fetch)
15583 (uri (pypi-uri "couleur" version))
15584 (sha256
15585 (base32
15586 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
15587 (build-system python-build-system)
15588 (arguments
15589 `(#:python ,python-2))
15590 (home-page "https://github.com/gabrielfalcao/couleur")
15591 (synopsis
15592 "ANSI terminal tool for python, colored shell and other handy fancy features")
15593 (description
15594 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
15595 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
15596 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
15597 ;; https://github.com/gabrielfalcao/couleur/issues/11
15598 (license license:lgpl3+)))
15599
15600 (define-public python-misaka
15601 (package
15602 (name "python-misaka")
15603 (version "2.1.0")
15604 (source
15605 (origin
15606 (method url-fetch)
15607 (uri (pypi-uri "misaka" version))
15608 (sha256
15609 (base32
15610 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
15611 (build-system python-build-system)
15612 (arguments
15613 `(;; Line 37 of setup.py calls self.run_command('develop')
15614 ;; in the 'check' phase. This command seems to be trying
15615 ;; to write to
15616 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
15617 ;; for which it does not have the permission to write.
15618 #:tests? #f))
15619 (propagated-inputs
15620 `(("python-cffi" ,python-cffi)))
15621 (home-page "https://github.com/FSX/misaka")
15622 (synopsis "Python binding for Hoedown")
15623 (description
15624 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
15625 library written in C. It features a fast HTML renderer and functionality to make custom
15626 renderers (e.g. man pages or LaTeX).")
15627 (license license:expat)))
15628
15629 (define-public python2-misaka
15630 (package-with-python2 python-misaka))
15631
15632 (define-public python2-steadymark
15633 ;; This is forced into being a python2 only variant
15634 ;; due to its dependence on couleur that has no support
15635 ;; for python3
15636 (package
15637 (name "python2-steadymark")
15638 (version "0.7.3")
15639 (source
15640 (origin
15641 (method url-fetch)
15642 (uri (pypi-uri "steadymark" version))
15643 (sha256
15644 (base32
15645 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
15646 (build-system python-build-system)
15647 (native-inputs
15648 `(("python-couleur" ,python2-couleur)
15649 ("python-sure" ,python2-sure)
15650 ("python-misaka" ,python2-misaka)))
15651 (arguments
15652 `(#:python ,python-2
15653 #:phases
15654 (modify-phases %standard-phases
15655 (add-before 'build 'patch-setup-py
15656 (lambda _
15657 ;; Update requirements from dependency==version
15658 ;; to dependency>=version
15659 (substitute* "setup.py"
15660 (("==") ">="))
15661 #t)))))
15662 (home-page "https://github.com/gabrielfalcao/steadymark")
15663 (synopsis "Markdown-based test runner for python")
15664 (description
15665 "@code{Steadymark} allows documentation to be written in github-flavoured
15666 markdown. The documentation may contain snippets of code surrounded by python
15667 code blocks and @code{Steadymark} will find these snippets and run them, making
15668 sure that there are no old malfunctional examples in the documentation examples.")
15669 (license license:expat)))
15670
15671 (define-public python-nose-randomly
15672 (package
15673 (name "python-nose-randomly")
15674 (version "1.2.5")
15675 (source
15676 (origin
15677 (method url-fetch)
15678 (uri (pypi-uri "nose-randomly" version))
15679 (sha256
15680 (base32
15681 "1cw9dlr1zh3w4i438kin7z0rm8092ki52hayisyc43h9pcplq7rn"))))
15682 (build-system python-build-system)
15683 (native-inputs
15684 `(("python-nose" ,python-nose)
15685 ("python-numpy" ,python-numpy)))
15686 (home-page "https://github.com/adamchainz/nose-randomly")
15687 (synopsis
15688 "Nose plugin to randomly order tests and control random.seed")
15689 (description
15690 "This is a @code{Nose} plugin to randomly order tests which can be quite
15691 powerful in discovering hidden flaws in the tests themselves, while helping to
15692 reduce inter-test dependencies. It also helps in controlling @code{random.seed},
15693 by resetting it to a repeatable number for each test, enabling the tests to
15694 create data based on random numbers and yet remain repeatable.")
15695 (license license:bsd-3)))
15696
15697 (define-public python2-nose-randomly
15698 (package-with-python2 python-nose-randomly))
15699
15700 (define-public python-jsonpointer
15701 (package
15702 (name "python-jsonpointer")
15703 (version "1.10")
15704 (source
15705 (origin
15706 (method url-fetch)
15707 (uri (pypi-uri "jsonpointer" version))
15708 (sha256
15709 (base32
15710 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
15711 (build-system python-build-system)
15712 (home-page "https://github.com/stefankoegl/python-json-pointer")
15713 (synopsis "Identify specific nodes in a JSON document")
15714 (description "@code{jsonpointer} allows you to access specific nodes
15715 by path in a JSON document (see RFC 6901).")
15716 (license license:bsd-3)))
15717
15718 (define-public python2-jsonpointer
15719 (package-with-python2 python-jsonpointer))
15720
15721 (define-public python-jsonpatch
15722 (package
15723 (name "python-jsonpatch")
15724 (version "1.16")
15725 (source
15726 (origin
15727 (method url-fetch)
15728 ;; pypi version lacks tests.js
15729 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
15730 "archive/v" version ".tar.gz"))
15731 (file-name (string-append name "-" version ".tar.gz"))
15732 (sha256
15733 (base32
15734 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
15735 (build-system python-build-system)
15736 (native-inputs
15737 `(("python-jsonpointer" ,python-jsonpointer)))
15738 (home-page "https://github.com/stefankoegl/python-json-patch")
15739 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
15740 (description "@code{jsonpatch} is a library and program that allows
15741 applying JSON Patches according to RFC 6902.")
15742 (license license:bsd-3)))
15743
15744 (define-public python2-jsonpatch
15745 (package-with-python2 python-jsonpatch))
15746
15747 (define-public python-jsonpatch-0.4
15748 (package (inherit python-jsonpatch)
15749 (name "python-jsonpatch")
15750 (version "0.4")
15751 (source
15752 (origin
15753 (method url-fetch)
15754 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
15755 "archive/v" version ".tar.gz"))
15756 (file-name (string-append name "-" version ".tar.gz"))
15757 (sha256
15758 (base32
15759 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
15760
15761 (define-public python2-jsonpatch-0.4
15762 (package-with-python2 python-jsonpatch-0.4))
15763
15764 (define-public python-rfc3987
15765 (package
15766 (name "python-rfc3987")
15767 (version "1.3.7")
15768 (source
15769 (origin
15770 (method url-fetch)
15771 (uri (pypi-uri "rfc3987" version))
15772 (sha256
15773 (base32
15774 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
15775 (build-system python-build-system)
15776 (home-page "http://pypi.python.org/pypi/rfc3987")
15777 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
15778 (description "@code{rfc3987} provides routines for parsing and
15779 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
15780 (license license:gpl3+)))
15781
15782 (define-public python2-rfc3987
15783 (package-with-python2 python-rfc3987))
15784
15785 (define-public python-validate-email
15786 (package
15787 (name "python-validate-email")
15788 (version "1.3")
15789 (source
15790 (origin
15791 (method url-fetch)
15792 (uri (pypi-uri "validate_email" version))
15793 (sha256
15794 (base32
15795 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
15796 (build-system python-build-system)
15797 (home-page "http://github.com/syrusakbary/validate_email")
15798 (synopsis "Verifies if an email address is valid and really exists")
15799 (description "@code{validate_email} can be used to verify if an email
15800 address is valid and really exists.")
15801 (license license:lgpl3+)))
15802
15803 (define-public python2-validate-email
15804 (package-with-python2 python-validate-email))
15805
15806 (define-public python-flex
15807 (package
15808 (name "python-flex")
15809 (version "6.10.0")
15810 (source
15811 (origin
15812 (method url-fetch)
15813 (uri (pypi-uri "flex" version))
15814 (sha256
15815 (base32
15816 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
15817 (build-system python-build-system)
15818 (propagated-inputs
15819 `(("python-click" ,python-click)
15820 ("python-iso8601" ,python-iso8601)
15821 ("python-jsonpointer" ,python-jsonpointer)
15822 ("python-pyyaml" ,python-pyyaml)
15823 ("python-requests" ,python-requests)
15824 ("python-rfc3987" ,python-rfc3987)
15825 ("python-six" ,python-six)
15826 ("python-validate-email" ,python-validate-email)))
15827 (home-page "https://github.com/pipermerriam/flex")
15828 (synopsis "Validates Swagger schemata")
15829 (description "@code{flex} can be used to validate Swagger schemata.")
15830 (license license:bsd-3)))
15831
15832 (define-public python2-flex
15833 (package-with-python2 python-flex))
15834
15835 (define-public python-marshmallow
15836 (package
15837 (name "python-marshmallow")
15838 (version "3.0.0b3")
15839 (source
15840 (origin
15841 (method url-fetch)
15842 (uri (pypi-uri "marshmallow" version))
15843 (sha256
15844 (base32
15845 "07mcrij1yvk85lvgx44wwr9pc80xryghvlgayb057g1cazcypysd"))))
15846 (build-system python-build-system)
15847 (propagated-inputs
15848 `(("python-dateutil" ,python-dateutil)
15849 ("python-simplejson" ,python-simplejson)))
15850 (native-inputs
15851 `(("python-pytest-3.0" ,python-pytest-3.0)
15852 ("python-pytz" ,python-pytz)))
15853 (home-page "https://github.com/marshmallow-code/marshmallow")
15854 (synopsis "Convert complex datatypes to and from native
15855 Python datatypes.")
15856 (description "@code{marshmallow} provides a library for converting
15857 complex datatypes to and from native Python datatypes.")
15858 (license license:expat)))
15859
15860 (define-public python2-marshmallow
15861 (package-with-python2 python-marshmallow))
15862
15863 (define-public python-bottle
15864 (package
15865 (name "python-bottle")
15866 (version "0.12.13")
15867 (source
15868 (origin
15869 (method url-fetch)
15870 (uri (pypi-uri "bottle" version))
15871 (sha256
15872 (base32
15873 "0m9k2a7yxvggc4kw8fsvj381vgsvfcdshg5nzy6vwrxiw2p53drr"))))
15874 (build-system python-build-system)
15875 (home-page "http://bottlepy.org/")
15876 (synopsis "WSGI framework for small web-applications.")
15877 (description "@code{python-bottle} is a WSGI framework for small web-applications.")
15878 (license license:expat)))
15879
15880 (define-public python2-bottle
15881 (package-with-python2 python-bottle))
15882
15883 (define-public python-apispec
15884 (package
15885 (name "python-apispec")
15886 (version "0.22.0")
15887 (source
15888 (origin
15889 (method url-fetch)
15890 (uri (pypi-uri "apispec" version))
15891 (sha256
15892 (base32
15893 "0y3jxmgp2d24am3hxl40f5rw9abb0r8037sagax3dv64h4n1azwq"))))
15894 (build-system python-build-system)
15895 (propagated-inputs
15896 `(("python-pyyaml" ,python-pyyaml)))
15897 (native-inputs
15898 `(("python-pytest-3.0" ,python-pytest-3.0)
15899 ("python-flask" ,python-flask)
15900 ("python-marshmallow" ,python-marshmallow)
15901 ("python-tornado" ,python-tornado)
15902 ("python-bottle" ,python-bottle)
15903 ("python-mock" ,python-mock)))
15904 (home-page "https://github.com/marshmallow-code/apispec")
15905 (synopsis "Swagger 2.0 API specification generator")
15906 (description "@code{python-apispec} is a pluggable API specification
15907 generator. Currently supports the OpenAPI specification (f.k.a.
15908 Swagger 2.0).")
15909 (license license:expat)))
15910
15911 (define-public python2-apispec
15912 (package-with-python2 python-apispec))
15913
15914 (define-public python-flasgger
15915 (package
15916 (name "python-flasgger")
15917 (version "0.6.3")
15918 (source
15919 (origin
15920 (method url-fetch)
15921 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
15922 version ".tar.gz"))
15923 (file-name (string-append name "-" version ".tar.gz"))
15924 (sha256
15925 (base32
15926 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
15927 (build-system python-build-system)
15928 (arguments
15929 `(#:phases
15930 (modify-phases %standard-phases
15931 (replace 'check
15932 (lambda* (#:key inputs outputs #:allow-other-keys)
15933 (substitute* "Makefile"
15934 (("flake8 flasgger --ignore=F403")
15935 "flake8 flasgger --ignore=E731,F403"))
15936 (setenv "PYTHONPATH" (string-append (getcwd)
15937 ":"
15938 (getenv "PYTHONPATH")))
15939 (zero? (system* "py.test")))))))
15940 (propagated-inputs
15941 `(("python-flask" ,python-flask)
15942 ("python-pyyaml" ,python-pyyaml)
15943 ("python-jsonschema" ,python-jsonschema)
15944 ("python-mistune" ,python-mistune)
15945 ("python-six" ,python-six)))
15946 (native-inputs
15947 `(("python-decorator" ,python-decorator)
15948 ("python-flake8" ,python-flake8)
15949 ("python-flask-restful" ,python-flask-restful)
15950 ("python-flex" ,python-flex)
15951 ("python-pytest-3.0" ,python-pytest-3.0)
15952 ("python-pytest-cov" ,python-pytest-cov)
15953 ("python-marshmallow" ,python-marshmallow)
15954 ("python-apispec" ,python-apispec)))
15955 (home-page "https://github.com/rochacbruno/flasgger/")
15956 (synopsis "Extract Swagger specs from your Flask project")
15957 (description "@code{python-flasgger} allows extracting Swagger specs
15958 from your Flask project. It is a fork of Flask-Swagger.")
15959 (license license:expat)))
15960
15961 (define-public python2-flasgger
15962 (package-with-python2 python-flasgger))
15963
15964 (define-public python-swagger-spec-validator
15965 (package
15966 (name "python-swagger-spec-validator")
15967 (version "2.1.0")
15968 (source
15969 (origin
15970 (method url-fetch)
15971 (uri (pypi-uri "swagger-spec-validator" version))
15972 (sha256
15973 (base32
15974 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
15975 (build-system python-build-system)
15976 (propagated-inputs
15977 `(("python-jsonschema" ,python-jsonschema)
15978 ("python-six" ,python-six)))
15979 (home-page
15980 "http://github.com/Yelp/swagger_spec_validator")
15981 (synopsis "Validation of Swagger specifications")
15982 (description "@code{swagger_spec_validator} provides a library for
15983 validating Swagger API specifications.")
15984 (license license:asl2.0)))
15985
15986 (define-public python2-swagger-spec-validator
15987 (package-with-python2 python-swagger-spec-validator))
15988
15989 (define-public python-apache-libcloud
15990 (package
15991 (name "python-apache-libcloud")
15992 (version "2.0.0")
15993 (source
15994 (origin
15995 (method url-fetch)
15996 (uri (pypi-uri "apache-libcloud" version))
15997 (sha256
15998 (base32
15999 "1a71z02ckcxld72k4qgmdnkjan52c4wczncs3p2mp5yafh7dsan7"))))
16000 (build-system python-build-system)
16001 (arguments
16002 `(#:phases
16003 (modify-phases %standard-phases
16004 (add-after 'unpack 'patch-ssh
16005 (lambda* (#:key inputs #:allow-other-keys)
16006 (substitute* "libcloud/compute/ssh.py"
16007 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
16008 "/bin/ssh" "'")))
16009 #t))
16010 (add-after 'unpack 'patch-tests
16011 (lambda _
16012 (substitute* "./libcloud/test/test_file_fixtures.py"
16013 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
16014 (("def _ascii") "def _raw_data(self, method, url, body, headers):
16015 return (httplib.OK,
16016 \"1234abcd\",
16017 {\"test\": \"value\"},
16018 httplib.responses[httplib.OK])
16019 def _ascii"))
16020 (substitute* "libcloud/test/compute/test_ssh_client.py"
16021 (("class ShellOutSSHClientTests")
16022 "@unittest.skip(\"Guix container doesn't have ssh service\")
16023 class ShellOutSSHClientTests")
16024 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
16025 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
16026 (("'.xF0', '.x90', '.x8D', '.x88'")
16027 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
16028 #t)))))
16029 (inputs
16030 `(("openssh" ,openssh)))
16031 (propagated-inputs
16032 `(("python-paramiko" ,python-paramiko)
16033 ("python-requests" ,python-requests)))
16034 (native-inputs
16035 `(("python-lockfile" ,python-lockfile)
16036 ("python-mock" ,python-mock)
16037 ("python-requests-mock" ,python-requests-mock)))
16038 (home-page "https://libcloud.apache.org/")
16039 (synopsis "Unified Cloud API")
16040 (description "@code{libcloud} is a Python library for interacting with
16041 many of the popular cloud service providers using a unified API.")
16042 (license license:asl2.0)))
16043
16044 (define-public python2-apache-libcloud
16045 (package-with-python2 python-apache-libcloud))
16046
16047 (define-public python-smmap2
16048 (package
16049 (name "python-smmap2")
16050 (version "2.0.3")
16051 (source
16052 (origin
16053 (method url-fetch)
16054 (uri (pypi-uri "smmap2" version))
16055 (sha256
16056 (base32
16057 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
16058 (build-system python-build-system)
16059 (native-inputs
16060 `(("python-nosexcover" ,python-nosexcover)))
16061 (home-page "https://github.com/Byron/smmap")
16062 (synopsis "Python sliding window memory map manager")
16063 (description "@code{smmap2} is a pure Python implementation of a sliding
16064 window memory map manager.")
16065 (license license:bsd-3)))
16066
16067 (define-public python2-smmap2
16068 (package-with-python2 python-smmap2))
16069
16070 (define-public python-regex
16071 (package
16072 (name "python-regex")
16073 (version "2017.06.07")
16074 (source (origin
16075 (method url-fetch)
16076 (uri (pypi-uri "regex" version))
16077 (sha256
16078 (base32
16079 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
16080 (build-system python-build-system)
16081 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
16082 (synopsis "Alternative regular expression module")
16083 (description "This regular expression implementation is backwards-
16084 compatible with the standard @code{re} module, but offers additional
16085 functionality like full case-folding for case-insensitive matches in Unicode.")
16086 (license license:psfl)))
16087
16088 (define-public python2-regex
16089 (package-with-python2 python-regex))
16090
16091 (define-public python2-pyopengl
16092 (package
16093 (name "python2-pyopengl")
16094 (version "3.1.0")
16095 (source
16096 (origin
16097 (method url-fetch)
16098 (uri (pypi-uri "PyOpenGL" version))
16099 (sha256
16100 (base32
16101 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
16102 (arguments
16103 `(#:python ,python-2))
16104 (build-system python-build-system)
16105 (home-page "http://pyopengl.sourceforge.net")
16106 (synopsis "Standard OpenGL bindings for Python")
16107 (description
16108 "PyOpenGL is the most common cross platform Python binding to OpenGL and
16109 related APIs. The binding is created using the standard @code{ctypes}
16110 library.")
16111 (license license:bsd-3)))
16112
16113 (define-public python-rencode
16114 (package
16115 (name "python-rencode")
16116 (version "1.0.3")
16117 (source
16118 (origin
16119 (method url-fetch)
16120 (uri (pypi-uri "rencode" version))
16121 (sha256
16122 (base32
16123 "08if5yax1xn5yfp8p3765ccjmfcv9di7i4m5jckgnwvdsgznwkbj"))))
16124 (build-system python-build-system)
16125 (native-inputs `(("pkg-config" ,pkg-config)
16126 ("python-cython", python-cython)))
16127 (home-page "https://github.com/aresch/rencode")
16128 (synopsis "Serialization of heterogeneous data structures")
16129 (description
16130 "The @code{rencode} module is a data structure serialization library,
16131 similar to @code{bencode} from the BitTorrent project. For complex,
16132 heterogeneous data structures with many small elements, r-encoding stake up
16133 significantly less space than b-encodings. This version of rencode is a
16134 complete rewrite in Cython to attempt to increase the performance over the
16135 pure Python module.")
16136 (license license:bsd-3)))
16137
16138 (define-public python2-rencode
16139 (package-with-python2 python-rencode))
16140
16141 (define-public python-xenon
16142 (package
16143 (name "python-xenon")
16144 (version "0.5.1")
16145 (source
16146 (origin
16147 (method url-fetch)
16148 (uri (pypi-uri "xenon" version))
16149 (sha256
16150 (base32
16151 "14kby2y48vp3sgwxqlm5d5789yibqwb1qli5fwcmdqg3iayrbklc"))))
16152 (build-system python-build-system)
16153 (native-inputs
16154 `(("python-pyyaml" ,python-pyyaml)
16155 ("python-radon" ,python-radon)
16156 ("python-requests" ,python-requests)
16157 ("python-flake8" ,python-flake8)
16158 ("python-tox" ,python-tox)))
16159 (arguments
16160 `(#:phases
16161 (modify-phases %standard-phases
16162 (add-before 'build 'patch-test-requirements
16163 (lambda* (#:key inputs #:allow-other-keys)
16164 ;; Update requirements from dependency==version to
16165 ;; dependency>=version.
16166 (substitute* "requirements.txt"
16167 (("==") ">=")
16168 ((",<1.5.0") ""))
16169 ;; Remove httpretty dependency for tests.
16170 (substitute* "setup.py"
16171 (("httpretty") ""))
16172 #t)))))
16173 (home-page "https://xenon.readthedocs.org/")
16174 (synopsis "Monitor code metrics for Python on your CI server")
16175 (description
16176 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
16177 Ideally, @code{xenon} is run every time code is committed. Through command
16178 line options, various thresholds can be set for the complexity of code. It
16179 will fail (i.e. it will exit with a non-zero exit code) when any of these
16180 requirements is not met.")
16181 (license license:expat)))
16182
16183 (define-public python2-xenon
16184 (package-with-python2 python-xenon))
16185
16186 (define-public python-flask-principal
16187 (package
16188 (name "python-flask-principal")
16189 (version "0.4.0")
16190 (source
16191 (origin
16192 (method url-fetch)
16193 (uri (pypi-uri "Flask-Principal" version))
16194 (sha256
16195 (base32
16196 "0lwlr5smz8vfm5h9a9i7da3q1c24xqc6vm9jdywdpgxfbi5i7mpm"))))
16197 (build-system python-build-system)
16198 (propagated-inputs
16199 `(("python-blinker" ,python-blinker)))
16200 (native-inputs
16201 `(("python-flask" ,python-flask)
16202 ("python-nose" ,python-nose)))
16203 (home-page "http://packages.python.org/Flask-Principal/")
16204 (synopsis "Identity management for Flask")
16205 (description "@code{flask_principal} is a identity management library for
16206 Flask. It supports managing both authentication and authorization data in a
16207 thread-local variable.")
16208 (license license:expat)))
16209
16210 (define-public python2-flask-principal
16211 (package-with-python2 python-flask-principal))
16212
16213 (define-public python-flask-httpauth
16214 (package
16215 (name "python-flask-httpauth")
16216 (version "3.2.3")
16217 (source
16218 (origin
16219 (method url-fetch)
16220 (uri (pypi-uri "Flask-HTTPAuth" version))
16221 (sha256
16222 (base32
16223 "13gff5w1mqpzm5nccyg02v3ifb9ifqh5k866cssjhghhg6msfjsz"))))
16224 (build-system python-build-system)
16225 (native-inputs
16226 `(("python-flask" ,python-flask)))
16227 (home-page "http://github.com/miguelgrinberg/flask-httpauth/")
16228 (synopsis "Basic and Digest HTTP authentication for Flask routes")
16229 (description "@code{flask_httpauth} provides Basic and Digest HTTP
16230 authentication for Flask routes.")
16231 (license license:expat)))
16232
16233 (define-public python2-flask-httpauth
16234 (package-with-python2 python-flask-httpauth))
16235
16236 (define-public python-pysocks
16237 (package
16238 (name "python-pysocks")
16239 (version "1.6.7")
16240 (source
16241 (origin
16242 (method url-fetch)
16243 (uri (pypi-uri "PySocks" version))
16244 (sha256
16245 (base32
16246 "1krkiss578zqwcg4c8iqz1hwscwhsvy2djp3xyvps5gsgvr2j0yh"))))
16247 (build-system python-build-system)
16248 (arguments `(#:tests? #f))
16249 (home-page "https://github.com/Anorov/PySocks")
16250 (synopsis "SOCKS client module")
16251 (description "@code{pysocks} is an updated and semi-actively maintained
16252 version of @code{SocksiPy} with bug fixes and extra features.")
16253 (license license:bsd-3)))
16254
16255 (define-public python2-pysocks
16256 (package-with-python2 python-pysocks))
16257
16258 (define-public python-pyaes
16259 (package
16260 (name "python-pyaes")
16261 (version "1.6.0")
16262 (source
16263 (origin
16264 (method url-fetch)
16265 (uri (pypi-uri "pyaes" version))
16266 (sha256
16267 (base32
16268 "0bp9bjqy1n6ij1zb86wz9lqa1dhla8qr1d7w2kxyn7jbj56sbmcw"))))
16269 (build-system python-build-system)
16270 (home-page "https://github.com/ricmoo/pyaes")
16271 (synopsis "Implementation of AES in Python")
16272 (description "This package contains a pure-Python implementation of the
16273 AES block cipher algorithm and the common modes of operation (CBC, CFB, CTR,
16274 ECB and OFB).")
16275 (license license:expat)))
16276
16277 (define-public python2-pyaes
16278 (package-with-python2 python-pyaes))
16279
16280 (define-public python-uritemplate
16281 (package
16282 (name "python-uritemplate")
16283 (version "3.0.0")
16284 (source
16285 (origin
16286 (method url-fetch)
16287 (uri (pypi-uri "uritemplate" version))
16288 (sha256
16289 (base32
16290 "0781gm9g34wa0asc19dx81ng0nqq07igzv3bbvdqmz13pv7469n0"))))
16291 (build-system python-build-system)
16292 (home-page "https://uritemplate.readthedocs.org")
16293 (synopsis "Library to deal with URI Templates")
16294 (description "@code{uritemplate} provides Python library to deal with URI
16295 Templates.")
16296 (license license:bsd-2)))
16297
16298 (define-public python2-uritemplate
16299 (package-with-python2 python-uritemplate))