gnu: snakemake: Update to 4.2.0.
[jackhill/guix/guix.git] / gnu / packages / python.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016, 2017 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015, 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, 2017 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, 2017 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 ng0 <ng0@infotropique.org>
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-humanfriendly
1103 (package
1104 (name "python-humanfriendly")
1105 (version "4.4.1")
1106 (source
1107 (origin
1108 (method url-fetch)
1109 (uri (pypi-uri "humanfriendly" version))
1110 (sha256
1111 (base32
1112 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
1113 (build-system python-build-system)
1114 (arguments
1115 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1116 #:tests? #f))
1117 (propagated-inputs
1118 `(("python-monotonic" ,python-monotonic)))
1119 (home-page "https://humanfriendly.readthedocs.io")
1120 (synopsis "Human-friendly input and output in Python")
1121 (description
1122 "The functions and classes in @code{humanfriendly} can be used to make
1123 text interfaces more user-friendly. It includes tools to parse and format
1124 numbers, file sizes, and timespans, timers for long-running operations, menus
1125 to allow the user to choose from a list of options, and terminal interaction
1126 helpers.")
1127 (license license:expat)))
1128
1129 (define-public python2-humanfriendly
1130 (package-with-python2 python-humanfriendly))
1131
1132 (define-public python-capturer
1133 (package
1134 (name "python-capturer")
1135 (version "2.4")
1136 (source
1137 (origin
1138 (method url-fetch)
1139 (uri (pypi-uri "capturer" version))
1140 (sha256
1141 (base32
1142 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1143 (build-system python-build-system)
1144 (arguments
1145 `(#:tests? #f))
1146 (propagated-inputs
1147 `(("python-humanfriendly" ,python-humanfriendly)))
1148 (home-page "https://capturer.readthedocs.io")
1149 (synopsis "Capture stdout and stderr streams of the current process")
1150 (description
1151 "The capturer package makes it easy to capture the stdout and stderr
1152 streams of the current process and subprocesses. Output can be relayed
1153 to the terminal in real time but is also available to the Python program
1154 for additional processing.")
1155 (license license:expat)))
1156
1157 (define-public python2-capturer
1158 (package-with-python2 python-capturer))
1159
1160 (define-public python-verboselogs
1161 (package
1162 (name "python-verboselogs")
1163 (version "1.7")
1164 (source
1165 (origin
1166 (method url-fetch)
1167 (uri (pypi-uri "verboselogs" version))
1168 (sha256
1169 (base32
1170 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1171 (build-system python-build-system)
1172 (native-inputs
1173 `(("python-mock" ,python-mock)
1174 ("python-astroid" ,python-astroid)
1175 ("python-pylint" ,python-pylint)))
1176 (home-page "https://verboselogs.readthedocs.io")
1177 (synopsis "Verbose logging level for Python's logging module")
1178 (description
1179 "The @code{verboselogs} package extends Python's @code{logging} module to
1180 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1181 (license license:expat)))
1182
1183 (define-public python2-verboselogs
1184 (package-with-python2 python-verboselogs))
1185
1186 (define-public python-coloredlogs
1187 (package
1188 (name "python-coloredlogs")
1189 (version "7.3")
1190 (source
1191 (origin
1192 (method url-fetch)
1193 (uri (pypi-uri "coloredlogs" version))
1194 (sha256
1195 (base32
1196 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
1197 (build-system python-build-system)
1198 (arguments
1199 `(;Tests require some updated modules
1200 #:tests? #f))
1201 (propagated-inputs
1202 `(("python-capturer" ,python-capturer)))
1203 (home-page "https://coloredlogs.readthedocs.io")
1204 (synopsis "Colored stream handler for Python's logging module")
1205 (description
1206 "The @code{coloredlogs} package enables colored terminal output for
1207 Python's logging module. The @code{ColoredFormatter} class inherits from
1208 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
1209 messages in color.")
1210 (license license:expat)))
1211
1212 (define-public python2-coloredlogs
1213 (package-with-python2 python-coloredlogs))
1214
1215 (define-public python-eventlet
1216 (package
1217 (name "python-eventlet")
1218 (version "0.20.1")
1219 (source
1220 (origin
1221 (method url-fetch)
1222 (uri (pypi-uri "eventlet" version))
1223 (sha256
1224 (base32
1225 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1226 (build-system python-build-system)
1227 (propagated-inputs
1228 `(("python-greenlet" ,python-greenlet)))
1229 (arguments
1230 ;; TODO: Requires unpackaged 'enum-compat'.
1231 '(#:tests? #f))
1232 (home-page "http://eventlet.net")
1233 (synopsis "Concurrent networking library for Python")
1234 (description
1235 "Eventlet is a concurrent networking library for Python that
1236 allows you to change how you run your code, not how you write it.
1237 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1238 Coroutines ensure that the developer uses a blocking style of programming
1239 that is similar to threading, but provide the benefits of non-blocking I/O.
1240 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1241 from the Python interpreter, or as a small part of a larger application.")
1242 (license license:expat)))
1243
1244 (define-public python2-eventlet
1245 (let ((base (package-with-python2
1246 (strip-python2-variant python-eventlet))))
1247 (package (inherit base)
1248 (propagated-inputs
1249 `(("python2-enum34" ,python2-enum34)
1250 ,@(package-propagated-inputs base))))))
1251
1252 (define-public python-keyring
1253 (package
1254 (name "python-keyring")
1255 (version "8.7")
1256 (source
1257 (origin
1258 (method url-fetch)
1259 (uri (pypi-uri "keyring" version))
1260 (sha256
1261 (base32
1262 "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
1263 (build-system python-build-system)
1264 (native-inputs
1265 `(("python-setuptools-scm" ,python-setuptools-scm)))
1266 (propagated-inputs
1267 `(("python-pycrypto" ,python-pycrypto)))
1268 (arguments
1269 `(#:tests? #f)) ;TODO: tests require pytest
1270 (home-page "https://github.com/jaraco/keyring")
1271 (synopsis "Store and access your passwords safely")
1272 (description
1273 "The Python keyring lib provides a easy way to access the system keyring
1274 service from python. It can be used in any application that needs safe
1275 password storage.")
1276 ;; "MIT" and PSF dual license
1277 (license license:x11)))
1278
1279 (define-public python2-keyring
1280 (package-with-python2 python-keyring))
1281
1282 (define-public python-six
1283 (package
1284 (name "python-six")
1285 (version "1.10.0")
1286 (source
1287 (origin
1288 (method url-fetch)
1289 (uri (pypi-uri "six" version))
1290 (sha256
1291 (base32
1292 "0snmb8xffb3vsma0z67i0h0w2g2dy0p3gsgh9gi4i0kgc5l8spqh"))))
1293 (build-system python-build-system)
1294 (native-inputs
1295 `(("python-py" ,python-py)
1296 ("python-pytest" ,python-pytest)))
1297 (home-page "http://pypi.python.org/pypi/six/")
1298 (synopsis "Python 2 and 3 compatibility utilities")
1299 (description
1300 "Six is a Python 2 and 3 compatibility library. It provides utility
1301 functions for smoothing over the differences between the Python versions with
1302 the goal of writing Python code that is compatible on both Python versions.
1303 Six supports every Python version since 2.5. It is contained in only one
1304 Python file, so it can be easily copied into your project.")
1305 (license license:x11)))
1306
1307 (define-public python2-six
1308 (package-with-python2 python-six))
1309
1310 (define-public python-dateutil
1311 (package
1312 (name "python-dateutil")
1313 (version "2.6.0")
1314 (source
1315 (origin
1316 (method url-fetch)
1317 (uri (pypi-uri "python-dateutil" version))
1318 (sha256
1319 (base32
1320 "1lhq0hxjc3cfha101q02ld5ijlpfyjn2w1yh7wvpiy367pgzi8k2"))))
1321 (build-system python-build-system)
1322 (propagated-inputs
1323 `(("python-six" ,python-six)))
1324 (home-page "https://dateutil.readthedocs.io/en/stable/")
1325 (synopsis "Extensions to the standard datetime module")
1326 (description
1327 "The dateutil module provides powerful extensions to the standard
1328 datetime module, available in Python 2.3+.")
1329 (license license:bsd-3)))
1330
1331 (define-public python2-dateutil
1332 (package-with-python2 python-dateutil))
1333
1334 (define-public python-parsedatetime
1335 (package
1336 (name "python-parsedatetime")
1337 (version "2.4")
1338 (source
1339 (origin
1340 (method url-fetch)
1341 (uri (pypi-uri "parsedatetime" version))
1342 (sha256
1343 (base32
1344 "0jxqkjks7z9dn222cqgvskp4wr6d92aglinxq7pd2w4mzdc7r09x"))))
1345 (build-system python-build-system)
1346 (native-inputs
1347 `(("python-nose" ,python-nose)
1348 ("python-pyicu" ,python-pyicu)
1349 ("python-pytest" ,python-pytest)
1350 ("python-pytest-runner" ,python-pytest-runner)))
1351 (propagated-inputs
1352 `(("python-future" ,python-future)))
1353 (home-page "https://github.com/bear/parsedatetime/")
1354 (synopsis
1355 "Parse human-readable date/time text")
1356 (description
1357 "Parse human-readable date/time text.")
1358 (license license:asl2.0)))
1359
1360 (define-public python2-parsedatetime
1361 (package-with-python2 python-parsedatetime))
1362
1363 (define-public python-schedule
1364 (package
1365 (name "python-schedule")
1366 (version "0.4.3")
1367 (source
1368 (origin
1369 (method url-fetch)
1370 (uri (pypi-uri "schedule" version))
1371 (sha256
1372 (base32
1373 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1374 (build-system python-build-system)
1375 (native-inputs
1376 `(("python-pytest" ,python-pytest)
1377 ("python-mock" ,python-mock)))
1378 (home-page "https://github.com/dbader/schedule")
1379 (synopsis "Schedule periodic function calls in Python")
1380 (description
1381 "Schedule is an in-process scheduler for periodic jobs that uses the
1382 builder pattern for configuration. Schedule lets you run Python functions (or
1383 any other callable) periodically at pre-determined intervals using a simple,
1384 human-friendly syntax.")
1385 (license license:expat)))
1386
1387 (define-public python2-schedule
1388 (package-with-python2 python-schedule))
1389
1390 (define-public python-pandas
1391 (package
1392 (name "python-pandas")
1393 (version "0.19.2")
1394 (source
1395 (origin
1396 (method url-fetch)
1397 (uri (pypi-uri "pandas" version))
1398 (sha256
1399 (base32 "0540cnbwy2hc4hv2sxfs8i47xi91qzvzxfn80dl785ibiicly3vg"))
1400 (patches
1401 (search-patches "python-pandas-skip-failing-tests.patch"))))
1402 (build-system python-build-system)
1403 (propagated-inputs
1404 `(("python-numpy" ,python-numpy)
1405 ("python-pytz" ,python-pytz)
1406 ("python-dateutil" ,python-dateutil)))
1407 (native-inputs
1408 `(("python-nose" ,python-nose)
1409 ("python-cython" ,python-cython)))
1410 (home-page "http://pandas.pydata.org")
1411 (synopsis "Data structures for data analysis, time series, and statistics")
1412 (description
1413 "Pandas is a Python package providing fast, flexible, and expressive data
1414 structures designed to make working with structured (tabular,
1415 multidimensional, potentially heterogeneous) and time series data both easy
1416 and intuitive. It aims to be the fundamental high-level building block for
1417 doing practical, real world data analysis in Python.")
1418 (license license:bsd-3)))
1419
1420 (define-public python2-pandas
1421 (package-with-python2 python-pandas))
1422
1423 (define-public python-tzlocal
1424 (package
1425 (name "python-tzlocal")
1426 (version "1.2.2")
1427 (source
1428 (origin
1429 (method url-fetch)
1430 (uri (pypi-uri "tzlocal" version))
1431 (sha256
1432 (base32
1433 "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
1434 (build-system python-build-system)
1435 (propagated-inputs
1436 `(("python-pytz" ,python-pytz)))
1437 (home-page "https://github.com/regebro/tzlocal")
1438 (synopsis
1439 "Local timezone information for Python")
1440 (description
1441 "Tzlocal returns a tzinfo object with the local timezone information.
1442 This module attempts to fix a glaring hole in pytz, that there is no way to
1443 get the local timezone information, unless you know the zoneinfo name, and
1444 under several distributions that's hard or impossible to figure out.")
1445 (license license:cc0)))
1446
1447 (define-public python2-pysqlite
1448 (package
1449 (name "python2-pysqlite")
1450 (version "2.8.3")
1451 (source
1452 (origin
1453 (method url-fetch)
1454 (uri (pypi-uri "pysqlite" version))
1455 (sha256
1456 (base32
1457 "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
1458 (build-system python-build-system)
1459 (inputs
1460 `(("sqlite" ,sqlite)))
1461 (arguments
1462 `(#:python ,python-2 ; incompatible with Python 3
1463 #:tests? #f)) ; no test target
1464 (home-page "https://github.com/ghaering/pysqlite")
1465 (synopsis "SQLite bindings for Python")
1466 (description
1467 "Pysqlite provides SQLite bindings for Python that comply to the
1468 Database API 2.0T.")
1469 (license license:zlib)))
1470
1471
1472 (define-public python2-mechanize
1473 (package
1474 (name "python2-mechanize")
1475 (version "0.2.5")
1476 (source
1477 (origin
1478 (method url-fetch)
1479 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1480 version ".tar.gz"))
1481 (sha256
1482 (base32
1483 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1484 (build-system python-build-system)
1485 (arguments
1486 `(#:python ,python-2 ; apparently incompatible with Python 3
1487 #:tests? #f))
1488 ;; test fails with message
1489 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1490 ;; (python-3.3.2) or
1491 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1492 ;; (python-2.7.5).
1493 ;; The source code is from March 2011 and probably not up-to-date
1494 ;; with respect to python unit tests.
1495 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1496 (synopsis
1497 "Stateful programmatic web browsing in Python")
1498 (description
1499 "Mechanize implements stateful programmatic web browsing in Python,
1500 after Andy Lester’s Perl module WWW::Mechanize.")
1501 (license (license:non-copyleft
1502 "file://COPYING"
1503 "See COPYING in the distribution."))))
1504
1505
1506 (define-public python-simplejson
1507 (package
1508 (name "python-simplejson")
1509 (version "3.10.0")
1510 (source
1511 (origin
1512 (method url-fetch)
1513 (uri (pypi-uri "simplejson" version))
1514 (sha256
1515 (base32
1516 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
1517 (build-system python-build-system)
1518 (home-page "http://simplejson.readthedocs.org/en/latest/")
1519 (synopsis
1520 "Json library for Python")
1521 (description
1522 "JSON (JavaScript Object Notation) is a subset of JavaScript
1523 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1524 format.
1525
1526 Simplejson exposes an API familiar to users of the standard library marshal
1527 and pickle modules. It is the externally maintained version of the json
1528 library contained in Python 2.6, but maintains compatibility with Python 2.5
1529 and (currently) has significant performance advantages, even without using
1530 the optional C extension for speedups. Simplejson is also supported on
1531 Python 3.3+.")
1532 (license license:x11)))
1533
1534 (define-public python2-simplejson
1535 (package-with-python2 python-simplejson))
1536
1537
1538 (define-public python-pyicu
1539 (package
1540 (name "python-pyicu")
1541 (version "1.9.5")
1542 (source
1543 (origin
1544 (method url-fetch)
1545 (uri (pypi-uri "PyICU" version))
1546 (sha256
1547 (base32
1548 "16rmxy9y0qhqqna2v49i7nzwm09as699rbyvh4raw7w602w55c3k"))))
1549 (build-system python-build-system)
1550 (arguments
1551 '(#:phases
1552 (modify-phases %standard-phases
1553 (add-before 'check 'delete-failing-test
1554 (lambda _
1555 ;; XXX: These tests require locales that are unavailable
1556 ;; in the build environment.
1557 (delete-file "test/test_DateTimeParserGenerator.py")
1558 #t)))))
1559 (inputs
1560 `(("icu4c" ,icu4c)))
1561 (home-page "http://pyicu.osafoundation.org/")
1562 (synopsis "Python extension wrapping the ICU C++ API")
1563 (description
1564 "PyICU is a python extension wrapping the ICU C++ API.")
1565 (license license:x11)))
1566
1567 (define-public python2-pyicu
1568 (package-with-python2 python-pyicu))
1569
1570 (define-public python2-dogtail
1571 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1572 ;; spaces in indentation" with Python 3.
1573 (package
1574 (name "python2-dogtail")
1575 (version "0.9.9")
1576 (source (origin
1577 (method url-fetch)
1578 (uri (pypi-uri "dogtail" version))
1579 (sha256
1580 (base32
1581 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1582 (build-system python-build-system)
1583 (arguments `(#:python ,python-2
1584 #:tests? #f)) ; invalid command "test"
1585 ;; Currently no offical homepage.
1586 (home-page "https://pypi.python.org/pypi/dogtail/")
1587 (synopsis "GUI test tool and automation framework written in Python")
1588 (description
1589 "Dogtail is a GUI test tool and automation framework written in Python.
1590 It uses Accessibility (a11y) technologies to communicate with desktop
1591 applications. dogtail scripts are written in Python and executed like any
1592 other Python program.")
1593 (license license:gpl2+)))
1594
1595 (define-public python2-empy
1596 (package
1597 (name "python2-empy")
1598 (version "3.3")
1599 (source (origin
1600 (method url-fetch)
1601 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1602 version ".tar.gz"))
1603 (sha256
1604 (base32
1605 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1606 (build-system python-build-system)
1607 (arguments
1608 `(#:python ,python-2
1609 #:phases
1610 (modify-phases %standard-phases
1611 (replace 'check
1612 (lambda _
1613 (zero? (system* "./test.sh")))))))
1614 (home-page "http://www.alcyone.com/software/empy/")
1615 (synopsis "Templating system for Python")
1616 (description
1617 "EmPy is a system for embedding Python expressions and statements in
1618 template text; it takes an EmPy source file, processes it, and produces
1619 output. This is accomplished via expansions, which are special signals to the
1620 EmPy system and are set off by a special prefix (by default the at sign, @@).
1621 EmPy can expand arbitrary Python expressions and statements in this way, as
1622 well as a variety of special forms. Textual data not explicitly delimited in
1623 this way is sent unaffected to the output, allowing Python to be used in
1624 effect as a markup language. Also supported are callbacks via hooks,
1625 recording and playback via diversions, and dynamic, chainable filters. The
1626 system is highly configurable via command line options and embedded
1627 commands.")
1628 (license license:lgpl2.1+)))
1629
1630 (define-public python2-element-tree
1631 (package
1632 (name "python2-element-tree")
1633 (version "1.2.6")
1634 (source (origin
1635 (method url-fetch)
1636 (uri (string-append
1637 "http://effbot.org/media/downloads/elementtree-"
1638 version "-20050316.tar.gz"))
1639 (sha256
1640 (base32
1641 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1642 (build-system python-build-system)
1643 (arguments
1644 `(#:python ,python-2 ; seems to be part of Python 3
1645 #:tests? #f)) ; no 'test' sub-command
1646 (synopsis "Toolkit for XML processing in Python")
1647 (description
1648 "ElementTree is a Python library supporting lightweight XML processing.")
1649 (home-page "http://effbot.org/zone/element-index.htm")
1650 (license (license:x11-style
1651 "http://docs.python.org/2/license.html"
1652 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1653
1654 (define-public python2-pybugz
1655 (package
1656 (name "python2-pybugz")
1657 (version "0.6.11")
1658 (source (origin
1659 (method url-fetch)
1660 (uri (string-append
1661 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1662 version ".tar.gz"))
1663 (sha256
1664 (base32
1665 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1666 (patches (search-patches "pybugz-stty.patch"
1667 "pybugz-encode-error.patch"))))
1668 (build-system python-build-system)
1669 (arguments
1670 `(#:python ,python-2 ; SyntaxError with Python 3
1671 #:tests? #f)) ; no 'test' sub-command
1672 (propagated-inputs
1673 `(("element-tree" ,python2-element-tree)))
1674 (synopsis "Python and command-line interface to Bugzilla")
1675 (description
1676 "PyBugz is a Python library and command-line tool to query the Bugzilla
1677 bug tracking system. It is meant as an aid to speed up interaction with the
1678 bug tracker.")
1679 (home-page "http://www.liquidx.net/pybugz/")
1680 (license license:gpl2)))
1681
1682 (define-public python-enum34
1683 (package
1684 (name "python-enum34")
1685 (version "1.1.6")
1686 (source
1687 (origin
1688 (method url-fetch)
1689 (uri (pypi-uri "enum34" version))
1690 (sha256
1691 (base32
1692 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1693 (build-system python-build-system)
1694 (home-page "https://pypi.python.org/pypi/enum34")
1695 (synopsis "Backported Python 3.4 Enum")
1696 (description
1697 "Enum34 is the new Python stdlib enum module available in Python 3.4
1698 backported for previous versions of Python from 2.4 to 3.3.")
1699 (license license:bsd-3)))
1700
1701 (define-public python2-enum34
1702 (package-with-python2 python-enum34))
1703
1704 (define-public python-parse-type
1705 (package
1706 (name "python-parse-type")
1707 (version "0.3.4")
1708 (source
1709 (origin
1710 (method url-fetch)
1711 (uri (string-append "https://pypi.python.org/packages/source/p/"
1712 "parse_type/parse_type-" version ".tar.gz"))
1713 (sha256
1714 (base32
1715 "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
1716 (build-system python-build-system)
1717 (arguments
1718 `(#:phases
1719 (modify-phases %standard-phases
1720 (add-after 'unpack 'patch-tests
1721 (lambda _
1722 (substitute* "tests/test_parse_type_parse.py"
1723 ;; Newer Python versions don't have the problem this test tests.
1724 (("self[.]assertRaises[(]parse.TooManyFields, p.parse, ''[)]")
1725 ""))
1726 #t)))))
1727 (propagated-inputs
1728 `(("python-six" ,python-six)
1729 ("python-parse" ,python-parse)))
1730 (native-inputs
1731 `(("python-pytest" ,python-pytest)
1732 ("python-pytest-runner" ,python-pytest-runner)))
1733 (home-page "https://github.com/jenisys/parse_type")
1734 (synopsis "Extended parse module")
1735 (description
1736 "Parse_type extends the python parse module.")
1737 (properties
1738 `((python2-variant . ,(delay python2-parse-type))))
1739 (license license:bsd-3)))
1740
1741 (define-public python2-parse-type
1742 (let ((base (package-with-python2
1743 (strip-python2-variant python-parse-type))))
1744 (package (inherit base)
1745 (propagated-inputs
1746 `(("python2-enum34" ,python2-enum34)
1747 ,@(package-propagated-inputs base))))))
1748
1749 (define-public python-parse
1750 (package
1751 (name "python-parse")
1752 (version "1.6.6")
1753 (source
1754 (origin
1755 (method url-fetch)
1756 (uri (pypi-uri "parse" version))
1757 (sha256
1758 (base32
1759 "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))
1760 (patches (search-patches "python-parse-too-many-fields.patch"))))
1761 (build-system python-build-system)
1762 (arguments
1763 `(#:phases
1764 (modify-phases %standard-phases
1765 (replace 'check
1766 (lambda _ (zero? (system* "python" "test_parse.py")))))))
1767 (home-page "https://github.com/r1chardj0n3s/parse")
1768 (synopsis "Parse strings")
1769 (description
1770 "Parse strings using a specification based on the Python format()
1771 syntax.")
1772 (license license:x11)))
1773
1774 (define-public python-polib
1775 (package
1776 (name "python-polib")
1777 (version "1.0.8")
1778 (source (origin
1779 (method url-fetch)
1780 (uri (pypi-uri "polib" version))
1781 (sha256
1782 (base32
1783 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1784 (build-system python-build-system)
1785 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1786 (synopsis "Manipulate, create and modify gettext files")
1787 (description "Polib can manipulate any gettext format (po, pot and mo)
1788 files. It can be used to create po files from scratch or to modify
1789 existing ones.")
1790 (license license:expat)))
1791
1792 (define-public python2-polib
1793 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1794 (package
1795 (inherit base)
1796 (arguments `(,@(package-arguments base)
1797 ;; Tests don't work with python2.
1798 #:tests? #f)))))
1799
1800 (define-public scons
1801 (package
1802 (name "scons")
1803 (version "2.5.1")
1804 (source (origin
1805 (method url-fetch)
1806 (uri (string-append "mirror://sourceforge/scons/scons/" version
1807 "/scons-" version ".tar.gz"))
1808 (sha256
1809 (base32
1810 "1wji1z9jdkhnmm99apx6fhld9cs52rr56aigniyrcsmlwy52298b"))))
1811 (build-system python-build-system)
1812 (arguments
1813 ;; With Python 3.x, fails to build with a syntax error.
1814 `(#:python ,python-2
1815 #:use-setuptools? #f ; still relies on distutils
1816 #:tests? #f)) ; no 'python setup.py test' command
1817 (home-page "http://scons.org/")
1818 (synopsis "Software construction tool written in Python")
1819 (description
1820 "SCons is a software construction tool. Think of SCons as an improved,
1821 cross-platform substitute for the classic Make utility with integrated
1822 functionality similar to autoconf/automake and compiler caches such as ccache.
1823 In short, SCons is an easier, more reliable and faster way to build
1824 software.")
1825 (license license:x11)))
1826
1827 (define-public python-extras
1828 (package
1829 (name "python-extras")
1830 (version "0.0.3")
1831 (source
1832 (origin
1833 (method url-fetch)
1834 (uri (string-append
1835 "https://pypi.python.org/packages/source/e/extras/extras-"
1836 version ".tar.gz"))
1837 (sha256
1838 (base32
1839 "1h7zx4dfyclalg0fqnfjijpn0f793a9mx8sy3b27gd31nr6dhq3s"))))
1840 (build-system python-build-system)
1841 (arguments
1842 ;; error in setup.cfg: command 'test' has no such option 'buffer'
1843 '(#:tests? #f))
1844 (home-page "https://github.com/testing-cabal/extras")
1845 (synopsis "Useful extensions to the Python standard library")
1846 (description
1847 "Extras is a set of extensions to the Python standard library.")
1848 (license license:expat)))
1849
1850 (define-public python2-extras
1851 (package-with-python2 python-extras))
1852
1853 (define-public python-mimeparse
1854 (package
1855 (name "python-mimeparse")
1856 (version "0.1.4")
1857 (source
1858 (origin
1859 (method url-fetch)
1860 (uri (string-append
1861 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1862 version ".tar.gz"))
1863 (sha256
1864 (base32
1865 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1866 (build-system python-build-system)
1867 (arguments
1868 '(#:tests? #f)) ; no setup.py test command
1869 (home-page
1870 "https://github.com/dbtsai/python-mimeparse")
1871 (synopsis "Python library for parsing MIME types")
1872 (description
1873 "Mimeparse provides basic functions for parsing MIME type names and
1874 matching them against a list of media-ranges.")
1875 (license license:expat)))
1876
1877 (define-public python2-mimeparse
1878 (package-with-python2 python-mimeparse))
1879
1880 (define-public python-nose
1881 (package
1882 (name "python-nose")
1883 (version "1.3.7")
1884 (source
1885 (origin
1886 (method url-fetch)
1887 (uri (pypi-uri "nose" version))
1888 (sha256
1889 (base32
1890 "164a43k7k2wsqqk1s6vavcdamvss4mz0vd6pwzv2h9n8rgwzxgzi"))))
1891 (build-system python-build-system)
1892 (arguments
1893 '(#:tests? #f)) ; FIXME: test suite fails
1894 (home-page "http://readthedocs.org/docs/nose/")
1895 (synopsis "Python testing library")
1896 (description
1897 "Nose extends the unittest library to make testing easier.")
1898 (license license:lgpl2.0+)))
1899
1900 (define-public python2-nose
1901 (package-with-python2 python-nose))
1902
1903 (define-public python-nose2
1904 (package
1905 (name "python-nose2")
1906 (version "0.6.5")
1907 (source
1908 (origin
1909 (method url-fetch)
1910 (uri (pypi-uri "nose2" version))
1911 (sha256
1912 (base32
1913 "1x4zjq1zlyrh8b9ba0cmafd3w94pxhid408kibyjd3s6h1lap6s7"))))
1914 (build-system python-build-system)
1915 (arguments `(#:tests? #f)) ; 'module' object has no attribute 'collector'
1916 (propagated-inputs
1917 `(("python-cov-core" ,python-cov-core)
1918 ("python-pytest-cov" ,python-pytest-cov)
1919 ("python-six" ,python-six)))
1920 (home-page "https://github.com/nose-devs/nose2")
1921 (synopsis "Next generation of nicer testing for Python")
1922 (description
1923 "Nose2 is the next generation of nicer testing for Python, based on the
1924 plugins branch of unittest2. Nose2 aims to improve on nose by providing a
1925 better plugin api, being easier for users to configure, and simplifying internal
1926 interfaces and processes.")
1927 (license license:bsd-2)))
1928
1929 (define-public python2-nose2
1930 (package-with-python2 python-nose2))
1931
1932 (define-public python-unittest2
1933 (package
1934 (name "python-unittest2")
1935 (version "0.5.1")
1936 (source
1937 (origin
1938 (method url-fetch)
1939 (uri (string-append
1940 "https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
1941 version ".tar.gz"))
1942 (sha256
1943 (base32
1944 "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
1945 (build-system python-build-system)
1946 (home-page "http://pypi.python.org/pypi/unittest2")
1947 (synopsis "Python unit testing library")
1948 (description
1949 "Unittest2 is a replacement for the unittest module in the Python
1950 standard library.")
1951 (license license:psfl)))
1952
1953 (define-public python2-unittest2
1954 (package (inherit python-unittest2)
1955 (name "python2-unittest2")
1956 (version "1.1.0")
1957 (source
1958 (origin
1959 (method url-fetch)
1960 (uri (string-append
1961 "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
1962 version ".tar.gz"))
1963 (sha256
1964 (base32
1965 "0y855kmx7a8rnf81d3lh5lyxai1908xjp0laf4glwa4c8472m212"))
1966 (patches
1967 (search-patches "python2-unittest2-remove-argparse.patch"))))
1968 (propagated-inputs
1969 `(("python2-six" ,python2-six)
1970 ("python2-traceback2" ,python2-traceback2)))
1971 (arguments
1972 `(#:python ,python-2
1973 #:tests? #f)))) ; no setup.py test command
1974
1975 (define-public python-pafy
1976 (package
1977 (name "python-pafy")
1978 (version "0.5.3.1")
1979 (source
1980 (origin
1981 (method url-fetch)
1982 (uri (pypi-uri "pafy" version))
1983 (sha256
1984 (base32
1985 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1986 (build-system python-build-system)
1987 (arguments
1988 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1989 (propagated-inputs
1990 ;; Youtube-dl is a python package which is imported in the file
1991 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1992 `(("youtube-dl" ,youtube-dl)))
1993 (home-page "https://np1.github.io/pafy/")
1994 (synopsis "Retrieve YouTube content and metadata")
1995 (description
1996 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1997 (license license:lgpl3+)))
1998
1999 (define-public python-py
2000 (package
2001 (name "python-py")
2002 (version "1.4.32")
2003 (source
2004 (origin
2005 (method url-fetch)
2006 (uri (pypi-uri "py" version))
2007 (sha256
2008 (base32
2009 "19s1pql9pq85h1qzsdwgyb8a3k1qgkvh33b02m8kfqhizz8rzf64"))))
2010 (build-system python-build-system)
2011 (arguments
2012 ;; FIXME: "ImportError: 'test' module incorrectly imported from
2013 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
2014 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
2015 ;; Is this module globally installed?"
2016 '(#:tests? #f))
2017 (home-page "http://pylib.readthedocs.org/")
2018 (synopsis "Python library for parsing, I/O, instrospection, and logging")
2019 (description
2020 "Py is a Python library for file name parsing, .ini file parsing, I/O,
2021 code introspection, and logging.")
2022 (license license:expat)))
2023
2024 (define-public python2-py
2025 (package-with-python2 python-py))
2026
2027 (define-public python-pytest
2028 (package
2029 (name "python-pytest")
2030 (version "2.7.3")
2031 (source
2032 (origin
2033 (method url-fetch)
2034 (uri (string-append
2035 "https://pypi.python.org/packages/source/p/pytest/pytest-"
2036 version ".tar.gz"))
2037 (sha256
2038 (base32
2039 "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
2040 (modules '((guix build utils)))
2041 (snippet
2042 ;; One of the tests involves the /usr directory, so it fails.
2043 '(substitute* "testing/test_argcomplete.py"
2044 (("def test_remove_dir_prefix\\(self\\):")
2045 "@pytest.mark.xfail\n def test_remove_dir_prefix(self):")))))
2046 (build-system python-build-system)
2047 (propagated-inputs
2048 `(("python-py" ,python-py)))
2049 (native-inputs
2050 `(;; Tests need the "regular" bash since 'bash-final' lacks `compgen`.
2051 ("bash" ,bash)
2052 ("python-nose" ,python-nose)
2053 ("python-mock" ,python-mock)))
2054 (home-page "http://pytest.org")
2055 (synopsis "Python testing library")
2056 (description
2057 "Pytest is a testing tool that provides auto-discovery of test modules
2058 and functions, detailed info on failing assert statements, modular fixtures,
2059 and many external plugins.")
2060 (license license:expat)))
2061
2062 (define-public python2-pytest
2063 (package-with-python2 python-pytest))
2064
2065 ;; Some packages require a newer pytest.
2066 (define-public python-pytest-3.0
2067 (package
2068 (inherit python-pytest)
2069 (name "python-pytest")
2070 (version "3.0.7")
2071 (source (origin
2072 (method url-fetch)
2073 (uri (pypi-uri "pytest" version))
2074 (sha256
2075 (base32
2076 "1asc4b2nd2a4f0g3r12y97rslq5wliji7b73wwkvdrm5s7mrc1mp"))))
2077 (arguments
2078 `(#:phases
2079 (modify-phases %standard-phases
2080 (add-before 'check 'disable-invalid-test
2081 (lambda _
2082 (substitute* "testing/test_argcomplete.py"
2083 (("def test_remove_dir_prefix" line)
2084 (string-append "@pytest.mark.skip"
2085 "(reason=\"Assumes that /usr exists.\")\n "
2086 line)))
2087 #t)))))
2088 (native-inputs
2089 `(("python-hypothesis" ,python-hypothesis)
2090 ,@(package-native-inputs python-pytest)))
2091 (properties `((python2-variant . ,(delay python2-pytest-3.0))))))
2092
2093 (define-public python2-pytest-3.0
2094 (let ((base (package-with-python2
2095 (strip-python2-variant python-pytest-3.0))))
2096 (package (inherit base)
2097 (native-inputs
2098 `(("python2-enum34" ,python2-enum34)
2099 ,@(package-native-inputs base))))))
2100
2101 (define-public python-pytest-cov
2102 (package
2103 (name "python-pytest-cov")
2104 (version "2.4.0")
2105 (source
2106 (origin
2107 (method url-fetch)
2108 (uri (pypi-uri "pytest-cov" version))
2109 (sha256
2110 (base32
2111 "03c2qc42r4bczyw93gd7n0qi1h1jfhw7fnbhi33c3vp1hs81gm2k"))))
2112 (build-system python-build-system)
2113 (arguments
2114 `(#:phases
2115 (modify-phases %standard-phases
2116 (replace 'check
2117 (lambda _
2118 ;; options taken from tox.ini
2119 ;; TODO: make "--restructuredtext" tests pass. They currently fail
2120 ;; with "Duplicate implicit target name"
2121 (zero? (system* "python" "./setup.py" "check"
2122 "--strict" "--metadata")))))))
2123 (propagated-inputs
2124 `(("python-coverage" ,python-coverage)
2125 ("python-pytest" ,python-pytest)))
2126 (home-page "https://github.com/pytest-dev/pytest-cov")
2127 (synopsis "Pytest plugin for measuring coverage")
2128 (description
2129 "Pytest-cov produces coverage reports. It supports centralised testing and
2130 distributed testing in both @code{load} and @code{each} modes. It also
2131 supports coverage of subprocesses.")
2132 (license license:expat)))
2133
2134 (define-public python2-pytest-cov
2135 (package-with-python2 python-pytest-cov))
2136
2137 (define-public python-pytest-runner
2138 (package
2139 (name "python-pytest-runner")
2140 (version "2.11.1")
2141 (source
2142 (origin
2143 (method url-fetch)
2144 (uri (pypi-uri "pytest-runner" version))
2145 (sha256
2146 (base32
2147 "1cw978kqqcq916b9gfns1qjqvg33c5ail5jhw9054dsynkm32flq"))))
2148 (build-system python-build-system)
2149 (arguments
2150 `(#:phases
2151 (modify-phases %standard-phases
2152 ;; The fancy way of setting the version with setuptools_scm does not
2153 ;; seem to work here.
2154 (add-after 'unpack 'set-version
2155 (lambda _
2156 (substitute* "docs/conf.py"
2157 (("version = setuptools_scm\\.get_version\\(root='\\.\\.')")
2158 (string-append "version = \"" ,version "\"")))
2159 #t)))))
2160 (native-inputs
2161 `(("python-pytest" ,python-pytest)
2162 ("python-setuptools-scm" ,python-setuptools-scm)))
2163 (home-page "https://github.com/pytest-dev/pytest-runner")
2164 (synopsis "Invoke py.test as a distutils command")
2165 (description
2166 "This package provides a @command{pytest-runner} command that
2167 @file{setup.py} files can use to run tests.")
2168 (license license:expat)))
2169
2170 (define-public python2-pytest-runner
2171 (package-with-python2 python-pytest-runner))
2172
2173 (define-public python-pytest-mock
2174 (package
2175 (name "python-pytest-mock")
2176 (version "1.2")
2177 (source
2178 (origin
2179 (method url-fetch)
2180 (uri (pypi-uri "pytest-mock" version ".zip"))
2181 (sha256
2182 (base32
2183 "03zxar5drzm7ksqyrwypjaza3cri6wqvpr6iam92djvg6znp32gp"))))
2184 (build-system python-build-system)
2185 (native-inputs
2186 `(("unzip" ,unzip)))
2187 (propagated-inputs
2188 `(("python-pytest" ,python-pytest)))
2189 (home-page "https://github.com/pytest-dev/pytest-mock/")
2190 (synopsis "Thin-wrapper around the mock package for easier use with py.test")
2191 (description
2192 "This plugin installs a @code{mocker} fixture which is a thin-wrapper
2193 around the patching API provided by the @code{mock} package, but with the
2194 benefit of not having to worry about undoing patches at the end of a test.
2195 The mocker fixture has the same API as @code{mock.patch}, supporting the
2196 same arguments.")
2197 (properties `((python2-variant . ,(delay python2-pytest-mock))))
2198 (license license:expat)))
2199
2200 (define-public python2-pytest-mock
2201 (let ((base (package-with-python2
2202 (strip-python2-variant python-pytest-mock))))
2203 (package (inherit base)
2204 (propagated-inputs
2205 `(("python2-mock" ,python2-mock)
2206 ,@(package-propagated-inputs base))))))
2207
2208 (define-public python-pytest-xdist
2209 (package
2210 (name "python-pytest-xdist")
2211 (version "1.14")
2212 (source
2213 (origin
2214 (method url-fetch)
2215 (uri (pypi-uri "pytest-xdist" version ".zip"))
2216 (sha256
2217 (base32
2218 "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"))
2219 (modules '((guix build utils)))
2220 (snippet
2221 '(begin
2222 ;; Remove pre-compiled .pyc files from source.
2223 (for-each delete-file-recursively
2224 (find-files "." "__pycache__" #:directories? #t))
2225 (for-each delete-file (find-files "." "\\.pyc$"))
2226 #t))))
2227 (build-system python-build-system)
2228 (arguments
2229 '(#:tests? #f)) ;FIXME: Some tests are failing.
2230 ;; #:phases
2231 ;; (modify-phases %standard-phases
2232 ;; (delete 'check)
2233 ;; (add-after 'install 'check
2234 ;; (lambda* (#:key inputs outputs #:allow-other-keys)
2235 ;; (add-installed-pythonpath inputs outputs)
2236 ;; (zero? (system* "py.test" "-v")))))
2237 (native-inputs
2238 `(("unzip" ,unzip)
2239 ("python-setuptools-scm" ,python-setuptools-scm)))
2240 (propagated-inputs
2241 `(("python-execnet" ,python-execnet)
2242 ("python-pytest" ,python-pytest)
2243 ("python-py" ,python-py)))
2244 (home-page
2245 "https://github.com/pytest-dev/pytest-xdist")
2246 (synopsis
2247 "Plugin for py.test with distributed testing and loop-on-failing modes")
2248 (description
2249 "The pytest-xdist plugin extends py.test with some unique test execution
2250 modes: parallelization, running tests in boxed subprocesses, the ability
2251 to run tests repeatedly when failed, and the ability to run tests on multiple
2252 Python interpreters or platforms. It uses rsync to copy the existing
2253 program code to a remote location, executes there, and then syncs the
2254 result back.")
2255 (license license:expat)))
2256
2257 (define-public python2-pytest-xdist
2258 (package-with-python2 python-pytest-xdist))
2259
2260 (define-public python-scripttest
2261 (package
2262 (name "python-scripttest")
2263 (version "1.3")
2264 (source
2265 (origin
2266 (method url-fetch)
2267 (uri (string-append
2268 "https://pypi.python.org/packages/source/s/scripttest/scripttest-"
2269 version ".tar.gz"))
2270 (sha256
2271 (base32
2272 "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
2273 (build-system python-build-system)
2274 (native-inputs
2275 `(("python-pytest" ,python-pytest)))
2276 (home-page "http://pythonpaste.org/scripttest/")
2277 (synopsis "Python library to test command-line scripts")
2278 (description "Scripttest is a Python helper library for testing
2279 interactive command-line applications. With it you can run a script in a
2280 subprocess and see the output as well as any file modifications.")
2281 (license license:expat)))
2282
2283 (define-public python2-scripttest
2284 (package-with-python2 python-scripttest))
2285
2286 (define-public python-testtools
2287 (package
2288 (name "python-testtools")
2289 (version "1.4.0")
2290 (source
2291 (origin
2292 (method url-fetch)
2293 (uri (pypi-uri "testtools" version))
2294 (sha256
2295 (base32
2296 "1vw8yljnd75d396hhw6s2hrf4cclzy845ifd5am0lxsl235z3i8c"))))
2297 (build-system python-build-system)
2298 (arguments
2299 `(#:phases
2300 (modify-phases %standard-phases
2301 (add-after 'unpack 'fix-module-imports
2302 (lambda _
2303 (substitute* "setup.py"
2304 (("'unittest2>=0.8.0',") ""))
2305 (substitute* '("testtools/testcase.py"
2306 "testtools/testsuite.py"
2307 "testtools/run.py"
2308 "testtools/tests/test_run.py"
2309 "testtools/tests/test_testsuite.py"
2310 "testtools/tests/test_deferredruntest.py")
2311 ;; unittest2 is a backport of Python2.7 features to Python 2.4.
2312 (("import unittest2 as unittest") "import unittest")
2313 (("import unittest2") "import unittest as unittest2")
2314 (("from unittest2 import") "from unittest import"))
2315 (substitute* "testtools/tests/test_testresult.py"
2316 ;; NUL in source code is not allowed (raises ValueError).
2317 (("\\x00\\x04") "\\x04"))
2318 #t)))))
2319 (propagated-inputs
2320 `(("python-mimeparse" ,python-mimeparse)
2321 ("python-extras" ,python-extras)))
2322 (home-page "https://github.com/testing-cabal/testtools")
2323 (synopsis
2324 "Extensions to the Python standard library unit testing framework")
2325 (description
2326 "Testtools extends the Python standard library unit testing framework to
2327 provide matchers, more debugging information, and cross-Python
2328 compatibility.")
2329 (license license:psfl)))
2330
2331 (define-public python2-testtools
2332 (package-with-python2 python-testtools))
2333
2334 (define-public python-testscenarios
2335 (package
2336 (name "python-testscenarios")
2337 (version "0.4")
2338 (source
2339 (origin
2340 (method url-fetch)
2341 (uri (string-append
2342 "https://pypi.python.org/packages/source/t/testscenarios/testscenarios-"
2343 version ".tar.gz"))
2344 (sha256
2345 (base32
2346 "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
2347 (build-system python-build-system)
2348 (propagated-inputs
2349 `(("python-testtools" ,python-testtools)))
2350 (home-page "https://launchpad.net/testscenarios")
2351 (synopsis "Pyunit extension for dependency injection")
2352 (description
2353 "Testscenarios provides clean dependency injection for Python unittest
2354 style tests.")
2355 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2356
2357 (define-public python2-testscenarios
2358 (package-with-python2 python-testscenarios))
2359
2360 (define-public python-testresources
2361 (package
2362 (name "python-testresources")
2363 (version "0.2.7")
2364 (source
2365 (origin
2366 (method url-fetch)
2367 (uri (string-append
2368 "https://pypi.python.org/packages/source/t/testresources/testresources-"
2369 version ".tar.gz"))
2370 (sha256
2371 (base32
2372 "0cbj3plbllyz42c4b5xxgwaa7mml54lakslrn4kkhinxhdri22md"))))
2373 (build-system python-build-system)
2374 (home-page "https://launchpad.net/testresources")
2375 (synopsis
2376 "Pyunit extension for managing test resources")
2377 (description
2378 "Testresources is an extension to Python's unittest to allow declarative
2379 use of resources by test cases.")
2380 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2381
2382 (define-public python2-testresources
2383 (package-with-python2 python-testresources))
2384
2385 (define-public python-subunit
2386 (package
2387 (name "python-subunit")
2388 (version "0.0.21")
2389 (source
2390 (origin
2391 (method url-fetch)
2392 (uri (string-append
2393 "https://pypi.python.org/packages/source/p/python-subunit/python-subunit-"
2394 version ".tar.gz"))
2395 (sha256
2396 (base32
2397 "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
2398 (build-system python-build-system)
2399 (propagated-inputs
2400 `(("python-extras" ,python-extras)
2401 ("python-mimeparse" ,python-mimeparse)))
2402 (native-inputs
2403 `(("python-testscenarios" ,python-testscenarios)))
2404 (home-page "http://launchpad.net/subunit")
2405 (synopsis "Python implementation of the subunit protocol")
2406 (description
2407 "Python-subunit is a Python implementation of the subunit test streaming
2408 protocol.")
2409 (license (list license:bsd-3 license:asl2.0)))) ; at the user's option
2410
2411 (define-public python2-subunit
2412 (package-with-python2 python-subunit))
2413
2414 ;; Recent versions of python-fixtures and python-testrepository need
2415 ;; python-pbr for packaging, which itself needs these two packages for
2416 ;; testing.
2417 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2418 ;; same source, just without any test dependencies and with tests disabled.
2419 ;; python-pbr-minmal is then used to package python-fixtures and
2420 ;; python-testrepository.
2421 ;; Strictly speaking we currently could remove the test-requirements from the
2422 ;; normal python-pbr package (and save this package) since test are disabled
2423 ;; there anyway. But this may change in future.
2424 (define python-pbr-minimal
2425 (package
2426 (name "python-pbr-minimal")
2427 (version "3.0.1")
2428 (source
2429 (origin
2430 (method url-fetch)
2431 (uri (pypi-uri "pbr" version))
2432 (sha256
2433 (base32
2434 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
2435 (build-system python-build-system)
2436 (arguments
2437 `(#:tests? #f))
2438 (home-page "http://docs.openstack.org/developer/pbr/")
2439 (synopsis "Minimal build of python-pbr used for bootstrapping")
2440 (description
2441 "Used only for bootstrapping python2-pbr, you should not need this.")
2442 (license license:asl2.0)))
2443
2444 (define python2-pbr-minimal
2445 (package-with-python2 python-pbr-minimal))
2446
2447 (define-public python-pbr
2448 (package
2449 (inherit python-pbr-minimal)
2450 (name "python-pbr")
2451 (arguments
2452 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2453 (propagated-inputs
2454 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2455 (native-inputs
2456 `(("python-fixtures" ,python-fixtures)
2457 ;; discover, coverage, hacking, subunit
2458 ("python-mock" ,python-mock)
2459 ("python-six" ,python-six)
2460 ("python-sphinx" ,python-sphinx)
2461 ("python-testrepository" ,python-testrepository)
2462 ("python-testresources" ,python-testresources)
2463 ("python-testscenarios" ,python-testscenarios)
2464 ("python-testtools" ,python-testtools)
2465 ("python-virtualenv" ,python-virtualenv)))
2466 (synopsis "Enhance the default behavior of Python’s setuptools")
2467 (description
2468 "Python Build Reasonableness (PBR) is a library that injects some useful
2469 and sensible default behaviors into your setuptools run. It will set
2470 versions, process requirements files and generate AUTHORS and ChangeLog file
2471 from git information.
2472 ")))
2473
2474 (define-public python2-pbr
2475 (package-with-python2 python-pbr))
2476
2477 (define-public python-fixtures
2478 (package
2479 (name "python-fixtures")
2480 (version "1.4.0")
2481 (source
2482 (origin
2483 (method url-fetch)
2484 (uri (pypi-uri "fixtures" version))
2485 (sha256
2486 (base32
2487 "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
2488 (build-system python-build-system)
2489 (arguments
2490 '(#:phases
2491 (modify-phases %standard-phases
2492 (replace 'check
2493 (lambda _
2494 (zero? (system* "python" "-m" "testtools.run"
2495 "fixtures.test_suite")))))))
2496 (propagated-inputs
2497 `(("python-six" ,python-six)))
2498 (native-inputs
2499 `(("python-mock" ,python-mock)
2500 ("python-pbr-minimal" ,python-pbr-minimal)
2501 ("python-testtools" ,python-testtools)))
2502 (home-page "https://launchpad.net/python-fixtures")
2503 (synopsis "Python test fixture library")
2504 (description
2505 "Fixtures provides a way to create reusable state, useful when writing
2506 Python tests.")
2507 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2508
2509 (define-public python2-fixtures
2510 (package-with-python2 python-fixtures))
2511
2512 (define-public python-testrepository
2513 (package
2514 (name "python-testrepository")
2515 (version "0.0.20")
2516 (source
2517 (origin
2518 (method url-fetch)
2519 (uri (string-append
2520 "https://pypi.python.org/packages/source/t/testrepository/testrepository-"
2521 version ".tar.gz"))
2522 (sha256
2523 (base32
2524 "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
2525 (build-system python-build-system)
2526 (arguments
2527 ;; FIXME: Many tests are failing.
2528 '(#:tests? #f))
2529 (propagated-inputs
2530 `(("python-fixtures" ,python-fixtures)
2531 ("python-subunit" ,python-subunit)
2532 ("python-testtools" ,python-testtools)))
2533 (native-inputs
2534 `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
2535 ("python-mimeparse" ,python-mimeparse)))
2536 (home-page "https://launchpad.net/testrepository")
2537 (synopsis "Database for Python test results")
2538 (description "Testrepository provides a database of test results which can
2539 be used as part of a developer's workflow to check things such as what tests
2540 have failed since the last commit or what tests are currently failing.")
2541 (license (list license:bsd-3 license:asl2.0)))) ; at user's option
2542
2543 (define-public python2-testrepository
2544 (package-with-python2 python-testrepository))
2545
2546 (define-public python-coverage
2547 (package
2548 (name "python-coverage")
2549 (version "4.1")
2550 (source
2551 (origin
2552 (method url-fetch)
2553 (uri (pypi-uri "coverage" version))
2554 (sha256
2555 (base32
2556 "01rbr4br4lsk0lwn8fb96zwd2xr4f0mg1w7iq3j11i8f5ig2nqs1"))))
2557 (build-system python-build-system)
2558 (arguments
2559 ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
2560 '(#:tests? #f))
2561 (home-page "http://nedbatchelder.com/code/coverage")
2562 (synopsis "Code coverage measurement for Python")
2563 (description
2564 "Coverage measures code coverage, typically during test execution. It
2565 uses the code analysis tools and tracing hooks provided in the Python standard
2566 library to determine which lines are executable, and which have been
2567 executed.")
2568 (license license:bsd-3)))
2569
2570 (define-public python2-coverage
2571 (package-with-python2 python-coverage))
2572
2573 (define-public python-cov-core
2574 (package
2575 (name "python-cov-core")
2576 (version "1.15.0")
2577 (source
2578 (origin
2579 (method url-fetch)
2580 (uri (pypi-uri "cov-core" version))
2581 (sha256
2582 (base32
2583 "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
2584 (build-system python-build-system)
2585 (propagated-inputs
2586 `(("python-coverage" ,python-coverage)))
2587 (home-page "https://github.com/schlamar/cov-core")
2588 (synopsis "Coverage plugin core for pytest-cov, nose-cov and nose2-cov")
2589 (description
2590 "This is a library package for use by @code{pytest-cov}, @code{nose-cov}
2591 and @code{nose2-cov}. It is useful for developing coverage plugins for these
2592 testing frameworks.")
2593 (license license:expat)))
2594
2595 (define-public python2-cov-core
2596 (package-with-python2 python-cov-core))
2597
2598 (define-public python-discover
2599 (package
2600 (name "python-discover")
2601 (version "0.4.0")
2602 (source
2603 (origin
2604 (method url-fetch)
2605 (uri (string-append
2606 "https://pypi.python.org/packages/source/d/discover/discover-"
2607 version ".tar.gz"))
2608 (sha256
2609 (base32
2610 "0y8d0zwiqar51kxj8lzmkvwc3b8kazb04gk5zcb4nzg5k68zmhq5"))))
2611 (build-system python-build-system)
2612 (home-page "http://pypi.python.org/pypi/discover/")
2613 (synopsis
2614 "Python test discovery for unittest")
2615 (description
2616 "Discover provides test discovery for unittest, a feature that has been
2617 backported from Python 2.7 for Python 2.4+.")
2618 (license license:bsd-3)))
2619
2620 (define-public python2-discover
2621 (package-with-python2 python-discover))
2622
2623 (define-public behave
2624 (package
2625 (name "behave")
2626 (version "1.2.5")
2627 (source (origin
2628 (method url-fetch)
2629 (uri (pypi-uri "behave" version ".tar.bz2"))
2630 (sha256
2631 (base32
2632 "1iypp6z46r19n4xmgx6m1lwmlpfjh8vapq8izigrqlaarvp2y64c"))))
2633 (build-system python-build-system)
2634 (propagated-inputs
2635 `(("python-six" ,python-six)
2636 ("python-parse" ,python-parse)
2637 ("python-parse-type" ,python-parse-type)))
2638 (arguments `(#:tests? #f)) ;TODO: tests require nose>=1.3 and
2639 ;PyHamcrest>=1.8
2640 (home-page "https://github.com/behave/behave")
2641 (synopsis "Python behavior-driven development")
2642 (description
2643 "Behave is a tool for behavior-driven development in python.
2644 Behavior-driven development (or BDD) is an agile software development
2645 technique that encourages collaboration between developers, QA and
2646 non-technical or business participants in a software project. Behave uses
2647 tests written in a natural language style, backed up by Python code.")
2648 (license license:x11)))
2649
2650 (define-public python-exif-read
2651 (package
2652 (name "python-exif-read")
2653 (version "2.1.2")
2654 (source (origin
2655 (method url-fetch)
2656 (uri (pypi-uri "ExifRead" version))
2657 (sha256
2658 (base32
2659 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2660 (build-system python-build-system)
2661 (arguments `(#:tests? #f)) ; no tests
2662 (home-page "https://github.com/ianare/exif-py")
2663 (synopsis "Python library to extract EXIF data from image files")
2664 (description
2665 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2666 files.")
2667 (license license:bsd-3)))
2668
2669 (define-public python2-exif-read
2670 (package-with-python2 python-exif-read))
2671
2672 (define-public python-pyld
2673 (package
2674 (name "python-pyld")
2675 (version "0.7.1")
2676 (source (origin
2677 (method url-fetch)
2678 (uri (pypi-uri "PyLD" version))
2679 (sha256
2680 (base32
2681 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
2682 (build-system python-build-system)
2683 (arguments `(#:tests? #f)) ; no tests
2684 (home-page "https://github.com/digitalbazaar/pyld")
2685 (synopsis "Python implementation of the JSON-LD specification")
2686 (description
2687 "PyLD is an implementation of the JSON-LD specification.")
2688 (license license:bsd-3)))
2689
2690 (define-public python2-pyld
2691 (package-with-python2 python-pyld))
2692
2693 (define-public python-certifi
2694 (package
2695 (name "python-certifi")
2696 (version "2017.1.23")
2697 (source (origin
2698 (method url-fetch)
2699 (uri (pypi-uri "certifi" version))
2700 (sha256
2701 (base32
2702 "1klrzl3hgvcf2mjk00g0k3kk1p2z27vzwnxivwar4vhjmjvpz1w1"))))
2703 (build-system python-build-system)
2704 (home-page "https://certifi.io/")
2705 (synopsis "Python CA certificate bundle")
2706 (description
2707 "Certifi is a Python library that contains a CA certificate bundle, which
2708 is used by the Requests library to verify HTTPS requests.")
2709 (license license:asl2.0)))
2710
2711 (define-public python2-certifi
2712 (package-with-python2 python-certifi))
2713
2714 (define-public python-click
2715 (package
2716 (name "python-click")
2717 (version "6.7")
2718 (source
2719 (origin
2720 (method url-fetch)
2721 (uri (pypi-uri "click" version))
2722 (sha256
2723 (base32
2724 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
2725 (build-system python-build-system)
2726 (arguments
2727 `(#:phases
2728 (modify-phases %standard-phases
2729 (add-after 'unpack 'fix-paths
2730 (lambda* (#:key inputs #:allow-other-keys)
2731 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2732 "cross-libc" "libc"))))
2733 (substitute* "click/_unicodefun.py"
2734 (("'locale'")
2735 (string-append "'" glibc "/bin/locale'"))))
2736 #t))
2737 (replace 'check
2738 (lambda _
2739 (zero? (system* "make" "test")))))))
2740 (native-inputs
2741 `(("python-pytest" ,python-pytest)))
2742 (home-page "http://click.pocoo.org")
2743 (synopsis "Command line library for Python")
2744 (description
2745 "Click is a Python package for creating command line interfaces in a
2746 composable way with as little code as necessary. Its name stands for
2747 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2748 with sensible defaults out of the box.")
2749 (license license:bsd-3)))
2750
2751 (define-public python2-click
2752 (package-with-python2 python-click))
2753
2754 (define-public python-wheel
2755 (package
2756 (name "python-wheel")
2757 (version "0.30.0a0")
2758 (source
2759 (origin
2760 (method url-fetch)
2761 (uri (pypi-uri "wheel" version))
2762 (sha256
2763 (base32
2764 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
2765 (build-system python-build-system)
2766 (native-inputs
2767 `(("python-jsonschema" ,python-jsonschema)
2768 ("python-pytest-cov" ,python-pytest-cov)))
2769 (home-page "https://bitbucket.org/pypa/wheel/")
2770 (synopsis "Format for built Python packages")
2771 (description
2772 "A wheel is a ZIP-format archive with a specially formatted filename and
2773 the @code{.whl} extension. It is designed to contain all the files for a PEP
2774 376 compatible install in a way that is very close to the on-disk format. Many
2775 packages will be properly installed with only the @code{Unpack} step and the
2776 unpacked archive preserves enough information to @code{Spread} (copy data and
2777 scripts to their final locations) at any later time. Wheel files can be
2778 installed with a newer @code{pip} or with wheel's own command line utility.")
2779 (license license:expat)
2780 (properties `((python2-variant . ,(delay python2-wheel))))))
2781
2782 (define-public python2-wheel
2783 (let ((wheel (package-with-python2
2784 (strip-python2-variant python-wheel))))
2785 (package (inherit wheel)
2786 (native-inputs `(("python2-functools32" ,python2-functools32)
2787 ,@(package-native-inputs wheel))))))
2788
2789
2790 (define-public python-requests
2791 (package
2792 (name "python-requests")
2793 (version "2.13.0")
2794 (source (origin
2795 (method url-fetch)
2796 (uri (pypi-uri "requests" version))
2797 (sha256
2798 (base32
2799 "1s0wg4any4dsv5l3hqjxqk2zgb7pdbqhy9rhc8kh3aigfq4ws8jp"))))
2800 ;; TODO: unbundle urllib3 and chardet.
2801 (build-system python-build-system)
2802 (arguments
2803 ;; FIXME: Some tests require network access.
2804 '(#:tests? #f))
2805 (home-page "http://python-requests.org/")
2806 (synopsis "Python HTTP library")
2807 (description
2808 "Requests is a Python HTTP client library. It aims to be easier to use
2809 than Python’s urllib2 library.")
2810 (license license:asl2.0)))
2811
2812 ;; Some software requires an older version of Requests, notably Docker
2813 ;; Compose.
2814 (define-public python-requests-2.7
2815 (package (inherit python-requests)
2816 (version "2.7.0")
2817 (source (origin
2818 (method url-fetch)
2819 (uri (pypi-uri "requests" version))
2820 (sha256
2821 (base32
2822 "0gdr9dxm24amxpbyqpbh3lbwxc2i42hnqv50sigx568qssv3v2ir"))))))
2823
2824 (define-public python2-requests
2825 (package-with-python2 python-requests))
2826
2827 (define-public python-vcversioner
2828 (package
2829 (name "python-vcversioner")
2830 (version "2.16.0.0")
2831 (source
2832 (origin
2833 (method url-fetch)
2834 (uri (pypi-uri "vcversioner" version))
2835 (sha256
2836 (base32
2837 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2838 (build-system python-build-system)
2839 (synopsis "Python library for version number discovery")
2840 (description "Vcversioner is a Python library that inspects tagging
2841 information in a variety of version control systems in order to discover
2842 version numbers.")
2843 (home-page "https://github.com/habnabit/vcversioner")
2844 (license license:isc)))
2845
2846 (define-public python2-vcversioner
2847 (package-with-python2 python-vcversioner))
2848
2849 (define-public python-jsonschema
2850 (package
2851 (name "python-jsonschema")
2852 (version "2.5.1")
2853 (source (origin
2854 (method url-fetch)
2855 (uri
2856 (string-append
2857 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2858 version ".tar.gz"))
2859 (sha256
2860 (base32
2861 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
2862 (build-system python-build-system)
2863 (arguments
2864 '(#:phases
2865 (modify-phases %standard-phases
2866 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
2867 (native-inputs
2868 `(("python-nose" ,python-nose)
2869 ("python-vcversioner" ,python-vcversioner)))
2870 (home-page "https://github.com/Julian/jsonschema")
2871 (synopsis "Implementation of JSON Schema for Python")
2872 (description
2873 "Jsonschema is an implementation of JSON Schema for Python.")
2874 (license license:expat)
2875 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2876
2877 (define-public python2-jsonschema
2878 (let ((jsonschema (package-with-python2
2879 (strip-python2-variant python-jsonschema))))
2880 (package (inherit jsonschema)
2881 (native-inputs
2882 `(("python2-mock" ,python2-mock)
2883 ,@(package-native-inputs jsonschema)))
2884 (propagated-inputs
2885 `(("python2-functools32" ,python2-functools32))))))
2886
2887 (define-public python-schema
2888 (package
2889 (name "python-schema")
2890 (version "0.6.6")
2891 (source
2892 (origin
2893 (method url-fetch)
2894 (uri (pypi-uri "schema" version))
2895 (sha256
2896 (base32
2897 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2898 (build-system python-build-system)
2899 (native-inputs
2900 `(("python-pytest" ,python-pytest)))
2901 (home-page "https://github.com/keleshev/schema")
2902 (synopsis "Simple data validation library")
2903 (description
2904 "@code{python-schema} is a library for validating Python data
2905 structures, such as those obtained from config-files, forms, external
2906 services or command-line parsing, converted from JSON/YAML (or
2907 something else) to Python data-types.")
2908 (license license:psfl)))
2909
2910 (define-public python2-schema
2911 (package-with-python2 python-schema))
2912
2913 (define-public python-schema-0.5
2914 (package (inherit python-schema)
2915 (version "0.5.0")
2916 (source
2917 (origin
2918 (method url-fetch)
2919 (uri (pypi-uri "schema" version))
2920 (sha256
2921 (base32
2922 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2923
2924 (define-public python2-schema-0.5
2925 (package-with-python2 python-schema-0.5))
2926
2927 (define-public python-kitchen
2928 (package
2929 (name "python-kitchen")
2930 (version "1.2.4")
2931 (source
2932 (origin
2933 (method url-fetch)
2934 (uri (pypi-uri "kitchen" version))
2935 (sha256
2936 (base32
2937 "0ggv3p4x8jvmmzhp0xm00h6pvh1g0gmycw71rjwagnrj8n23vxrq"))))
2938 (build-system python-build-system)
2939 (propagated-inputs
2940 `(("python-chardet" ,python-chardet)))
2941 (home-page "https://github.com/fedora-infra/kitchen")
2942 (synopsis "Python API for snippets")
2943 (description "@code{kitchen} module provides a python API for all sorts of
2944 little useful snippets of code that everybody ends up writing for their projects
2945 but never seem big enough to build an independent release. Use kitchen and stop
2946 cutting and pasting that code over and over.")
2947 (license (list license:lgpl2.1+
2948 ;; subprocess.py, test_subprocess.py,
2949 ;; kitchen/pycompat25/defaultdict.py:
2950 license:psfl))))
2951
2952 (define-public python2-kitchen
2953 (package-with-python2 python-kitchen))
2954
2955 (define-public python-unidecode
2956 (package
2957 (name "python-unidecode")
2958 (version "0.04.21")
2959 (source (origin
2960 (method url-fetch)
2961 (uri (pypi-uri "Unidecode" version))
2962 (sha256
2963 (base32
2964 "0lfhp9c5xrbpjvbpr12ji52g1lx04404bzzdg6pvabhzisw6l2i8"))))
2965 (build-system python-build-system)
2966 (home-page "https://pypi.python.org/pypi/Unidecode")
2967 (synopsis "ASCII transliterations of Unicode text")
2968 (description
2969 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2970 useful when integrating with legacy code that doesn't support Unicode, or for
2971 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2972 machine identifiers from human-readable Unicode strings that should still be
2973 somewhat intelligible.")
2974 (license license:gpl2+)))
2975
2976 (define-public python2-unidecode
2977 (package-with-python2 python-unidecode))
2978
2979 (define-public python-pyjwt
2980 (package
2981 (name "python-pyjwt")
2982 (version "1.5.3")
2983 (source
2984 (origin
2985 (method url-fetch)
2986 (uri (pypi-uri "PyJWT" version))
2987 (sha256
2988 (base32
2989 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2990 (modules '((guix build utils)))
2991 (snippet
2992 '(begin
2993 (for-each delete-file-recursively
2994 (find-files "." "\\.pyc$"))
2995 #t))))
2996 (build-system python-build-system)
2997 (native-inputs
2998 `(("python-pytest" ,python-pytest-3.0)
2999 ("python-pytest-cov" ,python-pytest-cov)
3000 ("python-pytest-runner" ,python-pytest-runner)))
3001 (home-page "https://github.com/progrium/pyjwt")
3002 (synopsis "JSON Web Token implementation in Python")
3003 (description
3004 "PyJWT is a JSON Web Token implementation written in Python.")
3005 (license license:expat)))
3006
3007 (define-public python2-pyjwt
3008 (package-with-python2 python-pyjwt))
3009
3010 (define-public python-pykka
3011 (package
3012 (name "python-pykka")
3013 (version "1.2.1")
3014 (source
3015 (origin
3016 (method url-fetch)
3017 (uri (pypi-uri "Pykka" version))
3018 (sha256
3019 (base32
3020 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
3021 (build-system python-build-system)
3022 (native-inputs
3023 `(("python-mock" ,python-mock)
3024 ("python-nose" ,python-nose)
3025 ("python-gevent" ,python-gevent)
3026 ("python-eventlet" ,python-eventlet)))
3027 (home-page "https://www.pykka.org/")
3028 (synopsis "Pykka is a Python implementation of the actor model")
3029 (description
3030 "Pykka is a Python implementation of the actor model.
3031 The actor model introduces some simple rules to control the sharing
3032 of state and cooperation between execution units, which makes it
3033 easier to build concurrent applications.")
3034 (license license:asl2.0)))
3035
3036 (define-public python2-pykka
3037 (package-with-python2 python-pykka))
3038
3039 (define-public python-oauthlib
3040 (package
3041 (name "python-oauthlib")
3042 (version "1.0.3")
3043 (source (origin
3044 (method url-fetch)
3045 (uri (pypi-uri "oauthlib" version))
3046 (sha256
3047 (base32
3048 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
3049 (build-system python-build-system)
3050 (native-inputs
3051 `(("python-nose" ,python-nose)
3052 ("python-mock" ,python-mock)
3053 ("python-cryptography" ,python-cryptography)
3054 ("python-pyjwt" ,python-pyjwt)
3055 ("python-blinker" ,python-blinker)))
3056 (home-page "https://github.com/idan/oauthlib")
3057 (synopsis "OAuth implementation for Python")
3058 (description
3059 "Oauthlib is a generic, spec-compliant, thorough implementation of the
3060 OAuth request-signing logic.")
3061 (license license:bsd-3)
3062 (properties `((python2-variant . ,(delay python2-oauthlib))))))
3063
3064 (define-public python2-oauthlib
3065 (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
3066 (package
3067 (inherit base)
3068 (native-inputs `(("python2-unittest2" ,python2-unittest2)
3069 ,@(package-native-inputs base))))))
3070
3071 (define-public python-itsdangerous
3072 (package
3073 (name "python-itsdangerous")
3074 (version "0.24")
3075 (source
3076 (origin
3077 (method url-fetch)
3078 (uri (string-append
3079 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
3080 version ".tar.gz"))
3081 (sha256
3082 (base32
3083 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
3084 (build-system python-build-system)
3085 (home-page "https://github.com/mitsuhiko/itsdangerous")
3086 (synopsis "Python library for passing data to/from untrusted environments")
3087 (description
3088 "Itsdangerous provides various helpers to pass trusted data to untrusted
3089 environments and back.")
3090 (license license:bsd-3)))
3091
3092 (define-public python2-itsdangerous
3093 (package-with-python2 python-itsdangerous))
3094
3095 (define-public python-pyyaml
3096 (package
3097 (name "python-pyyaml")
3098 (version "3.12")
3099 (source
3100 (origin
3101 (method url-fetch)
3102 (uri (pypi-uri "PyYAML" version))
3103 (sha256
3104 (base32
3105 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
3106 (build-system python-build-system)
3107 (inputs
3108 `(("libyaml" ,libyaml)))
3109 (home-page "http://pyyaml.org/wiki/PyYAML")
3110 (synopsis "YAML parser and emitter for Python")
3111 (description
3112 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
3113 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
3114 API, and sensible error messages. PyYAML supports standard YAML tags and
3115 provides Python-specific tags that allow to represent an arbitrary Python
3116 object.")
3117 (license license:expat)))
3118
3119 (define-public python2-pyyaml
3120 (package-with-python2 python-pyyaml))
3121
3122 (define-public python-virtualenv
3123 (package
3124 (name "python-virtualenv")
3125 (version "15.0.3")
3126 (source
3127 (origin
3128 (method url-fetch)
3129 (uri (pypi-uri "virtualenv" version))
3130 (sha256
3131 (base32
3132 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
3133 (build-system python-build-system)
3134 (arguments
3135 `(#:phases
3136 (modify-phases %standard-phases
3137 (replace 'check
3138 (lambda _
3139 ;; Disable failing test. See upstream bug report
3140 ;; https://github.com/pypa/virtualenv/issues/957
3141 (substitute* "tests/test_virtualenv.py"
3142 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
3143 (zero? (system* "py.test")))))))
3144 (native-inputs
3145 `(("python-mock" ,python-mock)
3146 ("python-pytest" ,python-pytest)))
3147 (home-page "https://virtualenv.pypa.io/")
3148 (synopsis "Virtual Python environment builder")
3149 (description
3150 "Virtualenv is a tool to create isolated Python environments.")
3151 (license license:expat)))
3152
3153 (define-public python2-virtualenv
3154 (package-with-python2 python-virtualenv))
3155
3156 (define-public python-markupsafe
3157 (package
3158 (name "python-markupsafe")
3159 (version "0.23")
3160 (source
3161 (origin
3162 (method url-fetch)
3163 (uri (string-append
3164 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
3165 version ".tar.gz"))
3166 (sha256
3167 (base32
3168 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
3169 (build-system python-build-system)
3170 (home-page "https://github.com/mitsuhiko/markupsafe")
3171 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3172 (description
3173 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3174 for Python.")
3175 (license license:bsd-3)))
3176
3177 (define-public python2-markupsafe
3178 (package-with-python2 python-markupsafe))
3179
3180 (define-public python-jinja2
3181 (package
3182 (name "python-jinja2")
3183 (version "2.9.6")
3184 (source
3185 (origin
3186 (method url-fetch)
3187 (uri (pypi-uri "Jinja2" version))
3188 (sha256
3189 (base32
3190 "1zzrkywhziqffrzks14kzixz7nd4yh2vc0fb04a68vfd2ai03anx"))))
3191 (build-system python-build-system)
3192 (arguments
3193 `(#:phases
3194 (modify-phases %standard-phases
3195 ;; These files cannot be built with Python < 3.6. See
3196 ;; https://github.com/pallets/jinja/issues/655
3197 ;; FIXME: Remove this when the "python" package is upgraded.
3198 (add-after 'unpack 'delete-incompatible-files
3199 (lambda _
3200 (for-each delete-file
3201 '("jinja2/asyncsupport.py"
3202 "jinja2/asyncfilters.py"))
3203 #t)))))
3204 (propagated-inputs
3205 `(("python-markupsafe" ,python-markupsafe)))
3206 (home-page "http://jinja.pocoo.org/")
3207 (synopsis "Python template engine")
3208 (description
3209 "Jinja2 is a small but fast and easy to use stand-alone template engine
3210 written in pure Python.")
3211 (license license:bsd-3)))
3212
3213 (define-public python2-jinja2
3214 (package-with-python2 python-jinja2))
3215
3216 (define-public python-pystache
3217 (package
3218 (name "python-pystache")
3219 (version "0.5.4")
3220 (source (origin
3221 (method url-fetch)
3222 (uri (pypi-uri "pystache" version))
3223 (sha256
3224 (base32
3225 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3226 (build-system python-build-system)
3227 (arguments
3228 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3229 (home-page "http://defunkt.io/pystache/")
3230 (synopsis "Python logic-less template engine")
3231 (description
3232 "Pystache is a Python implementation of the framework agnostic,
3233 logic-free templating system Mustache.")
3234 (license license:expat)
3235 (properties `((python2-variant . ,(delay python2-pystache))))))
3236
3237 (define-public python2-pystache
3238 (package (inherit (package-with-python2
3239 (strip-python2-variant python-pystache)))
3240 (arguments
3241 `(#:python ,python-2
3242 #:phases
3243 (modify-phases %standard-phases
3244 (replace 'check
3245 (lambda _
3246 (zero? (system* "python" "test_pystache.py")))))))))
3247
3248 (define-public python-joblib
3249 (package
3250 (name "python-joblib")
3251 (version "0.10.3")
3252 (source (origin
3253 (method url-fetch)
3254 (uri (pypi-uri "joblib" version))
3255 (sha256
3256 (base32
3257 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
3258 (modules '((guix build utils)))
3259 (snippet
3260 '(begin
3261 ;; Remove pre-compiled .pyc files from source.
3262 (for-each delete-file-recursively
3263 (find-files "." "__pycache__" #:directories? #t))
3264 (for-each delete-file (find-files "." "\\.pyc$"))
3265 #t))))
3266 (build-system python-build-system)
3267 (arguments
3268 `(#:phases
3269 (modify-phases %standard-phases
3270 (add-before 'check 'disable-failing-tests
3271 (lambda _
3272 ;; This numpydoc tests fails for unknown reasons
3273 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
3274 ;; This numpydoc test depends on matplotlib, which is not a
3275 ;; required input.
3276 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
3277 ;; These tests fail to execute sys.executable
3278 (substitute* "joblib/test/test_parallel.py"
3279 (("import nose" line)
3280 (string-append "from nose.plugins.skip import SkipTest\n" line))
3281 (("def test_nested_parallel_warnings" line)
3282 (string-append "@SkipTest\n" line))
3283 (("def test_parallel_with_interactively_defined_functions" line)
3284 (string-append "@SkipTest\n" line)))
3285 #t)))))
3286 ;; Provide nose to enable tests command
3287 (native-inputs
3288 `(("python-nose" ,python-nose)
3289 ("python-sphinx" ,python-sphinx)
3290 ("python-docutils" ,python-docutils)
3291 ("python-numpydoc" ,python-numpydoc)))
3292 (home-page "http://pythonhosted.org/joblib/")
3293 (synopsis "Using Python functions as pipeline jobs")
3294 (description
3295 "Joblib is a set of tools to provide lightweight pipelining in Python.
3296 In particular, joblib offers: transparent disk-caching of the output values
3297 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3298 logging and tracing of the execution.")
3299 (license license:bsd-3)))
3300
3301 (define-public python2-joblib
3302 (package-with-python2 python-joblib))
3303
3304 (define-public python-docutils
3305 (package
3306 (name "python-docutils")
3307 (version "0.14")
3308 (source
3309 (origin
3310 (method url-fetch)
3311 (uri (pypi-uri "docutils" version))
3312 (sha256
3313 (base32
3314 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
3315 (build-system python-build-system)
3316 (arguments
3317 '(#:tests? #f)) ; no setup.py test command
3318 (home-page "http://docutils.sourceforge.net/")
3319 (synopsis "Python Documentation Utilities")
3320 (description
3321 "Docutils is a modular system for processing documentation into useful
3322 formats, such as HTML, XML, and LaTeX. For input Docutils supports
3323 reStructuredText.")
3324 ;; Most of the source code is public domain, but some source files are
3325 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3326 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3327
3328 (define-public python2-docutils
3329 (package-with-python2 python-docutils))
3330
3331 (define-public python-pygments
3332 (package
3333 (name "python-pygments")
3334 (version "2.2.0")
3335 (source
3336 (origin
3337 (method url-fetch)
3338 (uri (pypi-uri "Pygments" version))
3339 (sha256
3340 (base32
3341 "1k78qdvir1yb1c634nkv6rbga8wv4289xarghmsbbvzhvr311bnv"))))
3342 (build-system python-build-system)
3343 (arguments
3344 ;; FIXME: Tests require sphinx, which depends on this.
3345 '(#:tests? #f))
3346 (home-page "http://pygments.org/")
3347 (synopsis "Syntax highlighting")
3348 (description
3349 "Pygments is a syntax highlighting package written in Python.")
3350 (license license:bsd-2)))
3351
3352 (define-public python2-pygments
3353 (package-with-python2 python-pygments))
3354
3355 (define-public python-sphinxcontrib-websupport
3356 (package
3357 (name "python-sphinxcontrib-websupport")
3358 (version "1.0.1")
3359 (source (origin
3360 (method url-fetch)
3361 (uri (pypi-uri "sphinxcontrib-websupport" version))
3362 (sha256
3363 (base32
3364 "1f9f0wjpi9nhikbyaz6d19s7qvzdf1nq2g5dsh640fma4q9rd1bs"))))
3365 (build-system python-build-system)
3366 (propagated-inputs
3367 `(("python-mock" ,python-mock)
3368 ("python-pytest" ,python-pytest)
3369 ("python-xapian-bindings" ,python-xapian-bindings)))
3370 ;; Needed for running the test suite
3371 (native-inputs
3372 `(("python-six" ,python-six)
3373 ("python-jinja2" ,python-jinja2)
3374 ("python-docutils" ,python-docutils)
3375 ("python-sphinx" ,python-sphinx)
3376 ("python-sqlalchemy" ,python-sqlalchemy)
3377 ("python-whoosh" ,python-whoosh)))
3378 (home-page "http://sphinx-doc.org/")
3379 (synopsis "Sphinx API for web applications")
3380 (description "This package provides a Python API to easily integrate
3381 Sphinx documentation into your web application. It provides tools to
3382 integrate Sphinx documents in web templates and to handle searches.")
3383 (license license:bsd-3)))
3384
3385 (define-public python-sphinx
3386 (package
3387 (name "python-sphinx")
3388 (version "1.5.1")
3389 (source
3390 (origin
3391 (method url-fetch)
3392 (uri (pypi-uri "Sphinx" version))
3393 (sha256
3394 (base32
3395 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
3396 (build-system python-build-system)
3397 (arguments
3398 `(#:phases
3399 (modify-phases %standard-phases
3400 (replace 'check
3401 (lambda _
3402 ;; Requires Internet access.
3403 (delete-file "tests/test_build_linkcheck.py")
3404 (zero? (system* "make" "test")))))))
3405 (propagated-inputs
3406 `(("python-imagesize" ,python-imagesize)
3407 ("python-sphinx-alabaster-theme"
3408 ,python-sphinx-alabaster-theme)
3409 ("python-babel" ,python-babel)
3410 ("python-snowballstemmer" ,python-snowballstemmer)
3411 ("python-docutils" ,python-docutils)
3412 ("python-jinja2" ,python-jinja2)
3413 ("python-pygments" ,python-pygments)
3414 ("python-requests" ,python-requests)
3415 ("python-six" ,python-six)))
3416 (native-inputs
3417 `(("graphviz" ,graphviz)
3418 ("python-html5lib" ,python-html5lib)
3419 ("python-mock" ,python-mock)
3420 ("python-nose" ,python-nose)))
3421 (home-page "http://sphinx-doc.org/")
3422 (synopsis "Python documentation generator")
3423 (description "Sphinx is a tool that makes it easy to create documentation
3424 for Python projects or other documents consisting of multiple reStructuredText
3425 sources.")
3426 (license license:bsd-3)
3427 (properties `((python2-variant . ,(delay python2-sphinx))))))
3428
3429 (define-public python-sphinx-1.6
3430 (package (inherit python-sphinx)
3431 (name "python-sphinx")
3432 (version "1.6.3")
3433 (source (origin
3434 (method url-fetch)
3435 (uri (pypi-uri "Sphinx" version))
3436 (sha256
3437 (base32
3438 "1rj6f3i8hmrx2qlkshi5kp5xcy98dlynwlyl05yvflj5f66dp2xg"))))
3439 (arguments
3440 `(#:phases
3441 (modify-phases %standard-phases
3442 (replace 'check
3443 (lambda _
3444 ;; Requires Internet access.
3445 (delete-file "tests/test_build_linkcheck.py")
3446 (substitute* "tests/test_build_latex.py"
3447 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
3448 "@pytest.mark.skip()"))
3449 (zero? (system* "make" "test")))))))
3450 (propagated-inputs
3451 `(("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)
3452 ,@(package-propagated-inputs python-sphinx)))
3453 (native-inputs
3454 `(("python-pytest" ,python-pytest-3.0)
3455 ("imagemagick" ,imagemagick) ; for "convert"
3456 ,@(package-native-inputs python-sphinx)))
3457 (properties '())))
3458
3459 (define-public python-sphinx-1.5.3
3460 (package
3461 (inherit python-sphinx)
3462 (name "python-sphinx")
3463 (version "1.5.3")
3464 (source
3465 (origin
3466 (method url-fetch)
3467 (uri (pypi-uri "Sphinx" version))
3468 (sha256
3469 (base32
3470 "0kw1axswbvaavr8ggyf4qr6hnisnrzlbkkcdada69vk1x9xjassg"))))
3471 (native-inputs
3472 `(("python-pytest" ,python-pytest-3.0)
3473 ,@(package-native-inputs python-sphinx)))))
3474
3475 (define-public python2-sphinx
3476 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
3477 (package
3478 (inherit base)
3479 (native-inputs `(("python2-mock" ,python2-mock)
3480 ("python2-enum34" ,python2-enum34)
3481 ,@(package-native-inputs base)))
3482 (propagated-inputs `(("python2-pytz" ,python2-pytz)
3483 ,@(package-propagated-inputs base))))))
3484
3485 (define-public python-sphinx-rtd-theme
3486 (package
3487 (name "python-sphinx-rtd-theme")
3488 (version "0.2.4")
3489 (source
3490 (origin
3491 (method url-fetch)
3492 (uri (pypi-uri "sphinx_rtd_theme" version))
3493 (sha256
3494 (base32
3495 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
3496 (build-system python-build-system)
3497 (arguments '(#:tests? #f)) ; No tests.
3498 (propagated-inputs
3499 `(("python-sphinx" ,python-sphinx)))
3500 (home-page "https://github.com/snide/sphinx_rtd_theme/")
3501 (synopsis "ReadTheDocs.org theme for Sphinx")
3502 (description "A theme for Sphinx used by ReadTheDocs.org.")
3503 (license license:expat)))
3504
3505 (define-public python2-sphinx-rtd-theme
3506 (package-with-python2 python-sphinx-rtd-theme))
3507
3508 (define-public python-guzzle-sphinx-theme
3509 (package
3510 (name "python-guzzle-sphinx-theme")
3511 (version "0.7.11")
3512 (source
3513 (origin
3514 (method url-fetch)
3515 (uri (pypi-uri "guzzle_sphinx_theme" version))
3516 (sha256
3517 (base32
3518 "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
3519 (build-system python-build-system)
3520 (propagated-inputs
3521 `(("python-sphinx" ,python-sphinx)))
3522 (home-page "https://github.com/guzzle/guzzle_sphinx_theme")
3523 (synopsis "Sphinx theme used by Guzzle")
3524 (description "This package provides guzzle_sphinx_theme, a theme for the
3525 Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
3526 and several other projects.")
3527 (license license:expat)))
3528
3529 (define-public python2-guzzle-sphinx-theme
3530 (package-with-python2 python-guzzle-sphinx-theme))
3531
3532 (define-public python-rst.linker
3533 (package
3534 (name "python-rst.linker")
3535 (version "1.7")
3536 (source
3537 (origin
3538 (method url-fetch)
3539 (uri (pypi-uri "rst.linker" version))
3540 (sha256
3541 (base32
3542 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
3543 (build-system python-build-system)
3544 (propagated-inputs
3545 `(("python-dateutil" ,python-dateutil)
3546 ("python-six" ,python-six)))
3547 (native-inputs
3548 `(("python-setuptools-scm" ,python-setuptools-scm)))
3549 ;; Test would require path.py, which would introduce a cyclic dependence.
3550 (arguments `(#:tests? #f))
3551 ;; Note: As of version 1.7 the documentation is not worth building.
3552 (home-page "https://github.com/jaraco/rst.linker")
3553 (synopsis "Sphinx plugin to add links and timestamps")
3554 (description "rst.linker allows to automatically replace text by a
3555 reStructuredText external reference or timestamps. It's primary purpose is to
3556 augment the changelog, but it can be used for other documents, too.")
3557 (license license:expat)))
3558
3559 (define-public python2-rst.linker
3560 (package-with-python2 python-rst.linker))
3561
3562 (define-public python-feedgenerator
3563 (package
3564 (name "python-feedgenerator")
3565 (version "1.9")
3566 (source
3567 (origin
3568 (method url-fetch)
3569 (uri (pypi-uri "feedgenerator" version))
3570 (sha256
3571 (base32
3572 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3573 (modules '((guix build utils)))
3574 (snippet
3575 '(begin
3576 ;; Remove pre-compiled .pyc files from source.
3577 (for-each delete-file-recursively
3578 (find-files "." "__pycache__" #:directories? #t))
3579 (for-each delete-file (find-files "." "\\.pyc$"))
3580 #t))))
3581 (build-system python-build-system)
3582 (propagated-inputs
3583 `(("python-pytz" ,python-pytz)
3584 ("python-six" ,python-six)))
3585 (home-page "https://github.com/getpelican/feedgenerator")
3586 (synopsis
3587 "Standalone version of Django's Atom/RSS feed generator")
3588 (description
3589 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3590 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3591 (license license:bsd-3)))
3592
3593 (define-public python2-feedgenerator
3594 (package-with-python2 python-feedgenerator))
3595
3596 (define-public python-blinker
3597 (package
3598 (name "python-blinker")
3599 (version "1.4")
3600 (source
3601 (origin
3602 (method url-fetch)
3603 (uri (pypi-uri "blinker" version))
3604 (sha256
3605 (base32
3606 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3607 (build-system python-build-system)
3608 (home-page "http://pythonhosted.org/blinker/")
3609 (synopsis "Fast, simple object-to-object and broadcast signaling")
3610 (description
3611 "Blinker provides a fast dispatching system that allows any number of
3612 interested parties to subscribe to events, or \"signals\".")
3613 (license license:expat)))
3614
3615 (define-public python2-blinker
3616 (package-with-python2 python-blinker))
3617
3618 (define-public pelican
3619 (package
3620 (name "pelican")
3621 (version "3.6.3")
3622 (source
3623 (origin
3624 (method url-fetch)
3625 (uri (pypi-uri "pelican" version))
3626 (sha256
3627 (base32
3628 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
3629 (build-system python-build-system)
3630 (propagated-inputs
3631 `(("python-feedgenerator" ,python-feedgenerator)
3632 ("python-jinja2" ,python-jinja2)
3633 ("python-pygments" ,python-pygments)
3634 ("python-docutils" ,python-docutils)
3635 ("python-pytz" ,python-pytz)
3636 ("python-blinker" ,python-blinker)
3637 ("python-unidecode" ,python-unidecode)
3638 ("python-six" ,python-six)
3639 ("python-dateutil" ,python-dateutil)))
3640 (home-page "http://getpelican.com/")
3641 (arguments
3642 `(;; XXX Requires a lot more packages to do unit tests :P
3643 #:tests? #f
3644 #:phases (modify-phases %standard-phases
3645 (add-before
3646 'install 'adjust-requires
3647 ;; Since feedgenerator is installed from git, it doesn't
3648 ;; conform to the version requirements.
3649 ;;
3650 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3651 ;; version requirement so setuptools doesn't get confused.
3652 (lambda _
3653 (substitute* "setup.py"
3654 (("['\"]feedgenerator.*?['\"]")
3655 "'feedgenerator'")))))))
3656 (synopsis "Python-based static site publishing system")
3657 (description
3658 "Pelican is a tool to generate a static blog from reStructuredText,
3659 Markdown input files, and more. Pelican uses Jinja2 for templating
3660 and is very extensible.")
3661 (license license:agpl3+)))
3662
3663 (define-public python-scikit-learn
3664 (package
3665 (name "python-scikit-learn")
3666 (version "0.19.0")
3667 (source
3668 (origin
3669 (method url-fetch)
3670 (uri (string-append
3671 "https://github.com/scikit-learn/scikit-learn/archive/"
3672 version ".tar.gz"))
3673 (file-name (string-append name "-" version ".tar.gz"))
3674 (sha256
3675 (base32
3676 "0g7q4ri75mj93wpa9bp83a3jmrf3dm5va9h7k4zkbcxr6bgqka15"))))
3677 (build-system python-build-system)
3678 (arguments
3679 `(#:phases
3680 (modify-phases %standard-phases
3681 (delete 'check)
3682 (add-after 'install 'check
3683 ;; Running tests from the source directory requires
3684 ;; an "inplace" build with paths relative to CWD.
3685 ;; http://scikit-learn.org/stable/developers/advanced_installation.html#testing
3686 ;; Use the installed version instead.
3687 (lambda* (#:key inputs outputs #:allow-other-keys)
3688 (add-installed-pythonpath inputs outputs)
3689 ;; some tests require access to "$HOME"
3690 (setenv "HOME" "/tmp")
3691 ;; Step out of the source directory just to be sure.
3692 (chdir "..")
3693 (zero? (system* "nosetests" "-v" "sklearn")))))))
3694 (inputs
3695 `(("openblas" ,openblas)))
3696 (native-inputs
3697 `(("python-nose" ,python-nose)
3698 ("python-cython" ,python-cython)))
3699 (propagated-inputs
3700 `(("python-numpy" ,python-numpy)
3701 ("python-scipy" ,python-scipy)))
3702 (home-page "http://scikit-learn.org/")
3703 (synopsis "Machine Learning in Python")
3704 (description
3705 "Scikit-learn provides simple and efficient tools for data
3706 mining and data analysis.")
3707 (license license:bsd-3)))
3708
3709 (define-public python2-scikit-learn
3710 (package-with-python2 python-scikit-learn))
3711
3712 (define-public python-scikit-image
3713 (package
3714 (name "python-scikit-image")
3715 (version "0.11.3")
3716 (source
3717 (origin
3718 (method url-fetch)
3719 (uri (string-append
3720 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
3721 version ".tar.gz"))
3722 (sha256
3723 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
3724 (build-system python-build-system)
3725 (arguments
3726 ;; TODO: Some tests require running X11 server. Disable them?
3727 '(#:tests? #f))
3728 ;; See DEPENDS.txt for the list of build and run time requiremnts
3729 (propagated-inputs
3730 `(("python-matplotlib" ,python-matplotlib)
3731 ("python-networkx" ,python-networkx)
3732 ("python-scipy" ,python-scipy)
3733 ("python-pillow" ,python-pillow)))
3734 (native-inputs
3735 `(("python-numpy" ,python-numpy)
3736 ("python-cython" ,python-cython)
3737 ("python-six" ,python-six)))
3738 (home-page "http://scikit-image.org/")
3739 (synopsis "Image processing in Python")
3740 (description
3741 "Scikit-image is a collection of algorithms for image processing.")
3742 (license license:bsd-3)))
3743
3744 (define-public python2-scikit-image
3745 (package-with-python2 python-scikit-image))
3746
3747 (define-public python-redis
3748 (package
3749 (name "python-redis")
3750 (version "2.10.5")
3751 (source
3752 (origin
3753 (method url-fetch)
3754 (uri (pypi-uri "redis" version))
3755 (sha256
3756 (base32 "0csmrkxb29x7xs9b51zplwkkq2hwnbh9jns1g85dykn5rxmaxysx"))))
3757 (build-system python-build-system)
3758 ;; Tests require a running Redis server
3759 (arguments '(#:tests? #f))
3760 ;; As long as we are not running test, we do not need this input :-)
3761 ;;(native-inputs
3762 ;; `(("python-pytest" ,python-pytest)))
3763 (home-page "https://github.com/andymccurdy/redis-py")
3764 (synopsis "Redis Python client")
3765 (description
3766 "This package provides a Python interface to the Redis key-value store.")
3767 (license license:expat)))
3768
3769 (define-public python2-redis
3770 (package-with-python2 python-redis))
3771
3772 (define-public python-rq
3773 (package
3774 (name "python-rq")
3775 (version "0.7.1")
3776 (source
3777 (origin
3778 (method url-fetch)
3779 (uri (pypi-uri "rq" version))
3780 (sha256
3781 (base32 "0gaq5pnh0zy46r8jvygi0ifbvz3pq6i7xla78ijcgjw0x77qzsdh"))))
3782 (build-system python-build-system)
3783 (propagated-inputs
3784 `(("python-click" ,python-click)
3785 ("python-redis" ,python-redis)))
3786 (home-page "http://python-rq.org/")
3787 (synopsis "Simple job queues for Python")
3788 (description
3789 "RQ (Redis Queue) is a simple Python library for queueing jobs and
3790 processing them in the background with workers. It is backed by Redis and it
3791 is designed to have a low barrier to entry.")
3792 (license license:bsd-2)))
3793
3794 (define-public python2-rq
3795 (package-with-python2 python-rq))
3796
3797 (define-public python-cython
3798 (package
3799 (name "python-cython")
3800 (version "0.27")
3801 (source
3802 (origin
3803 (method url-fetch)
3804 (uri (pypi-uri "Cython" version))
3805 (sha256
3806 (base32
3807 "02y0pp1nx77b8s1mpxc6da2dccl6wd31pp4ksi9via479qcvacmr"))))
3808 (build-system python-build-system)
3809 ;; we need the full python package and not just the python-wrapper
3810 ;; because we need libpython3.3m.so
3811 (inputs
3812 `(("python" ,python)))
3813 (arguments
3814 `(#:phases
3815 (modify-phases %standard-phases
3816 (add-before 'check 'set-HOME
3817 ;; some tests require access to "$HOME/.cython"
3818 (lambda _ (setenv "HOME" "/tmp") #t))
3819 (replace 'check
3820 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
3821 (home-page "http://cython.org/")
3822 (synopsis "C extensions for Python")
3823 (description "Cython is an optimising static compiler for both the Python
3824 programming language and the extended Cython programming language. It makes
3825 writing C extensions for Python as easy as Python itself.")
3826 (license license:asl2.0)
3827 (properties `((python2-variant . ,(delay python2-cython))))))
3828
3829 (define-public python2-cython
3830 (package (inherit (package-with-python2
3831 (strip-python2-variant python-cython)))
3832 (name "python2-cython")
3833 (inputs
3834 `(("python-2" ,python-2))))) ; this is not automatically changed
3835
3836 ;; The RPython toolchain currently does not support Python 3.
3837 (define-public python2-rpython
3838 (package
3839 (name "python2-rpython")
3840 (version "0.1.4")
3841 (source
3842 (origin
3843 (method url-fetch)
3844 (uri (pypi-uri "rpython" version))
3845 (sha256
3846 (base32
3847 "07pps06fq4c4wmi5ii0sgh9zgwniz5y7frqhm28g3a154l163fxc"))))
3848 (build-system python-build-system)
3849 (arguments `(#:python ,python-2))
3850 (native-inputs
3851 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3852 (home-page "https://rpython.readthedocs.org")
3853 (synopsis "Framework for implementing interpreters and virtual machines")
3854 (description "RPython is a translation and support framework for
3855 producing implementations of dynamic languages, emphasizing a clean separation
3856 between language specification and implementation aspects.")
3857 (license license:expat)))
3858
3859 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3860 ;; python-scipy still build, as these three packages are often used together.
3861 (define-public python-numpy
3862 (package
3863 (name "python-numpy")
3864 (version "1.12.0")
3865 (source
3866 (origin
3867 (method url-fetch)
3868 (uri (string-append
3869 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3870 (file-name (string-append name "-" version ".tar.gz"))
3871 (sha256
3872 (base32
3873 "025d4j4aakcp8w5i5diqh812cbbjgac7jszx1j56ivrbi1i8vv7d"))))
3874 (build-system python-build-system)
3875 (inputs
3876 `(("openblas" ,openblas)
3877 ("lapack" ,lapack)))
3878 (native-inputs
3879 `(("python-cython" ,python-cython)
3880 ("python-nose" ,python-nose)
3881 ("gfortran" ,gfortran)))
3882 (arguments
3883 `(#:phases
3884 (modify-phases %standard-phases
3885 (add-before 'build 'set-environment-variables
3886 (lambda* (#:key inputs #:allow-other-keys)
3887 (call-with-output-file "site.cfg"
3888 (lambda (port)
3889 (format port
3890 "[openblas]
3891 libraries = openblas
3892 library_dirs = ~a/lib
3893 include_dirs = ~a/include
3894
3895 # backslash-n to make emacs happy
3896 \n[lapack]
3897 lapack_libs = lapack
3898 library_dirs = ~a/lib
3899 include_dirs = ~a/include
3900 "
3901 (assoc-ref inputs "openblas")
3902 (assoc-ref inputs "openblas")
3903 (assoc-ref inputs "lapack")
3904 (assoc-ref inputs "lapack"))))
3905 ;; Make /gnu/store/...-bash-.../bin/sh the default shell, instead of
3906 ;; /bin/sh.
3907 (substitute* "numpy/distutils/exec_command.py"
3908 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3909 (string-append match-start (assoc-ref inputs "bash") match-end)))
3910 ;; Use "gcc" executable, not "cc".
3911 (substitute* "numpy/distutils/system_info.py"
3912 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3913 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3914 #t))
3915 ;; Tests can only be run after the library has been installed and not
3916 ;; within the source directory.
3917 (delete 'check)
3918 (add-after 'install 'check
3919 (lambda* (#:key outputs inputs #:allow-other-keys)
3920 ;; Make installed package available for running the tests
3921 (add-installed-pythonpath inputs outputs)
3922 (with-directory-excursion "/tmp"
3923 (zero? (system* "python" "-c"
3924 "import numpy; numpy.test(verbose=2)"))))))))
3925 (home-page "http://www.numpy.org/")
3926 (synopsis "Fundamental package for scientific computing with Python")
3927 (description "NumPy is the fundamental package for scientific computing
3928 with Python. It contains among other things: a powerful N-dimensional array
3929 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3930 and Fortran code, useful linear algebra, Fourier transform, and random number
3931 capabilities.")
3932 (license license:bsd-3)))
3933
3934 (define-public python2-numpy
3935 (package-with-python2 python-numpy))
3936
3937 (define-public python-numpy-next
3938 (package (inherit python-numpy)
3939 (name "python-numpy-next")
3940 (version "1.13.1")
3941 (source
3942 (origin
3943 (method url-fetch)
3944 (uri (pypi-uri "numpy" version ".zip"))
3945 (sha256
3946 (base32
3947 "1fsgkhh1vdkhmlz8vmdgxnj9n9yaanckxxzz9s0b4p08fqvjic69"))))
3948 (native-inputs
3949 `(("unzip" ,unzip)
3950 ("python-cython" ,python-cython)
3951 ("python-nose" ,python-nose)
3952 ("gfortran" ,gfortran)))))
3953
3954 (define-public python2-numpy-next
3955 (package-with-python2 python-numpy-next))
3956
3957 (define-public python-munch
3958 (package
3959 (name "python-munch")
3960 (version "2.0.4")
3961 (source
3962 (origin
3963 (method url-fetch)
3964 (uri (pypi-uri "munch" version))
3965 (sha256
3966 (base32
3967 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3968 (build-system python-build-system)
3969 (home-page "https://github.com/Infinidat/munch")
3970 (synopsis "Dot-accessible dictionary")
3971 (description "Munch is a dot-accessible dictionary similar to JavaScript
3972 objects.")
3973 (license license:expat)))
3974
3975 (define-public python2-munch
3976 (package-with-python2 python-munch))
3977
3978 (define-public python-colormath
3979 (package
3980 (name "python-colormath")
3981 (version "2.1.1")
3982 (source
3983 (origin
3984 (method url-fetch)
3985 (uri (pypi-uri "colormath" version))
3986 (sha256
3987 (base32
3988 "01wp5xwm0a89wdm1dc9rr1ij90idzdiiipxdj1yslhqzkhnjnfh0"))))
3989 (build-system python-build-system)
3990 (propagated-inputs
3991 `(("python-networkx" ,python-networkx)
3992 ("python-numpy" ,python-numpy)))
3993 (home-page "https://github.com/gtaylor/python-colormath")
3994 (synopsis "Color math and conversion library")
3995 (description
3996 "This is a Python library for color math and conversions.")
3997 (license license:bsd-3)))
3998
3999 (define-public python2-colormath
4000 (package-with-python2 python-colormath))
4001
4002 (define-public python-spectra
4003 (package
4004 (name "python-spectra")
4005 (version "0.0.8")
4006 (source
4007 (origin
4008 (method url-fetch)
4009 (uri (pypi-uri "spectra" version))
4010 (sha256
4011 (base32
4012 "0n87kzhpkml2s2q91rdkl8wz2kkv5b0bkrgww45lxa5vq34qh6w5"))))
4013 (build-system python-build-system)
4014 (arguments
4015 `(#:phases
4016 (modify-phases %standard-phases
4017 (replace 'check
4018 (lambda _
4019 (zero? (system* "nosetests" "-v")))))))
4020 (propagated-inputs
4021 `(("python-colormath" ,python-colormath)))
4022 (native-inputs
4023 `(("python-nose" ,python-nose)))
4024 (home-page "http://github.com/jsvine/spectra")
4025 (synopsis "Color scales and color conversion")
4026 (description
4027 "This package provides a Python library intended to make color math,
4028 color scales, and color space conversion easy. It has support for:
4029
4030 @enumerate
4031 @item Color scales
4032 @item Color ranges
4033 @item Color blending
4034 @item Brightening/darkening colors
4035 @item Saturating/desaturating colors
4036 @item Conversion to/from multiple color spaces.
4037 @end enumerate\n")
4038 (license license:expat)))
4039
4040 (define-public python2-spectra
4041 (package-with-python2 python-spectra))
4042
4043 (define-public python2-fastlmm
4044 (package
4045 (name "python2-fastlmm")
4046 (version "0.2.21")
4047 (source
4048 (origin
4049 (method url-fetch)
4050 (uri (pypi-uri "fastlmm" version ".zip"))
4051 (sha256
4052 (base32
4053 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
4054 (build-system python-build-system)
4055 (arguments
4056 `(#:python ,python-2)) ; only Python 2.7 is supported
4057 (propagated-inputs
4058 `(("python2-numpy" ,python2-numpy)
4059 ("python2-scipy" ,python2-scipy)
4060 ("python2-matplotlib" ,python2-matplotlib)
4061 ("python2-pandas" ,python2-pandas)
4062 ("python2-scikit-learn" ,python2-scikit-learn)
4063 ("python2-pysnptools" ,python2-pysnptools)))
4064 (native-inputs
4065 `(("unzip" ,unzip)
4066 ("python2-cython" ,python2-cython)
4067 ("python2-mock" ,python2-mock)
4068 ("python2-nose" ,python2-nose)))
4069 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
4070 (synopsis "Perform genome-wide association studies on large data sets")
4071 (description
4072 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
4073 Models, is a program for performing both single-SNP and SNP-set genome-wide
4074 association studies (GWAS) on extremely large data sets.")
4075 (license license:asl2.0)))
4076
4077 (define-public python-numpy-documentation
4078 (package
4079 (name "python-numpy-documentation")
4080 (version (package-version python-numpy))
4081 (source (package-source python-numpy))
4082 (build-system python-build-system)
4083 (native-inputs
4084 `(("python-matplotlib" ,python-matplotlib)
4085 ("python-numpy" ,python-numpy)
4086 ("pkg-config" ,pkg-config)
4087 ("python-sphinx" ,python-sphinx)
4088 ("python-numpydoc" ,python-numpydoc)
4089 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
4090 texlive-fonts-ec
4091 texlive-generic-ifxetex
4092 texlive-generic-pdftex
4093 texlive-latex-amsfonts
4094 texlive-latex-capt-of
4095 texlive-latex-cmap
4096 texlive-latex-environ
4097 texlive-latex-eqparbox
4098 texlive-latex-etoolbox
4099 texlive-latex-expdlist
4100 texlive-latex-fancyhdr
4101 texlive-latex-fancyvrb
4102 texlive-latex-fncychap
4103 texlive-latex-float
4104 texlive-latex-framed
4105 texlive-latex-geometry
4106 texlive-latex-graphics
4107 texlive-latex-hyperref
4108 texlive-latex-mdwtools
4109 texlive-latex-multirow
4110 texlive-latex-oberdiek
4111 texlive-latex-parskip
4112 texlive-latex-preview
4113 texlive-latex-tabulary
4114 texlive-latex-threeparttable
4115 texlive-latex-titlesec
4116 texlive-latex-trimspaces
4117 texlive-latex-ucs
4118 texlive-latex-upquote
4119 texlive-latex-url
4120 texlive-latex-varwidth
4121 texlive-latex-wrapfig)))
4122 ("texinfo" ,texinfo)
4123 ("perl" ,perl)
4124 ("scipy-sphinx-theme"
4125 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
4126 (method git-fetch)
4127 (uri (git-reference
4128 (url "https://github.com/scipy/scipy-sphinx-theme.git")
4129 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
4130 (sha256
4131 (base32
4132 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
4133 ,@(package-native-inputs python-numpy)))
4134 (arguments
4135 `(#:tests? #f ; we're only generating the documentation
4136 #:phases
4137 (modify-phases %standard-phases
4138 (delete 'build)
4139 (replace 'install
4140 (lambda* (#:key inputs outputs #:allow-other-keys)
4141 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4142 (doc (string-append
4143 data "/doc/" ,name "-"
4144 ,(package-version python-numpy)))
4145 (info-reader (string-append data "/info"))
4146 (html (string-append doc "/html"))
4147 (scipy-sphinx-theme "scipy-sphinx-theme")
4148 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
4149 (pyver ,(string-append "PYVER=")))
4150
4151 ;; FIXME: this is needed to for texlive-union to generate
4152 ;; fonts, which are not found.
4153 (setenv "HOME" "/tmp")
4154
4155 (with-directory-excursion "doc"
4156 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
4157 (mkdir-p html)
4158 (system* "make" "html" pyver)
4159 (system* "make" "latex" "PAPER=a4" pyver)
4160 (system* "make" "-C" "build/latex"
4161 "all-pdf" "PAPER=a4" pyver)
4162 ;; FIXME: Generation of the info file fails.
4163 ;; (system* "make" "info" pyver)
4164 ;; (mkdir-p info)
4165 ;; (copy-file "build/texinfo/numpy.info"
4166 ;; (string-append info "/numpy.info"))
4167 (for-each (lambda (file)
4168 (copy-file (string-append "build/latex" file)
4169 (string-append doc file)))
4170 '("/numpy-ref.pdf" "/numpy-user.pdf"))
4171 (with-directory-excursion "build/html"
4172 (for-each (lambda (file)
4173 (let* ((dir (dirname file))
4174 (tgt-dir (string-append html "/" dir)))
4175 (unless (equal? "." dir)
4176 (mkdir-p tgt-dir))
4177 (install-file file html)))
4178 (find-files "." ".*")))))
4179 #t)))))
4180 (home-page (package-home-page python-numpy))
4181 (synopsis "Documentation for the python-numpy package")
4182 (description (package-description python-numpy))
4183 (license (package-license python-numpy))))
4184
4185 (define-public python2-numpy-documentation
4186 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
4187 (package
4188 (inherit numpy-documentation)
4189 (native-inputs `(("python2-functools32" ,python2-functools32)
4190 ,@(package-native-inputs numpy-documentation))))))
4191
4192 (define-public python-pygit2
4193 (package
4194 (name "python-pygit2")
4195 (version "0.26.0")
4196 (source
4197 (origin
4198 (method url-fetch)
4199 (uri (pypi-uri "pygit2" version))
4200 (sha256
4201 (base32
4202 "1cbc488ra3kg7r3qky17ms0szi3cda2d96qfkv1l9djsy9hnvw57"))
4203 (patches
4204 (search-patches "python-pygit2-disable-network-tests.patch"))))
4205 (build-system python-build-system)
4206 (propagated-inputs
4207 `(("python-six" ,python-six)
4208 ("python-cffi" ,python-cffi)
4209 ("libgit2" ,libgit2)
4210 ("python-tox" ,python-tox)))
4211 (home-page "https://github.com/libgit2/pygit2")
4212 (synopsis "Python bindings for libgit2")
4213 (description "Pygit2 is a set of Python bindings to the libgit2 shared
4214 library, libgit2 implements Git plumbing.")
4215 ;; GPL2.0 only, with linking exception.
4216 (license license:gpl2)))
4217
4218 (define-public python2-pygit2
4219 (package-with-python2 python-pygit2))
4220
4221 (define-public python-pyparsing
4222 (package
4223 (name "python-pyparsing")
4224 (version "2.2.0")
4225 (source
4226 (origin
4227 (method url-fetch)
4228 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
4229 "/pyparsing-" version
4230 "/pyparsing-" version ".tar.gz"))
4231 (sha256
4232 (base32
4233 "016b9gh606aa44sq92jslm89bg874ia0yyiyb643fa6dgbsbqch8"))))
4234 (build-system python-build-system)
4235 (outputs '("out" "doc"))
4236 (arguments
4237 `(#:tests? #f ; no test target
4238 #:phases
4239 (modify-phases %standard-phases
4240 (add-after 'install 'install-doc
4241 (lambda* (#:key outputs #:allow-other-keys)
4242 (let* ((doc (string-append (assoc-ref outputs "doc")
4243 "/share/doc/" ,name "-" ,version))
4244 (html-doc (string-append doc "/html"))
4245 (examples (string-append doc "/examples")))
4246 (mkdir-p html-doc)
4247 (mkdir-p examples)
4248 (for-each
4249 (lambda (dir tgt)
4250 (map (lambda (file)
4251 (install-file file tgt))
4252 (find-files dir ".*")))
4253 (list "docs" "htmldoc" "examples")
4254 (list doc html-doc examples))
4255 #t))))))
4256 (home-page "http://pyparsing.wikispaces.com")
4257 (synopsis "Python parsing class library")
4258 (description
4259 "The pyparsing module is an alternative approach to creating and
4260 executing simple grammars, vs. the traditional lex/yacc approach, or the use
4261 of regular expressions. The pyparsing module provides a library of classes
4262 that client code uses to construct the grammar directly in Python code.")
4263 (license license:expat)))
4264
4265 (define-public python2-pyparsing
4266 (package-with-python2 python-pyparsing))
4267
4268 (define-public python-numpydoc
4269 (package
4270 (name "python-numpydoc")
4271 (version "0.5")
4272 (source
4273 (origin
4274 (method url-fetch)
4275 (uri (string-append
4276 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
4277 version ".tar.gz"))
4278 (sha256
4279 (base32
4280 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
4281 (modules '((guix build utils)))
4282 (snippet
4283 '(begin
4284 ;; Drop a test requiring matplotlib, which we cannot add as an
4285 ;; input since it would create a circular dependency: Extend the
4286 ;; test for Python 3, where it is already dropped, to Python 2.
4287 (substitute* "numpydoc/tests/test_plot_directive.py"
4288 (("3") "2"))))))
4289 (build-system python-build-system)
4290 (propagated-inputs
4291 `(("python-sphinx" ,python-sphinx)))
4292 (native-inputs
4293 `(("python-nose" ,python-nose)))
4294 (home-page "https://pypi.python.org/pypi/numpydoc")
4295 (synopsis
4296 "Numpy's Sphinx extensions")
4297 (description
4298 "Sphinx extension to support docstrings in Numpy format.")
4299 (license license:bsd-2)))
4300
4301 (define-public python2-numpydoc
4302 (package-with-python2 python-numpydoc))
4303
4304 (define-public python-numexpr
4305 (package
4306 (name "python-numexpr")
4307 (version "2.6.4")
4308 (source
4309 (origin
4310 (method url-fetch)
4311 (uri (pypi-uri "numexpr" version))
4312 (sha256
4313 (base32
4314 "1kpnbb5d5n927113zccfibn16z7gidjipyac6kbbhzs0lnizkgph"))))
4315 (build-system python-build-system)
4316 (arguments `(#:tests? #f)) ; no tests included
4317 (propagated-inputs
4318 `(("python-numpy" ,python-numpy)))
4319 (home-page "https://github.com/pydata/numexpr")
4320 (synopsis "Fast numerical expression evaluator for NumPy")
4321 (description
4322 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
4323 expressions that operate on arrays are accelerated and use less memory than
4324 doing the same calculation in Python. In addition, its multi-threaded
4325 capabilities can make use of all your cores, which may accelerate
4326 computations, most specially if they are not memory-bounded (e.g. those using
4327 transcendental functions).")
4328 (license license:expat)))
4329
4330 (define-public python2-numexpr
4331 (package-with-python2 python-numexpr))
4332
4333 (define-public python-cycler
4334 (package
4335 (name "python-cycler")
4336 (version "0.10.0")
4337 (source (origin
4338 (method url-fetch)
4339 (uri (pypi-uri "cycler" version))
4340 (sha256
4341 (base32
4342 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
4343 (build-system python-build-system)
4344 (arguments
4345 ;; XXX: The current version requires 'coveralls' which we don't have.
4346 ;; Enable this for the next release which uses 'python-pytest'.
4347 '(#:tests? #f))
4348 (propagated-inputs
4349 `(("python-six" ,python-six)))
4350 (home-page "http://matplotlib.org/cycler/")
4351 (synopsis "Composable keyword argument iterator")
4352 (description
4353 "When using @code{matplotlib} and plotting more than one line, it is
4354 common to want to be able to want to be able to cycle over one or more artist
4355 styles; but the plotting logic can quickly become involved.
4356 To address this and enable easy cycling over arbitrary @code{kwargs}, the
4357 @code{Cycler} class was developed.")
4358 (license license:bsd-3)))
4359
4360 (define-public python2-cycler
4361 (package-with-python2 python-cycler))
4362
4363 (define-public python-colorspacious
4364 (package
4365 (name "python-colorspacious")
4366 (version "1.1.0")
4367 (source
4368 (origin
4369 (method url-fetch)
4370 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
4371 version ".tar.gz"))
4372 (file-name (string-append name "-" version))
4373 (sha256
4374 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
4375 (build-system python-build-system)
4376 (propagated-inputs
4377 `(("python-numpy" ,python-numpy)))
4378 (native-inputs
4379 `(("python-nose" ,python-nose)))
4380 (arguments
4381 `(#:phases
4382 (modify-phases %standard-phases
4383 (replace 'check
4384 (lambda _
4385 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
4386 (home-page "https://github.com/njsmith/colorspacious")
4387 (synopsis "Python library for colorspace conversions")
4388 (description "@code{colorspacious} is a Python library that lets you
4389 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
4390 (license license:expat)))
4391
4392 (define-public python2-colorspacious
4393 (package-with-python2 python-colorspacious))
4394
4395 (define-public python-matplotlib
4396 (package
4397 (name "python-matplotlib")
4398 (version "2.0.2")
4399 (source
4400 (origin
4401 (method url-fetch)
4402 (uri (pypi-uri "matplotlib" version))
4403 (sha256
4404 (base32
4405 "1w8z2a1l7s72p1byfz7g03wqhygqxi8w82619dqb3a1lm97w9yqg"))))
4406 (build-system python-build-system)
4407 (propagated-inputs ; the following packages are all needed at run time
4408 `(("python-cycler" ,python-cycler)
4409 ("python-pyparsing" ,python-pyparsing)
4410 ("python-pygobject" ,python-pygobject)
4411 ("gobject-introspection" ,gobject-introspection)
4412 ("python-tkinter" ,python "tk")
4413 ("python-dateutil" ,python-dateutil)
4414 ("python-numpy" ,python-numpy)
4415 ("python-pillow" ,python-pillow)
4416 ("python-pytz" ,python-pytz)
4417 ("python-six" ,python-six)
4418 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
4419 ;; from 'gtk+') provides the required 'typelib' files used by
4420 ;; 'gobject-introspection'. The location of these files is set with the
4421 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
4422 ;; is done automatically by a 'native-search-path' procedure. However,
4423 ;; at run-time the user must set this variable as follows:
4424 ;;
4425 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
4426 ("gtk+" ,gtk+)
4427 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
4428 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
4429 ;; object. For this reason we need to import both libraries.
4430 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
4431 ("python-pycairo" ,python-pycairo)
4432 ("python-cairocffi" ,python-cairocffi)))
4433 (inputs
4434 `(("libpng" ,libpng)
4435 ("imagemagick" ,imagemagick)
4436 ("freetype" ,freetype)
4437 ("cairo" ,cairo)
4438 ("glib" ,glib)
4439 ;; FIXME: Add backends when available.
4440 ;("python-wxpython" ,python-wxpython)
4441 ("python-pyqt" ,python-pyqt)
4442 ("tcl" ,tcl)
4443 ("tk" ,tk)))
4444 (native-inputs
4445 `(("pkg-config" ,pkg-config)
4446 ("python-nose" ,python-nose)
4447 ("python-mock" ,python-mock)))
4448 (arguments
4449 `(#:phases
4450 (modify-phases %standard-phases
4451 (add-before 'build 'configure-environment
4452 (lambda* (#:key outputs inputs #:allow-other-keys)
4453 (let ((cairo (assoc-ref inputs "cairo"))
4454 (gtk+ (assoc-ref inputs "gtk+")))
4455 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
4456 ;; has not effect.
4457 (setenv "LD_LIBRARY_PATH"
4458 (string-append cairo "/lib:" gtk+ "/lib"))
4459 (setenv "HOME" (getcwd))
4460 (call-with-output-file "setup.cfg"
4461 (lambda (port)
4462 (format port "[directories]~%
4463 basedirlist = ~a,~a~%
4464 [rc_options]~%
4465 backend = TkAgg~%"
4466 (assoc-ref inputs "tcl")
4467 (assoc-ref inputs "tk")))))
4468 #t)))))
4469 (home-page "http://matplotlib.org")
4470 (synopsis "2D plotting library for Python")
4471 (description
4472 "Matplotlib is a Python 2D plotting library which produces publication
4473 quality figures in a variety of hardcopy formats and interactive environments
4474 across platforms. Matplotlib can be used in Python scripts, the python and
4475 ipython shell, web application servers, and six graphical user interface
4476 toolkits.")
4477 (license license:psfl)
4478 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4479
4480 (define-public python2-matplotlib
4481 (let ((matplotlib (package-with-python2
4482 (strip-python2-variant python-matplotlib))))
4483 (package (inherit matplotlib)
4484 ;; Make sure to use special packages for Python 2 instead
4485 ;; of those automatically rewritten by package-with-python2.
4486 (propagated-inputs
4487 `(("python2-pycairo" ,python2-pycairo)
4488 ("python2-functools32" ,python2-functools32)
4489 ("python2-pygobject-2" ,python2-pygobject-2)
4490 ("python2-subprocess32" ,python2-subprocess32)
4491 ("python2-tkinter" ,python-2 "tk")
4492 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4493 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4494
4495 (define-public python-matplotlib-documentation
4496 (package
4497 (name "python-matplotlib-documentation")
4498 (version (package-version python-matplotlib))
4499 (source (package-source python-matplotlib))
4500 (build-system python-build-system)
4501 (native-inputs
4502 `(("python-matplotlib" ,python-matplotlib)
4503 ("python-colorspacious" ,python-colorspacious)
4504 ("python-sphinx" ,python-sphinx)
4505 ("python-numpydoc" ,python-numpydoc)
4506 ("python-ipython" ,python-ipython)
4507 ("python-mock" ,python-mock)
4508 ("graphviz" ,graphviz)
4509 ("texlive" ,texlive)
4510 ("texinfo" ,texinfo)
4511 ,@(package-native-inputs python-matplotlib)))
4512 (arguments
4513 `(#:tests? #f ; we're only generating documentation
4514 #:phases
4515 (modify-phases %standard-phases
4516 (replace 'build
4517 (lambda _
4518 (chdir "doc")
4519 ;; Produce pdf in 'A4' format.
4520 (substitute* "conf.py"
4521 (("latex_paper_size = 'letter'") "")
4522 ;; latex_paper_size is deprecated -> set paper size using
4523 ;; latex_elements
4524 (("latex_elements\\['pointsize'\\] = '11pt'" match)
4525 ;; insert at a point where latex_elements{} is defined:
4526 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
4527 (zero? (system* "python" "make.py" "html" "latex" "texinfo"))))
4528 (replace 'install
4529 (lambda* (#:key inputs outputs #:allow-other-keys)
4530 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4531 (doc (string-append data "/doc/python-matplotlib-" ,version))
4532 (info (string-append data "/info"))
4533 (html (string-append doc "/html")))
4534 (mkdir-p html)
4535 (mkdir-p info)
4536 (copy-recursively "build/html" html)
4537 (symlink (string-append html "/_images")
4538 (string-append info "/matplotlib-figures"))
4539 (with-directory-excursion "build/texinfo"
4540 (substitute* "matplotlib.texi"
4541 (("@image\\{([^,]*)" all file)
4542 (string-append "@image{matplotlib-figures/" file)))
4543 (symlink (string-append html "/_images")
4544 "./matplotlib-figures")
4545 (system* "makeinfo" "--no-split"
4546 "-o" "matplotlib.info" "matplotlib.texi"))
4547 (copy-file "build/texinfo/matplotlib.info"
4548 (string-append info "/matplotlib.info"))
4549 (copy-file "build/latex/Matplotlib.pdf"
4550 (string-append doc "/Matplotlib.pdf")))
4551 #t)))))
4552 (home-page (package-home-page python-matplotlib))
4553 (synopsis "Documentation for the python-matplotlib package")
4554 (description (package-description python-matplotlib))
4555 (license (package-license python-matplotlib))))
4556
4557 (define-public python2-matplotlib-documentation
4558 (package-with-python2 python-matplotlib-documentation))
4559
4560 (define-public python2-pysnptools
4561 (package
4562 (name "python2-pysnptools")
4563 (version "0.3.9")
4564 (source
4565 (origin
4566 (method url-fetch)
4567 (uri (pypi-uri "pysnptools" version ".zip"))
4568 (sha256
4569 (base32
4570 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
4571 (build-system python-build-system)
4572 (arguments
4573 `(#:python ,python-2)) ; only Python 2.7 is supported
4574 (propagated-inputs
4575 `(("python2-numpy" ,python2-numpy)
4576 ("python2-scipy" ,python2-scipy)
4577 ("python2-pandas" ,python2-pandas)))
4578 (native-inputs
4579 `(("python2-cython" ,python2-cython)))
4580 (native-inputs
4581 `(("unzip" ,unzip)))
4582 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
4583 (synopsis "Library for reading and manipulating genetic data")
4584 (description
4585 "PySnpTools is a library for reading and manipulating genetic data. It
4586 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4587 those files. It can also efficiently manipulate ranges of integers using set
4588 operators such as union, intersection, and difference.")
4589 (license license:asl2.0)))
4590
4591 (define-public python-rpy2
4592 (package
4593 (name "python-rpy2")
4594 (version "2.9.0")
4595 (source
4596 (origin
4597 (method url-fetch)
4598 (uri (pypi-uri "rpy2" version))
4599 (sha256
4600 (base32
4601 "0bqihjrdqwj5r1h86shvfb1p5hfr4a6klv1v54bzfr9r144w3rni"))))
4602 (build-system python-build-system)
4603 (arguments
4604 '(#:modules ((ice-9 ftw)
4605 (srfi srfi-1)
4606 (srfi srfi-26)
4607 (guix build utils)
4608 (guix build python-build-system))
4609 #:phases
4610 (modify-phases %standard-phases
4611 ;; Without this phase the test loader cannot find the directories, in
4612 ;; which it is supposed to look for test files.
4613 (add-after 'unpack 'fix-tests
4614 (lambda* (#:key outputs #:allow-other-keys)
4615 (substitute* "rpy/tests.py"
4616 (("loader.discover\\(")
4617 "loader.discover(rpy_root + '/' +"))
4618 #t))
4619 (replace 'check
4620 (lambda* (#:key outputs inputs #:allow-other-keys)
4621 (let ((cwd (getcwd)))
4622 (setenv "PYTHONPATH"
4623 (string-append cwd "/build/"
4624 (find (cut string-prefix? "lib" <>)
4625 (scandir (string-append cwd "/build")))
4626 ":"
4627 (getenv "PYTHONPATH"))))
4628 ;; FIXME: Even when all tests pass, the check phase will fail.
4629 (system* "python" "-m" "rpy2.tests" "-v"))))))
4630 (propagated-inputs
4631 `(("python-six" ,python-six)
4632 ("python-jinja2" ,python-jinja2)
4633 ("python-pytz" ,python-pytz)))
4634 (inputs
4635 `(("readline" ,readline)
4636 ("icu4c" ,icu4c)
4637 ("pcre" ,pcre)
4638 ("r-minimal" ,r-minimal)
4639 ("r-survival" ,r-survival)
4640 ("r-ggplot2" ,r-ggplot2)
4641 ("r-rsqlite" ,r-rsqlite)
4642 ("r-dplyr" ,r-dplyr)
4643 ("r-dbplyr" ,r-dbplyr)
4644 ("python-numpy" ,python-numpy)))
4645 (native-inputs
4646 `(("zlib" ,zlib)))
4647 (home-page "http://rpy.sourceforge.net/")
4648 (synopsis "Python interface to the R language")
4649 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
4650 low-level interface to R from Python, a proposed high-level interface,
4651 including wrappers to graphical libraries, as well as R-like structures and
4652 functions.")
4653 ;; Any of these licenses can be picked for the R interface. The whole
4654 ;; project is released under GPLv2+ according to the license declaration
4655 ;; in "setup.py".
4656 (license (list license:mpl2.0 license:gpl2+ license:lgpl2.1+))))
4657
4658 (define-public python-scipy
4659 (package
4660 (name "python-scipy")
4661 (version "0.19.1")
4662 (source
4663 (origin
4664 (method url-fetch)
4665 (uri (pypi-uri "scipy" version))
4666 (sha256
4667 (base32
4668 "1rl411bvla6q7qfdb47fpdnyjhfgzl6smpha33n9ar1klykjr6m1"))))
4669 (build-system python-build-system)
4670 (propagated-inputs
4671 `(("python-numpy" ,python-numpy)
4672 ("python-matplotlib" ,python-matplotlib)
4673 ("python-pyparsing" ,python-pyparsing)))
4674 (inputs
4675 `(("lapack" ,lapack)
4676 ("openblas" ,openblas)))
4677 (native-inputs
4678 `(("python-cython" ,python-cython)
4679 ("python-nose" ,python-nose)
4680 ("python-sphinx" ,python-sphinx)
4681 ("python-numpydoc" ,python-numpydoc)
4682 ("gfortran" ,gfortran)
4683 ("perl" ,perl)))
4684 (outputs '("out" "doc"))
4685 (arguments
4686 `(#:phases
4687 (modify-phases %standard-phases
4688 (add-before 'build 'configure-openblas
4689 (lambda* (#:key inputs #:allow-other-keys)
4690 (call-with-output-file "site.cfg"
4691 (lambda (port)
4692 (format port
4693 "[blas]
4694 libraries = openblas
4695 library_dirs = ~a/lib
4696 include_dirs = ~a/include
4697
4698 # backslash-n to make emacs happy
4699 \n[atlas]
4700 library_dirs = ~a/lib
4701 atlas_libs = openblas
4702 "
4703 (assoc-ref inputs "openblas")
4704 (assoc-ref inputs "openblas")
4705 (assoc-ref inputs "openblas"))))
4706 #t))
4707 (add-after 'install 'install-doc
4708 (lambda* (#:key inputs outputs #:allow-other-keys)
4709 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4710 (doc (string-append data "/doc/" ,name "-" ,version))
4711 (html (string-append doc "/html"))
4712 (pyver ,(string-append "PYVER=")))
4713 ;; Make installed package available for building the
4714 ;; documentation
4715 (add-installed-pythonpath inputs outputs)
4716 (with-directory-excursion "doc"
4717 ;; Fix generation of images for mathematical expressions.
4718 (substitute* (find-files "source" "conf\\.py")
4719 (("pngmath_use_preview = True")
4720 "pngmath_use_preview = False"))
4721 (mkdir-p html)
4722 (system* "make" "html" pyver)
4723 (with-directory-excursion "build/html"
4724 (for-each (lambda (file)
4725 (let* ((dir (dirname file))
4726 (tgt-dir (string-append html "/" dir)))
4727 (install-file file html)))
4728 (find-files "." ".*")))))
4729 #t))
4730 (add-after 'unpack 'fix-tests
4731 (lambda _
4732 (substitute* "scipy/integrate/tests/test_quadpack.py"
4733 (("libm.so") "libm.so.6"))
4734 #t))
4735 ;; Tests can only be run after the library has been installed and not
4736 ;; within the source directory.
4737 (delete 'check)
4738 (add-after 'install 'check
4739 (lambda* (#:key inputs outputs #:allow-other-keys)
4740 (add-installed-pythonpath inputs outputs)
4741 (with-directory-excursion "/tmp"
4742 (zero? (system* "python" "-c"
4743 "import scipy; scipy.test('full')")))
4744 #t)))))
4745 (home-page "http://www.scipy.org/")
4746 (synopsis "The Scipy library provides efficient numerical routines")
4747 (description "The SciPy library is one of the core packages that make up
4748 the SciPy stack. It provides many user-friendly and efficient numerical
4749 routines such as routines for numerical integration and optimization.")
4750 (properties `((python2-variant . ,(delay python2-scipy))))
4751 (license license:bsd-3)))
4752
4753 (define-public python2-scipy
4754 (package-with-python2
4755 (strip-python2-variant python-scipy)))
4756
4757 (define-public python-sockjs-tornado
4758 (package
4759 (name "python-sockjs-tornado")
4760 (version "1.0.3")
4761 (source
4762 (origin
4763 (method url-fetch)
4764 (uri (pypi-uri "sockjs-tornado" version))
4765 (sha256
4766 (base32
4767 "16cff40nniqsyvda1pb2j3b4zwmrw7y2g1vqq78lp20xpmhnwwkd"))))
4768 (build-system python-build-system)
4769 (arguments
4770 `(;; There are no tests, and running the test phase requires missing
4771 ;; dependencies
4772 #:tests? #f))
4773 (propagated-inputs
4774 `(("python-tornado" ,python-tornado)))
4775 (home-page "http://github.com/mrjoes/sockjs-tornado/")
4776 (synopsis
4777 "SockJS python server implementation on top of Tornado framework")
4778 (description
4779 "SockJS-tornado provides the server side counterpart to a SockJS client
4780 library, through the Tornado framework.
4781
4782 SockJS provides a low latency, full duplex, cross-domain communication channel
4783 between a web browser and web server.")
4784 (license license:expat)))
4785
4786 (define-public python2-sockjs-tornado
4787 (package-with-python2 python-sockjs-tornado))
4788
4789 (define-public python-socksipy-branch
4790 (package
4791 (name "python-socksipy-branch")
4792 (version "1.01")
4793 (source
4794 (origin
4795 (method url-fetch)
4796 (uri (pypi-uri "SocksiPy-branch" version))
4797 (sha256
4798 (base32
4799 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4800 (build-system python-build-system)
4801 (arguments
4802 `(#:tests? #f)) ; There are no tests
4803 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4804 (synopsis "Python SOCKS module")
4805 (description
4806 "SocksiPy - A Python SOCKS client module. It provides a
4807 socket-like interface that supports connections to any TCP
4808 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4809 The original version was developed by Dan Haim, this is a
4810 branch created by Mario Vilas to address some open issues,
4811 as the original project seems to have been abandoned circa 2007.")
4812 (license license:bsd-3)))
4813
4814 (define-public python2-socksipy-branch
4815 (package-with-python2 python-socksipy-branch))
4816
4817 (define-public python-sqlalchemy
4818 (package
4819 (name "python-sqlalchemy")
4820 (version "1.0.12")
4821 (source
4822 (origin
4823 (method url-fetch)
4824 (uri (string-append "https://pypi.python.org/packages/source/S/"
4825 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
4826 (sha256
4827 (base32
4828 "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
4829 (build-system python-build-system)
4830 (native-inputs
4831 `(("python-cython" ,python-cython) ;for c extensions
4832 ("python-pytest" ,python-pytest)
4833 ("python-mock" ,python-mock))) ;for tests
4834 (arguments
4835 `(#:phases
4836 (modify-phases %standard-phases
4837 (replace 'check
4838 (lambda _ (zero? (system* "py.test")))))))
4839 (home-page "http://www.sqlalchemy.org")
4840 (synopsis "Database abstraction library")
4841 (description
4842 "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
4843 gives application developers the full power and flexibility of SQL. It
4844 provides a full suite of well known enterprise-level persistence patterns,
4845 designed for efficient and high-performing database access, adapted into a
4846 simple and Pythonic domain language.")
4847 (license license:x11)))
4848
4849 (define-public python2-sqlalchemy
4850 (package-with-python2 python-sqlalchemy))
4851
4852 (define-public python-pycodestyle
4853 (package
4854 (name "python-pycodestyle")
4855 (version "2.3.1")
4856 (source
4857 (origin
4858 (method url-fetch)
4859 (uri (pypi-uri "pycodestyle" version))
4860 (sha256
4861 (base32
4862 "0rk78b66p57ala26mdldl9lafr48blv5s659sah9q50qnfjmc8k8"))))
4863 (build-system python-build-system)
4864 (home-page "https://pycodestyle.readthedocs.io/")
4865 (synopsis "Python style guide checker")
4866 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4867 Python code against some of the style conventions in
4868 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4869 (license license:expat)))
4870
4871 (define-public python2-pycodestyle
4872 (package-with-python2 python-pycodestyle))
4873
4874 (define-public python-orderedmultidict
4875 (package
4876 (name "python-orderedmultidict")
4877 (version "0.7.11")
4878 (source
4879 (origin
4880 (method url-fetch)
4881 (uri (pypi-uri "orderedmultidict" version))
4882 (sha256
4883 (base32
4884 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4885 (build-system python-build-system)
4886 (arguments
4887 `(#:phases
4888 (modify-phases %standard-phases
4889 (add-after 'unpack 'fix-tests
4890 (lambda _
4891 ;; The package uses nosetest for running the tests.
4892 ;; Adding this initfile allows to run the test suite
4893 ;; without requiring nosetest.
4894 (zero? (system* "touch" "tests/__init__.py")))))))
4895 (propagated-inputs
4896 `(("python-six" ,python-six)))
4897 (native-inputs
4898 `(("python-pycodestyle" ,python-pycodestyle)))
4899 (home-page "https://github.com/gruns/orderedmultidict")
4900 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4901 (description "This package contains a library for ordered multivalue
4902 dictionaries. A multivalue dictionary is a dictionary that can store
4903 multiple values for the same key. An ordered multivalue dictionary is a
4904 multivalue dictionary that retains the order of insertions and deletions.")
4905 (license license:unlicense)))
4906
4907 (define-public python2-orderedmultidict
4908 (package-with-python2 python-orderedmultidict))
4909
4910 (define-public python-furl
4911 (package
4912 (name "python-furl")
4913 (version "0.5.6")
4914 (source
4915 (origin
4916 (method url-fetch)
4917 (uri (pypi-uri "furl" version))
4918 (sha256
4919 (base32
4920 "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
4921 (build-system python-build-system)
4922 (propagated-inputs
4923 `(("python-six" ,python-six)
4924 ("python-orderedmultidict" ,python-orderedmultidict)))
4925 (native-inputs
4926 `(("python-pycodestyle" ,python-pycodestyle)))
4927 (home-page "https://github.com/gruns/furl")
4928 (synopsis "URL manipulation in Python")
4929 (description "Furl provides an easy-to-use alternative to the
4930 @code{urllib} and @code{urlparse} modules for manipulating URLs.")
4931 (license license:unlicense)))
4932
4933 (define-public python2-furl
4934 (package-with-python2 python-furl))
4935
4936 (define-public python-flaky
4937 (package
4938 (name "python-flaky")
4939 (version "3.4.0")
4940 (source (origin
4941 (method url-fetch)
4942 (uri (pypi-uri "flaky" version))
4943 (sha256
4944 (base32
4945 "18pkmf79rfkfpy1d2rrx3v55nxj762ilyk9rvd6s6dccxw58imsa"))))
4946 (build-system python-build-system)
4947 (arguments
4948 ;; TODO: Tests require 'coveralls' and 'genty' which are not in Guix yet.
4949 '(#:tests? #f))
4950 (home-page "https://github.com/box/flaky")
4951 (synopsis "Automatically rerun flaky tests")
4952 (description
4953 "Flaky is a plugin for @code{nose} or @code{py.test} that automatically
4954 reruns flaky tests.
4955
4956 Ideally, tests reliably pass or fail, but sometimes test fixtures must rely
4957 on components that aren't 100% reliable. With flaky, instead of removing
4958 those tests or marking them to @code{@@skip}, they can be automatically
4959 retried.")
4960 (license license:asl2.0)))
4961
4962 (define-public python2-flaky
4963 (package-with-python2 python-flaky))
4964
4965 (define-public python-flask-babel
4966 (package
4967 (name "python-flask-babel")
4968 (version "0.11.1")
4969 (source
4970 (origin
4971 (method url-fetch)
4972 (uri (pypi-uri "Flask-Babel" version))
4973 (sha256
4974 (base32
4975 "16b80cipdba9xj3jlaiaq6wgrgpjb70w3j01jjy9hbp4k71kd6yj"))))
4976 (build-system python-build-system)
4977 (propagated-inputs
4978 `(("python-flask" ,python-flask)
4979 ("python-babel" ,python-babel)
4980 ("python-jinja2" ,python-jinja2)
4981 ("python-pytz" ,python-pytz)))
4982 (home-page "https://github.com/python-babel/flask-babel")
4983 (synopsis "Add i18n/l10n support to Flask applications")
4984 (description "This package implements internationalization and localization
4985 support for Flask. This is based on the Python babel module as well as pytz -
4986 both of which are installed automatically if you install this library.")
4987 (license license:bsd-3)))
4988
4989 (define-public python2-flask-babel
4990 (package-with-python2 python-flask-babel))
4991
4992 (define-public python-sqlalchemy-utils
4993 (package
4994 (name "python-sqlalchemy-utils")
4995 (version "0.32.13")
4996 (source
4997 (origin
4998 (method url-fetch)
4999 (uri (pypi-uri "SQLAlchemy-Utils" version))
5000 (sha256
5001 (base32
5002 "0vsib7gidjamzsz6w4s5pdhxzxsrkghjnm4sqwk94igjrl3i5ixj"))))
5003 (build-system python-build-system)
5004 (arguments
5005 '(#:tests? #f)) ; FIXME: Many tests require a running database server.
5006 ;; #:phases
5007 ;; (modify-phases %standard-phases
5008 ;; (replace 'check
5009 ;; (lambda _
5010 ;; (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
5011 (propagated-inputs
5012 `(("python-six" ,python-six)
5013 ("python-sqlalchemy" ,python-sqlalchemy)))
5014 (native-inputs
5015 `(("python-dateutil" ,python-dateutil)
5016 ("python-flexmock" ,python-flexmock)
5017 ("python-psycopg2" ,python-psycopg2)
5018 ("python-pytest" ,python-pytest)
5019 ("python-pytz" ,python-pytz)))
5020 (home-page "https://github.com/kvesteri/sqlalchemy-utils")
5021 (synopsis "Various utility functions for SQLAlchemy")
5022 (description
5023 "SQLAlchemy-utils provides various utility functions and custom data types
5024 for SQLAlchemy. SQLAlchemy is an SQL database abstraction library for Python.
5025
5026 You might also want to install the following optional dependencies:
5027 @enumerate
5028 @item @code{python-passlib}
5029 @item @code{python-babel}
5030 @item @code{python-cryptography}
5031 @item @code{python-pytz}
5032 @item @code{python-psycopg2}
5033 @item @code{python-furl}
5034 @item @code{python-flask-babel}
5035 @end enumerate
5036 ")
5037 (license license:bsd-3)))
5038
5039 (define-public python2-sqlalchemy-utils
5040 (package-with-python2 python-sqlalchemy-utils))
5041
5042 (define-public python-alembic
5043 (package
5044 (name "python-alembic")
5045 (version "0.9.5")
5046 (source
5047 (origin
5048 (method url-fetch)
5049 (uri (pypi-uri "alembic" version))
5050 (sha256
5051 (base32
5052 "01gx2syqbaxh4hr9pf7pxhlb6p36qaf99140dy19lsx1paxb9p4b"))))
5053 (build-system python-build-system)
5054 (native-inputs
5055 `(("python-mock" ,python-mock)
5056 ("python-pytest-cov" ,python-pytest-cov)))
5057 (propagated-inputs
5058 `(("python-dateutil" ,python-dateutil)
5059 ("python-sqlalchemy" ,python-sqlalchemy)
5060 ("python-mako" ,python-mako)
5061 ("python-editor" ,python-editor)))
5062 (home-page "http://bitbucket.org/zzzeek/alembic")
5063 (synopsis
5064 "Database migration tool for SQLAlchemy")
5065 (description
5066 "Alembic is a lightweight database migration tool for usage with the
5067 SQLAlchemy Database Toolkit for Python.")
5068 (license license:expat)))
5069
5070 (define-public python2-alembic
5071 (package-with-python2 python-alembic))
5072
5073 (define-public python-autopep8
5074 (package
5075 (name "python-autopep8")
5076 (version "1.3.2")
5077 (source
5078 (origin
5079 (method url-fetch)
5080 (uri (pypi-uri "autopep8" version))
5081 (sha256
5082 (base32
5083 "1p9pa1ffg4iy96l918808jggg9a69iaka5awmj8xid36yc5mk0ky"))))
5084 (build-system python-build-system)
5085 (propagated-inputs
5086 `(("python-pycodestyle" ,python-pycodestyle)))
5087 (home-page "https://github.com/hhatto/autopep8")
5088 (synopsis "Format Python code according to the PEP 8 style guide")
5089 (description
5090 "@code{autopep8} automatically formats Python code to conform to
5091 the PEP 8 style guide. It uses the pycodestyle utility to determine
5092 what parts of the code needs to be formatted. @code{autopep8} is
5093 capable of fixing most of the formatting issues that can be reported
5094 by pycodestyle.")
5095 (license (license:non-copyleft
5096 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
5097
5098 (define-public python2-autopep8
5099 (package-with-python2 python-autopep8))
5100
5101 (define-public python-distutils-extra
5102 (package
5103 (name "python-distutils-extra")
5104 (version "2.38")
5105 (source
5106 (origin
5107 (method url-fetch)
5108 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
5109 version "/+download/python-distutils-extra-"
5110 version ".tar.gz"))
5111 (sha256
5112 (base32
5113 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
5114 (build-system python-build-system)
5115 (home-page "https://launchpad.net/python-distutils-extra/")
5116 (synopsis "Enhancements to Python's distutils")
5117 (description
5118 "The python-distutils-extra module enables you to easily integrate
5119 gettext support, themed icons, and scrollkeeper-based documentation into
5120 Python's distutils.")
5121 (license license:gpl2)))
5122
5123 (define-public python2-distutils-extra
5124 (package-with-python2 python-distutils-extra))
5125
5126 (define-public python2-elib.intl
5127 (package
5128 (name "python2-elib.intl")
5129 (version "0.0.3")
5130 (source
5131 (origin
5132 ;; This project doesn't tag releases or publish tarballs, so we take
5133 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
5134 (method git-fetch)
5135 (uri (git-reference
5136 (url "https://github.com/dieterv/elib.intl.git")
5137 (commit "d09997cfef")))
5138 (sha256
5139 (base32
5140 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
5141 (build-system python-build-system)
5142 (arguments
5143 ;; incompatible with Python 3 (exception syntax)
5144 `(#:python ,python-2
5145 #:tests? #f))
5146 (home-page "https://github.com/dieterv/elib.intl")
5147 (synopsis "Enhanced internationalization for Python")
5148 (description
5149 "The elib.intl module provides enhanced internationalization (I18N)
5150 services for your Python modules and applications.")
5151 (license license:lgpl3+)))
5152
5153 (define-public python-pillow
5154 (package
5155 (name "python-pillow")
5156 (version "3.3.3")
5157 (source
5158 (origin
5159 (method url-fetch)
5160 (uri (pypi-uri "Pillow" version))
5161 (patches (search-patches "python-pillow-freetype-2.7-test-failure.patch"))
5162 (sha256
5163 (base32
5164 "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
5165 (build-system python-build-system)
5166 (native-inputs
5167 `(("python-nose" ,python-nose)))
5168 (inputs
5169 `(("freetype" ,freetype)
5170 ("lcms" ,lcms)
5171 ("zlib" ,zlib)
5172 ("libjpeg" ,libjpeg)
5173 ("openjpeg" ,openjpeg)
5174 ("libtiff" ,libtiff)
5175 ("libwebp" ,libwebp)))
5176 (arguments
5177 `(#:phases (modify-phases %standard-phases
5178 (add-after
5179 'install 'check-installed
5180 (lambda* (#:key outputs inputs #:allow-other-keys)
5181 (begin
5182 (setenv "HOME" (getcwd))
5183 ;; Make installed package available for running the
5184 ;; tests
5185 (add-installed-pythonpath inputs outputs)
5186 (and (zero? (system* "python" "selftest.py"
5187 "--installed"))
5188 (zero? (system* "python" "test-installed.py"))))))
5189 (delete 'check))))
5190 (home-page "https://pypi.python.org/pypi/Pillow")
5191 (synopsis "Fork of the Python Imaging Library")
5192 (description
5193 "The Python Imaging Library adds image processing capabilities to your
5194 Python interpreter. This library provides extensive file format support, an
5195 efficient internal representation, and fairly powerful image processing
5196 capabilities. The core image library is designed for fast access to data
5197 stored in a few basic pixel formats. It should provide a solid foundation for
5198 a general image processing tool.")
5199 (license (license:x11-style
5200 "http://www.pythonware.com/products/pil/license.htm"
5201 "The PIL Software License"))))
5202
5203 (define-public python2-pillow
5204 (package-with-python2 python-pillow))
5205
5206 (define-public python-pycparser
5207 (package
5208 (name "python-pycparser")
5209 (version "2.17")
5210 (source
5211 (origin
5212 (method url-fetch)
5213 (uri (pypi-uri "pycparser" version))
5214 (sha256
5215 (base32
5216 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
5217 (outputs '("out" "doc"))
5218 (build-system python-build-system)
5219 (native-inputs
5220 `(("pkg-config" ,pkg-config)))
5221 (arguments
5222 `(#:phases
5223 (modify-phases %standard-phases
5224 (replace 'check
5225 (lambda _
5226 (with-directory-excursion "tests"
5227 (zero? (system* "python" "all_tests.py")))))
5228 (add-after 'install 'install-doc
5229 (lambda* (#:key outputs #:allow-other-keys)
5230 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5231 (doc (string-append data "/doc/" ,name "-" ,version))
5232 (examples (string-append doc "/examples")))
5233 (mkdir-p examples)
5234 (for-each (lambda (file)
5235 (copy-file (string-append "." file)
5236 (string-append doc file)))
5237 '("/README.rst" "/CHANGES" "/LICENSE"))
5238 (copy-recursively "examples" examples)))))))
5239 (home-page "https://github.com/eliben/pycparser")
5240 (synopsis "C parser in Python")
5241 (description
5242 "Pycparser is a complete parser of the C language, written in pure Python
5243 using the PLY parsing library. It parses C code into an AST and can serve as
5244 a front-end for C compilers or analysis tools.")
5245 (license license:bsd-3)))
5246
5247 (define-public python2-pycparser
5248 (package-with-python2 python-pycparser))
5249
5250 (define-public python-xcffib
5251 (package
5252 (name "python-xcffib")
5253 (version "0.5.1")
5254 (source
5255 (origin
5256 (method url-fetch)
5257 (uri (pypi-uri "xcffib" version))
5258 (sha256
5259 (base32
5260 "09gbnmr5vn58mm8xi3fmd7fz6743cks6c46dphnxzwax6zsxmy60"))))
5261 (build-system python-build-system)
5262 (inputs
5263 `(("libxcb" ,libxcb)))
5264 (propagated-inputs
5265 `(("python-cffi" ,python-cffi) ; used at run time
5266 ("python-six" ,python-six)))
5267 (arguments
5268 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
5269 #:tests? #f
5270 #:phases
5271 (modify-phases %standard-phases
5272 (add-after 'unpack 'fix-libxcb-path
5273 (lambda* (#:key inputs #:allow-other-keys)
5274 (let ((libxcb (assoc-ref inputs "libxcb")))
5275 (substitute* '("xcffib/__init__.py")
5276 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
5277 #t)))
5278 (add-after 'install 'install-doc
5279 (lambda* (#:key outputs #:allow-other-keys)
5280 (let ((doc (string-append (assoc-ref outputs "out") "/share"
5281 "/doc/" ,name "-" ,version)))
5282 (mkdir-p doc)
5283 (copy-file "README.md"
5284 (string-append doc "/README.md"))
5285 #t))))))
5286 (home-page "https://github.com/tych0/xcffib")
5287 (synopsis "XCB Python bindings")
5288 (description
5289 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
5290 support for Python 3 and PyPy. It is based on cffi.")
5291 (license license:expat)))
5292
5293 (define-public python2-xcffib
5294 (package-with-python2 python-xcffib))
5295
5296 (define-public python-cairocffi
5297 (package
5298 (name "python-cairocffi")
5299 (version "0.8.0")
5300 (source
5301 (origin
5302 (method url-fetch)
5303 ;; The archive on pypi is missing the 'utils' directory!
5304 (uri (string-append "https://github.com/Kozea/cairocffi/archive/v"
5305 version ".tar.gz"))
5306 (file-name (string-append name "-" version ".tar.gz"))
5307 (sha256
5308 (base32
5309 "1rk2dvy3fxrga6bvvxc2fi5lbaynm5h4a0w0aaxyn3bc77rszjg9"))))
5310 (build-system python-build-system)
5311 (outputs '("out" "doc"))
5312 (inputs
5313 `(("gdk-pixbuf" ,gdk-pixbuf)
5314 ("cairo" ,cairo)))
5315 (native-inputs
5316 `(("pkg-config" ,pkg-config)
5317 ("python-sphinx" ,python-sphinx)
5318 ("python-docutils" ,python-docutils)))
5319 (propagated-inputs
5320 `(("python-xcffib" ,python-xcffib))) ; used at run time
5321 (arguments
5322 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
5323 #:tests? #f
5324 #:phases
5325 (modify-phases %standard-phases
5326 (add-after 'install 'install-doc
5327 (lambda* (#:key inputs outputs #:allow-other-keys)
5328 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5329 (doc (string-append data "/doc/" ,name "-" ,version))
5330 (html (string-append doc "/html")))
5331 (setenv "LD_LIBRARY_PATH"
5332 (string-append (assoc-ref inputs "cairo") "/lib" ":"
5333 (assoc-ref inputs "gdk-pixbuf") "/lib"))
5334 (setenv "LANG" "en_US.UTF-8")
5335 (mkdir-p html)
5336 (for-each (lambda (file)
5337 (copy-file (string-append "." file)
5338 (string-append doc file)))
5339 '("/README.rst" "/CHANGES" "/LICENSE"))
5340 (system* "python" "setup.py" "build_sphinx")
5341 (copy-recursively "docs/_build/html" html)
5342 #t))))))
5343 (home-page "https://github.com/Kozea/cairocffi")
5344 (synopsis "Python bindings and object-oriented API for Cairo")
5345 (description
5346 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
5347 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
5348 graphics library with support for multiple backends including image buffers,
5349 PNG, PostScript, PDF, and SVG file output.")
5350 (license license:bsd-3)))
5351
5352 (define-public python2-cairocffi
5353 (package-with-python2 python-cairocffi))
5354
5355 (define-public python-decorator
5356 (package
5357 (name "python-decorator")
5358 (version "4.0.10")
5359 (source
5360 (origin
5361 (method url-fetch)
5362 (uri (pypi-uri "decorator" version))
5363 (sha256
5364 (base32 "0w7hg59hlpq74jpyja4yfryap0ccjvchgpkfp20rhj9krgnrhvlw"))))
5365 (build-system python-build-system)
5366 (arguments '(#:tests? #f)) ; no test target
5367 (home-page "https://pypi.python.org/pypi/decorator/")
5368 (synopsis "Python module to simplify usage of decorators")
5369 (description
5370 "The aim of the decorator module is to simplify the usage of decorators
5371 for the average programmer, and to popularize decorators usage giving examples
5372 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
5373 etc. The core of this module is a decorator factory.")
5374 (license license:expat)))
5375
5376 (define-public python2-decorator
5377 (package-with-python2 python-decorator))
5378
5379 (define-public python-drmaa
5380 (package
5381 (name "python-drmaa")
5382 (version "0.7.7")
5383 (source
5384 (origin
5385 (method url-fetch)
5386 (uri (pypi-uri "drmaa" version))
5387 (sha256
5388 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
5389 (build-system python-build-system)
5390 ;; The test suite requires libdrmaa which is provided by the cluster
5391 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
5392 ;; should be set to the path of the libdrmaa library.
5393 (arguments '(#:tests? #f))
5394 (native-inputs
5395 `(("python-nose" ,python-nose)))
5396 (home-page "https://pypi.python.org/pypi/drmaa")
5397 (synopsis "Python bindings for the DRMAA library")
5398 (description
5399 "A Python package for Distributed Resource Management (DRM) job
5400 submission and control. This package is an implementation of the DRMAA 1.0
5401 Python language binding specification.")
5402 (license license:bsd-3)))
5403
5404 (define-public python2-drmaa
5405 (package-with-python2 python-drmaa))
5406
5407 (define-public python-grako
5408 (package
5409 (name "python-grako")
5410 (version "3.99.9")
5411 (source
5412 (origin
5413 (method url-fetch)
5414 (uri
5415 (pypi-uri "grako" version ".zip"))
5416 (sha256
5417 (base32
5418 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
5419 (build-system python-build-system)
5420 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
5421 (native-inputs
5422 `(("unzip" ,unzip)
5423 ("python-pytest" ,python-pytest-3.0)
5424 ("python-pytest-runner" ,python-pytest-runner)))
5425 (home-page "https://bitbucket.org/neogeny/grako")
5426 (synopsis "EBNF parser generator")
5427 (description
5428 "Grako takes a grammar in a variation of EBNF as input, and outputs a
5429 memoizing PEG/Packrat parser in Python.")
5430 (license license:bsd-3)))
5431
5432 (define-public python2-grako
5433 (package-with-python2 python-grako))
5434
5435 (define-public python-gridmap
5436 (package
5437 (name "python-gridmap")
5438 (version "0.13.0")
5439 (source
5440 (origin
5441 (method url-fetch)
5442 (uri (string-append
5443 "https://github.com/pygridtools/gridmap/archive/v"
5444 version ".tar.gz"))
5445 (file-name (string-append name "-" version ".tar.gz"))
5446 (sha256
5447 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
5448 (build-system python-build-system)
5449 (arguments
5450 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
5451 (propagated-inputs
5452 `(("python-psutil" ,python-psutil)
5453 ("python-drmaa" ,python-drmaa)
5454 ("python-pyzmq" ,python-pyzmq)))
5455 (home-page "https://github.com/pygridtools/gridmap")
5456 (synopsis "Create jobs on a cluster directly from Python")
5457 (description
5458 "Gridmap is a Python package to allow you to easily create jobs on the
5459 cluster directly from Python. You can directly map Python functions onto the
5460 cluster without needing to write any wrapper code yourself.")
5461 (license license:gpl3+)))
5462
5463 (define-public python2-gridmap
5464 (package-with-python2 python-gridmap))
5465
5466 (define-public python-honcho
5467 (package
5468 (name "python-honcho")
5469 (version "1.0.1")
5470 (source
5471 (origin
5472 (method url-fetch)
5473 (uri (string-append
5474 "https://github.com/nickstenning/honcho/archive/v"
5475 version ".tar.gz"))
5476 (file-name (string-append name "-" version ".tar.gz"))
5477 (sha256
5478 (base32 "0zizn61n5z5hq421hkypk9pw8s6fpxw30f4hsg7k4ivwzy3gjw9j"))))
5479 (build-system python-build-system)
5480 (native-inputs
5481 `(("python-pytest" ,python-pytest-3.0)
5482 ("python-mock" ,python-mock)
5483 ("python-tox" ,python-tox)
5484 ("which" ,which))) ;for tests
5485 (propagated-inputs
5486 `(("python-jinja2" ,python-jinja2)))
5487 (arguments
5488 `(#:phases
5489 (modify-phases %standard-phases
5490 (delete 'check)
5491 (add-after 'install 'check
5492 (lambda* (#:key outputs inputs #:allow-other-keys)
5493 ;; fix honcho path in testsuite
5494 (substitute* "tests/conftest.py"
5495 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
5496 "/bin/honcho" "'")))
5497 ;; It's easier to run tests after install.
5498 ;; Make installed package available for running the tests
5499 (add-installed-pythonpath inputs outputs)
5500 (zero? (system* "py.test" "-v")))))))
5501 (home-page "https://github.com/nickstenning/honcho")
5502 (synopsis "Manage Procfile-based applications")
5503 (description
5504 "A Procfile is a file which describes how to run an application
5505 consisting of serveral processes. honcho starts all listed processes.
5506 The output of all running processes is collected by honcho and
5507 displayed.")
5508 (license license:expat)))
5509
5510 (define-public python2-honcho
5511 (package-with-python2 python-honcho))
5512
5513 (define-public python-pexpect
5514 (package
5515 (name "python-pexpect")
5516 (version "4.2.1")
5517 (source
5518 (origin
5519 (method url-fetch)
5520 (uri (pypi-uri "pexpect" version))
5521 (sha256
5522 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
5523 (build-system python-build-system)
5524 (arguments
5525 `(#:phases
5526 (modify-phases %standard-phases
5527 (add-before 'check 'prepare-tests
5528 (lambda _
5529 (substitute* (find-files "tests")
5530 (("/bin/ls") (which "ls"))
5531 (("/bin/echo") (which "echo"))
5532 (("/bin/which") (which "which"))
5533 ;; Many tests try to use the /bin directory which
5534 ;; is not present in the build environment.
5535 ;; Use one that's non-empty and unlikely to change.
5536 (("/bin'") "/dev'"))
5537 ;; XXX: Socket connection test gets "Connection reset by peer".
5538 ;; Why does it not work? Delete for now.
5539 (delete-file "tests/test_socket.py")
5540 #t))
5541 (replace 'check (lambda _ (zero? (system* "nosetests" "-v")))))))
5542 (native-inputs
5543 `(("python-nose" ,python-nose)
5544 ("python-pytest" ,python-pytest-3.0)
5545 ("man-db" ,man-db)
5546 ("which" ,which)
5547 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
5548 (propagated-inputs
5549 `(("python-ptyprocess" ,python-ptyprocess)))
5550 (home-page "http://pexpect.readthedocs.org/")
5551 (synopsis "Controlling interactive console applications")
5552 (description
5553 "Pexpect is a pure Python module for spawning child applications;
5554 controlling them; and responding to expected patterns in their output.
5555 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5556 child application and control it as if a human were typing commands.")
5557 (license license:isc)))
5558
5559 (define-public python2-pexpect
5560 (package-with-python2 python-pexpect))
5561
5562 (define-public python-setuptools-scm
5563 (package
5564 (name "python-setuptools-scm")
5565 (version "1.15.0")
5566 (source (origin
5567 (method url-fetch)
5568 (uri (pypi-uri "setuptools_scm" version))
5569 (sha256
5570 (base32
5571 "0bwyc5markib0i7i2qlyhdzxhiywzxbkfiapldma8m91m82jvwfs"))))
5572 (build-system python-build-system)
5573 (home-page "https://github.com/pypa/setuptools_scm/")
5574 (synopsis "Manage Python package versions in SCM metadata")
5575 (description
5576 "Setuptools_scm handles managing your Python package versions in
5577 @dfn{software configuration management} (SCM) metadata instead of declaring
5578 them as the version argument or in a SCM managed file.")
5579 (license license:expat)))
5580
5581 (define-public python2-setuptools-scm
5582 (package-with-python2 python-setuptools-scm))
5583
5584 (define-public python-pathpy
5585 (package
5586 (name "python-pathpy")
5587 (version "8.1.1")
5588 (source
5589 (origin
5590 (method url-fetch)
5591 (uri (string-append "https://pypi.python.org/packages/source/p/"
5592 "path.py/path.py-" version ".tar.gz"))
5593 (sha256
5594 (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
5595 (outputs '("out" "doc"))
5596 (build-system python-build-system)
5597 (propagated-inputs
5598 `(("python-appdirs" ,python-appdirs)))
5599 (native-inputs
5600 `(("python-setuptools-scm" ,python-setuptools-scm)
5601 ("python-sphinx" ,python-sphinx)
5602 ("python-rst.linker" ,python-rst.linker)
5603 ("python-pytest" ,python-pytest)
5604 ("python-pytest-runner" ,python-pytest-runner)))
5605 (arguments
5606 `(#:phases
5607 (modify-phases %standard-phases
5608 (add-after 'build 'build-doc
5609 (lambda _
5610 (setenv "LANG" "en_US.UTF-8")
5611 (zero? (system* "python" "setup.py" "build_sphinx"))))
5612 (add-after 'install 'install-doc
5613 (lambda* (#:key outputs #:allow-other-keys)
5614 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5615 (doc (string-append data "/doc/" ,name "-" ,version))
5616 (html (string-append doc "/html")))
5617 (mkdir-p html)
5618 (for-each (lambda (file)
5619 (copy-file file (string-append doc "/" file)))
5620 '("README.rst" "CHANGES.rst"))
5621 (copy-recursively "build/sphinx/html" html)))))))
5622 (home-page "https://github.com/jaraco/path.py")
5623 (synopsis "Python module wrapper for built-in os.path")
5624 (description
5625 "@code{path.py} implements path objects as first-class entities, allowing
5626 common operations on files to be invoked on those path objects directly.")
5627 (license license:expat)))
5628
5629 (define-public python2-pathpy
5630 (package-with-python2 python-pathpy))
5631
5632 (define-public python-pickleshare
5633 (package
5634 (name "python-pickleshare")
5635 (version "0.5")
5636 (source
5637 (origin
5638 (method url-fetch)
5639 (uri (string-append "https://pypi.python.org/packages/source/p/"
5640 "pickleshare/pickleshare-" version ".tar.gz"))
5641 (sha256
5642 (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
5643 (build-system python-build-system)
5644 (propagated-inputs
5645 `(("python-pathpy" ,python-pathpy)))
5646 (home-page "https://github.com/vivainio/pickleshare")
5647 (synopsis "Tiny key value database with concurrency support")
5648 (description
5649 "PickleShare is a small ‘shelve’-like datastore with concurrency support.
5650 Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
5651 shelve, many processes can access the database simultaneously. Changing a
5652 value in database is immediately visible to other processes accessing the same
5653 database. Concurrency is possible because the values are stored in separate
5654 files. Hence the “database” is a directory where all files are governed by
5655 PickleShare.")
5656 (license license:expat)))
5657
5658 (define-public python2-pickleshare
5659 (package-with-python2 python-pickleshare))
5660
5661 (define-public python-simplegeneric
5662 (package
5663 (name "python-simplegeneric")
5664 (version "0.8.1")
5665 (source
5666 (origin
5667 (method url-fetch)
5668 (uri (string-append "https://pypi.python.org/packages/source/s/"
5669 "simplegeneric/simplegeneric-" version ".zip"))
5670 (sha256
5671 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5672 (build-system python-build-system)
5673 (native-inputs
5674 `(("unzip" ,unzip)))
5675 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5676 (synopsis "Python module for simple generic functions")
5677 (description
5678 "The simplegeneric module lets you define simple single-dispatch generic
5679 functions, akin to Python’s built-in generic functions like @code{len()},
5680 @code{iter()} and so on. However, instead of using specially-named methods,
5681 these generic functions use simple lookup tables, akin to those used by
5682 e.g. @code{pickle.dump()} and other generic functions found in the Python
5683 standard library.")
5684 (license license:zpl2.1)))
5685
5686 (define-public python2-simplegeneric
5687 (package-with-python2 python-simplegeneric))
5688
5689 (define-public python-ipython-genutils
5690 ;; TODO: This package is retired, check if can be removed, see description.
5691 (package
5692 (name "python-ipython-genutils")
5693 (version "0.1.0")
5694 (source
5695 (origin
5696 (method url-fetch)
5697 (uri (string-append "https://pypi.python.org/packages/source/i/"
5698 "ipython_genutils/ipython_genutils-"
5699 version ".tar.gz"))
5700 (sha256
5701 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5702 (build-system python-build-system)
5703 (arguments `(#:tests? #f)) ; no tests
5704 (home-page "http://ipython.org")
5705 (synopsis "Vestigial utilities from IPython")
5706 (description
5707 "This package provides retired utilities from IPython. No packages
5708 outside IPython/Jupyter should depend on it.
5709
5710 This package shouldn't exist. It contains some common utilities shared by
5711 Jupyter and IPython projects during The Big Split. As soon as possible, those
5712 packages will remove their dependency on this, and this package will go
5713 away.")
5714 (license license:bsd-3)))
5715
5716 (define-public python2-ipython-genutils
5717 (package-with-python2 python-ipython-genutils))
5718
5719 (define-public python-traitlets
5720 (package
5721 (name "python-traitlets")
5722 (version "4.2.0")
5723 (source
5724 (origin
5725 (method url-fetch)
5726 (uri (pypi-uri "traitlets" version))
5727 (sha256
5728 (base32
5729 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
5730 (build-system python-build-system)
5731 (arguments
5732 `(#:phases
5733 (modify-phases %standard-phases
5734 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5735 (propagated-inputs
5736 `(("python-ipython-genutils" ,python-ipython-genutils)
5737 ("python-decorator" ,python-decorator)))
5738 (native-inputs
5739 `(("python-mock" ,python-mock)
5740 ("python-nose" ,python-nose)))
5741 (home-page "http://ipython.org")
5742 (synopsis "Configuration system for Python applications")
5743 (description
5744 "Traitlets is a framework that lets Python classes have attributes with
5745 type checking, dynamically calculated default values, and ‘on change’
5746 callbacks. The package also includes a mechanism to use traitlets for
5747 configuration, loading values from files or from command line arguments. This
5748 is a distinct layer on top of traitlets, so you can use traitlets in your code
5749 without using the configuration machinery.")
5750 (license license:bsd-3)))
5751
5752 (define-public python2-traitlets
5753 (package-with-python2 python-traitlets))
5754
5755 (define-public python-jupyter-core
5756 (package
5757 (name "python-jupyter-core")
5758 (version "4.2.1")
5759 (source
5760 (origin
5761 (method url-fetch)
5762 (uri (string-append (pypi-uri "jupyter_core" version)))
5763 (sha256
5764 (base32
5765 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
5766 (build-system python-build-system)
5767 ;; FIXME: not sure how to run the tests
5768 (arguments `(#:tests? #f))
5769 (propagated-inputs
5770 `(("python-traitlets" ,python-traitlets)))
5771 (home-page "http://jupyter.org/")
5772 (synopsis "Jupyter base package")
5773 (description
5774 "Jupyter core is the base package on which Jupyter projects rely.")
5775 (license license:bsd-3)))
5776
5777 (define-public python2-jupyter-core
5778 (package-with-python2 python-jupyter-core))
5779
5780 (define-public python-jupyter-client
5781 (package
5782 (name "python-jupyter-client")
5783 (version "4.4.0")
5784 (source
5785 (origin
5786 (method url-fetch)
5787 (uri (pypi-uri "jupyter_client" version))
5788 (sha256
5789 (base32
5790 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
5791 (build-system python-build-system)
5792 ;; Tests fail because of missing native python kernel which I assume is
5793 ;; provided by the ipython package, which we cannot use because it would
5794 ;; cause a dependency cycle.
5795 (arguments `(#:tests? #f))
5796 (propagated-inputs
5797 `(("python-pyzmq" ,python-pyzmq)
5798 ("python-traitlets" ,python-traitlets)
5799 ("python-jupyter-core" ,python-jupyter-core)))
5800 (home-page "http://jupyter.org/")
5801 (synopsis "Jupyter protocol implementation and client libraries")
5802 (description
5803 "The @code{jupyter_client} package contains the reference implementation
5804 of the Jupyter protocol. It also provides client and kernel management APIs
5805 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5806 installing @code{kernelspec}s for use with Jupyter frontends.")
5807 (license license:bsd-3)))
5808
5809 (define-public python2-jupyter-client
5810 (package-with-python2 python-jupyter-client))
5811
5812 (define-public python-ipykernel
5813 (package
5814 (name "python-ipykernel")
5815 (version "4.5.2")
5816 (source
5817 (origin
5818 (method url-fetch)
5819 (uri (pypi-uri "ipykernel" version))
5820 (sha256
5821 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
5822 (build-system python-build-system)
5823 ;; The tests load a submodule of IPython. However, IPython itself depends
5824 ;; on ipykernel.
5825 (arguments `(#:tests? #f))
5826 (propagated-inputs
5827 ;; imported at runtime during connect
5828 `(("python-jupyter-client" ,python-jupyter-client)))
5829 (home-page "http://ipython.org")
5830 (synopsis "IPython Kernel for Jupyter")
5831 (description
5832 "This package provides the IPython kernel for Jupyter.")
5833 (license license:bsd-3)))
5834
5835 (define-public python2-ipykernel
5836 (package-with-python2 python-ipykernel))
5837
5838 (define-public python-testpath
5839 (package
5840 (name "python-testpath")
5841 (version "0.2")
5842 (source
5843 (origin
5844 (method url-fetch)
5845 (uri (string-append "https://github.com/jupyter/testpath/archive/"
5846 version ".tar.gz"))
5847 (file-name (string-append name "-" version ".tar.gz"))
5848 (sha256
5849 (base32
5850 "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55"))))
5851 (build-system python-build-system)
5852 (arguments
5853 `(#:tests? #f ; this package does not even have a setup.py
5854 #:modules ((guix build python-build-system)
5855 (guix build utils)
5856 (srfi srfi-1))
5857 #:imported-modules (,@%python-build-system-modules
5858 (srfi srfi-1))
5859 #:phases
5860 (modify-phases %standard-phases
5861 (delete 'install)
5862 (replace 'build
5863 (lambda* (#:key inputs outputs #:allow-other-keys)
5864 (let* ((version (last
5865 (string-split (assoc-ref inputs "python") #\-)))
5866 (x.y (string-join (take (string-split version #\.) 2)
5867 "."))
5868 (dir (string-append
5869 (assoc-ref outputs "out")
5870 "/lib/python" x.y "/site-packages/testpath")))
5871 (mkdir-p dir)
5872 (copy-recursively "testpath" dir))
5873 #t)))))
5874 (home-page "https://github.com/takluyver/testpath")
5875 (synopsis "Test utilities for code working with files and commands")
5876 (description
5877 "Testpath is a collection of utilities for Python code working with files
5878 and commands. It contains functions to check things on the filesystem, and
5879 tools for mocking system commands and recording calls to those.")
5880 (license license:expat)))
5881
5882 (define-public python2-testpath
5883 (package-with-python2 python-testpath))
5884
5885 (define-public python-ipython
5886 (package
5887 (name "python-ipython")
5888 (version "5.3.0")
5889 (source
5890 (origin
5891 (method url-fetch)
5892 (uri (pypi-uri "ipython" version ".tar.gz"))
5893 (sha256
5894 (base32 "079wyjir4a9qx6kvx096b1asm63djbidk65z3ykcbnlngmg62pmz"))))
5895 (build-system python-build-system)
5896 (outputs '("out" "doc"))
5897 (propagated-inputs
5898 `(("python-pyzmq" ,python-pyzmq)
5899 ("python-prompt-toolkit" ,python-prompt-toolkit)
5900 ("python-terminado" ,python-terminado)
5901 ("python-matplotlib" ,python-matplotlib)
5902 ("python-numpy" ,python-numpy)
5903 ("python-numpydoc" ,python-numpydoc)
5904 ("python-jinja2" ,python-jinja2)
5905 ("python-jupyter-console"
5906 ;; The python-ipython and python-jupyter-console require each
5907 ;; other. To get the functionality in both packages working, strip
5908 ;; down the python-jupyter-console package when using it as an input
5909 ;; to python-ipython.
5910 ,python-jupyter-console-minimal)
5911 ("python-mistune" ,python-mistune)
5912 ("python-pexpect" ,python-pexpect)
5913 ("python-pickleshare" ,python-pickleshare)
5914 ("python-simplegeneric" ,python-simplegeneric)
5915 ("python-jsonschema" ,python-jsonschema)
5916 ("python-traitlets" ,python-traitlets)
5917 ("python-ipykernel" ,python-ipykernel)
5918 ("python-nbformat" ,python-nbformat)
5919 ("python-pygments" ,python-pygments)))
5920 (inputs
5921 `(("readline" ,readline)
5922 ("which" ,which)))
5923 (native-inputs
5924 `(("graphviz" ,graphviz)
5925 ("pkg-config" ,pkg-config)
5926 ("python-requests" ,python-requests) ;; for tests
5927 ("python-testpath" ,python-testpath)
5928 ("python-nose" ,python-nose)
5929 ("python-sphinx" ,python-sphinx)
5930 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
5931 ;; FIXME: It's possible that a smaller union would work just as well.
5932 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
5933 texlive-fonts-ec
5934 texlive-generic-ifxetex
5935 texlive-generic-pdftex
5936 texlive-latex-amsfonts
5937 texlive-latex-capt-of
5938 texlive-latex-cmap
5939 texlive-latex-environ
5940 texlive-latex-eqparbox
5941 texlive-latex-etoolbox
5942 texlive-latex-expdlist
5943 texlive-latex-fancyhdr
5944 texlive-latex-fancyvrb
5945 texlive-latex-fncychap
5946 texlive-latex-float
5947 texlive-latex-framed
5948 texlive-latex-geometry
5949 texlive-latex-graphics
5950 texlive-latex-hyperref
5951 texlive-latex-mdwtools
5952 texlive-latex-multirow
5953 texlive-latex-oberdiek
5954 texlive-latex-parskip
5955 texlive-latex-preview
5956 texlive-latex-tabulary
5957 texlive-latex-threeparttable
5958 texlive-latex-titlesec
5959 texlive-latex-trimspaces
5960 texlive-latex-ucs
5961 texlive-latex-upquote
5962 texlive-latex-url
5963 texlive-latex-varwidth
5964 texlive-latex-wrapfig)))
5965 ("texinfo" ,texinfo)))
5966 (arguments
5967 `(#:phases
5968 (modify-phases %standard-phases
5969 (add-after
5970 'install 'install-doc
5971 (lambda* (#:key inputs outputs #:allow-other-keys)
5972 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5973 (doc (string-append data "/doc/" ,name "-" ,version))
5974 (html (string-append doc "/html"))
5975 (man1 (string-append data "/man/man1"))
5976 (info (string-append data "/info"))
5977 (examples (string-append doc "/examples"))
5978 (python-arg (string-append "PYTHON=" (which "python"))))
5979 (setenv "LANG" "en_US.utf8")
5980 ;; Make installed package available for running the tests
5981 (add-installed-pythonpath inputs outputs)
5982 (with-directory-excursion "docs"
5983 ;; FIXME: pdf fails to build
5984 ;;(system* "make" "pdf" "PAPER=a4")
5985 (system* "make" python-arg "html")
5986 (system* "make" python-arg "info"))
5987 (copy-recursively "docs/man" man1)
5988 (copy-recursively "examples" examples)
5989 (copy-recursively "docs/build/html" html)
5990 ;; (copy-file "docs/build/latex/ipython.pdf"
5991 ;; (string-append doc "/ipython.pdf"))
5992 (mkdir-p info)
5993 (copy-file "docs/build/texinfo/ipython.info"
5994 (string-append info "/ipython.info"))
5995 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
5996 ;; Tests can only be run after the library has been installed and not
5997 ;; within the source directory.
5998 (delete 'check)
5999 (add-after
6000 'install 'check
6001 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
6002 (if tests?
6003 (with-directory-excursion "/tmp"
6004 ;; Make installed package available for running the tests
6005 (add-installed-pythonpath inputs outputs)
6006 (setenv "HOME" "/tmp/") ;; required by a test
6007 (zero? (system* (string-append (assoc-ref outputs "out")
6008 "/bin/iptest"))))
6009 #t)))
6010 (add-before
6011 'install 'fix-tests
6012 (lambda* (#:key inputs #:allow-other-keys)
6013 (substitute* "./IPython/utils/_process_posix.py"
6014 (("/usr/bin/env', 'which") (which "which")))
6015 (substitute* "./IPython/core/tests/test_inputtransformer.py"
6016 (("#!/usr/bin/env python")
6017 (string-append "#!" (which "python"))))
6018 ;; Disable 1 failing test
6019 (substitute* "./IPython/core/tests/test_magic.py"
6020 (("def test_dirops\\(\\):" all)
6021 (string-append "@dec.skipif(True)\n" all))))))))
6022 (home-page "http://ipython.org")
6023 (synopsis "IPython is a tool for interactive computing in Python")
6024 (description
6025 "IPython provides a rich architecture for interactive computing with:
6026 Powerful interactive shells, a browser-based notebook, support for interactive
6027 data visualization, embeddable interpreters and tools for parallel
6028 computing.")
6029 (license license:bsd-3)
6030 (properties `((python2-variant . ,(delay python2-ipython))))))
6031
6032 (define-public python2-ipython
6033 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
6034 (package
6035 (inherit ipython)
6036 ;; FIXME: add pyreadline once available.
6037 (propagated-inputs
6038 `(("python2-backports-shutil-get-terminal-size"
6039 ,python2-backports-shutil-get-terminal-size)
6040 ("python2-pathlib2" ,python2-pathlib2)
6041 ,@(package-propagated-inputs ipython)))
6042 (native-inputs
6043 `(("python2-mock" ,python2-mock)
6044 ,@(package-native-inputs ipython))))))
6045
6046 (define-public python-isodate
6047 (package
6048 (name "python-isodate")
6049 (version "0.5.4")
6050 (source
6051 (origin
6052 (method url-fetch)
6053 (uri (pypi-uri "isodate" version))
6054 (sha256
6055 (base32
6056 "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
6057 (build-system python-build-system)
6058 (home-page
6059 "http://cheeseshop.python.org/pypi/isodate")
6060 (synopsis
6061 "Python date parser and formatter")
6062 (description
6063 "Python-isodate is a python module for parsing and formatting
6064 ISO 8601 dates, time and duration.")
6065 (license license:bsd-3)))
6066
6067 (define-public python2-isodate
6068 (package-with-python2 python-isodate))
6069
6070 (define-public python-html5lib
6071 (package
6072 (name "python-html5lib")
6073 (version "1.0b10")
6074 (source
6075 (origin
6076 (method url-fetch)
6077 (uri (pypi-uri "html5lib" version))
6078 (sha256
6079 (base32
6080 "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd"))))
6081 (build-system python-build-system)
6082 (propagated-inputs
6083 `(("python-six" ,python-six)
6084 ("python-webencodings" ,python-webencodings)))
6085 (arguments
6086 `(#:test-target "check"))
6087 (home-page
6088 "https://github.com/html5lib/html5lib-python")
6089 (synopsis
6090 "Python HTML parser based on the WHATWG HTML specifcation")
6091 (description
6092 "Html5lib is an HTML parser based on the WHATWG HTML specifcation
6093 and written in Python.")
6094 (license license:expat)))
6095
6096 (define-public python2-html5lib
6097 (package-with-python2 python-html5lib))
6098
6099 ;; Needed for python-bleach, a dependency of python-notebook
6100 (define-public python-html5lib-0.9
6101 (package
6102 (inherit python-html5lib)
6103 (version "0.999")
6104 (source
6105 (origin
6106 (method url-fetch)
6107 (uri (pypi-uri "html5lib" version))
6108 (sha256
6109 (base32
6110 "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
6111
6112 (define-public python2-html5lib-0.9
6113 (package-with-python2 python-html5lib-0.9))
6114
6115 (define-public python-html5-parser
6116 (package
6117 (name "python-html5-parser")
6118 (version "0.4.4")
6119 (source (origin
6120 (method url-fetch)
6121 (uri (pypi-uri "html5-parser" version))
6122 (sha256
6123 (base32
6124 "1d8sxhl41ffh7qlk7wlsy17xw6slzx5v1yna9s72wx5qrpaa3wxr"))))
6125 (build-system python-build-system)
6126 (native-inputs
6127 `(("pkg-config" ,pkg-config)))
6128 (inputs
6129 `(("libxml2" ,libxml2)))
6130 (propagated-inputs
6131 `(("python-lxml" ,python-lxml)
6132 ("python-beautifulsoup4" ,python-beautifulsoup4)))
6133 (home-page "https://html5-parser.readthedocs.io")
6134 (synopsis "Fast C-based HTML5 parsing for Python")
6135 (description "This package provides a fast implementation of the HTML5
6136 parsing spec for Python. Parsing is done in C using a variant of the gumbo
6137 parser. The gumbo parse tree is then transformed into an lxml tree, also in
6138 C, yielding parse times that can be a thirtieth of the html5lib parse times.")
6139 ;; src/as-python-tree.[c|h] are licensed GPL3. The other files
6140 ;; indicate ASL2.0, including the LICENSE file for the whole project.
6141 (license (list license:asl2.0 license:gpl3))))
6142
6143 (define-public python2-html5-parser
6144 (package-with-python2 python-html5-parser))
6145
6146 (define-public python-webencodings
6147 (package
6148 (name "python-webencodings")
6149 (version "0.5")
6150 (source (origin
6151 (method url-fetch)
6152 (uri (pypi-uri "webencodings" version))
6153 (sha256
6154 (base32
6155 "015rw7662lkpb9aqiqah2hbizk6w531badqwjpz41rr47glmxid5"))))
6156 (build-system python-build-system)
6157 (arguments
6158 '(#:phases
6159 (modify-phases %standard-phases
6160 (replace 'check
6161 (lambda _
6162 (zero? (system* "py.test" "-v" "webencodings/tests.py")))))))
6163 (native-inputs
6164 `(("python-pytest" ,python-pytest)))
6165 (home-page "https://github.com/SimonSapin/python-webencodings")
6166 (synopsis "Character encoding aliases for legacy web content")
6167 (description
6168 "In order to be compatible with legacy web content when interpreting
6169 something like @code{Content-Type: text/html; charset=latin1}, tools need
6170 to use a particular set of aliases for encoding labels as well as some
6171 overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
6172 the web are actually aliases for @code{windows-1252}, and an @code{UTF-8}
6173 or @code{UTF-16} BOM takes precedence over any other encoding declaration.
6174 The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
6175 defines all such details so that implementations do not have to
6176 reverse-engineer each other.
6177
6178 This module implements the Encoding standard and has encoding labels and
6179 BOM detection, but the actual implementation for encoders and decoders
6180 is Python’s.")
6181 (license license:bsd-3)))
6182
6183 (define-public python2-webencodings
6184 (package-with-python2 python-webencodings))
6185
6186 (define-public python-urwid
6187 (package
6188 (name "python-urwid")
6189 (version "1.3.1")
6190 (source
6191 (origin
6192 (method url-fetch)
6193 (uri (pypi-uri "urwid" version))
6194 (sha256
6195 (base32
6196 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
6197 (build-system python-build-system)
6198 (arguments
6199 `(#:phases
6200 (modify-phases %standard-phases
6201 ;; Disable failing test. Bug filed upstream:
6202 ;; https://github.com/wardi/urwid/issues/164
6203 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
6204 (add-after 'unpack 'disable-failing-test
6205 (lambda _
6206 (substitute* "urwid/tests/test_event_loops.py"
6207 (("test_remove_watch_file")
6208 "disable_remove_watch_file")))))))
6209 (home-page "http://urwid.org")
6210 (synopsis "Console user interface library for Python")
6211 (description
6212 "Urwid is a curses-based UI/widget library for Python. It includes many
6213 features useful for text console applications.")
6214 (license license:lgpl2.1+)))
6215
6216 (define-public python2-urwid
6217 (let ((python2-urwid (package-with-python2 python-urwid)))
6218 (package
6219 (inherit python2-urwid)
6220 (arguments
6221 (append
6222 `(;; Explicitly using Python 2 is necessary due the argument list being
6223 ;; built from only the 'delete-test_vterm.py' phase and python-urwid's
6224 ;; package arguments, which by default assumes the use of Python 3.
6225 #:python ,python-2
6226 #:phases
6227 (modify-phases %standard-phases
6228 ;; Disable the vterm tests because of non-deterministic failures
6229 ;; with Python 2. See https://github.com/urwid/urwid/issues/230.
6230 (add-after 'unpack 'delete-test_vterm.py
6231 (delete-file "urwid/tests/test_vterm.py"))))
6232 (package-arguments python-urwid))))))
6233
6234 (define-public python-openid
6235 (package
6236 (name "python-openid")
6237 (version "3.0.10")
6238 (source
6239 (origin
6240 (method url-fetch)
6241 (uri (pypi-uri "python3-openid" version))
6242 (sha256
6243 (base32
6244 "1x3nh3fycqfn43jp5j5pb4q4y2jxp4mdka4absaa3bc0078qd758"))))
6245 (build-system python-build-system)
6246 (arguments
6247 `(#:phases
6248 (modify-phases %standard-phases
6249 (replace 'check
6250 (lambda _
6251 (zero? (system* "./admin/runtests")))))))
6252 (properties `((python2-variant . ,(delay python2-openid))))
6253 (propagated-inputs
6254 `(("python-defusedxml" ,python-defusedxml)))
6255 (native-inputs
6256 `(("python-psycopg2" ,python-psycopg2)
6257 ("python-django" ,python-django)))
6258 (home-page "https://github.com/necaris/python3-openid")
6259 (synopsis "OpenID support for servers and consumers")
6260 (description "This library provides OpenID authentication for Python, both
6261 for clients and servers.")
6262 (license license:asl2.0)))
6263
6264 (define-public python2-openid
6265 (package
6266 (name "python2-openid")
6267 (version "2.2.5")
6268 (source
6269 (origin
6270 (method url-fetch)
6271 (uri (pypi-uri "python-openid" version))
6272 (sha256
6273 (base32
6274 "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
6275 (build-system python-build-system)
6276 (arguments
6277 ;; Python 3 support is in `python3-openid`, a separate package.
6278 `(#:python ,python-2))
6279 (home-page "https://github.com/openid/python-openid")
6280 (synopsis "OpenID support for servers and consumers")
6281 (description "This library provides OpenID authentication for Python, both
6282 for clients and servers.")
6283 (license license:asl2.0)))
6284
6285 (define-public python-urwidtrees
6286 (package
6287 (name "python-urwidtrees")
6288 (version "1.0.2")
6289 (source
6290 (origin
6291 (method url-fetch)
6292 ;; package author intends on distributing via github rather than pypi:
6293 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
6294 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
6295 version ".tar.gz"))
6296 (file-name (string-append name "-" version ".tar.gz"))
6297 (sha256
6298 (base32
6299 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
6300 (build-system python-build-system)
6301 (arguments
6302 '(#:tests? #f)) ; no tests
6303 (propagated-inputs `(("python-urwid" ,python-urwid)))
6304 (home-page "https://github.com/pazz/urwidtrees")
6305 (synopsis "Tree widgets for urwid")
6306 (description "Urwidtrees is a Widget Container API for the @code{urwid}
6307 toolkit. Use it to build trees of widgets.")
6308 (license license:gpl3+)))
6309
6310 (define-public python2-urwidtrees
6311 (package-with-python2 python-urwidtrees))
6312
6313 (define-public python-dbus
6314 (package
6315 (name "python-dbus")
6316 (version "1.2.0")
6317 (source
6318 (origin
6319 (method url-fetch)
6320 (uri (string-append
6321 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
6322 version ".tar.gz"))
6323 (sha256
6324 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
6325 (build-system gnu-build-system)
6326 (arguments
6327 '(#:phases
6328 (modify-phases %standard-phases
6329 (add-before
6330 'check 'pre-check
6331 (lambda _
6332 ;; XXX: For the missing '/etc/machine-id'.
6333 (substitute* "test/run-test.sh"
6334 (("DBUS_FATAL_WARNINGS=1")
6335 "DBUS_FATAL_WARNINGS=0"))
6336 #t)))))
6337 (native-inputs
6338 `(("pkg-config" ,pkg-config)))
6339 (inputs
6340 `(("python" ,python)
6341 ("dbus-glib" ,dbus-glib)))
6342 (synopsis "Python bindings for D-bus")
6343 (description "python-dbus provides bindings for libdbus, the reference
6344 implementation of D-Bus.")
6345 (home-page "http://www.freedesktop.org/wiki/Software/DBusBindings/")
6346 (license license:expat)))
6347
6348 (define-public python2-dbus
6349 (package (inherit python-dbus)
6350 (name "python2-dbus")
6351 (inputs `(("python" ,python-2)
6352 ,@(alist-delete "python"
6353 (package-inputs python-dbus)
6354 equal?)))
6355 ;; FIXME: on Python 2, the test_utf8 fails with:
6356 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
6357 (arguments `(#:tests? #f))))
6358
6359 (define-public python-apsw
6360 (package
6361 (name "python-apsw")
6362 (version "3.9.2-r1")
6363 (source
6364 (origin
6365 (method url-fetch)
6366 (uri (pypi-uri "apsw" version))
6367 (sha256
6368 (base32
6369 "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
6370 (build-system python-build-system)
6371 (inputs
6372 `(("sqlite" ,sqlite)))
6373 (arguments
6374 `(#:phases
6375 (modify-phases %standard-phases
6376 (replace 'build
6377 (lambda _
6378 (zero?
6379 (system* "python" "setup.py" "build" "--enable-all-extensions"))))
6380 (add-after 'build 'build-test-helper
6381 (lambda _
6382 (zero?
6383 (system
6384 (string-append "gcc -fPIC -shared -o ./testextension.sqlext "
6385 "-I. -Isqlite3 src/testextension.c") ))))
6386 (delete 'check)
6387 (add-after 'install 'check
6388 (lambda* (#:key inputs outputs #:allow-other-keys)
6389 (add-installed-pythonpath inputs outputs)
6390 (zero? (system* "python" "setup.py" "test")))))))
6391 (home-page "https://github.com/rogerbinns/apsw/")
6392 (synopsis "Another Python SQLite Wrapper")
6393 (description "APSW is a Python wrapper for the SQLite
6394 embedded relational database engine. In contrast to other wrappers such as
6395 pysqlite it focuses on being a minimal layer over SQLite attempting just to
6396 translate the complete SQLite API into Python.")
6397 (license license:zlib)))
6398
6399 (define-public python2-apsw
6400 (package-with-python2 python-apsw))
6401
6402 (define-public python-lxml
6403 (package
6404 (name "python-lxml")
6405 (version "3.8.0")
6406 (source
6407 (origin
6408 (method url-fetch)
6409 (uri (pypi-uri "lxml" version))
6410 (sha256
6411 (base32
6412 "15nvf6n285n282682qyw3wihsncb0x5amdhyi4b83bfa2nz74vvk"))))
6413 (build-system python-build-system)
6414 (inputs
6415 `(("libxml2" ,libxml2)
6416 ("libxslt" ,libxslt)))
6417 (home-page "http://lxml.de/")
6418 (synopsis
6419 "Python XML processing library")
6420 (description
6421 "The lxml XML toolkit is a Pythonic binding for the C libraries
6422 libxml2 and libxslt.")
6423 (license license:bsd-3))) ; and a few more, see LICENSES.txt
6424
6425 (define-public python2-lxml
6426 (package-with-python2 python-lxml))
6427
6428 ;; beautifulsoup4 has a totally different namespace than 3.x,
6429 ;; and pypi seems to put it under its own name, so I guess we should too
6430 (define-public python-beautifulsoup4
6431 (package
6432 (name "python-beautifulsoup4")
6433 (version "4.5.3")
6434 (source
6435 (origin
6436 (method url-fetch)
6437 (uri (pypi-uri "beautifulsoup4" version))
6438 (sha256
6439 (base32
6440 "0glaw1vyxnbp03fni7h5496n6iib0n5iim4gax1n0ngscs9s075j"))))
6441 (build-system python-build-system)
6442 (arguments
6443 `(#:phases
6444 (modify-phases %standard-phases
6445 ;; The Python 2 source is the definitive source of beautifulsoup4. We
6446 ;; must use this conversion script when building with Python 3. The
6447 ;; conversion script also runs the tests.
6448 ;; For more information, see the file 'convert-py3k' in the source
6449 ;; distribution.
6450 (replace 'check
6451 (lambda _ (zero? (system* "./convert-py3k")))))))
6452 (home-page
6453 "http://www.crummy.com/software/BeautifulSoup/bs4/")
6454 (synopsis
6455 "Python screen-scraping library")
6456 (description
6457 "Beautiful Soup is a Python library designed for rapidly setting up
6458 screen-scraping projects. It offers Pythonic idioms for navigating,
6459 searching, and modifying a parse tree, providing a toolkit for
6460 dissecting a document and extracting what you need. It automatically
6461 converts incoming documents to Unicode and outgoing documents to UTF-8.")
6462 (license license:expat)
6463 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
6464
6465 (define-public python2-beautifulsoup4
6466 (package
6467 (inherit (package-with-python2
6468 (strip-python2-variant python-beautifulsoup4)))
6469 (arguments `(#:python ,python-2))))
6470
6471 (define-public python-cssutils
6472 (package
6473 (name "python-cssutils")
6474 (version "1.0.1")
6475 (source
6476 (origin
6477 (method url-fetch)
6478 (uri (pypi-uri "cssutils" version))
6479 (sha256
6480 (base32
6481 "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"))))
6482 (build-system python-build-system)
6483 (native-inputs
6484 `(("unzip" ,unzip))) ; for unpacking the source
6485 (arguments
6486 `(#:tests? #f)) ;tests require python-pbr < 1.7.0
6487 (home-page "http://cthedot.de/cssutils/")
6488 (synopsis
6489 "CSS Cascading Style Sheets library for Python")
6490 (description
6491 "Cssutils is a Python package for parsing and building CSS
6492 Cascading Style Sheets. Currently it provides a DOM only and no rendering
6493 options.")
6494 (license license:lgpl3+)))
6495
6496 (define-public python2-cssutils
6497 (package-with-python2 python-cssutils))
6498
6499 (define-public python-cssselect
6500 (package
6501 (name "python-cssselect")
6502 (version "0.9.2")
6503 (source
6504 (origin
6505 (method url-fetch)
6506 (uri (pypi-uri "cssselect" version))
6507 (sha256
6508 (base32
6509 "1xg6gbva1yswghiycmgincv6ab4bn7hpm720ndbj40h8xycmnfvi"))))
6510 (build-system python-build-system)
6511 (arguments
6512 ;; tests fail with message
6513 ;; AttributeError: 'module' object has no attribute 'tests'
6514 `(#:tests? #f))
6515 (home-page
6516 "https://pythonhosted.org/cssselect/")
6517 (synopsis
6518 "CSS3 selector parser and translator to XPath 1.0")
6519 (description
6520 "Cssselect ia a Python module that parses CSS3 Selectors and translates
6521 them to XPath 1.0 expressions. Such expressions can be used in lxml or
6522 another XPath engine to find the matching elements in an XML or HTML document.")
6523 (license license:bsd-3)))
6524
6525 (define-public python2-cssselect
6526 (package-with-python2 python-cssselect))
6527
6528 (define-public python-openid-cla
6529 (package
6530 (name "python-openid-cla")
6531 (version "1.2")
6532 (source
6533 (origin
6534 (method url-fetch)
6535 (uri (pypi-uri "python-openid-cla" version))
6536 (sha256
6537 (base32
6538 "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
6539 (build-system python-build-system)
6540 (arguments '(#:tests? #f)) ; No tests.
6541 (home-page "https://github.com/puiterwijk/python-openid-cla/")
6542 (synopsis "Implementation of the OpenID CLA extension for python-openid")
6543 (description "@code{openid-cla} is an implementation of the OpenID
6544 contributor license agreement extension for python-openid.")
6545 (license license:bsd-3)))
6546
6547 (define-public python2-openid-cla
6548 (package-with-python2 python-openid-cla))
6549
6550 (define-public python-openid-teams
6551 (package
6552 (name "python-openid-teams")
6553 (version "1.1")
6554 (source
6555 (origin
6556 (method url-fetch)
6557 (uri (pypi-uri "python-openid-teams" version))
6558 (sha256
6559 (base32
6560 "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
6561 (build-system python-build-system)
6562 (arguments '(#:tests? #f)) ; No tests.
6563 (home-page "https://github.com/puiterwijk/python-openid-teams/")
6564 (synopsis "Implementation of the OpenID teams extension for python-openid")
6565 (description
6566 "@code{openid-teams} is an implementation of the OpenID
6567 teams extension for python-openid.")
6568 (license license:bsd-3)))
6569
6570 (define-public python2-openid-teams
6571 (package-with-python2 python-openid-teams))
6572
6573 (define-public python-netifaces
6574 (package
6575 (name "python-netifaces")
6576 (version "0.10.4")
6577 (source
6578 (origin
6579 (method url-fetch)
6580 (uri (string-append
6581 "https://pypi.python.org/packages/source/n/netifaces/netifaces-"
6582 version
6583 ".tar.gz"))
6584 (sha256
6585 (base32
6586 "1plw237a4zib4z8s62g0mrs8gm3kjfrp5sxh6bbk9nl3rdls2mln"))))
6587 (build-system python-build-system)
6588 (home-page
6589 "https://bitbucket.org/al45tair/netifaces")
6590 (synopsis
6591 "Python module for portable network interface information")
6592 (description
6593 "Netifaces is a Python module providing information on network
6594 interfaces in an easy and portable manner.")
6595 (license license:expat)))
6596
6597 (define-public python2-netifaces
6598 (package-with-python2 python-netifaces))
6599
6600 (define-public python-networkx
6601 (package
6602 (name "python-networkx")
6603 (version "1.11")
6604 (source
6605 (origin
6606 (method url-fetch)
6607 (uri (pypi-uri "networkx" version))
6608 (sha256
6609 (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
6610 (build-system python-build-system)
6611 ;; python-decorator is needed at runtime
6612 (propagated-inputs
6613 `(("python-decorator" ,python-decorator)))
6614 (native-inputs
6615 `(("python-nose" ,python-nose)))
6616 (home-page "http://networkx.github.io/")
6617 (synopsis "Python module for creating and manipulating graphs and networks")
6618 (description
6619 "NetworkX is a Python package for the creation, manipulation, and study
6620 of the structure, dynamics, and functions of complex networks.")
6621 (license license:bsd-3)))
6622
6623 (define-public python2-networkx
6624 (package-with-python2 python-networkx))
6625
6626 (define-public snakemake
6627 (package
6628 (name "snakemake")
6629 (version "4.2.0")
6630 (source
6631 (origin
6632 (method url-fetch)
6633 (uri (pypi-uri "snakemake" version))
6634 (sha256
6635 (base32 "0mgl44q152ws40zj2vicqark5szyd73vqy9pf26g6hk6dk0y0c79"))))
6636 (build-system python-build-system)
6637 (arguments
6638 ;; TODO: Package missing test dependencies.
6639 '(#:tests? #f
6640 #:phases
6641 (modify-phases %standard-phases
6642 ;; For cluster execution Snakemake will call Python. Since there is
6643 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6644 ;; this by calling the snakemake wrapper instead.
6645 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6646 (lambda* (#:key outputs #:allow-other-keys)
6647 (substitute* "snakemake/executors.py"
6648 (("\\{sys.executable\\} -m snakemake")
6649 (string-append (assoc-ref outputs "out")
6650 "/bin/snakemake")))
6651 #t)))))
6652 (propagated-inputs
6653 `(("python-wrapt" ,python-wrapt)
6654 ("python-requests" ,python-requests)
6655 ("python-appdirs" ,python-appdirs)
6656 ("python-configargparse" ,python-configargparse)
6657 ("python-pyyaml" ,python-pyyaml)
6658 ("python-ratelimiter" ,python-ratelimiter)))
6659 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
6660 (synopsis "Python-based execution environment for make-like workflows")
6661 (description
6662 "Snakemake aims to reduce the complexity of creating workflows by
6663 providing a clean and modern domain specific specification language (DSL) in
6664 Python style, together with a fast and comfortable execution environment.")
6665 (license license:expat)))
6666
6667 (define-public python-pyqrcode
6668 (package
6669 (name "python-pyqrcode")
6670 (version "1.2.1")
6671 (source
6672 (origin
6673 (method url-fetch)
6674 (uri (pypi-uri "PyQRCode" version))
6675 (sha256
6676 (base32
6677 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6678 (build-system python-build-system)
6679 (home-page
6680 "https://github.com/mnooner256/pyqrcode")
6681 (synopsis "QR code generator")
6682 (description
6683 "Pyqrcode is a QR code generator written purely in Python with
6684 SVG, EPS, PNG and terminal output.")
6685 (license license:bsd-3)))
6686
6687 (define-public python-seaborn
6688 (package
6689 (name "python-seaborn")
6690 (version "0.7.1")
6691 (source
6692 (origin
6693 (method url-fetch)
6694 (uri (pypi-uri "seaborn" version))
6695 (sha256
6696 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
6697 (build-system python-build-system)
6698 (arguments
6699 '(#:tests? #f)) ; Tests requires a running X11 server.
6700 (propagated-inputs
6701 `(("python-pandas" ,python-pandas)
6702 ("python-matplotlib" ,python-matplotlib)
6703 ("python-scipy" ,python-scipy)))
6704 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6705 (synopsis "Statistical data visualization")
6706 (description
6707 "Seaborn is a library for making attractive and informative statistical
6708 graphics in Python. It is built on top of matplotlib and tightly integrated
6709 with the PyData stack, including support for numpy and pandas data structures
6710 and statistical routines from scipy and statsmodels.")
6711 (license license:bsd-3)
6712 (properties `((python2-variant . ,(delay python2-seaborn))))))
6713
6714 (define-public python2-seaborn
6715 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
6716 (package
6717 (inherit base)
6718 (propagated-inputs `(("python2-pytz" ,python2-pytz)
6719 ,@(package-propagated-inputs base))))))
6720
6721 (define-public python-mpmath
6722 (package
6723 (name "python-mpmath")
6724 (version "0.19")
6725 (source (origin
6726 (method url-fetch)
6727 (uri (string-append "http://mpmath.org/files/mpmath-"
6728 version ".tar.gz"))
6729 (sha256
6730 (base32
6731 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6732 (build-system python-build-system)
6733 (arguments
6734 '(#:phases
6735 (modify-phases %standard-phases
6736 (replace 'check
6737 (lambda _
6738 (zero?
6739 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
6740 (home-page "http://mpmath.org")
6741 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6742 (description
6743 "@code{mpmath} can be used as an arbitrary-precision substitute for
6744 Python's float/complex types and math/cmath modules, but also does much
6745 more advanced mathematics.")
6746 (license license:bsd-3)))
6747
6748 (define-public python2-mpmath
6749 (package-with-python2 python-mpmath))
6750
6751 (define-public python-sympy
6752 (package
6753 (name "python-sympy")
6754 (version "1.0")
6755 (source
6756 (origin
6757 (method url-fetch)
6758 (uri (string-append
6759 "https://github.com/sympy/sympy/releases/download/sympy-"
6760 version "/sympy-" version ".tar.gz"))
6761 (sha256
6762 (base32 "1bpzjwr9hrr7w88v4vgnj9lr6vxcldc94si13n8xpr1rv08d5b1y"))))
6763 (build-system python-build-system)
6764 (propagated-inputs
6765 `(("python-mpmath" ,python-mpmath)))
6766 (home-page "http://www.sympy.org/")
6767 (synopsis "Python library for symbolic mathematics")
6768 (description
6769 "SymPy is a Python library for symbolic mathematics. It aims to become a
6770 full-featured computer algebra system (CAS) while keeping the code as simple
6771 as possible in order to be comprehensible and easily extensible.")
6772 (license license:bsd-3)))
6773
6774 (define-public python2-sympy
6775 (package-with-python2 python-sympy))
6776
6777 (define-public python-q
6778 (package
6779 (name "python-q")
6780 (version "2.6")
6781 (source
6782 (origin
6783 (method url-fetch)
6784 (uri (pypi-uri "q" version))
6785 (sha256
6786 (base32
6787 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6788 (build-system python-build-system)
6789 (home-page "https://github.com/zestyping/q")
6790 (synopsis "Quick-and-dirty debugging output for tired programmers")
6791 (description
6792 "q is a Python module for \"print\" style of debugging Python code. It
6793 provides convenient short API for print out of values, tracebacks, and
6794 falling into the Python interpreter.")
6795 (license license:asl2.0)))
6796
6797 (define-public python2-q
6798 (package-with-python2 python-q))
6799
6800 (define-public python-testlib
6801 (package
6802 (name "python-testlib")
6803 (version "0.6.5")
6804 (source
6805 (origin
6806 (method url-fetch)
6807 (uri (string-append
6808 "https://pypi.python.org/packages/source/t/testlib/testlib-"
6809 version ".zip"))
6810 (sha256
6811 (base32 "1mz26cxn4x8bbgv0rn0mvj2z05y31rkc8009nvdlb3lam5b4mj3y"))))
6812 (build-system python-build-system)
6813 (native-inputs
6814 `(("unzip" ,unzip))) ; for unpacking the source
6815 (synopsis "Python micro test suite harness")
6816 (description "A micro unittest suite harness for Python.")
6817 (home-page "https://github.com/trentm/testlib")
6818 (license license:expat)))
6819
6820 (define-public python2-testlib
6821 (package-with-python2 python-testlib))
6822
6823 (define-public python2-xlib
6824 (package
6825 (name "python2-xlib")
6826 (version "0.14")
6827 (source (origin
6828 (method url-fetch)
6829 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6830 "/" version "/"
6831 "python-xlib-" version ".tar.gz"))
6832 (sha256
6833 (base32
6834 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6835 (build-system python-build-system)
6836 (arguments
6837 `(#:python ,python-2 ;Python 2 only
6838 #:tests? #f)) ;no tests
6839 (home-page "http://python-xlib.sourceforge.net/")
6840 (synopsis "Python X11 client library")
6841 (description
6842 "The Python X Library is intended to be a fully functional X client
6843 library for Python programs. It is useful to implement low-level X clients.
6844 It is written entirely in Python.")
6845 (license license:gpl2+)))
6846
6847 (define-public python-singledispatch
6848 (package
6849 (name "python-singledispatch")
6850 (version "3.4.0.3")
6851 (source
6852 (origin
6853 (method url-fetch)
6854 (uri (pypi-uri "singledispatch" version))
6855 (sha256
6856 (base32
6857 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6858 (build-system python-build-system)
6859 (native-inputs
6860 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6861 (home-page
6862 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6863 (synopsis "Backport of singledispatch feature from Python 3.4")
6864 (description
6865 "This library brings functools.singledispatch from Python 3.4 to Python
6866 2.6-3.3.")
6867 (license license:expat)))
6868
6869 (define-public python2-singledispatch
6870 (package-with-python2 python-singledispatch))
6871
6872 (define-public python-tornado
6873 (package
6874 (name "python-tornado")
6875 (version "4.5.1")
6876 (source
6877 (origin
6878 (method url-fetch)
6879 (uri (pypi-uri "tornado" version))
6880 (sha256
6881 (base32 "1zbkgcdfq81k298awrm8p0xwbwwn2p3nbizdglzfbkskhai082fv"))))
6882 (build-system python-build-system)
6883 (arguments
6884 '(;; FIXME: Two tests error out with:
6885 ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
6886 ;; #:phases
6887 ;; (modify-phases %standard-phases
6888 ;; (replace 'check
6889 ;; (lambda _
6890 ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
6891 ;; ;; "tornado/platform/kqueue.py". This is the supported method:
6892 ;; (zero? (system* "python" "-m" "tornado.test")))))
6893 #:tests? #f))
6894 (native-inputs
6895 `(("python-certifi" ,python-certifi)))
6896 (propagated-inputs
6897 `(("python-backports-abc" ,python-backports-abc)))
6898 (home-page "http://www.tornadoweb.org/")
6899 (synopsis "Python web framework and asynchronous networking library")
6900 (description
6901 "Tornado is a Python web framework and asynchronous networking library,
6902 originally developed at FriendFeed. By using non-blocking network I/O,
6903 Tornado can scale to tens of thousands of open connections, making it ideal
6904 for long polling, WebSockets, and other applications that require a long-lived
6905 connection to each user.")
6906 (license license:asl2.0)
6907 (properties `((python2-variant . ,(delay python2-tornado))))))
6908
6909 (define-public python2-tornado
6910 (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
6911 (package (inherit tornado)
6912 (propagated-inputs
6913 `(("python2-backport-ssl-match-hostname"
6914 ,python2-backport-ssl-match-hostname)
6915 ("python2-singledispatch" ,python2-singledispatch)
6916 ,@(package-propagated-inputs tornado))))))
6917
6918 (define-public python-tornado-http-auth
6919 (package
6920 (name "python-tornado-http-auth")
6921 (version "1.1.0")
6922 (source
6923 (origin
6924 (method url-fetch)
6925 (uri (pypi-uri "tornado-http-auth" version))
6926 (sha256
6927 (base32
6928 "0znrgqd7k2s4ia474xizi6h3061zj4sn5n6cq76bkwl3wwshifn5"))))
6929 (build-system python-build-system)
6930 (propagated-inputs
6931 `(("python-tornado" ,python-tornado)))
6932 (home-page
6933 "https://github.com/gvalkov/tornado-http-auth")
6934 (synopsis
6935 "Digest and basic authentication module for Tornado")
6936 (description
6937 "Provides support for adding authentication to services using the Tornado
6938 web framework, either via the basic or digest authentication schemes.")
6939 (license license:asl2.0)))
6940
6941 ;; the python- version can be removed with python-3.5
6942 (define-public python-backports-abc
6943 (package
6944 (name "python-backports-abc")
6945 (version "0.5")
6946 (source
6947 (origin
6948 (method url-fetch)
6949 (uri (pypi-uri "backports_abc" version))
6950 (sha256
6951 (base32
6952 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6953 (build-system python-build-system)
6954 (home-page "https://github.com/cython/backports_abc")
6955 (synopsis "Backport of additions to the 'collections.abc' module")
6956 (description
6957 "Python-backports-abc provides a backport of additions to the
6958 'collections.abc' module in Python-3.5.")
6959 (license license:psfl)))
6960
6961 (define-public python2-backports-abc
6962 (package-with-python2 python-backports-abc))
6963
6964 (define-public python-backports-csv
6965 (package
6966 (name "python-backports-csv")
6967 (version "1.0.5")
6968 (source
6969 (origin
6970 (method url-fetch)
6971 (uri (pypi-uri "backports.csv" version))
6972 (sha256
6973 (base32
6974 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6975 (build-system python-build-system)
6976 (home-page "https://github.com/ryanhiebert/backports.csv")
6977 (synopsis "Backport of Python 3's csv module for Python 2")
6978 (description
6979 "Provides a backport of Python 3's @code{csv} module for parsing
6980 comma separated values. The API of the @code{csv} module in Python 2
6981 is drastically different from the @code{csv} module in Python 3.
6982 This is due, for the most part, to the difference between str in
6983 Python 2 and Python 3.")
6984 (license license:psfl)))
6985
6986 (define-public python2-backports-csv
6987 (package-with-python2 python-backports-csv))
6988
6989 (define-public python2-backports-shutil-get-terminal-size
6990 (package
6991 (name "python2-backports-shutil-get-terminal-size")
6992 (version "1.0.0")
6993 (source
6994 (origin
6995 (method url-fetch)
6996 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6997 (sha256
6998 (base32
6999 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
7000 (build-system python-build-system)
7001 (arguments
7002 `(#:python ,python-2
7003 #:phases
7004 (modify-phases %standard-phases
7005 (replace 'check
7006 (lambda _
7007 (zero? (system* "py.test" "-v")))))))
7008 (native-inputs
7009 `(("python2-pytest" ,python2-pytest)))
7010 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
7011 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
7012 (description
7013 "This package provides a backport of the @code{get_terminal_size
7014 function} from Python 3.3's @code{shutil}.
7015 Unlike the original version it is written in pure Python rather than C,
7016 so it might be a tiny bit slower.")
7017 (license license:expat)))
7018
7019 (define-public python-waf
7020 (package
7021 (name "python-waf")
7022 (version "1.9.8")
7023 (source (origin
7024 (method url-fetch)
7025 (uri (string-append "https://waf.io/"
7026 "waf-" version ".tar.bz2"))
7027 (sha256
7028 (base32
7029 "0wl4cnmp06lfxqjxaan58bqxn27smhydz0sg5prrfbl3bsw4gv6q"))))
7030 (build-system python-build-system)
7031 (arguments
7032 '(#:phases
7033 (modify-phases %standard-phases
7034 (replace 'build
7035 (lambda _
7036 (zero? (system* "python" "waf-light" "configure" "build"))))
7037 (replace 'check
7038 (lambda _
7039 (zero? (system* "python" "waf" "--version"))))
7040 (replace 'install
7041 (lambda _
7042 (copy-file "waf" %output))))))
7043 (home-page "https://waf.io/")
7044 (synopsis "Python-based build system")
7045 (description
7046 "Waf is a Python-based framework for configuring, compiling and installing
7047 applications.")
7048 (license license:bsd-3)))
7049
7050 (define-public python2-waf
7051 (package-with-python2 python-waf))
7052
7053 (define-public python-pyzmq
7054 (package
7055 (name "python-pyzmq")
7056 (version "15.1.0")
7057 (source
7058 (origin
7059 (method url-fetch)
7060 (uri (pypi-uri "pyzmq" version))
7061 (sha256
7062 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
7063 (build-system python-build-system)
7064 (arguments
7065 `(#:configure-flags
7066 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
7067 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
7068 ;; --inplace' for 'python setup.py test' to work.
7069 #:tests? #f))
7070 (inputs
7071 `(("zeromq" ,zeromq)))
7072 (native-inputs
7073 `(("pkg-config" ,pkg-config)
7074 ("python-nose" ,python-nose)))
7075 (home-page "https://github.com/zeromq/pyzmq")
7076 (synopsis "Python bindings for 0MQ")
7077 (description
7078 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
7079 (license license:bsd-4)))
7080
7081 (define-public python2-pyzmq
7082 (package-with-python2 python-pyzmq))
7083
7084 (define-public python-pep8
7085 (package
7086 (name "python-pep8")
7087 (version "1.7.0")
7088 (source
7089 (origin
7090 (method url-fetch)
7091 (uri (pypi-uri "pep8" version))
7092 (sha256
7093 (base32
7094 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
7095 (build-system python-build-system)
7096 (home-page "http://pep8.readthedocs.org/")
7097 (synopsis "Python style guide checker")
7098 (description
7099 "This tools checks Python code against some of the style conventions in
7100 PEP 8.")
7101 (license license:expat)))
7102
7103 (define-public python2-pep8
7104 (package-with-python2 python-pep8))
7105
7106 (define-public python-pyflakes
7107 (package
7108 (name "python-pyflakes")
7109 (version "1.0.0")
7110 (source
7111 (origin
7112 (method url-fetch)
7113 (uri (pypi-uri "pyflakes" version))
7114 (sha256
7115 (base32
7116 "0qs2sgqszq7wcplis8509wk2ygqcrwzbs1ghfj3svvivq2j377pk"))))
7117 (build-system python-build-system)
7118 (home-page
7119 "https://github.com/pyflakes/pyflakes")
7120 (synopsis "Passive checker of Python programs")
7121 (description
7122 "Pyflakes statically checks Python source code for common errors.")
7123 (license license:expat)))
7124
7125 (define-public python2-pyflakes
7126 (package-with-python2 python-pyflakes))
7127
7128 (define-public python-mccabe
7129 (package
7130 (name "python-mccabe")
7131 (version "0.4.0")
7132 (source
7133 (origin
7134 (method url-fetch)
7135 (uri (pypi-uri "mccabe" version))
7136 (sha256
7137 (base32
7138 "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
7139 (build-system python-build-system)
7140 (native-inputs
7141 `(("python-pytest" ,python-pytest)
7142 ("python-pytest-runner" ,python-pytest-runner)))
7143 (home-page "https://github.com/flintwork/mccabe")
7144 (synopsis "McCabe checker, plugin for flake8")
7145 (description
7146 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
7147 complexity of Python source code.")
7148 (license license:expat)))
7149
7150 (define-public python2-mccabe
7151 (package-with-python2 python-mccabe))
7152
7153 (define-public python-mccabe-0.2.1
7154 (package (inherit python-mccabe)
7155 (version "0.2.1")
7156 (source
7157 (origin
7158 (method url-fetch)
7159 (uri (pypi-uri "mccabe" version))
7160 (sha256
7161 (base32
7162 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
7163
7164 (define-public python2-mccabe-0.2.1
7165 (package-with-python2 python-mccabe-0.2.1))
7166
7167 ;; Flake8 2.4.1 requires an older version of pep8.
7168 ;; This should be removed ASAP.
7169 (define-public python-pep8-1.5.7
7170 (package (inherit python-pep8)
7171 (version "1.5.7")
7172 (source
7173 (origin
7174 (method url-fetch)
7175 (uri (string-append
7176 "https://pypi.python.org/packages/source/p/pep8/pep8-"
7177 version
7178 ".tar.gz"))
7179 (sha256
7180 (base32
7181 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
7182 (arguments
7183 ;; XXX Tests not compatible with Python 3.5.
7184 '(#:tests? #f))))
7185
7186 (define-public python2-pep8-1.5.7
7187 (package-with-python2 python-pep8-1.5.7))
7188
7189 ;; Flake8 2.4.1 requires an older version of pyflakes.
7190 ;; This should be removed ASAP.
7191 (define-public python-pyflakes-0.8.1
7192 (package (inherit python-pyflakes)
7193 (version "0.8.1")
7194 (source
7195 (origin
7196 (method url-fetch)
7197 (uri (string-append
7198 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
7199 version
7200 ".tar.gz"))
7201 (sha256
7202 (base32
7203 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
7204 (arguments
7205 ;; XXX Tests not compatible with Python 3.5.
7206 '(#:tests? #f))))
7207
7208 (define-public python2-pyflakes-0.8.1
7209 (package-with-python2 python-pyflakes-0.8.1))
7210
7211 (define-public python-flake8
7212 (package
7213 (name "python-flake8")
7214 (version "2.5.4")
7215 (source
7216 (origin
7217 (method url-fetch)
7218 (uri (pypi-uri "flake8" version))
7219 (sha256
7220 (base32
7221 "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))
7222 (modules '((guix build utils)))
7223 (snippet
7224 '(begin
7225 ;; Remove pre-compiled .pyc files from source.
7226 (for-each delete-file-recursively
7227 (find-files "." "__pycache__" #:directories? #t))
7228 (for-each delete-file (find-files "." "\\.pyc$"))
7229 #t))))
7230 (build-system python-build-system)
7231 (propagated-inputs
7232 `(("python-pep8" ,python-pep8)
7233 ("python-pyflakes" ,python-pyflakes)
7234 ("python-mccabe" ,python-mccabe)))
7235 (native-inputs
7236 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
7237 ("python-nose" ,python-nose)))
7238 (home-page "https://gitlab.com/pycqa/flake8")
7239 (synopsis
7240 "The modular source code checker: pep8, pyflakes and co")
7241 (description
7242 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
7243 (license license:expat)))
7244
7245 (define-public python2-flake8
7246 (package-with-python2 python-flake8))
7247
7248 (define-public python-flake8-polyfill
7249 (package
7250 (name "python-flake8-polyfill")
7251 (version "1.0.1")
7252 (source
7253 (origin
7254 (method url-fetch)
7255 (uri (pypi-uri "flake8-polyfill" version))
7256 (sha256
7257 (base32
7258 "02gn2wxvh9vnf7m7dld7ca4l60mg5c370hv3swwppkngwaqmcw67"))))
7259 (build-system python-build-system)
7260 (arguments
7261 '(#:phases
7262 (modify-phases %standard-phases
7263 (replace 'check
7264 (lambda _
7265 (setenv "PYTHONPATH"
7266 (string-append (getcwd) "/build/lib:"
7267 (getenv "PYTHONPATH")))
7268 (zero? (system* "py.test" "-v")))))))
7269 (native-inputs
7270 `(("python-flake8" ,python-flake8)
7271 ("python-mock" ,python-mock)
7272 ("python-pycodestyle" ,python-pycodestyle)
7273 ("python-pytest" ,python-pytest)))
7274 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
7275 (synopsis "Polyfill package for Flake8 plugins")
7276 (description
7277 "This package that provides some compatibility helpers for Flake8
7278 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
7279 (license license:expat)))
7280
7281 (define-public python2-flake8-polyfill
7282 (package-with-python2 python-flake8-polyfill))
7283
7284 (define-public python-mistune
7285 (package
7286 (name "python-mistune")
7287 (version "0.7.3")
7288 (source
7289 (origin
7290 (method url-fetch)
7291 (uri (pypi-uri "mistune" version))
7292 (sha256
7293 (base32
7294 "04xpk1zvslhq3xpnf01g3ag0dy9wfv4z28p093r8k49vvxlyil11"))))
7295 (build-system python-build-system)
7296 (native-inputs
7297 `(("python-nose" ,python-nose)
7298 ("python-cython" ,python-cython)))
7299 (home-page "https://github.com/lepture/mistune")
7300 (synopsis "Markdown parser in pure Python")
7301 (description "This package provides a fast markdown parser in pure
7302 Python.")
7303 (license license:bsd-3)))
7304
7305 (define-public python2-mistune
7306 (package-with-python2 python-mistune))
7307
7308 (define-public python-markdown
7309 (package
7310 (name "python-markdown")
7311 (version "2.6.8")
7312 (source
7313 (origin
7314 (method url-fetch)
7315 (uri (pypi-uri "Markdown" version))
7316 (sha256
7317 (base32
7318 "0cqfhr1km2s5d8jm6hbwgkrrj9hvkjf2gab3s2axlrw1clgaij0a"))))
7319 (build-system python-build-system)
7320 (arguments
7321 `(#:phases
7322 (modify-phases %standard-phases
7323 (replace 'check
7324 (lambda _
7325 (zero? (system* "python" "run-tests.py")))))))
7326 (native-inputs
7327 `(("python-nose" ,python-nose)
7328 ("python-pyyaml" ,python-pyyaml)))
7329 (home-page "https://pythonhosted.org/Markdown/")
7330 (synopsis "Python implementation of Markdown")
7331 (description
7332 "This package provides a Python implementation of John Gruber's
7333 Markdown. The library features international input, various Markdown
7334 extensions, and several HTML output formats. A command line wrapper
7335 markdown_py is also provided to convert Markdown files to HTML.")
7336 (license license:bsd-3)))
7337
7338 (define-public python2-markdown
7339 (package-with-python2 python-markdown))
7340
7341 (define-public python-ptyprocess
7342 (package
7343 (name "python-ptyprocess")
7344 (version "0.5.1")
7345 (source
7346 (origin
7347 (method url-fetch)
7348 (uri (string-append
7349 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
7350 version ".tar.gz"))
7351 (sha256
7352 (base32
7353 "19l1xrjn4l9gjz01s3vg92gn2dd9d8mw1v86ppkzlnr9m5iwwc05"))))
7354 (build-system python-build-system)
7355 (native-inputs
7356 `(("python-nose" ,python-nose)))
7357 (arguments
7358 `(#:phases
7359 (modify-phases %standard-phases
7360 (replace 'check
7361 (lambda _
7362 (zero? (system* "nosetests")))))))
7363 (home-page "https://github.com/pexpect/ptyprocess")
7364 (synopsis "Run a subprocess in a pseudo terminal")
7365 (description
7366 "This package provides a Python library used to launch a subprocess in a
7367 pseudo terminal (pty), and interact with both the process and its pty.")
7368 (license license:isc)))
7369
7370 (define-public python2-ptyprocess
7371 (package-with-python2 python-ptyprocess))
7372
7373 (define-public python-cram
7374 (package
7375 (name "python-cram")
7376 (version "0.7")
7377 (home-page "https://bitheap.org/cram/")
7378 (source (origin
7379 (method url-fetch)
7380 (uri (list (string-append home-page "cram-"
7381 version ".tar.gz")
7382 (pypi-uri "cram" version)))
7383 (sha256
7384 (base32
7385 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
7386 (arguments
7387 '(#:phases
7388 (modify-phases %standard-phases
7389 (add-after 'unpack 'patch-source
7390 (lambda _
7391 (substitute* (find-files "cram" ".*\\.py$")
7392 ;; Replace default shell path.
7393 (("/bin/sh") (which "sh")))
7394 (substitute* (find-files "tests" ".*\\.t$")
7395 (("md5") "md5sum")
7396 (("/bin/bash") (which "bash"))
7397 (("/bin/sh") (which "sh")))
7398 (substitute* "cram/_test.py"
7399 ;; This hack works around a bug triggered by substituting
7400 ;; the /bin/sh paths. "tests/usage.t" compares the output of
7401 ;; "cram -h", which breaks the output at 80 characters. This
7402 ;; causes the line showing the default shell to break into two
7403 ;; lines, but the test expects a single line...
7404 (("env\\['COLUMNS'\\] = '80'")
7405 "env['COLUMNS'] = '160'"))
7406 #t))
7407 (delete 'check)
7408 (add-after 'install 'check
7409 ;; The test phase uses the built library and executable.
7410 ;; It's easier to run it after install since the build
7411 ;; directory contains version-specific PATH.
7412 (lambda* (#:key inputs outputs #:allow-other-keys)
7413 (add-installed-pythonpath inputs outputs)
7414 (setenv "PATH" (string-append (getenv "PATH") ":"
7415 (assoc-ref outputs "out") "/bin"))
7416 (zero? (system* "make" "test")))))))
7417 (build-system python-build-system)
7418 (native-inputs
7419 `(("python-coverage" ,python-coverage)
7420 ("which" ,which)))
7421 (synopsis "Simple testing framework for command line applications")
7422 (description
7423 "Cram is a functional testing framework for command line applications.
7424 Cram tests look like snippets of interactive shell sessions. Cram runs each
7425 command and compares the command output in the test with the command’s actual
7426 output.")
7427 (license license:gpl2+)))
7428
7429 (define-public python2-cram
7430 (package-with-python2 python-cram))
7431
7432 (define-public python-terminado
7433 (package
7434 (name "python-terminado")
7435 (version "0.6")
7436 (source
7437 (origin
7438 (method url-fetch)
7439 (uri (pypi-uri "terminado" version))
7440 (sha256
7441 (base32
7442 "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
7443 (build-system python-build-system)
7444 (propagated-inputs
7445 `(("python-tornado" ,python-tornado)
7446 ("python-ptyprocess" ,python-ptyprocess)))
7447 (native-inputs
7448 `(("python-nose" ,python-nose)))
7449 (arguments
7450 `(#:phases
7451 (modify-phases %standard-phases
7452 (replace 'check
7453 (lambda _
7454 (zero? (system* "nosetests")))))))
7455 (home-page "https://github.com/takluyver/terminado")
7456 (synopsis "Terminals served to term.js using Tornado websockets")
7457 (description "This package provides a Tornado websocket backend for the
7458 term.js Javascript terminal emulator library.")
7459 (license license:bsd-2)
7460 (properties `((python2-variant . ,(delay python2-terminado))))))
7461
7462 (define-public python2-terminado
7463 (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
7464 (package (inherit terminado)
7465 (propagated-inputs
7466 `(("python2-backport-ssl-match-hostname"
7467 ,python2-backport-ssl-match-hostname)
7468 ,@(package-propagated-inputs terminado))))))
7469
7470 (define-public python-straight-plugin
7471 (package
7472 (name "python-straight-plugin")
7473 (version "1.4.1")
7474 (source
7475 (origin
7476 (method url-fetch)
7477 (uri (pypi-uri "straight.plugin" version))
7478 (sha256
7479 (base32
7480 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
7481 (build-system python-build-system)
7482 (home-page "https://github.com/ironfroggy/straight.plugin")
7483 (synopsis "Simple namespaced plugin facility")
7484 (description "Straight Plugin provides a type of plugin you can create from
7485 almost any existing Python modules, and an easy way for outside developers to
7486 add functionality and customization to your projects with their own plugins.")
7487 (license license:expat)))
7488
7489 (define-public python2-straight-plugin
7490 (package-with-python2 python-straight-plugin))
7491
7492 (define-public python-fonttools
7493 (package
7494 (name "python-fonttools")
7495 (version "3.15.1")
7496 (source (origin
7497 (method url-fetch)
7498 (uri (pypi-uri "fonttools" version ".zip"))
7499 (sha256
7500 (base32
7501 "1hhj97izwliy0vybmza72d90l5d4mcn50y8akq7kyccfl82vdx4d"))))
7502 (build-system python-build-system)
7503 (arguments
7504 '(#:test-target "check"
7505 #:phases
7506 (modify-phases %standard-phases
7507 (add-after 'unpack 'patch-setuppy
7508 ;; Remove the undocumented "extra_path" argument, which adds an
7509 ;; intervening directories between site-packages and the package
7510 ;; directory.
7511 (lambda _
7512 (substitute* "setup.py"
7513 (("^[ \t]*extra_path *= *'FontTools',") ""))
7514 #t)))))
7515 (native-inputs
7516 `(("unzip" ,unzip)))
7517 (home-page "https://github.com/behdad/fonttools")
7518 (synopsis "Tools to manipulate font files")
7519 (description
7520 "FontTools/TTX is a library to manipulate font files from Python. It
7521 supports reading and writing of TrueType/OpenType fonts, reading and writing
7522 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
7523 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
7524 from an XML-based format.")
7525 (license (license:non-copyleft
7526 "file://LICENSE.txt"
7527 "See LICENSE.txt in the distribution."))))
7528
7529 (define-public python2-fonttools
7530 (package-with-python2 python-fonttools))
7531
7532 (define-public python-ly
7533 (package
7534 (name "python-ly")
7535 (version "0.9.4")
7536 (source
7537 (origin
7538 (method url-fetch)
7539 (uri (string-append "https://pypi.python.org/packages/57/4f/"
7540 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
7541 "/python-ly-" version ".tar.gz"))
7542 (sha256
7543 (base32
7544 "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
7545 (build-system python-build-system)
7546 (arguments
7547 ;; FIXME: Some tests need network access.
7548 '(#:tests? #f))
7549 (synopsis "Tool and library for manipulating LilyPond files")
7550 (description "This package provides a Python library to parse, manipulate
7551 or create documents in LilyPond format. A command line program ly is also
7552 provided that can be used to do various manipulations with LilyPond files.")
7553 (home-page "https://pypi.python.org/pypi/python-ly")
7554 (license license:gpl2+)))
7555
7556 (define-public python-appdirs
7557 (package
7558 (name "python-appdirs")
7559 (version "1.4.3")
7560 (source
7561 (origin
7562 (method url-fetch)
7563 (uri (pypi-uri "appdirs" version))
7564 (sha256
7565 (base32
7566 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
7567 (build-system python-build-system)
7568 (home-page "https://github.com/ActiveState/appdirs")
7569 (synopsis
7570 "Determine platform-specific dirs, e.g. a \"user data dir\"")
7571 (description
7572 "This module provides a portable way of finding out where user data
7573 should be stored on various operating systems.")
7574 (license license:expat)))
7575
7576 (define-public python2-appdirs
7577 (package-with-python2 python-appdirs))
7578
7579 (define-public python-llfuse
7580 (package
7581 (name "python-llfuse")
7582 (version "1.2")
7583 (source (origin
7584 (method url-fetch)
7585 (uri (string-append
7586 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7587 "llfuse-" version ".tar.bz2"))
7588 (sha256
7589 (base32
7590 "11hms1x68bf1bqbqy7w3wpffqsd3jkgricmzrc1hrnwkswfzzlr4"))))
7591 (build-system python-build-system)
7592 (inputs
7593 `(("fuse" ,fuse)
7594 ("attr" ,attr)))
7595 (native-inputs
7596 `(("pkg-config" ,pkg-config)))
7597 (synopsis "Python bindings for FUSE")
7598 (description
7599 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
7600 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
7601 (license license:lgpl2.0+)
7602 (properties `((python2-variant . ,(delay python2-llfuse))))))
7603
7604 (define-public python2-llfuse
7605 (package (inherit (package-with-python2
7606 (strip-python2-variant python-llfuse)))
7607 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
7608
7609 ;; For attic-0.16
7610 (define-public python-llfuse-0.41
7611 (package (inherit python-llfuse)
7612 (version "0.41.1")
7613 (source (origin
7614 (method url-fetch)
7615 (uri (string-append
7616 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7617 "llfuse-" version ".tar.bz2"))
7618 (sha256
7619 (base32
7620 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
7621 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
7622 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
7623 (license (list license:expat license:lgpl2.0+))))
7624
7625 (define-public python-msgpack
7626 (package
7627 (name "python-msgpack")
7628 (version "0.4.8")
7629 (source (origin
7630 (method url-fetch)
7631 (uri (pypi-uri "msgpack-python" version))
7632 (sha256
7633 (base32
7634 "11pqk5braa6wndpnr1dhg64js82vjgxnm0lzy73rwl831zgijaqs"))))
7635 (build-system python-build-system)
7636 (synopsis "MessagePack (de)serializer")
7637 (description "MessagePack is a fast, compact binary serialization format,
7638 suitable for similar data to JSON. This package provides CPython bindings for
7639 reading and writing MessagePack data.")
7640 (home-page "https://pypi.python.org/pypi/msgpack-python/")
7641 (license license:asl2.0)))
7642
7643 (define-public python2-msgpack
7644 (package-with-python2 python-msgpack))
7645
7646 (define-public python-netaddr
7647 (package
7648 (name "python-netaddr")
7649 (version "0.7.19")
7650 (source
7651 (origin
7652 (method url-fetch)
7653 (uri (pypi-uri "netaddr" version))
7654 (sha256
7655 (base32
7656 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7657 (build-system python-build-system)
7658 (arguments `(#:tests? #f)) ;; No tests.
7659 (home-page "https://github.com/drkjam/netaddr/")
7660 (synopsis "Pythonic manipulation of network addresses")
7661 (description
7662 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7663 and MAC network addresses.")
7664 (license license:bsd-3)))
7665
7666 (define-public python2-netaddr
7667 (package-with-python2 python-netaddr))
7668
7669 (define-public python2-neo4j-driver
7670 (package
7671 (name "python2-neo4j-driver")
7672 ;; NOTE: When upgrading to 1.5.0, please add a python3 variant.
7673 (version "1.4.0")
7674 (source (origin
7675 (method url-fetch)
7676 (uri (pypi-uri "neo4j-driver" version))
7677 (sha256
7678 (base32
7679 "011r1vh182p8mm83d8dz9rfnc3l7rf7fd00cyrbyfzi71jmc4g98"))))
7680 (build-system python-build-system)
7681 (arguments
7682 `(#:python ,python-2))
7683 (home-page "https://neo4j.com/developer/python/")
7684 (synopsis "Neo4j driver code written in Python")
7685 (description "This package provides the Neo4j Python driver that connects
7686 to the database using Neo4j's binary protocol. It aims to be minimal, while
7687 being idiomatic to Python.")
7688 (license license:asl2.0)))
7689
7690 (define-public python2-py2neo
7691 (package
7692 (name "python2-py2neo")
7693 (version "3.1.2")
7694 (source (origin
7695 (method url-fetch)
7696 (uri (pypi-uri "py2neo" version))
7697 (sha256
7698 (base32
7699 "1f1q95vqcvlc3nsc33p841swnjdcjazddlq2dzi3qfnjqjrajxw1"))))
7700 (build-system python-build-system)
7701 (arguments
7702 `(#:python ,python-2))
7703 (home-page "http://py2neo.org")
7704 (synopsis "Library and toolkit for working with Neo4j in Python")
7705 (description "This package provides a client library and toolkit for
7706 working with Neo4j from within Python applications and from the command
7707 line. The core library has no external dependencies and has been carefully
7708 designed to be easy and intuitive to use.")
7709 (license license:asl2.0)))
7710
7711 (define-public python-wrapt
7712 (package
7713 (name "python-wrapt")
7714 (version "1.10.8")
7715 (source
7716 (origin
7717 (method url-fetch)
7718 (uri (pypi-uri "wrapt" version))
7719 (sha256
7720 (base32
7721 "0wrcm1mydvfivbkzz0h81ygzdchnscshi6xvy5n3r21r9s0px8af"))))
7722 (build-system python-build-system)
7723 (arguments
7724 ;; Tests are not included in the tarball, they are only available in the
7725 ;; git repository.
7726 `(#:tests? #f))
7727 (home-page "https://github.com/GrahamDumpleton/wrapt")
7728 (synopsis "Module for decorators, wrappers and monkey patching")
7729 (description
7730 "The aim of the wrapt module is to provide a transparent object proxy for
7731 Python, which can be used as the basis for the construction of function
7732 wrappers and decorator functions.")
7733 (license license:bsd-2)))
7734
7735 (define-public python2-wrapt
7736 (package-with-python2 python-wrapt))
7737
7738 (define-public python-iso8601
7739 (package
7740 (name "python-iso8601")
7741 (version "0.1.11")
7742 (source
7743 (origin
7744 (method url-fetch)
7745 (uri (pypi-uri "iso8601" version))
7746 (sha256
7747 (base32
7748 "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
7749 (build-system python-build-system)
7750 (native-inputs
7751 `(("python-pytest" ,python-pytest)))
7752 (home-page "https://bitbucket.org/micktwomey/pyiso8601")
7753 (synopsis "Module to parse ISO 8601 dates")
7754 (description
7755 "This module parses the most common forms of ISO 8601 date strings (e.g.
7756 @code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
7757 (license license:expat)))
7758
7759 (define-public python2-iso8601
7760 (package-with-python2 python-iso8601))
7761
7762 (define-public python-monotonic
7763 (package
7764 (name "python-monotonic")
7765 (version "0.3")
7766 (source
7767 (origin
7768 (method url-fetch)
7769 (uri (string-append
7770 "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
7771 version
7772 ".tar.gz"))
7773 (sha256
7774 (base32
7775 "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
7776 (build-system python-build-system)
7777 (home-page "https://github.com/atdt/monotonic")
7778 (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
7779 (description
7780 "This module provides a monotonic() function which returns the value (in
7781 fractional seconds) of a clock which never goes backwards.")
7782 (license license:asl2.0)))
7783
7784 (define-public python2-monotonic
7785 (package-with-python2 python-monotonic))
7786
7787 (define-public python-webob
7788 (package
7789 (name "python-webob")
7790 (version "1.5.1")
7791 (source
7792 (origin
7793 (method url-fetch)
7794 (uri (pypi-uri "WebOb" version))
7795 (sha256
7796 (base32
7797 "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
7798 (build-system python-build-system)
7799 (native-inputs
7800 `(("python-nose" ,python-nose)))
7801 (home-page "http://webob.org/")
7802 (synopsis "WSGI request and response object")
7803 (description
7804 "WebOb provides wrappers around the WSGI request environment, and an
7805 object to help create WSGI responses.")
7806 (license license:expat)))
7807
7808 (define-public python2-webob
7809 (package-with-python2 python-webob))
7810
7811 (define-public python-xlrd
7812 (package
7813 (name "python-xlrd")
7814 (version "1.0.0")
7815 (source (origin
7816 (method url-fetch)
7817 (uri (pypi-uri "xlrd" version))
7818 (sha256
7819 (base32
7820 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7821 (build-system python-build-system)
7822 (arguments
7823 `(#:phases
7824 (modify-phases %standard-phases
7825 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7826 ;; run tests instead for now.
7827 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
7828 (native-inputs `(("python-nose" ,python-nose)))
7829 (home-page "http://www.python-excel.org/")
7830 (synopsis "Library for extracting data from Excel files")
7831 (description "This packages provides a library to extract data from
7832 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7833 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7834 Unicode-aware. It is not intended as an end-user tool.")
7835 (license license:bsd-3)))
7836
7837 (define-public python2-xlrd
7838 (package-with-python2 python-xlrd))
7839
7840 (define-public python-prettytable
7841 (package
7842 (name "python-prettytable")
7843 (version "0.7.2")
7844 (source
7845 (origin
7846 (method url-fetch)
7847 (uri (string-append
7848 "https://pypi.python.org/packages/source/P/PrettyTable/"
7849 "prettytable-" version ".tar.bz2"))
7850 (sha256
7851 (base32
7852 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7853 (build-system python-build-system)
7854 (home-page "http://code.google.com/p/prettytable/")
7855 (synopsis "Display tabular data in an ASCII table format")
7856 (description
7857 "A library designed to represent tabular data in visually appealing ASCII
7858 tables. PrettyTable allows for selection of which columns are to be printed,
7859 independent alignment of columns (left or right justified or centred) and
7860 printing of sub-tables by specifying a row range.")
7861 (license license:bsd-3)))
7862
7863 (define-public python2-prettytable
7864 (package-with-python2 python-prettytable))
7865
7866 (define-public python-tables
7867 (package
7868 (name "python-tables")
7869 (version "3.2.2")
7870 (source
7871 (origin
7872 (method url-fetch)
7873 (uri (pypi-uri "tables" version))
7874 (sha256
7875 (base32
7876 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
7877 (modules '((guix build utils)))
7878 (snippet
7879 '(begin
7880 ;; Remove pre-compiled .pyc files from source.
7881 (for-each delete-file-recursively
7882 (find-files "." "__pycache__" #:directories? #t))
7883 (for-each delete-file (find-files "." "\\.pyc$"))
7884 #t))))
7885 (build-system python-build-system)
7886 (arguments
7887 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7888 ;; or "check", so we must override the build and check phases.
7889 #:phases
7890 (modify-phases %standard-phases
7891 (add-after 'unpack 'use-gcc
7892 (lambda _
7893 (substitute* "setup.py"
7894 (("compiler = new_compiler\\(\\)" line)
7895 (string-append line
7896 "\ncompiler.set_executables(compiler='gcc',"
7897 "compiler_so='gcc',"
7898 "linker_exe='gcc',"
7899 "linker_so='gcc -shared')")))
7900 #t))
7901 (replace 'build
7902 (lambda* (#:key inputs #:allow-other-keys)
7903 (zero? (system* "python" "setup.py" "build"
7904 (string-append "--hdf5="
7905 (assoc-ref inputs "hdf5"))))))
7906 (replace 'check
7907 (lambda* (#:key inputs #:allow-other-keys)
7908 (zero? (system* "python" "setup.py" "check"
7909 (string-append "--hdf5="
7910 (assoc-ref inputs "hdf5")))))))))
7911 (propagated-inputs
7912 `(("python-numexpr" ,python-numexpr)
7913 ("python-numpy" ,python-numpy)))
7914 (native-inputs
7915 `(("python-cython" ,python-cython)
7916 ("pkg-config" ,pkg-config)))
7917 (inputs
7918 `(("hdf5" ,hdf5)
7919 ("bzip2" ,bzip2)
7920 ("zlib" ,zlib)))
7921 (home-page "http://www.pytables.org/")
7922 (synopsis "Hierarchical datasets for Python")
7923 (description "PyTables is a package for managing hierarchical datasets and
7924 designed to efficiently cope with extremely large amounts of data.")
7925 (license license:bsd-3)))
7926
7927 (define-public python2-tables
7928 (package-with-python2 python-tables))
7929
7930 (define-public python-pyasn1
7931 (package
7932 (name "python-pyasn1")
7933 (version "0.2.3")
7934 (source
7935 (origin
7936 (method url-fetch)
7937 (uri (pypi-uri "pyasn1" version))
7938 (sha256
7939 (base32
7940 "1b86yx23c1x74clai05a5ma8c8nfmhlx3j1mxq0ff657i2ylx33k"))))
7941 (build-system python-build-system)
7942 (home-page "http://pyasn1.sourceforge.net/")
7943 (synopsis "ASN.1 types and codecs")
7944 (description
7945 "This is an implementation of ASN.1 types and codecs in Python. It is
7946 suitable for a wide range of protocols based on the ASN.1 specification.")
7947 (license license:bsd-2)))
7948
7949 (define-public python2-pyasn1
7950 (package-with-python2 python-pyasn1))
7951
7952 (define-public python-pyasn1-modules
7953 (package
7954 (name "python-pyasn1-modules")
7955 (version "0.0.8")
7956 (source
7957 (origin
7958 (method url-fetch)
7959 (uri (pypi-uri "pyasn1-modules" version))
7960 (sha256
7961 (base32
7962 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
7963 (build-system python-build-system)
7964 (propagated-inputs
7965 `(("python-pyasn1" ,python-pyasn1)))
7966 (home-page "https://sourceforge.net/projects/pyasn1/")
7967 (synopsis "ASN.1 codec implementations")
7968 (description
7969 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7970 implementations of ASN.1-based codecs and protocols.")
7971 (license license:bsd-3)))
7972
7973 (define-public python2-pyasn1-modules
7974 (package-with-python2 python-pyasn1-modules))
7975
7976 (define-public python-ipaddress
7977 (package
7978 (name "python-ipaddress")
7979 (version "1.0.18")
7980 (source (origin
7981 (method url-fetch)
7982 (uri (pypi-uri "ipaddress" version))
7983 (sha256
7984 (base32
7985 "1q8klj9d84cmxgz66073x1j35cplr3r77vx1znhxiwl5w74391ax"))))
7986 (build-system python-build-system)
7987 (home-page "https://github.com/phihag/ipaddress")
7988 (synopsis "IP address manipulation library")
7989 (description
7990 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7991 in Python. This library is used to create, poke at, and manipulate IPv4 and
7992 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7993 module to older versions of Python.")
7994 (license license:psfl)))
7995
7996 (define-public python2-ipaddress
7997 (package-with-python2 python-ipaddress))
7998
7999 (define-public python2-ipaddr
8000 (package
8001 (name "python2-ipaddr")
8002 (version "2.1.11")
8003 (source
8004 (origin
8005 (method url-fetch)
8006 (uri (pypi-uri "ipaddr" version))
8007 (sha256
8008 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
8009 (build-system python-build-system)
8010 (arguments
8011 `(#:python ,python-2 ;version 2 only
8012 #:phases
8013 (modify-phases %standard-phases
8014 (replace 'check
8015 (lambda* _
8016 (zero? (system* "python" "ipaddr_test.py")))))))
8017 (home-page "https://github.com/google/ipaddr-py")
8018 (synopsis "IP address manipulation library")
8019 (description
8020 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
8021 IPv6 addresses and networks.
8022
8023 For new implementations you may prefer to use the standard module
8024 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
8025 versions of Python.")
8026 (license license:asl2.0)))
8027
8028 (define-public python-idna
8029 (package
8030 (name "python-idna")
8031 (version "2.5")
8032 (source
8033 (origin
8034 (method url-fetch)
8035 (uri (pypi-uri "idna" version))
8036 (sha256
8037 (base32
8038 "1ara12a7k2zc69msa0arrvw00gn61a6i6by01xb3lkkc0h4cxd9w"))))
8039 (build-system python-build-system)
8040 (home-page "https://github.com/kjd/idna")
8041 (synopsis "Internationalized domain names in applications")
8042 (description
8043 "This is a library to support the Internationalised Domain Names in
8044 Applications (IDNA) protocol as specified in RFC 5891. This version of the
8045 protocol is often referred to as “IDNA2008” and can produce different results
8046 from the earlier standard from 2003. The library is also intended to act as a
8047 suitable drop-in replacement for the “encodings.idna” module that comes with
8048 the Python standard library but currently only supports the older 2003
8049 specification.")
8050 (license license:bsd-4)))
8051
8052 (define-public python2-idna
8053 (package-with-python2 python-idna))
8054
8055 (define-public python-pretend
8056 (package
8057 (name "python-pretend")
8058 (version "1.0.8")
8059 (source
8060 (origin
8061 (method url-fetch)
8062 (uri (string-append "https://pypi.python.org/packages/source/p/"
8063 "pretend/pretend-" version ".tar.gz"))
8064 (sha256
8065 (base32
8066 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
8067 (build-system python-build-system)
8068 (home-page "https://github.com/alex/pretend")
8069 (synopsis "Library for stubbing in Python")
8070 (description
8071 "Pretend is a library to make stubbing with Python easier. Stubbing is a
8072 technique for writing tests. You may hear the term mixed up with mocks,
8073 fakes, or doubles. Basically, a stub is an object that returns pre-canned
8074 responses, rather than doing any computation.")
8075 (license license:bsd-3)))
8076
8077 (define-public python2-pretend
8078 (package-with-python2 python-pretend))
8079
8080 (define-public python-cryptography-vectors
8081 (package
8082 (name "python-cryptography-vectors")
8083 (version "2.0.3")
8084 (source
8085 (origin
8086 (method url-fetch)
8087 (uri (pypi-uri "cryptography_vectors" version))
8088 (sha256
8089 (base32
8090 "1qa117fs1yd50zn2cfxh7d9l999ds0z4h83m9m7j4fk6ffm33f5y"))))
8091 (build-system python-build-system)
8092 (home-page "https://github.com/pyca/cryptography")
8093 (synopsis "Test vectors for the cryptography package")
8094 (description
8095 "This package contains test vectors for the cryptography package.")
8096 ;; Distributed under either BSD-3 or ASL2.0
8097 (license (list license:bsd-3 license:asl2.0))))
8098
8099 (define-public python2-cryptography-vectors
8100 (package-with-python2 python-cryptography-vectors))
8101
8102 (define-public python-cryptography
8103 (package
8104 (name "python-cryptography")
8105 (version "2.0.3")
8106 (source
8107 (origin
8108 (method url-fetch)
8109 (uri (pypi-uri "cryptography" version))
8110 (sha256
8111 (base32
8112 "0fnck37zyvbzmccbp7w3jy27jgmij1992j5wyy3gxhw6a11b4jyh"))))
8113 (build-system python-build-system)
8114 (inputs
8115 `(("openssl" ,openssl)))
8116 (propagated-inputs
8117 `(("python-asn1crypto" ,python-asn1crypto)
8118 ("python-cffi" ,python-cffi)
8119 ("python-six" ,python-six)
8120 ("python-idna" ,python-idna)
8121 ("python-iso8601" ,python-iso8601)))
8122 (native-inputs
8123 `(("python-cryptography-vectors" ,python-cryptography-vectors)
8124 ("python-hypothesis" ,python-hypothesis)
8125 ("python-pretend" ,python-pretend)
8126 ("python-pytz" ,python-pytz)
8127 ("python-pytest" ,python-pytest-3.0)))
8128 (home-page "https://github.com/pyca/cryptography")
8129 (synopsis "Cryptographic recipes and primitives for Python")
8130 (description
8131 "cryptography is a package which provides cryptographic recipes and
8132 primitives to Python developers. It aims to be the “cryptographic standard
8133 library” for Python. The package includes both high level recipes, and low
8134 level interfaces to common cryptographic algorithms such as symmetric ciphers,
8135 message digests and key derivation functions.")
8136 ;; Distributed under either BSD-3 or ASL2.0
8137 (license (list license:bsd-3 license:asl2.0))
8138 (properties `((python2-variant . ,(delay python2-cryptography))))))
8139
8140 (define-public python2-cryptography
8141 (let ((crypto (package-with-python2
8142 (strip-python2-variant python-cryptography))))
8143 (package (inherit crypto)
8144 (propagated-inputs
8145 `(("python2-ipaddress" ,python2-ipaddress)
8146 ("python2-backport-ssl-match-hostname"
8147 ,python2-backport-ssl-match-hostname)
8148 ("python2-enum34" ,python2-enum34)
8149 ,@(package-propagated-inputs crypto))))))
8150
8151 (define-public python-pyopenssl
8152 (package
8153 (name "python-pyopenssl")
8154 (version "17.3.0")
8155 (source
8156 (origin
8157 (method url-fetch)
8158 (uri (pypi-uri "pyOpenSSL" version))
8159 (sha256
8160 (base32
8161 "0xkc1wfnpg6abzllivg3ylhc63npjdy1v81f4kc08bm8cj80nqr9"))))
8162 (build-system python-build-system)
8163 (arguments
8164 '(#:phases
8165 (modify-phases %standard-phases
8166 (delete 'check)
8167 (add-after 'install 'check
8168 (lambda* (#:key inputs outputs #:allow-other-keys)
8169 (add-installed-pythonpath inputs outputs)
8170 (zero? (system* "py.test" "-v" "-k"
8171 (string-append
8172 ;; This test tries to look up certificates from
8173 ;; the compiled-in default path in OpenSSL, which
8174 ;; does not exist in the build environment.
8175 "not test_fallback_default_verify_paths "
8176 ;; This test attempts to make a connection to
8177 ;; an external web service.
8178 "and not test_set_default_verify_paths"))))))))
8179 (propagated-inputs
8180 `(("python-cryptography" ,python-cryptography)
8181 ("python-six" ,python-six)))
8182 (inputs
8183 `(("openssl" ,openssl)))
8184 (native-inputs
8185 `(("python-flaky" ,python-flaky)
8186 ("python-pretend" ,python-pretend)
8187 ("python-pytest" ,python-pytest-3.0)))
8188 (home-page "https://github.com/pyca/pyopenssl")
8189 (synopsis "Python wrapper module around the OpenSSL library")
8190 (description
8191 "PyOpenSSL is a high-level wrapper around a subset of the OpenSSL
8192 library.")
8193 (license license:asl2.0)))
8194
8195 (define-public python2-pyopenssl
8196 (package-with-python2 python-pyopenssl))
8197
8198 (define-public python-pip
8199 (package
8200 (name "python-pip")
8201 (version "9.0.1")
8202 (source
8203 (origin
8204 (method url-fetch)
8205 (uri (pypi-uri "pip" version))
8206 (sha256
8207 (base32
8208 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
8209 (build-system python-build-system)
8210 (arguments
8211 '(#:tests? #f)) ; there are no tests in the pypi archive.
8212 (home-page "https://pip.pypa.io/")
8213 (synopsis "Package manager for Python software")
8214 (description
8215 "Pip is a package manager for Python software, that finds packages on the
8216 Python Package Index (PyPI).")
8217 (license license:expat)))
8218
8219 (define-public python2-pip
8220 (package-with-python2 python-pip))
8221
8222 (define-public python-tlsh
8223 (package
8224 (name "python-tlsh")
8225 (version "3.4.4")
8226 (home-page "https://github.com/trendmicro/tlsh")
8227 (source (origin
8228 (method url-fetch)
8229 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
8230 version ".tar.gz"))
8231 (sha256
8232 (base32
8233 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
8234 (file-name (string-append name "-" version ".tar.gz"))))
8235 (build-system cmake-build-system)
8236 (arguments
8237 '(#:out-of-source? #f
8238 #:phases (modify-phases %standard-phases
8239 (replace
8240 'install
8241 (lambda* (#:key outputs #:allow-other-keys)
8242 ;; Build and install the Python bindings. The underlying
8243 ;; C++ library is apparently not meant to be installed.
8244 (let ((out (assoc-ref outputs "out")))
8245 (with-directory-excursion "py_ext"
8246 (and (system* "python" "setup.py" "build")
8247 (system* "python" "setup.py" "install"
8248 (string-append "--prefix=" out))))))))))
8249 (inputs `(("python" ,python-wrapper))) ;for the bindings
8250 (synopsis "Fuzzy matching library for Python")
8251 (description
8252 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
8253 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
8254 value which can be used for similarity comparisons. Similar objects have
8255 similar hash values, which allows for the detection of similar objects by
8256 comparing their hash values. The byte stream should have a sufficient amount
8257 of complexity; for example, a byte stream of identical bytes will not generate
8258 a hash value.")
8259 (license license:asl2.0)))
8260
8261 (define-public python2-tlsh
8262 (package
8263 (inherit python-tlsh)
8264 (name "python2-tlsh")
8265 (inputs `(("python" ,python-2)))))
8266
8267 (define-public python-termcolor
8268 (package
8269 (name "python-termcolor")
8270 (version "1.1.0")
8271 (source
8272 (origin
8273 (method url-fetch)
8274 (uri (pypi-uri "termcolor" version))
8275 (sha256
8276 (base32
8277 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
8278 (build-system python-build-system)
8279 (arguments
8280 ;; There are no tests.
8281 `(#:tests? #f))
8282 (home-page "http://pypi.python.org/pypi/termcolor")
8283 (synopsis "ANSII Color formatting for terminal output")
8284 (description
8285 "This package provides ANSII Color formatting for output in terminals.")
8286 (license license:expat)))
8287
8288 (define-public python2-termcolor
8289 (package-with-python2 python-termcolor))
8290
8291 (define-public python-libarchive-c
8292 (package
8293 (name "python-libarchive-c")
8294 (version "2.2")
8295 (source (origin
8296 (method url-fetch)
8297 (uri (pypi-uri "libarchive-c" version))
8298 (sha256
8299 (base32
8300 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
8301 (build-system python-build-system)
8302 (arguments
8303 '(#:phases (modify-phases %standard-phases
8304 (add-before
8305 'build 'reference-libarchive
8306 (lambda* (#:key inputs #:allow-other-keys)
8307 ;; Retain the absolute file name of libarchive.so.
8308 (let ((libarchive (assoc-ref inputs "libarchive")))
8309 (substitute* "libarchive/ffi.py"
8310 (("find_library\\('archive'\\)")
8311 (string-append "'" libarchive
8312 "/lib/libarchive.so'")))))))))
8313 (inputs
8314 `(("libarchive" ,libarchive)))
8315 (home-page "https://github.com/Changaco/python-libarchive-c")
8316 (synopsis "Python interface to libarchive")
8317 (description
8318 "This package provides Python bindings to libarchive, a C library to
8319 access possibly compressed archives in many different formats. It uses
8320 Python's @code{ctypes} foreign function interface (FFI).")
8321 (license license:lgpl2.0+)))
8322
8323 (define-public python2-libarchive-c
8324 (package-with-python2 python-libarchive-c))
8325
8326 (define-public python-file
8327 (package
8328 (inherit file)
8329 (name "python-file")
8330 (build-system python-build-system)
8331 (arguments
8332 '(#:tests? #f ;no tests
8333 #:configure-flags '("--single-version-externally-managed" "--root=/")
8334 #:phases (modify-phases %standard-phases
8335 (add-before 'build 'change-directory
8336 (lambda _
8337 (chdir "python")
8338 #t))
8339 (add-before 'build 'set-library-file-name
8340 (lambda* (#:key inputs #:allow-other-keys)
8341 (let ((file (assoc-ref inputs "file")))
8342 (substitute* "magic.py"
8343 (("find_library\\('magic'\\)")
8344 (string-append "'" file "/lib/libmagic.so'")))
8345 #t))))))
8346 (inputs `(("file" ,file)))
8347 (self-native-input? #f)
8348 (synopsis "Python bindings to the libmagic file type guesser. Note that
8349 this module and the python-magic module both provide a \"magic.py\" file;
8350 these two modules, which are different and were developed separately, both
8351 serve the same purpose: provide Python bindings for libmagic.")))
8352
8353 (define-public python2-file
8354 (package-with-python2 python-file))
8355
8356 (define-public python-debian
8357 (package
8358 (name "python-debian")
8359 (version "0.1.28")
8360 (source
8361 (origin
8362 (method url-fetch)
8363 (uri (pypi-uri name version))
8364 (sha256
8365 (base32
8366 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
8367 (build-system python-build-system)
8368 (propagated-inputs
8369 `(("python-six" ,python-six)))
8370 (home-page "http://packages.debian.org/sid/python-debian")
8371 (synopsis "Debian package related modules")
8372 (description
8373 ;; XXX: Use @enumerate instead of @itemize to work around
8374 ;; <http://bugs.gnu.org/21772>.
8375 "This package provides Python modules that abstract many formats of
8376 Debian-related files, such as:
8377
8378 @enumerate
8379 @item Debtags information;
8380 @item @file{debian/changelog} files;
8381 @item packages files, pdiffs;
8382 @item control files of single or multiple RFC822-style paragraphs---e.g.
8383 @file{debian/control}, @file{.changes}, @file{.dsc};
8384 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
8385 contained files and meta-information.
8386 @end enumerate\n")
8387
8388 ;; Modules are either GPLv2+ or GPLv3+.
8389 (license license:gpl3+)))
8390
8391 (define-public python2-debian
8392 (package-with-python2 python-debian))
8393
8394 (define-public python-nbformat
8395 (package
8396 (name "python-nbformat")
8397 (version "4.3.0")
8398 (source
8399 (origin
8400 (method url-fetch)
8401 (uri (pypi-uri "nbformat" version))
8402 (sha256
8403 (base32
8404 "12s7j4qja8b5bs1kyw5dzmrqbjxxj8wk52cyasbiqbv7fblcrssz"))))
8405 (build-system python-build-system)
8406 (arguments `(#:tests? #f)) ; no test target
8407 (propagated-inputs
8408 `(("python-ipython-genutils" ,python-ipython-genutils)
8409 ("python-jsonschema" ,python-jsonschema)
8410 ("python-jupyter-core" ,python-jupyter-core)
8411 ("python-traitlets" ,python-traitlets)))
8412 (home-page "http://jupyter.org")
8413 (synopsis "Jupyter Notebook format")
8414 (description "This package provides the reference implementation of the
8415 Jupyter Notebook format and Python APIs for working with notebooks.")
8416 (license license:bsd-3)))
8417
8418 (define-public python2-nbformat
8419 (package-with-python2 python-nbformat))
8420
8421 (define-public python-bleach
8422 (package
8423 (name "python-bleach")
8424 (version "1.4.3")
8425 (source
8426 (origin
8427 (method url-fetch)
8428 (uri (pypi-uri "bleach" version))
8429 (sha256
8430 (base32
8431 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
8432 (build-system python-build-system)
8433 (propagated-inputs
8434 `(("python-html5lib" ,python-html5lib-0.9)
8435 ("python-six" ,python-six)))
8436 (native-inputs
8437 `(("python-nose" ,python-nose)))
8438 (home-page "https://github.com/jsocol/bleach")
8439 (synopsis "Whitelist-based HTML-sanitizing tool")
8440 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
8441 (license license:asl2.0)))
8442
8443 (define-public python2-bleach
8444 (package-with-python2 python-bleach))
8445
8446 (define-public python-entrypoints
8447 (package
8448 (name "python-entrypoints")
8449 (version "0.2.2")
8450 (source
8451 (origin
8452 (method url-fetch)
8453 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
8454 version ".tar.gz"))
8455 (file-name (string-append name "-" version ".tar.gz"))
8456 (sha256
8457 (base32
8458 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
8459 (build-system python-build-system)
8460 ;; The package does not come with a setup.py file, so we have to generate
8461 ;; one ourselves.
8462 (arguments
8463 `(#:tests? #f
8464 #:phases
8465 (modify-phases %standard-phases
8466 (add-after 'unpack 'create-setup.py
8467 (lambda _
8468 (call-with-output-file "setup.py"
8469 (lambda (port)
8470 (format port "\
8471 from setuptools import setup
8472 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
8473 " ,version))))))))
8474 (home-page "https://github.com/takluyver/entrypoints")
8475 (synopsis "Discover and load entry points from installed Python packages")
8476 (description "Entry points are a way for Python packages to advertise
8477 objects with some common interface. The most common examples are
8478 @code{console_scripts} entry points, which define shell commands by
8479 identifying a Python function to run. The @code{entrypoints} module contains
8480 functions to find and load entry points.")
8481 (license license:expat)))
8482
8483 (define-public python2-entrypoints
8484 (package-with-python2 python-entrypoints))
8485
8486 (define-public python-nbconvert
8487 (package
8488 (name "python-nbconvert")
8489 (version "5.0.0b1")
8490 (source
8491 (origin
8492 (method url-fetch)
8493 (uri (pypi-uri "nbconvert" version))
8494 (sha256
8495 (base32
8496 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
8497 (build-system python-build-system)
8498 (arguments
8499 `(;; The "bdist_egg" target is disabled by default, causing the installation
8500 ;; to fail.
8501 #:configure-flags (list "bdist_egg")
8502 ;; FIXME: 5 failures, 40 errors.
8503 #:tests? #f))
8504 ;; #:phases
8505 ;; (modify-phases %standard-phases
8506 ;; (replace 'check
8507 ;; (lambda _
8508 ;; (zero? (system* "py.test" "-v")))))
8509 (native-inputs
8510 `(("python-pytest" ,python-pytest)))
8511 (propagated-inputs
8512 `(("python-bleach" ,python-bleach)
8513 ("python-entrypoints" ,python-entrypoints)
8514 ("python-jinja2" ,python-jinja2)
8515 ("python-jupyter-core" ,python-jupyter-core)
8516 ("python-mistune" ,python-mistune)
8517 ("python-nbformat" ,python-nbformat)
8518 ("python-pygments" ,python-pygments)
8519 ("python-traitlets" ,python-traitlets)))
8520 (home-page "http://jupyter.org")
8521 (synopsis "Converting Jupyter Notebooks")
8522 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
8523 notebooks to various other formats via Jinja templates. It allows you to
8524 convert an @code{.ipynb} notebook file into various static formats including:
8525
8526 @enumerate
8527 @item HTML
8528 @item LaTeX
8529 @item PDF
8530 @item Reveal JS
8531 @item Markdown (md)
8532 @item ReStructured Text (rst)
8533 @item executable script
8534 @end enumerate\n")
8535 (license license:bsd-3)))
8536
8537 (define-public python2-nbconvert
8538 (package-with-python2 python-nbconvert))
8539
8540 (define-public python-notebook
8541 (package
8542 (name "python-notebook")
8543 (version "4.2.3")
8544 (source (origin
8545 (method url-fetch)
8546 (uri (pypi-uri "notebook" version))
8547 (sha256
8548 (base32
8549 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
8550 (build-system python-build-system)
8551 (arguments
8552 `(#:phases
8553 (modify-phases %standard-phases
8554 (replace 'check
8555 (lambda _
8556 ;; HOME must be set for tests
8557 (setenv "HOME" "/tmp")
8558 (zero? (system* "nosetests")))))))
8559 (propagated-inputs
8560 `(("python-jupyter-core" ,python-jupyter-core)
8561 ("python-nbformat" ,python-nbformat)
8562 ("python-nbconvert" ,python-nbconvert)
8563 ("python-ipython" ,python-ipython)))
8564 (native-inputs
8565 `(("python-nose" ,python-nose)
8566 ("python-sphinx" ,python-sphinx)
8567 ("python-requests" ,python-requests)))
8568 (home-page "http://jupyter.org/")
8569 (synopsis "Web-based notebook environment for interactive computing")
8570 (description
8571 "The Jupyter HTML notebook is a web-based notebook environment for
8572 interactive computing.")
8573 (properties `((python2-variant . ,(delay python2-notebook))))
8574 (license license:bsd-3)))
8575
8576 (define-public python2-notebook
8577 (let ((base (package-with-python2
8578 (strip-python2-variant python-notebook))))
8579 (package (inherit base)
8580 (native-inputs
8581 `(("python2-mock" ,python2-mock)
8582 ,@(package-native-inputs base)))
8583 (arguments
8584 (substitute-keyword-arguments (package-arguments base)
8585 ((#:phases phases)
8586 `(modify-phases ,phases
8587 (add-before 'check 'disable-test-case
8588 ;; The test requires network access to localhost. Curiously it
8589 ;; fails with Python 2 only. Simply make the test-case return
8590 ;; immediately.
8591 (lambda _
8592 (substitute*
8593 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
8594 (("formats = self.nbconvert_api") "return #")))))))))))
8595
8596 (define-public python-widgetsnbextension
8597 (package
8598 (name "python-widgetsnbextension")
8599 (version "1.2.6")
8600 (source
8601 (origin
8602 (method url-fetch)
8603 (uri (pypi-uri "widgetsnbextension" version))
8604 (sha256
8605 (base32
8606 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
8607 (build-system python-build-system)
8608 (propagated-inputs
8609 `(("python-notebook" ,python-notebook)))
8610 (native-inputs
8611 `(("python-certifi" ,python-certifi)
8612 ("python-nose" ,python-nose)))
8613 (home-page "http://ipython.org")
8614 (synopsis "IPython HTML widgets for Jupyter")
8615 (description "This package provides interactive HTML widgets for Jupyter
8616 notebooks.")
8617 (license license:bsd-3)))
8618
8619 (define-public python2-widgetsnbextension
8620 (package-with-python2 python-widgetsnbextension))
8621
8622 (define-public python-ipywidgets
8623 (package
8624 (name "python-ipywidgets")
8625 (version "5.2.2")
8626 (source
8627 (origin
8628 (method url-fetch)
8629 (uri (pypi-uri "ipywidgets" version))
8630 (sha256
8631 (base32
8632 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
8633 (build-system python-build-system)
8634 ;; FIXME: it's not clear how to run the tests.
8635 (arguments `(#:tests? #f))
8636 (propagated-inputs
8637 `(("python-ipykernel" ,python-ipykernel)
8638 ("python-ipython" ,python-ipython)
8639 ("python-traitlets" ,python-traitlets)
8640 ("python-widgetsnbextension" ,python-widgetsnbextension)))
8641 (home-page "http://ipython.org")
8642 (synopsis "IPython HTML widgets for Jupyter")
8643 (description "Ipywidgets are interactive HTML widgets for Jupyter
8644 notebooks and the IPython kernel. Notebooks come alive when interactive
8645 widgets are used. Users gain control of their data and can visualize changes
8646 in the data.")
8647 (license license:bsd-3)))
8648
8649 (define-public python2-ipywidgets
8650 (package-with-python2 python-ipywidgets))
8651
8652 (define-public python-jupyter-console
8653 (package
8654 (name "python-jupyter-console")
8655 (version "5.0.0")
8656 (source
8657 (origin
8658 (method url-fetch)
8659 (uri (pypi-uri "jupyter_console" version))
8660 (sha256
8661 (base32
8662 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
8663 (build-system python-build-system)
8664 ;; FIXME: it's not clear how to run the tests.
8665 (arguments `(#:tests? #f))
8666 (propagated-inputs
8667 `(("python-ipykernel" ,python-ipykernel)
8668 ("python-ipython" ,python-ipython)
8669 ("python-jupyter-client" ,python-jupyter-client)
8670 ("python-prompt-toolkit" ,python-prompt-toolkit)
8671 ("python-pygments" ,python-pygments)))
8672 (home-page "https://jupyter.org")
8673 (synopsis "Jupyter terminal console")
8674 (description "This package provides a terminal-based console frontend for
8675 Jupyter kernels. It also allows for console-based interaction with non-Python
8676 Jupyter kernels such as IJulia and IRKernel.")
8677 (license license:bsd-3)))
8678
8679 (define-public python2-jupyter-console
8680 (package-with-python2 python-jupyter-console))
8681
8682 ;; The python-ipython and python-jupyter-console require each other. To get
8683 ;; the functionality in both packages working, strip down the
8684 ;; python-jupyter-console package when using it as an input to python-ipython.
8685 (define python-jupyter-console-minimal
8686 (package
8687 (inherit python-jupyter-console)
8688 (arguments
8689 (substitute-keyword-arguments
8690 (package-arguments python-jupyter-console)
8691 ((#:phases phases)
8692 `(modify-phases ,phases
8693 (add-after 'install 'delete-bin
8694 (lambda* (#:key outputs #:allow-other-keys)
8695 ;; Delete the bin files, to avoid conflicts in profiles
8696 ;; where python-ipython and python-jupyter-console are
8697 ;; both present.
8698 (delete-file-recursively
8699 (string-append
8700 (assoc-ref outputs "out") "/bin"))))))))
8701 ;; Remove the python-ipython propagated input, to avoid the cycle
8702 (propagated-inputs
8703 (alist-delete
8704 "python-ipython"
8705 (package-propagated-inputs python-jupyter-console)))))
8706
8707 (define-public jupyter
8708 (package
8709 (name "jupyter")
8710 (version "1.0.0")
8711 (source
8712 (origin
8713 (method url-fetch)
8714 (uri (pypi-uri "jupyter" version))
8715 (sha256
8716 (base32
8717 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8718 (build-system python-build-system)
8719 ;; FIXME: it's not clear how to run the tests.
8720 (arguments `(#:tests? #f))
8721 (propagated-inputs
8722 `(("python-ipykernel" ,python-ipykernel)
8723 ("python-ipywidgets" ,python-ipywidgets)
8724 ("python-jupyter-console" ,python-jupyter-console)
8725 ("python-nbconvert" ,python-nbconvert)
8726 ("python-notebook" ,python-notebook)))
8727 (home-page "http://jupyter.org")
8728 (synopsis "Web application for interactive documents")
8729 (description
8730 "The Jupyter Notebook is a web application that allows you to create and
8731 share documents that contain live code, equations, visualizations and
8732 explanatory text. Uses include: data cleaning and transformation, numerical
8733 simulation, statistical modeling, machine learning and much more.")
8734 (license license:bsd-3)))
8735
8736 (define-public python-chardet
8737 (package
8738 (name "python-chardet")
8739 (version "3.0.4")
8740 (source
8741 (origin
8742 (method url-fetch)
8743 (uri (pypi-uri "chardet" version))
8744 (sha256
8745 (base32
8746 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8747 (native-inputs
8748 `(("python-hypothesis" ,python-hypothesis)
8749 ("python-pytest" ,python-pytest)
8750 ("python-pytest-runner" ,python-pytest-runner)))
8751 (build-system python-build-system)
8752 (home-page "https://github.com/chardet/chardet")
8753 (synopsis "Universal encoding detector for Python 2 and 3")
8754 (description
8755 "This package provides @code{chardet}, a Python module that can
8756 automatically detect a wide range of file encodings.")
8757 (license license:lgpl2.1+)))
8758
8759 (define-public python2-chardet
8760 (package-with-python2 python-chardet))
8761
8762 (define-public python-docopt
8763 (package
8764 (name "python-docopt")
8765 (version "0.6.2")
8766 (source
8767 (origin
8768 (method url-fetch)
8769 ;; The release on PyPI does not include tests.
8770 (uri (string-append
8771 "https://github.com/docopt/docopt/archive/"
8772 version ".tar.gz"))
8773 (file-name (string-append name "-" version ".tar.gz"))
8774 (sha256
8775 (base32
8776 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8777 (build-system python-build-system)
8778 (native-inputs
8779 `(("python-pytest" ,python-pytest)))
8780 (arguments
8781 `(#:phases
8782 (modify-phases %standard-phases
8783 (replace 'check
8784 (lambda _ (zero? (system* "py.test")))))))
8785 (home-page "http://docopt.org")
8786 (synopsis "Command-line interface description language for Python")
8787 (description "This library allows the user to define a command-line
8788 interface from a program's help message rather than specifying it
8789 programatically with command-line parsers like @code{getopt} and
8790 @code{argparse}.")
8791 (license license:expat)))
8792
8793 (define-public python2-docopt
8794 (package-with-python2 python-docopt))
8795
8796 (define-public python-zope-event
8797 (package
8798 (name "python-zope-event")
8799 (version "4.1.0")
8800 (source
8801 (origin
8802 (method url-fetch)
8803 (uri (string-append "https://pypi.python.org/packages/source/z"
8804 "/zope.event/zope.event-" version ".tar.gz"))
8805 (sha256
8806 (base32
8807 "11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
8808 (build-system python-build-system)
8809 (home-page "http://pypi.python.org/pypi/zope.event")
8810 (synopsis "Event publishing system for Python")
8811 (description "Zope.event provides an event publishing API, intended for
8812 use by applications which are unaware of any subscribers to their events. It
8813 is a simple event-dispatching system on which more sophisticated event
8814 dispatching systems can be built.")
8815 (license license:zpl2.1)))
8816
8817 (define-public python2-zope-event
8818 (package-with-python2 python-zope-event))
8819
8820 (define-public python-zope-interface
8821 (package
8822 (name "python-zope-interface")
8823 (version "4.1.3")
8824 (source
8825 (origin
8826 (method url-fetch)
8827 (uri (string-append "https://pypi.python.org/packages/source/z"
8828 "/zope.interface/zope.interface-" version ".tar.gz"))
8829 (sha256
8830 (base32
8831 "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
8832 (build-system python-build-system)
8833 (native-inputs
8834 `(("python-zope-event" ,python-zope-event)))
8835 (home-page "https://github.com/zopefoundation/zope.interface")
8836 (synopsis "Python implementation of the \"design by contract\"
8837 methodology")
8838 (description "Zope.interface provides an implementation of \"object
8839 interfaces\" for Python. Interfaces are a mechanism for labeling objects as
8840 conforming to a given API or contract.")
8841 (license license:zpl2.1)))
8842
8843 (define-public python2-zope-interface
8844 (package-with-python2 python-zope-interface))
8845
8846 (define-public python-zope-exceptions
8847 (package
8848 (name "python-zope-exceptions")
8849 (version "4.0.8")
8850 (source
8851 (origin
8852 (method url-fetch)
8853 (uri (string-append "https://pypi.python.org/packages/source/z"
8854 "/zope.exceptions/zope.exceptions-"
8855 version ".tar.gz"))
8856 (sha256
8857 (base32
8858 "0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
8859 (build-system python-build-system)
8860 (arguments
8861 '(#:tests? #f)) ; circular dependency with zope.testrunner
8862 (propagated-inputs
8863 `(("python-zope-interface" ,python-zope-interface)))
8864 (home-page "http://cheeseshop.python.org/pypi/zope.exceptions")
8865 (synopsis "Zope exceptions")
8866 (description "Zope.exceptions provides general-purpose exception types
8867 that have uses outside of the Zope framework.")
8868 (license license:zpl2.1)))
8869
8870 (define-public python2-zope-exceptions
8871 (package-with-python2 python-zope-exceptions))
8872
8873 (define-public python-zope-testing
8874 (package
8875 (name "python-zope-testing")
8876 (version "4.5.0")
8877 (source
8878 (origin
8879 (method url-fetch)
8880 (uri (string-append "https://pypi.python.org/packages/source/z"
8881 "/zope.testing/zope.testing-" version ".tar.gz"))
8882 (sha256
8883 (base32
8884 "1yvglxhzvhl45mndvn9gskx2ph30zz1bz7rrlyfs62fv2pvih90s"))
8885 (modules '((guix build utils)))
8886 (snippet
8887 '(begin
8888 ;; Remove pre-compiled .pyc files backup files from source.
8889 (for-each delete-file (find-files "." "(\\.pyc|~)$"))
8890 #t))))
8891 (build-system python-build-system)
8892 (native-inputs
8893 `(("python-zope-exceptions" ,python-zope-exceptions)))
8894 (propagated-inputs
8895 `(("python-zope-interface" ,python-zope-interface)))
8896 (home-page "http://pypi.python.org/pypi/zope.testing")
8897 (synopsis "Zope testing helpers")
8898 (description "Zope.testing provides a number of testing utilities for HTML
8899 forms, HTTP servers, regular expressions, and more.")
8900 (license license:zpl2.1)))
8901
8902 (define-public python2-zope-testing
8903 (package-with-python2 python-zope-testing))
8904
8905 (define-public python-zope-testrunner
8906 (package
8907 (name "python-zope-testrunner")
8908 (version "4.4.9")
8909 (source
8910 (origin
8911 (method url-fetch)
8912 (uri (string-append "https://pypi.python.org/packages/source/z"
8913 "/zope.testrunner/zope.testrunner-"
8914 version ".zip"))
8915 (sha256
8916 (base32
8917 "1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
8918 (build-system python-build-system)
8919 (arguments
8920 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
8921 (native-inputs
8922 `(("python-six" ,python-six)
8923 ;("python-zope-interface" ,python-zope-interface)
8924 ("python-zope-exceptions" ,python-zope-exceptions)
8925 ("python-zope-testing" ,python-zope-testing)
8926 ("unzip" ,unzip)))
8927 (propagated-inputs
8928 `(("python-zope-interface" ,python-zope-interface)))
8929 (home-page "http://pypi.python.org/pypi/zope.testrunner")
8930 (synopsis "Zope testrunner script")
8931 (description "Zope.testrunner provides a script for running Python
8932 tests.")
8933 (license license:zpl2.1)))
8934
8935 (define-public python2-zope-testrunner
8936 (let ((base (package-with-python2 python-zope-testrunner)))
8937 (package
8938 (inherit base)
8939 (native-inputs
8940 (append (package-native-inputs base)
8941 `(("python2-subunit" ,python2-subunit)
8942 ("python2-mimeparse" ,python2-mimeparse)))))))
8943
8944 (define-public python-zope-i18nmessageid
8945 (package
8946 (name "python-zope-i18nmessageid")
8947 (version "4.0.3")
8948 (source
8949 (origin
8950 (method url-fetch)
8951 (uri (string-append
8952 "https://pypi.python.org/packages/source/z"
8953 "/zope.i18nmessageid/zope.i18nmessageid-"
8954 version ".tar.gz"))
8955 (sha256
8956 (base32
8957 "1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
8958 (build-system python-build-system)
8959 (home-page "http://pypi.python.org/pypi/zope.i18nmessageid")
8960 (synopsis "Message identifiers for internationalization")
8961 (description "Zope.i18nmessageid provides facilities for declaring
8962 internationalized messages within program source text.")
8963 (license license:zpl2.1)))
8964
8965 (define-public python2-zope-i18nmessageid
8966 (package-with-python2 python-zope-i18nmessageid))
8967
8968 (define-public python-zope-schema
8969 (package
8970 (name "python-zope-schema")
8971 (version "4.4.2")
8972 (source
8973 (origin
8974 (method url-fetch)
8975 (uri (string-append "https://pypi.python.org/packages/source/z"
8976 "/zope.schema/zope.schema-" version ".tar.gz"))
8977 (sha256
8978 (base32
8979 "1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
8980 (build-system python-build-system)
8981 (arguments
8982 '(#:tests? #f)) ; FIXME: Tests can't find zope.event.
8983 (propagated-inputs
8984 `(("python-zope-event" ,python-zope-event)
8985 ("python-zope-exceptions", python-zope-exceptions)
8986 ("python-zope-interface" ,python-zope-interface)))
8987 (native-inputs
8988 `(("python-zope-testing" ,python-zope-testing)
8989 ("python-coverage" ,python-coverage)
8990 ("python-nose" ,python-nose)))
8991 (home-page "http://pypi.python.org/pypi/zope.schema")
8992 (synopsis "Zope data schemas")
8993 (description "Zope.scheme provides extensions to zope.interface for
8994 defining data schemas.")
8995 (license license:zpl2.1)))
8996
8997 (define-public python2-zope-schema
8998 (package-with-python2 python-zope-schema))
8999
9000 (define-public python-zope-configuration
9001 (package
9002 (name "python-zope-configuration")
9003 (version "4.0.3")
9004 (source (origin
9005 (method url-fetch)
9006 (uri (string-append "https://pypi.python.org/packages/source/z"
9007 "/zope.configuration/zope.configuration-"
9008 version ".tar.gz"))
9009 (sha256
9010 (base32
9011 "1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
9012 (build-system python-build-system)
9013 (arguments
9014 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
9015 (propagated-inputs
9016 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
9017 ("python-zope-schema" ,python-zope-schema)))
9018 (home-page "http://pypi.python.org/pypi/zope.configuration")
9019 (synopsis "Zope Configuration Markup Language")
9020 (description "Zope.configuration implements ZCML, the Zope Configuration
9021 Markup Language.")
9022 (license license:zpl2.1)))
9023
9024 (define-public python2-zope-configuration
9025 (package-with-python2 python-zope-configuration))
9026
9027 (define-public python-zope-proxy
9028 (package
9029 (name "python-zope-proxy")
9030 (version "4.1.6")
9031 (source
9032 (origin
9033 (method url-fetch)
9034 (uri (string-append "https://pypi.python.org/packages/source/z"
9035 "/zope.proxy/zope.proxy-" version ".tar.gz"))
9036 (sha256
9037 (base32
9038 "0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
9039 (build-system python-build-system)
9040 (arguments
9041 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
9042 (propagated-inputs
9043 `(("python-zope-interface" ,python-zope-interface)))
9044 (home-page "http://pypi.python.org/pypi/zope.proxy")
9045 (synopsis "Generic, transparent proxies")
9046 (description "Zope.proxy provides generic, transparent proxies for Python.
9047 Proxies are special objects which serve as mostly-transparent wrappers around
9048 another object, intervening in the apparent behavior of the wrapped object
9049 only when necessary to apply the policy (e.g., access checking, location
9050 brokering, etc.) for which the proxy is responsible.")
9051 (license license:zpl2.1)))
9052
9053 (define-public python2-zope-proxy
9054 (package-with-python2 python-zope-proxy))
9055
9056 (define-public python-zope-location
9057 (package
9058 (name "python-zope-location")
9059 (version "4.0.3")
9060 (source
9061 (origin
9062 (method url-fetch)
9063 (uri (string-append "https://pypi.python.org/packages/source/z"
9064 "/zope.location/zope.location-" version ".tar.gz"))
9065 (sha256
9066 (base32
9067 "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
9068 (build-system python-build-system)
9069 (arguments
9070 '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
9071 (propagated-inputs
9072 `(("python-zope-proxy" ,python-zope-proxy)
9073 ("python-zope-schema" ,python-zope-schema)))
9074 (home-page "http://pypi.python.org/pypi/zope.location/")
9075 (synopsis "Zope location library")
9076 (description "Zope.location implements the concept of \"locations\" in
9077 Zope3, which are are special objects that have a structural location.")
9078 (license license:zpl2.1)))
9079
9080 (define-public python2-zope-location
9081 (package-with-python2 python-zope-location))
9082
9083 (define-public python-zope-security
9084 (package
9085 (name "python-zope-security")
9086 (version "4.0.3")
9087 (source
9088 (origin
9089 (method url-fetch)
9090 (uri (string-append "https://pypi.python.org/packages/source/z"
9091 "/zope.security/zope.security-" version ".tar.gz"))
9092 (sha256
9093 (base32
9094 "14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
9095 (build-system python-build-system)
9096 (arguments
9097 '(#:tests? #f)) ; FIXME: Tests can't find zope.testrunner.
9098 (propagated-inputs
9099 `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
9100 ("python-zope-proxy" ,python-zope-proxy)
9101 ("python-zope-schema" ,python-zope-schema)))
9102 (native-inputs
9103 `(("python-six" ,python-six)
9104 ("python-zope-component" ,python-zope-component)
9105 ("python-zope-configuration" ,python-zope-configuration)
9106 ("python-zope-location" ,python-zope-location)
9107 ("python-zope-testrunner" ,python-zope-testrunner)
9108 ("python-zope-testing" ,python-zope-testing)))
9109 (home-page "http://pypi.python.org/pypi/zope.security")
9110 (synopsis "Zope security framework")
9111 (description "Zope.security provides a generic mechanism to implement
9112 security policies on Python objects.")
9113 (license license:zpl2.1)))
9114
9115 (define-public python2-zope-security
9116 (let ((zope-security (package-with-python2 python-zope-security)))
9117 (package (inherit zope-security)
9118 (propagated-inputs
9119 `(("python2-zope-testrunner" ,python2-zope-testrunner)
9120 ,@(alist-delete
9121 "python-zope-testrunner"
9122 (package-propagated-inputs zope-security)))))))
9123
9124 (define-public python-zope-component
9125 (package
9126 (name "python-zope-component")
9127 (version "4.3.0")
9128 (source
9129 (origin
9130 (method url-fetch)
9131 (uri (pypi-uri "zope.component" version))
9132 (sha256
9133 (base32
9134 "1hlvzwj1kcfz1qms1dzhwsshpsf38z9clmyksb1gh41n8k3kchdv"))))
9135 (build-system python-build-system)
9136 (arguments
9137 ;; Skip tests due to circular dependency with python-zope-security.
9138 '(#:tests? #f))
9139 (native-inputs
9140 `(("python-zope-testing" ,python-zope-testing)))
9141 (propagated-inputs
9142 `(("python-zope-event" ,python-zope-event)
9143 ("python-zope-interface" ,python-zope-interface)
9144 ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
9145 ("python-zope-configuration" ,python-zope-configuration)))
9146 (home-page "https://github.com/zopefoundation/zope.component")
9147 (synopsis "Zope Component Architecture")
9148 (description "Zope.component represents the core of the Zope Component
9149 Architecture. Together with the zope.interface package, it provides
9150 facilities for defining, registering and looking up components.")
9151 (license license:zpl2.1)))
9152
9153 (define-public python2-zope-component
9154 (package-with-python2 python-zope-component))
9155
9156 (define-public python-pythondialog
9157 (package
9158 (name "python-pythondialog")
9159 (version "3.4.0")
9160 (source
9161 (origin
9162 (method url-fetch)
9163 (uri (pypi-uri "pythondialog" version))
9164 (sha256
9165 (base32
9166 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
9167 (build-system python-build-system)
9168 (arguments
9169 `(#:phases
9170 (modify-phases %standard-phases
9171 (add-after 'unpack 'patch-path
9172 (lambda* (#:key inputs #:allow-other-keys)
9173 (let* ((dialog (assoc-ref inputs "dialog")))
9174 ;; Since this library really wants to grovel the search path, we
9175 ;; must hardcode dialog's store path into it.
9176 (substitute* "dialog.py"
9177 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
9178 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
9179 #t))))
9180 #:tests? #f)) ; no test suite
9181 (propagated-inputs
9182 `(("dialog" ,dialog)))
9183 (home-page "http://pythondialog.sourceforge.net/")
9184 (synopsis "Python interface to the UNIX dialog utility")
9185 (description "A Python wrapper for the dialog utility. Its purpose is to
9186 provide an easy to use, pythonic and comprehensive Python interface to dialog.
9187 This allows one to make simple text-mode user interfaces on Unix-like systems")
9188 (license license:lgpl2.1)
9189 (properties `((python2-variant . ,(delay python2-pythondialog))))))
9190
9191 (define-public python2-pythondialog
9192 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
9193 (package
9194 (inherit base)
9195 (version (package-version python-pythondialog))
9196 (source (origin
9197 (method url-fetch)
9198 (uri (pypi-uri "python2-pythondialog" version))
9199 (sha256
9200 (base32
9201 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
9202
9203 (define-public python-pyrfc3339
9204 (package
9205 (name "python-pyrfc3339")
9206 (version "1.0")
9207 (source
9208 (origin
9209 (method url-fetch)
9210 (uri (pypi-uri "pyRFC3339" version))
9211 (sha256
9212 (base32
9213 "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
9214 (build-system python-build-system)
9215 (propagated-inputs
9216 `(("python-pytz" ,python-pytz)))
9217 (native-inputs
9218 `(("python-nose" ,python-nose)))
9219 (home-page "https://github.com/kurtraschke/pyRFC3339")
9220 (synopsis "Python timestamp library")
9221 (description "Python library for generating and parsing RFC 3339-compliant
9222 timestamps.")
9223 (license license:expat)))
9224
9225 (define-public python2-pyrfc3339
9226 (package-with-python2 python-pyrfc3339))
9227
9228 (define-public python-werkzeug
9229 (package
9230 (name "python-werkzeug")
9231 (version "0.11.15")
9232 (source
9233 (origin
9234 (method url-fetch)
9235 (uri (pypi-uri "Werkzeug" version))
9236 (sha256
9237 (base32
9238 "1h5wycw8yj7q0grqsjnsqflmrlsdagvl2j4dsgdncci6mjc7fpa5"))))
9239 (build-system python-build-system)
9240 (native-inputs
9241 `(("python-pytest" ,python-pytest)))
9242 (home-page "http://werkzeug.pocoo.org/")
9243 (synopsis "Utilities for WSGI applications")
9244 (description "One of the most advanced WSGI utility modules. It includes a
9245 powerful debugger, full-featured request and response objects, HTTP utilities to
9246 handle entity tags, cache control headers, HTTP dates, cookie handling, file
9247 uploads, a powerful URL routing system and a bunch of community-contributed
9248 addon modules.")
9249 (license license:x11)))
9250
9251 (define-public python2-werkzeug
9252 (package-with-python2 python-werkzeug))
9253
9254 (define-public python-configobj
9255 (package
9256 (name "python-configobj")
9257 (version "5.0.6")
9258 (source (origin
9259 (method url-fetch)
9260 (uri (string-append
9261 "https://pypi.python.org/packages/source/c/configobj/"
9262 "configobj-" version ".tar.gz"))
9263 (sha256
9264 (base32
9265 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
9266 ;; Patch setup.py so it looks for python-setuptools, which is
9267 ;; required to parse the keyword 'install_requires' in setup.py.
9268 (patches (search-patches "python-configobj-setuptools.patch"))))
9269 (build-system python-build-system)
9270 (propagated-inputs
9271 `(("python-six" ,python-six)))
9272 (synopsis "Config file reading, writing and validation")
9273 (description "ConfigObj is a simple but powerful config file reader and
9274 writer: an ini file round tripper. Its main feature is that it is very easy to
9275 use, with a straightforward programmer’s interface and a simple syntax for
9276 config files.")
9277 (home-page "https://github.com/DiffSK/configobj")
9278 (license license:bsd-3)))
9279
9280 (define-public python2-configobj
9281 (package-with-python2 python-configobj))
9282
9283 (define-public python-configargparse
9284 (package
9285 (name "python-configargparse")
9286 (version "0.12.0")
9287 (source (origin
9288 (method url-fetch)
9289 (uri (string-append
9290 "https://pypi.io/packages/source/C/ConfigArgParse/"
9291 "ConfigArgParse-" version ".tar.gz"))
9292 (sha256
9293 (base32
9294 "0fgkiqh6r3rbkdq3k8c48m85g52k96686rw3a6jg4lcncrkpvk98"))))
9295 (build-system python-build-system)
9296 (native-inputs
9297 `(("python-pyyaml" ,python-pyyaml)))
9298 (arguments
9299 `(#:phases
9300 (modify-phases %standard-phases
9301 (replace 'check
9302 (lambda _
9303 ;; Bypass setuptools-shim because one test relies on "setup.py"
9304 ;; being the first argument passed to the python call.
9305 ;;
9306 ;; NOTE: Many tests do not run because they rely on Python's
9307 ;; built-in test.test_argparse, but we remove the unit tests from
9308 ;; our Python installation.
9309 (zero? (system* "python" "setup.py" "test")))))))
9310 (synopsis "Replacement for argparse")
9311 (description "A drop-in replacement for argparse that allows options to also
9312 be set via config files and/or environment variables.")
9313 (home-page "https://github.com/bw2/ConfigArgParse")
9314 (license license:expat)))
9315
9316 (define-public python2-configargparse
9317 (package-with-python2 python-configargparse))
9318
9319 (define-public python-ndg-httpsclient
9320 (package
9321 (name "python-ndg-httpsclient")
9322 (version "0.4.2")
9323 (source (origin
9324 (method url-fetch)
9325 (uri (pypi-uri "ndg_httpsclient" version))
9326 (sha256
9327 (base32
9328 "1b5qirv46v4dpnmfqviwq42mdwfcby4dxmz0i41wad2337pqf2aq"))))
9329 (build-system python-build-system)
9330 (arguments
9331 '(;; The tests appear to require networking.
9332 #:tests? #f))
9333 (propagated-inputs
9334 `(("python-pyopenssl" ,python-pyopenssl)))
9335 (synopsis "HTTPS support for Python's httplib and urllib2")
9336 (description "This is a HTTPS client implementation for httplib and urllib2
9337 based on PyOpenSSL. PyOpenSSL provides a more fully featured SSL implementation
9338 over the default provided with Python and importantly enables full verification
9339 of the SSL peer.")
9340 (home-page "https://github.com/cedadev/ndg_httpsclient/")
9341 (license license:bsd-3)))
9342
9343 ;; python2-openssl requires special care, so package-with-python2 is
9344 ;; insufficient.
9345 (define-public python2-ndg-httpsclient
9346 (package (inherit python-ndg-httpsclient)
9347 (name "python2-ndg-httpsclient")
9348 (arguments `(#:python ,python-2))
9349 (propagated-inputs
9350 `(("python2-pyopenssl" ,python2-pyopenssl)))))
9351
9352 (define-public python-contextlib2
9353 (package
9354 (name "python-contextlib2")
9355 (version "0.4.0")
9356 (source
9357 (origin
9358 (method url-fetch)
9359 (uri (pypi-uri "contextlib2" version))
9360 (sha256
9361 (base32
9362 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
9363 (build-system python-build-system)
9364 (arguments
9365 `(#:phases
9366 (modify-phases %standard-phases
9367 (replace 'check
9368 (lambda _ (zero?
9369 (system*
9370 "python" "test_contextlib2.py" "-v")))))))
9371 (home-page "http://contextlib2.readthedocs.org/")
9372 (synopsis "Tools for decorators and context managers")
9373 (description "This module is primarily a backport of the Python
9374 3.2 contextlib to earlier Python versions. Like contextlib, it
9375 provides utilities for common tasks involving decorators and context
9376 managers. It also contains additional features that are not part of
9377 the standard library.")
9378 (license license:psfl)))
9379
9380 (define-public python2-contextlib2
9381 (package-with-python2 python-contextlib2))
9382
9383 (define-public python-texttable
9384 (package
9385 (name "python-texttable")
9386 (version "0.8.7")
9387 (source
9388 (origin
9389 (method url-fetch)
9390 (uri (pypi-uri "texttable" version))
9391 (sha256
9392 (base32
9393 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
9394 (build-system python-build-system)
9395 (arguments '(#:tests? #f)) ; no tests
9396 (home-page "https://github.com/foutaise/texttable/")
9397 (synopsis "Python module for creating simple ASCII tables")
9398 (description "Texttable is a Python module for creating simple ASCII
9399 tables.")
9400 (license license:lgpl2.1+)))
9401
9402 (define-public python2-texttable
9403 (package-with-python2 python-texttable))
9404
9405 (define-public python-websocket-client
9406 (package
9407 (name "python-websocket-client")
9408 (version "0.37.0")
9409 (source
9410 (origin
9411 (method url-fetch)
9412 (uri (pypi-uri "websocket_client" version))
9413 (sha256
9414 (base32
9415 "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
9416 (build-system python-build-system)
9417 (propagated-inputs
9418 `(("python-six" ,python-six)))
9419 (home-page "https://github.com/liris/websocket-client")
9420 (synopsis "WebSocket client for Python")
9421 (description "The Websocket-client module provides the low level APIs for
9422 WebSocket usage in Python programs.")
9423 (license license:lgpl2.1+)))
9424
9425 (define-public python2-websocket-client
9426 (package-with-python2 python-websocket-client))
9427
9428 (define-public python-atomicwrites
9429 (package
9430 (name "python-atomicwrites")
9431 (version "1.1.5")
9432 (source (origin
9433 (method url-fetch)
9434 (uri (pypi-uri "atomicwrites" version))
9435 (sha256
9436 (base32
9437 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
9438 (build-system python-build-system)
9439 (synopsis "Atomic file writes in Python")
9440 (description "Library for atomic file writes using platform dependent tools
9441 for atomic file system operations.")
9442 (home-page "https://github.com/untitaker/python-atomicwrites")
9443 (license license:expat)))
9444
9445 (define-public python2-atomicwrites
9446 (package-with-python2 python-atomicwrites))
9447
9448 (define-public python-requests-toolbelt
9449 (package
9450 (name "python-requests-toolbelt")
9451 (version "0.8.0")
9452 (source (origin
9453 (method url-fetch)
9454 (uri (pypi-uri "requests-toolbelt" version))
9455 (sha256
9456 (base32
9457 "1dc7l42i4080r8i4m9fj51jx367lqkai170vrv7wd93gdj9k39gn"))))
9458 (build-system python-build-system)
9459 (native-inputs
9460 `(("python-betamax" ,python-betamax)
9461 ("python-mock" ,python-mock)
9462 ("python-pytest" ,python-pytest)))
9463 (propagated-inputs
9464 `(("python-requests" ,python-requests)))
9465 (synopsis "Extensions to python-requests")
9466 (description "This is a toolbelt of useful classes and functions to be used
9467 with python-requests.")
9468 (home-page "https://github.com/sigmavirus24/requests-toolbelt")
9469 (license license:asl2.0)))
9470
9471 (define-public python2-requests-toolbelt
9472 (package-with-python2 python-requests-toolbelt))
9473
9474 (define-public python-click-threading
9475 (package
9476 (name "python-click-threading")
9477 (version "0.4.3")
9478 (source (origin
9479 (method url-fetch)
9480 (uri (pypi-uri "click-threading" version))
9481 (sha256
9482 (base32
9483 "0xs4bg2ws0zgyiplk312l049hi23c2zqf1g771rjhh5vr2msk4cg"))))
9484 (build-system python-build-system)
9485 (propagated-inputs
9486 `(("python-click" ,python-click)))
9487 (synopsis "Utilities for multithreading in Click")
9488 (description "This package provides utilities for multithreading in Click
9489 applications.")
9490 (home-page "https://github.com/click-contrib/click-threading")
9491 (license license:expat)))
9492
9493 (define-public python-click-log
9494 (package
9495 (name "python-click-log")
9496 (version "0.2.0")
9497 (source (origin
9498 (method url-fetch)
9499 (uri (pypi-uri "click-log" version))
9500 (sha256
9501 (base32
9502 "1bjrfxji1yv4fj0g78ri2yfgn2wbivn8g69fxfinxvxpmighhshp"))))
9503 (build-system python-build-system)
9504 (propagated-inputs
9505 `(("python-click" ,python-click)))
9506 (synopsis "Logging for click applications")
9507 (description "This package provides a Python library for logging Click
9508 applications.")
9509 (home-page "https://github.com/click-contrib/click-log")
9510 (license license:expat)))
9511
9512 (define-public python-apipkg
9513 (package
9514 (name "python-apipkg")
9515 (version "1.4")
9516 (source (origin
9517 (method url-fetch)
9518 (uri (pypi-uri "apipkg" version))
9519 (sha256
9520 (base32
9521 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
9522 (build-system python-build-system)
9523 (native-inputs
9524 `(("python-pytest" ,python-pytest)))
9525 (synopsis "Namespace control and lazy-import mechanism")
9526 (description "With apipkg you can control the exported namespace of a Python
9527 package and greatly reduce the number of imports for your users. It is a small
9528 pure Python module that works on virtually all Python versions.")
9529 (home-page "https://bitbucket.org/hpk42/apipkg")
9530 (license license:expat)))
9531
9532 (define-public python2-apipkg
9533 (package-with-python2 python-apipkg))
9534
9535 (define-public python-execnet
9536 (package
9537 (name "python-execnet")
9538 (version "1.4.1")
9539 (source (origin
9540 (method url-fetch)
9541 (uri (pypi-uri "execnet" version))
9542 (sha256
9543 (base32
9544 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
9545 (build-system python-build-system)
9546 (arguments
9547 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
9548 ;; The two test failures are caused by the lack of an `ssh` executable.
9549 ;; The test suite can be run with pytest after the 'install' phase.
9550 #:tests? #f))
9551 (native-inputs
9552 `(("python-pytest" ,python-pytest)
9553 ("python-setuptools-scm" ,python-setuptools-scm)))
9554 (propagated-inputs
9555 `(("python-apipkg" ,python-apipkg)))
9556 (synopsis "Rapid multi-Python deployment")
9557 (description "Execnet provides a share-nothing model with
9558 channel-send/receive communication for distributing execution across many
9559 Python interpreters across version, platform and network barriers. It has a
9560 minimal and fast API targeting the following uses:
9561 @enumerate
9562 @item distribute tasks to (many) local or remote CPUs
9563 @item write and deploy hybrid multi-process applications
9564 @item write scripts to administer multiple environments
9565 @end enumerate")
9566 (home-page "http://codespeak.net/execnet/")
9567 (license license:expat)))
9568
9569 (define-public python2-execnet
9570 (package-with-python2 python-execnet))
9571
9572 (define-public python-trollius-redis
9573 (package
9574 (name "python-trollius-redis")
9575 (version "0.1.4")
9576 (source
9577 (origin
9578 (method url-fetch)
9579 (uri (pypi-uri "trollius_redis" version))
9580 (sha256
9581 (base32
9582 "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
9583 (build-system python-build-system)
9584 ;; TODO: Tests require packaging 'hiredis'.
9585 (arguments '(#:tests? #f))
9586 (home-page "https://github.com/benjolitz/trollius-redis")
9587 (synopsis "Port of asyncio-redis to trollius")
9588 (description "@code{trollius-redis} is a Redis client for Python
9589 trollius. It is an asynchronious IO (PEP 3156) implementation of the
9590 Redis protocol.")
9591 (license license:bsd-2)))
9592
9593 (define-public python2-trollius-redis
9594 (package-with-python2 python-trollius-redis))
9595
9596 ;;; The software provided by this package was integrated into pytest 2.8.
9597 (define-public python-pytest-cache
9598 (package
9599 (name "python-pytest-cache")
9600 (version "1.0")
9601 (source (origin
9602 (method url-fetch)
9603 (uri (pypi-uri "pytest-cache" version))
9604 (sha256
9605 (base32
9606 "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
9607 (build-system python-build-system)
9608 (propagated-inputs
9609 `(("python-apipkg" ,python-apipkg)
9610 ("python-execnet" ,python-execnet)
9611 ("python-py" ,python-py)
9612 ("python-pytest" ,python-pytest)))
9613 (synopsis "Py.test plugin with mechanisms for caching across test runs")
9614 (description "The pytest-cache plugin provides tools to rerun failures from
9615 the last py.test invocation.")
9616 (home-page "https://bitbucket.org/hpk42/pytest-cache/")
9617 (license license:expat)))
9618
9619 (define-public python2-pytest-cache
9620 (package-with-python2 python-pytest-cache))
9621
9622 (define-public python-pytest-localserver
9623 (package
9624 (name "python-pytest-localserver")
9625 (version "0.3.5")
9626 (source (origin
9627 (method url-fetch)
9628 (uri (pypi-uri "pytest-localserver" version))
9629 (sha256
9630 (base32
9631 "0dvqspjr6va55zwmnnc2mmpqc7mm65kxig9ya44x1z8aadzxpa4p"))))
9632 (build-system python-build-system)
9633 (arguments
9634 `(#:phases (modify-phases %standard-phases
9635 (replace 'check
9636 (lambda _
9637 (zero? (system* "py.test" "--genscript=runtests.py"))
9638 (zero? (system* "py.test")))))))
9639 (native-inputs
9640 `(("python-pytest" ,python-pytest)
9641 ("python-requests" ,python-requests)
9642 ("python-six" ,python-six)))
9643 (propagated-inputs
9644 `(("python-werkzeug" ,python-werkzeug)))
9645 (synopsis "Py.test plugin to test server connections locally")
9646 (description "Pytest-localserver is a plugin for the pytest testing
9647 framework which enables you to test server connections locally.")
9648 (home-page "https://pypi.python.org/pypi/pytest-localserver")
9649 (license license:expat)))
9650
9651 (define-public python-wsgi-intercept
9652 (package
9653 (name "python-wsgi-intercept")
9654 (version "1.2.2")
9655 (source (origin
9656 (method url-fetch)
9657 (uri (string-append
9658 "https://pypi.python.org/packages/"
9659 "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
9660 "wsgi_intercept-" version ".tar.gz"))
9661 (sha256
9662 (base32
9663 "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
9664 (build-system python-build-system)
9665 (propagated-inputs
9666 `(("python-six" ,python-six)))
9667 (native-inputs
9668 `(("python-pytest" ,python-pytest)
9669 ("python-httplib2" ,python-httplib2)
9670 ("python-requests" ,python-requests)
9671 ("python-urllib3" ,python-urllib3)))
9672 (synopsis "Puts a WSGI application in place of a real URI for testing")
9673 (description "Wsgi_intercept installs a WSGI application in place of a real
9674 URI for testing. Testing a WSGI application normally involves starting a
9675 server at a local host and port, then pointing your test code to that address.
9676 Instead, this library lets you intercept calls to any specific host/port
9677 combination and redirect them into a WSGI application importable by your test
9678 program. Thus, you can avoid spawning multiple processes or threads to test
9679 your Web app.")
9680 (home-page "https://github.com/cdent/wsgi-intercept")
9681 (license license:expat)))
9682
9683 (define-public python-pytest-xprocess
9684 (package
9685 (name "python-pytest-xprocess")
9686 (version "0.9.1")
9687 (source (origin
9688 (method url-fetch)
9689 (uri (pypi-uri "pytest-xprocess" version))
9690 (sha256
9691 (base32
9692 "17zlql1xqw3ywcgwwbqmw633aly99lab12hm02asr8awvg5603pp"))))
9693 (build-system python-build-system)
9694 (propagated-inputs
9695 `(("python-pytest" ,python-pytest)
9696 ("python-pytest-cache" ,python-pytest-cache)
9697 ("python-psutil" ,python-psutil)))
9698 (synopsis "Pytest plugin to manage external processes across test runs")
9699 (description "Pytest-xprocess is an experimental py.test plugin for managing
9700 processes across test runs.")
9701 (home-page "https://bitbucket.org/pytest-dev/pytest-xprocess")
9702 (license license:expat)))
9703
9704 (define-public python-icalendar
9705 (package
9706 (name "python-icalendar")
9707 (version "3.11.7")
9708 (source (origin
9709 (method url-fetch)
9710 (uri (pypi-uri "icalendar" version))
9711 (sha256
9712 (base32
9713 "0ahf1i98wjizhld2qd7v2vmvzsmdw08mmins82bf3fpbnp2sxbgc"))))
9714 (build-system python-build-system)
9715 (propagated-inputs
9716 `(("python-dateutil" ,python-dateutil)
9717 ("python-pytz" ,python-pytz)))
9718 (synopsis "Python library for parsing iCalendar files")
9719 (description "The icalendar package is a parser/generator of iCalendar
9720 files for use with Python.")
9721 (home-page "https://github.com/collective/icalendar")
9722 (license license:bsd-2)))
9723
9724 (define-public python-sphinxcontrib-newsfeed
9725 (package
9726 (name "python-sphinxcontrib-newsfeed")
9727 (version "0.1.4")
9728 (source (origin
9729 (method url-fetch)
9730 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
9731 (sha256
9732 (base32
9733 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
9734 (arguments '(#:tests? #f)) ; No tests.
9735 (build-system python-build-system)
9736 (propagated-inputs
9737 `(("python-sphinx" ,python-sphinx)))
9738 (synopsis "News Feed extension for Sphinx")
9739 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
9740 Blog, News or Announcements section to a Sphinx website.")
9741 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
9742 (license license:bsd-2)))
9743
9744 (define-public python-args
9745 (package
9746 (name "python-args")
9747 (version "0.1.0")
9748 (source (origin
9749 (method url-fetch)
9750 (uri (pypi-uri "args" version))
9751 (sha256
9752 (base32
9753 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
9754 (build-system python-build-system)
9755 (home-page "https://github.com/kennethreitz/args")
9756 (synopsis "Command-line argument parser")
9757 (description
9758 "This library provides a Python module to parse command-line arguments.")
9759 (license license:bsd-3)))
9760
9761 (define-public python2-args
9762 (package-with-python2 python-args))
9763
9764 (define-public python-clint
9765 (package
9766 (name "python-clint")
9767 (version "0.5.1")
9768 (source (origin
9769 (method url-fetch)
9770 (uri (pypi-uri "clint" version))
9771 (sha256
9772 (base32
9773 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
9774 (build-system python-build-system)
9775 (arguments
9776 '(#:phases
9777 (modify-phases %standard-phases
9778 (replace 'check
9779 (lambda _
9780 (zero? (system* "py.test" "-v")))))))
9781 (native-inputs
9782 `(("python-pytest" ,python-pytest)))
9783 (propagated-inputs
9784 `(("python-args" ,python-args)))
9785 (home-page "https://github.com/kennethreitz/clint")
9786 (synopsis "Command-line interface tools")
9787 (description
9788 "Clint is a Python module filled with a set of tools for developing
9789 command-line applications, including tools for colored and indented
9790 output, progress bar display, and pipes.")
9791 (license license:isc)))
9792
9793 (define-public python2-clint
9794 (package-with-python2 python-clint))
9795
9796 (define-public python-astor
9797 (package
9798 (name "python-astor")
9799 (version "0.5")
9800 (source (origin
9801 (method url-fetch)
9802 (uri (pypi-uri "astor" version))
9803 (sha256
9804 (base32
9805 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
9806 (build-system python-build-system)
9807 (home-page "https://github.com/berkerpeksag/astor")
9808 (synopsis "Read and write Python ASTs")
9809 (description
9810 "Astor is designed to allow easy manipulation of Python source via the
9811 Abstract Syntax Tree.")
9812 (license license:bsd-3)))
9813
9814 (define-public python2-astor
9815 (package-with-python2 python-astor))
9816
9817 (define-public python-rply
9818 (package
9819 (name "python-rply")
9820 (version "0.7.4")
9821 (source (origin
9822 (method url-fetch)
9823 (uri (pypi-uri "rply" version))
9824 (sha256
9825 (base32
9826 "12rp1d9ba7nvd5rhaxi6xzx1rm67r1k1ylsrkzhpwnphqpb06cvj"))))
9827 (build-system python-build-system)
9828 (propagated-inputs
9829 `(("python-appdirs" ,python-appdirs)))
9830 (home-page "https://github.com/alex/rply")
9831 (synopsis "Parser generator for Python")
9832 (description
9833 "This package provides a pure Python based parser generator, that also
9834 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
9835 with a new public API, and RPython support.")
9836 (license license:bsd-3)))
9837
9838 (define-public python2-rply
9839 (package-with-python2 python-rply))
9840
9841 (define-public python-hy
9842 (package
9843 (name "python-hy")
9844 (version "0.13.0")
9845 (source (origin
9846 (method url-fetch)
9847 (uri (pypi-uri "hy" version))
9848 (sha256
9849 (base32
9850 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
9851 (build-system python-build-system)
9852 (arguments
9853 '(#:phases
9854 (modify-phases %standard-phases
9855 (replace 'check
9856 (lambda _
9857 ;; Tests require write access to HOME.
9858 (setenv "HOME" "/tmp")
9859 (zero? (system* "nosetests")))))))
9860 (native-inputs
9861 `(("python-coverage" ,python-coverage)
9862 ("python-nose" ,python-nose)))
9863 (propagated-inputs
9864 `(("python-astor" ,python-astor)
9865 ("python-clint" ,python-clint)
9866 ("python-rply" ,python-rply)))
9867 (home-page "http://hylang.org/")
9868 (synopsis "Lisp frontend to Python")
9869 (description
9870 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
9871 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
9872 Python at your fingertips, in Lisp form.")
9873 (license license:expat)))
9874
9875 (define-public python2-hy
9876 (package-with-python2 python-hy))
9877
9878 (define-public python-rauth
9879 (package
9880 (name "python-rauth")
9881 (version "0.7.3")
9882 (source
9883 (origin
9884 (method url-fetch)
9885 (uri (pypi-uri "rauth" version))
9886 (sha256
9887 (base32
9888 "02kv8w8l98ky223avyq7vw7x1f2ya9chrm59r77ylq45qb0xnk2j"))))
9889 (build-system python-build-system)
9890 (arguments
9891 `(#:test-target "check"))
9892 (propagated-inputs
9893 `(("python-requests" ,python-requests)))
9894 (home-page "https://github.com/litl/rauth")
9895 (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
9896 (description
9897 "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
9898 provides service wrappers for convenient connection initialization and
9899 authenticated session objects providing things like keep-alive.")
9900 (license license:expat)
9901 (properties `((python2-variant . ,(delay python2-rauth))))))
9902
9903 (define-public python2-rauth
9904 (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
9905 (package
9906 (inherit base)
9907 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9908 ,@(package-native-inputs base))))))
9909
9910 (define-public python2-functools32
9911 (package
9912 (name "python2-functools32")
9913 (version "3.2.3-2")
9914 (source
9915 (origin
9916 (method url-fetch)
9917 (uri (pypi-uri "functools32" version))
9918 (sha256
9919 (base32
9920 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
9921 (build-system python-build-system)
9922 (arguments
9923 `(#:python ,python-2
9924 #:tests? #f)) ; no test target
9925 (home-page "https://github.com/MiCHiLU/python-functools32")
9926 (synopsis
9927 "Backport of the functools module from Python 3.2.3")
9928 (description
9929 "This package is a backport of the @code{functools} module from Python
9930 3.2.3 for use with older versions of Python and PyPy.")
9931 (license license:expat)))
9932
9933 (define-public python2-subprocess32
9934 (package
9935 (name "python2-subprocess32")
9936 (version "3.2.7")
9937 (source (origin
9938 (method url-fetch)
9939 (uri (pypi-uri "subprocess32" version))
9940 (sha256
9941 (base32
9942 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
9943 (patches
9944 (search-patches "python2-subprocess32-disable-input-test.patch"))))
9945 (build-system python-build-system)
9946 (arguments
9947 `(#:python ,python-2
9948 #:phases
9949 (modify-phases %standard-phases
9950 (add-after 'unpack 'patch-/bin/sh
9951 (lambda _
9952 (substitute* '("subprocess32.py"
9953 "test_subprocess32.py")
9954 (("/bin/sh") (which "sh")))
9955 #t))
9956 (delete 'check)
9957 (add-after 'install 'check
9958 (lambda* (#:key inputs outputs #:allow-other-keys)
9959 ;; For some reason this package fails to import
9960 ;; _posixsubprocess.so when PYTHONPATH is set to the build
9961 ;; directory. Running tests after install is easier.
9962 (add-installed-pythonpath inputs outputs)
9963 (zero? (system* "python" "test_subprocess32.py")))))))
9964 (home-page "https://github.com/google/python-subprocess32")
9965 (synopsis "Backport of the subprocess module from Python 3.2")
9966 (description
9967 "This is a backport of the @code{subprocess} standard library module
9968 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
9969 new features. On POSIX systems it is guaranteed to be reliable when used
9970 in threaded applications. It includes timeout support from Python 3.3 but
9971 otherwise matches 3.2’s API.")
9972 (license license:psfl)))
9973
9974 (define-public python2-futures
9975 (package
9976 (name "python2-futures")
9977 (version "3.0.5")
9978 (source
9979 (origin
9980 (method url-fetch)
9981 (uri (pypi-uri "futures" version))
9982 (sha256
9983 (base32
9984 "1pw1z4329xvlabdpwqa6b7v2fxf7hl64m4cgr22ckbym8m8m4hh5"))))
9985 (build-system python-build-system)
9986 (arguments `(#:python ,python-2))
9987 (home-page "https://github.com/agronholm/pythonfutures")
9988 (synopsis
9989 "Backport of the concurrent.futures package from Python 3.2")
9990 (description
9991 "The concurrent.futures module provides a high-level interface for
9992 asynchronously executing callables. This package backports the
9993 concurrent.futures package from Python 3.2")
9994 (license license:bsd-3)))
9995
9996 (define-public python-promise
9997 (package
9998 (name "python-promise")
9999 (version "0.4.2")
10000 (source
10001 (origin
10002 (method url-fetch)
10003 (uri (pypi-uri "promise" version))
10004 (sha256
10005 (base32
10006 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
10007 (build-system python-build-system)
10008 ;; Tests wants python-futures, which is a python2 only program, and
10009 ;; can't be found by python-promise at test time.
10010 (arguments `(#:tests? #f))
10011 (home-page "https://github.com/syrusakbary/promise")
10012 (synopsis "Promises/A+ implementation for Python")
10013 (description
10014 "Promises/A+ implementation for Python")
10015 (properties `((python2-variant . ,(delay python2-promise))))
10016 (license license:expat)))
10017
10018 (define-public python2-promise
10019 (let ((promise (package-with-python2
10020 (strip-python2-variant python-promise))))
10021 (package (inherit promise)
10022 (arguments (substitute-keyword-arguments (package-arguments promise)
10023 ((#:tests? _) #t)))
10024 (native-inputs
10025 `(("python2-futures" ,python2-futures)
10026 ("python2-pytest" ,python2-pytest)
10027 ,@(package-native-inputs promise))))))
10028
10029 (define-public python-urllib3
10030 (package
10031 (name "python-urllib3")
10032 (version "1.18.1")
10033 (source
10034 (origin
10035 (method url-fetch)
10036 (uri (pypi-uri "urllib3" version))
10037 (sha256
10038 (base32
10039 "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
10040 (build-system python-build-system)
10041 (arguments `(#:tests? #f))
10042 (native-inputs
10043 `(;; some packages for tests
10044 ("python-nose" ,python-nose)
10045 ("python-mock" ,python-mock)
10046 ("python-tornado" ,python-tornado)))
10047 (propagated-inputs
10048 `(;; These 5 inputs are used to build urrlib3[secure]
10049 ("python-certifi" ,python-certifi)
10050 ("python-cryptography" ,python-cryptography) ;
10051 ("python-idna" ,python-idna)
10052 ("python-ipaddress" ,python-ipaddress)
10053 ("python-pyopenssl" ,python-pyopenssl)))
10054 (home-page "https://urllib3.readthedocs.org/")
10055 (synopsis "HTTP library with thread-safe connection pooling")
10056 (description
10057 "Urllib3 supports features left out of urllib and urllib2 libraries. It
10058 can reuse the same socket connection for multiple requests, it can POST files,
10059 supports url redirection and retries, and also gzip and deflate decoding.")
10060 (license license:expat)))
10061
10062 (define-public python2-urllib3
10063 (package-with-python2 python-urllib3))
10064
10065 (define-public python-colorama
10066 (package
10067 (name "python-colorama")
10068 (version "0.3.7")
10069 (source
10070 (origin
10071 (method url-fetch)
10072 (uri (pypi-uri "colorama" version))
10073 (sha256
10074 (base32
10075 "0avqkn6362v7k2kg3afb35g4sfdvixjgy890clip4q174p9whhz0"))))
10076 (build-system python-build-system)
10077 (synopsis "Colored terminal text rendering for Python")
10078 (description "Colorama is a Python library for rendering colored terminal
10079 text.")
10080 (home-page "https://pypi.python.org/pypi/colorama")
10081 (license license:bsd-3)))
10082
10083 (define-public python2-colorama
10084 (package-with-python2 python-colorama))
10085
10086 (define-public python-rsa
10087 (package
10088 (name "python-rsa")
10089 (version "3.4.2")
10090 (source
10091 (origin
10092 (method url-fetch)
10093 (uri (pypi-uri "rsa" version))
10094 (sha256
10095 (base32
10096 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
10097 (build-system python-build-system)
10098 (propagated-inputs
10099 `(("python-pyasn1" ,python-pyasn1)))
10100 (synopsis "Pure-Python RSA implementation")
10101 (description "Python-RSA is a pure-Python RSA implementation. It supports
10102 encryption and decryption, signing and verifying signatures, and key
10103 generation according to PKCS#1 version 1.5. It can be used as a Python
10104 library as well as on the command line.")
10105 (home-page "http://stuvel.eu/rsa")
10106 (license license:asl2.0)))
10107
10108 (define-public python2-rsa
10109 (package-with-python2 python-rsa))
10110
10111 (define-public python-pluggy
10112 (package
10113 (name "python-pluggy")
10114 (version "0.3.1")
10115 (source
10116 (origin
10117 (method url-fetch)
10118 (uri (pypi-uri "pluggy" version))
10119 (sha256
10120 (base32
10121 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
10122 (build-system python-build-system)
10123 (synopsis "Plugin and hook calling mechanism for Python")
10124 (description "Pluggy is an extraction of the plugin manager as used by
10125 Pytest but stripped of Pytest specific details.")
10126 (home-page "https://pypi.python.org/pypi/pluggy")
10127 (license license:expat)))
10128
10129 (define-public python2-pluggy
10130 (package-with-python2 python-pluggy))
10131
10132 (define-public python-tox
10133 (package
10134 (name "python-tox")
10135 (version "2.8.1")
10136 (source
10137 (origin
10138 (method url-fetch)
10139 (uri (pypi-uri "tox" version))
10140 (sha256
10141 (base32
10142 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
10143 (build-system python-build-system)
10144 (arguments
10145 ;; FIXME: Tests require pytest-timeout, which itself requires
10146 ;; pytest>=2.8.0 for installation.
10147 '(#:tests? #f))
10148 (propagated-inputs
10149 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
10150 ("python-py" ,python-py)
10151 ("python-virtualenv" ,python-virtualenv)))
10152 (native-inputs
10153 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
10154 ("python-pytest" ,python-pytest) ; >= 2.3.5
10155 ("python-setuptools-scm" ,python-setuptools-scm)))
10156 (home-page "http://tox.testrun.org/")
10157 (synopsis "Virtualenv-based automation of test activities")
10158 (description "Tox is a generic virtualenv management and test command line
10159 tool. It can be used to check that a package installs correctly with
10160 different Python versions and interpreters, or run tests in each type of
10161 supported environment, or act as a frontend to continuous integration
10162 servers.")
10163 (license license:expat)))
10164
10165 (define-public python2-tox
10166 (package-with-python2 python-tox))
10167
10168 (define-public python-jmespath
10169 (package
10170 (name "python-jmespath")
10171 (version "0.9.0")
10172 (source
10173 (origin
10174 (method url-fetch)
10175 (uri (pypi-uri "jmespath" version))
10176 (sha256
10177 (base32
10178 "0g9xvl69y7nr3w7ag4fsp6sm4fqf6vrqjw7504x2hzrrsh3ampq8"))))
10179 (build-system python-build-system)
10180 (native-inputs
10181 `(("python-nose" ,python-nose)))
10182 (synopsis "JSON Matching Expressions")
10183 (description "JMESPath (pronounced “james path”) is a Python library that
10184 allows one to declaratively specify how to extract elements from a JSON
10185 document.")
10186 (home-page "https://github.com/jmespath/jmespath.py")
10187 (license license:expat)))
10188
10189 (define-public python2-jmespath
10190 (package-with-python2 python-jmespath))
10191
10192 (define-public python-botocore
10193 (package
10194 (name "python-botocore")
10195 (version "1.7.9")
10196 (source
10197 (origin
10198 (method url-fetch)
10199 (uri (pypi-uri "botocore" version))
10200 (sha256
10201 (base32
10202 "02b1bw25r1wdjs5yppb1h9igf11wj092biriv2yg8hzp5r0wrkmg"))))
10203 (build-system python-build-system)
10204 (arguments
10205 ;; FIXME: Many tests are failing.
10206 '(#:tests? #f))
10207 (propagated-inputs
10208 `(("python-dateutil" ,python-dateutil)
10209 ("python-docutils" ,python-docutils)
10210 ("python-jmespath" ,python-jmespath)))
10211 (native-inputs
10212 `(("python-mock" ,python-mock)
10213 ("python-nose" ,python-nose)
10214 ("behave" ,behave)
10215 ("python-tox" ,python-tox)
10216 ("python-wheel" ,python-wheel)))
10217 (home-page "https://github.com/boto/botocore")
10218 (synopsis "Low-level interface to AWS")
10219 (description "Botocore is a Python library that provides a low-level
10220 interface to the Amazon Web Services (AWS) API.")
10221 (license license:asl2.0)))
10222
10223 (define-public python2-botocore
10224 (package-with-python2 python-botocore))
10225
10226 (define-public awscli
10227 (package
10228 (name "awscli")
10229 (version "1.11.164")
10230 (source
10231 (origin
10232 (method url-fetch)
10233 (uri (pypi-uri name version))
10234 (sha256
10235 (base32
10236 "05r8cw7i7ff6barpmyxxk3i52gzb1xyxwj8isynmiyqlmk3c9r8w"))))
10237 (build-system python-build-system)
10238 (propagated-inputs
10239 `(("python-colorama" ,python-colorama)
10240 ("python-botocore" ,python-botocore)
10241 ("python-s3transfer" ,python-s3transfer)
10242 ("python-docutils" ,python-docutils)
10243 ("python-pyyaml" ,python-pyyaml)
10244 ("python-rsa" ,python-rsa)))
10245 (arguments
10246 ;; FIXME: The 'pypi' release does not contain tests.
10247 '(#:tests? #f))
10248 (home-page "https://aws.amazon.com/cli/")
10249 (synopsis "Command line client for AWS")
10250 (description "AWS CLI provides a unified command line interface to the
10251 Amazon Web Services (AWS) API.")
10252 (license license:asl2.0)))
10253
10254 (define-public python-hypothesis
10255 (package
10256 (name "python-hypothesis")
10257 (version "3.1.0")
10258 (source (origin
10259 (method url-fetch)
10260 (uri (pypi-uri "hypothesis" version))
10261 (sha256
10262 (base32
10263 "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
10264 (build-system python-build-system)
10265 (native-inputs
10266 `(("python-flake8" ,python-flake8)
10267 ("python-pytest" ,python-pytest)))
10268 (synopsis "Library for property based testing")
10269 (description "Hypothesis is a library for testing your Python code against a
10270 much larger range of examples than you would ever want to write by hand. It’s
10271 based on the Haskell library, Quickcheck, and is designed to integrate
10272 seamlessly into your existing Python unit testing work flow.")
10273 (home-page "https://github.com/DRMacIver/hypothesis")
10274 (license license:mpl2.0)
10275 (properties `((python2-variant . ,(delay python2-hypothesis))))))
10276
10277 (define-public python2-hypothesis
10278 (let ((hypothesis (package-with-python2
10279 (strip-python2-variant python-hypothesis))))
10280 (package (inherit hypothesis)
10281 (propagated-inputs
10282 `(("python2-enum34" ,python2-enum34)
10283 ,@(package-propagated-inputs hypothesis))))))
10284
10285 (define-public python-pytest-subtesthack
10286 (package
10287 (name "python-pytest-subtesthack")
10288 (version "0.1.1")
10289 (source (origin
10290 (method url-fetch)
10291 (uri (pypi-uri "pytest-subtesthack" version))
10292 (sha256
10293 (base32
10294 "15kzcr5pchf3id4ikdvlv752rc0j4d912n589l4rifp8qsj19l1x"))))
10295 (build-system python-build-system)
10296 (propagated-inputs
10297 `(("python-pytest" ,python-pytest)))
10298 (synopsis "Set-up and tear-down fixtures for unit tests")
10299 (description "This plugin allows you to set up and tear down fixtures within
10300 unit test functions that use @code{py.test}. This is useful for using
10301 @command{hypothesis} inside py.test, as @command{hypothesis} will call the test
10302 function multiple times, without setting up or tearing down fixture state as is
10303 normally the case.")
10304 (home-page "https://github.com/untitaker/pytest-subtesthack/")
10305 (license license:unlicense)))
10306
10307 (define-public python2-pytest-subtesthack
10308 (package-with-python2 python-pytest-subtesthack))
10309
10310 (define-public python-xdo
10311 (package
10312 (name "python-xdo")
10313 (version "0.3")
10314 (source (origin
10315 (method url-fetch)
10316 (uri (string-append
10317 "http://http.debian.net/debian/pool/main/p/python-xdo/"
10318 "python-xdo_" version ".orig.tar.gz"))
10319 (sha256
10320 (base32
10321 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
10322 (build-system python-build-system)
10323 (arguments
10324 '(#:phases
10325 (modify-phases %standard-phases
10326 (add-before 'install 'patch-libxdo-path
10327 ;; Hardcode the path of dynamically loaded libxdo library.
10328 (lambda* (#:key inputs #:allow-other-keys)
10329 (let ((libxdo (string-append
10330 (assoc-ref inputs "xdotool")
10331 "/lib/libxdo.so")))
10332 (substitute* "xdo/_xdo.py"
10333 (("find_library\\(\"xdo\"\\)")
10334 (simple-format #f "\"~a\"" libxdo)))
10335 #t))))
10336 #:tests? #f)) ; no tests provided
10337 (propagated-inputs
10338 `(("python-six" ,python-six)))
10339 (inputs
10340 `(("xdotool" ,xdotool)
10341 ("libX11" ,libx11)))
10342 (home-page "https://tracker.debian.org/pkg/python-xdo")
10343 (synopsis "Python library for simulating X11 keyboard/mouse input")
10344 (description "Provides bindings to libxdo for manipulating X11 via simulated
10345 input. (Note that this is mostly a legacy library; you may wish to look at
10346 python-xdo for newer bindings.)")
10347 (license license:bsd-3)))
10348
10349 (define-public python2-xdo
10350 (package-with-python2 python-xdo))
10351
10352 (define-public python-wtforms
10353 (package
10354 (name "python-wtforms")
10355 (version "2.1")
10356 (source
10357 (origin
10358 (method url-fetch)
10359 (uri (pypi-uri "WTForms" version ".zip"))
10360 (sha256
10361 (base32
10362 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz"))))
10363 (build-system python-build-system)
10364 (arguments
10365 '(#:phases
10366 (modify-phases %standard-phases
10367 (add-after 'unpack 'remove-django-test
10368 ;; Don't fail the tests when the inputs for the optional tests cannot be found.
10369 (lambda _
10370 (substitute*
10371 "tests/runtests.py"
10372 (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "")
10373 (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") ""))
10374 #t)))))
10375 (native-inputs
10376 `(("unzip" ,unzip)))
10377 (home-page "http://wtforms.simplecodes.com/")
10378 (synopsis
10379 "Form validation and rendering library for Python web development")
10380 (description
10381 "WTForms is a flexible forms validation and rendering library
10382 for Python web development. It is very similar to the web form API
10383 available in Django, but is a standalone package.")
10384 (license license:bsd-3)))
10385
10386 (define-public python2-wtforms
10387 (package-with-python2 python-wtforms))
10388
10389 (define-public python-mako
10390 (package
10391 (name "python-mako")
10392 (version "1.0.6")
10393 (source
10394 (origin
10395 (method url-fetch)
10396 (uri (pypi-uri "Mako" version))
10397 (sha256
10398 (base32
10399 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
10400 (build-system python-build-system)
10401 (propagated-inputs
10402 `(("python-markupsafe" ,python-markupsafe)))
10403 (native-inputs
10404 `(("python-mock" ,python-mock)
10405 ("python-nose" ,python-nose)
10406 ("python-pytest" ,python-pytest)))
10407 (home-page "http://www.makotemplates.org/")
10408 (synopsis "Templating language for Python")
10409 (description "Mako is a templating language for Python that compiles
10410 templates into Python modules.")
10411 (license license:expat)))
10412
10413 (define-public python2-mako
10414 (package-with-python2 python-mako))
10415
10416 (define-public python-waitress
10417 (package
10418 (name "python-waitress")
10419 (version "0.8.10")
10420 (source
10421 (origin
10422 (method url-fetch)
10423 (uri (pypi-uri "waitress" version))
10424 (sha256
10425 (base32
10426 "017n9ra6vvmq9d5sfhdzyzr1mg15x2hj2dhm4pdlw98c1ypw2h3w"))))
10427 (build-system python-build-system)
10428 (home-page "https://github.com/Pylons/waitress")
10429 (synopsis "Waitress WSGI server")
10430 (description "Waitress is meant to be a production-quality pure-Python WSGI
10431 server with very acceptable performance.")
10432 (license license:zpl2.1)))
10433
10434 (define-public python2-waitress
10435 (package-with-python2 python-waitress))
10436
10437 (define-public python-wsgiproxy2
10438 (package
10439 (name "python-wsgiproxy2")
10440 (version "0.4.2")
10441 (source
10442 (origin
10443 (method url-fetch)
10444 (uri (pypi-uri "WSGIProxy2" version ".zip"))
10445 (sha256
10446 (base32
10447 "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"))))
10448 (build-system python-build-system)
10449 (arguments
10450 '(;; Wsgiproxy2's test suite requires Restkit, which does not yet fully
10451 ;; support Python 3:
10452 ;; https://github.com/benoitc/restkit/issues/140
10453 #:tests? #f))
10454 (native-inputs
10455 `(("unzip" ,unzip)
10456 ("python-nose" ,python-nose)
10457 ("python-coverage" ,python-coverage)))
10458 (propagated-inputs
10459 `(("python-six" ,python-six)
10460 ("python-webob" ,python-webob)))
10461 (home-page
10462 "https://github.com/gawel/WSGIProxy2/")
10463 (synopsis "WSGI Proxy with various http client backends")
10464 (description "WSGI turns HTTP requests into WSGI function calls.
10465 WSGIProxy turns WSGI function calls into HTTP requests.
10466 It also includes code to sign requests and pass private data,
10467 and to spawn subprocesses to handle requests.")
10468 (license license:expat)))
10469
10470 (define-public python2-wsgiproxy2
10471 (package-with-python2 python-wsgiproxy2))
10472
10473 (define-public python-pastedeploy
10474 (package
10475 (name "python-pastedeploy")
10476 (version "1.5.2")
10477 (source
10478 (origin
10479 (method url-fetch)
10480 (uri (pypi-uri "PasteDeploy" version))
10481 (sha256
10482 (base32
10483 "1jz3m4hq8v6hyhfjz9425nd3nvn52cvbfipdcd72krjmla4qz1fm"))))
10484 (build-system python-build-system)
10485 (native-inputs
10486 `(("python-nose" ,python-nose)))
10487 (home-page "http://pythonpaste.org/deploy/")
10488 (synopsis
10489 "Load, configure, and compose WSGI applications and servers")
10490 (description
10491 "This tool provides code to load WSGI applications and servers from URIs;
10492 these URIs can refer to Python Eggs for INI-style configuration files. Paste
10493 Script provides commands to serve applications based on this configuration
10494 file.")
10495 (license license:expat)))
10496
10497 (define-public python2-pastedeploy
10498 (package-with-python2 python-pastedeploy))
10499
10500 (define-public python-paste
10501 (package
10502 (name "python-paste")
10503 (version "2.0.3")
10504 (source
10505 (origin
10506 (method url-fetch)
10507 (uri (pypi-uri "Paste" version))
10508 (sha256
10509 (base32
10510 "062jk0nlxf6lb2wwj6zc20rlvrwsnikpkh90y0dn8cjch93s6ii3"))
10511 (patches (search-patches "python-paste-remove-website-test.patch"
10512 "python-paste-remove-timing-test.patch"))))
10513 (build-system python-build-system)
10514 (native-inputs
10515 `(("python-nose" ,python-nose)))
10516 (propagated-inputs
10517 `(("python-six" ,python-six)))
10518 (home-page "http://pythonpaste.org")
10519 (synopsis
10520 "Python web development tools, focusing on WSGI")
10521 (description
10522 "Paste provides a variety of web development tools and middleware which
10523 can be nested together to build web applications. Paste's design closely
10524 follows ideas flowing from WSGI (Web Standard Gateway Interface).")
10525 (license license:expat)))
10526
10527 (define-public python2-paste
10528 (package-with-python2 python-paste))
10529
10530 (define-public python-pastescript
10531 (package
10532 (name "python-pastescript")
10533 (version "2.0.2")
10534 (source
10535 (origin
10536 (method url-fetch)
10537 (uri (pypi-uri "PasteScript" version))
10538 (sha256
10539 (base32
10540 "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
10541 (build-system python-build-system)
10542 (native-inputs
10543 `(("python-nose" ,python-nose)))
10544 (propagated-inputs
10545 `(("python-paste" ,python-paste)
10546 ("python-pastedeploy" ,python-pastedeploy)))
10547 (home-page "http://pythonpaste.org/script/")
10548 (arguments
10549 '(;; Unfortunately, this requires the latest unittest2,
10550 ;; but that requires traceback2 which requires linecache2 which requires
10551 ;; unittest2. So we're skipping tests for now.
10552 ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
10553 ;; so in theory we could get around this situation somehow.)
10554 #:tests? #f))
10555 (synopsis
10556 "Pluggable command line tool for serving web applications and more")
10557 (description
10558 "PasteScript is a plugin-friendly command line tool which provides a
10559 variety of features, from launching web applications to bootstrapping project
10560 layouts.")
10561 (license license:expat)))
10562
10563 (define-public python2-pastescript
10564 (package-with-python2 python-pastescript))
10565
10566 (define-public python-pyquery
10567 (package
10568 (name "python-pyquery")
10569 (version "1.2.17")
10570 (source
10571 (origin
10572 (method url-fetch)
10573 (uri (pypi-uri "pyquery" version))
10574 (sha256
10575 (base32
10576 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
10577 (build-system python-build-system)
10578 (native-inputs
10579 `(("python-webob" ,python-webob)
10580 ("python-webtest" ,python-webtest)))
10581 (propagated-inputs
10582 `(("python-lxml" ,python-lxml)
10583 ("python-cssselect" ,python-cssselect)))
10584 (home-page "https://github.com/gawel/pyquery")
10585 (synopsis "Make jQuery-like queries on xml documents")
10586 (description "pyquery allows you to make jQuery queries on xml documents.
10587 The API is as much as possible the similar to jQuery. pyquery uses lxml for
10588 fast xml and html manipulation.")
10589 (license license:bsd-3)))
10590
10591 (define-public python2-pyquery
10592 (package-with-python2 python-pyquery))
10593
10594 (define-public python-webtest
10595 (package
10596 (name "python-webtest")
10597 (version "2.0.20")
10598 (source
10599 (origin
10600 (method url-fetch)
10601 (uri (pypi-uri "WebTest" version))
10602 (sha256
10603 (base32
10604 "0bv0qhdjakdsdgj4sk21gnpp8xp8bga4x03p6gjb83ihrsb7n4xv"))))
10605 (build-system python-build-system)
10606 (arguments
10607 `(;; Unfortunately we have to disable tests!
10608 ;; This release of WebTest is pinned to python-nose < 1.3,
10609 ;; but older versions of python-nose are plagued with the following
10610 ;; bug(s), which rears its ugly head during test execution:
10611 ;; https://github.com/nose-devs/nose/issues/759
10612 ;; https://github.com/nose-devs/nose/pull/811
10613 #:tests? #f))
10614 ;; Commented out code is no good, but in this case, once tests
10615 ;; are ready to be enabled again, we should put the following
10616 ;; in place:
10617 ;; (native-inputs
10618 ;; `(("python-nose" ,python-nose) ; technially < 1.3,
10619 ;; ; but see above comment
10620 ;; ("python-coverage" ,python-coverage)
10621 ;; ("python-mock" ,python-mock)
10622 ;; ("python-pastedeploy" ,python-pastedeploy)
10623 ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
10624 ;; ("python-pyquery" ,python-pyquery)))
10625 (propagated-inputs
10626 `(("python-waitress" ,python-waitress)
10627 ("python-webob" ,python-webob)
10628 ("python-six" ,python-six)
10629 ("python-beautifulsoup4" ,python-beautifulsoup4)))
10630 (home-page "http://webtest.pythonpaste.org/")
10631 (synopsis "Helper to test WSGI applications")
10632 (description "Webtest allows you to test your Python web applications
10633 without starting an HTTP server. It supports anything that supports the
10634 minimum of WSGI.")
10635 (license license:expat)))
10636
10637 (define-public python2-webtest
10638 (package-with-python2 python-webtest))
10639
10640 (define-public python-anyjson
10641 (package
10642 (name "python-anyjson")
10643 (version "0.3.3")
10644 (source
10645 (origin
10646 (method url-fetch)
10647 (uri (pypi-uri "anyjson" version))
10648 (sha256
10649 (base32
10650 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
10651 (build-system python-build-system)
10652 (arguments
10653 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
10654 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
10655 ;; whatever) so this transformation needs to be done before the tests
10656 ;; can be run. Maybe we could add a build step to transform beforehand
10657 ;; but it could be annoying/difficult.
10658 ;; We can enable tests for the Python 2 version, though, and do below.
10659 #:tests? #f))
10660 (home-page "http://bitbucket.org/runeh/anyjson/")
10661 (synopsis
10662 "Wraps best available JSON implementation in a common interface")
10663 (description
10664 "Anyjson loads whichever is the fastest JSON module installed
10665 and provides a uniform API regardless of which JSON implementation is used.")
10666 (license license:bsd-3)
10667 (properties `((python2-variant . ,(delay python2-anyjson))))))
10668
10669 (define-public python2-anyjson
10670 (let ((anyjson (package-with-python2
10671 (strip-python2-variant python-anyjson))))
10672 (package
10673 (inherit anyjson)
10674 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
10675 #:tests? #t
10676 ,@(package-arguments anyjson)))
10677 (native-inputs `(("python2-nose" ,python2-nose))))))
10678
10679 (define-public python-amqp
10680 (package
10681 (name "python-amqp")
10682 (version "1.4.9")
10683 (source
10684 (origin
10685 (method url-fetch)
10686 (uri (pypi-uri "amqp" version))
10687 (sha256
10688 (base32
10689 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
10690 (build-system python-build-system)
10691 (native-inputs
10692 `(("python-nose" ,python-nose)
10693 ("python-mock" ,python-mock)))
10694 (home-page "https://github.com/celery/py-amqp")
10695 (synopsis
10696 "Low-level AMQP client for Python (fork of amqplib)")
10697 (description
10698 "This is a fork of amqplib which was originally written by Barry Pederson.
10699 It is maintained by the Celery project, and used by kombu as a pure python
10700 alternative when librabbitmq is not available.")
10701 (license license:lgpl2.1+)
10702 (properties `((python2-variant . ,(delay python2-amqp))))))
10703
10704 (define-public python2-amqp
10705 (let ((amqp (package-with-python2
10706 (strip-python2-variant python-amqp))))
10707 (package
10708 (inherit amqp)
10709 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
10710 ;; unmaintained. Weirdly, does not do this on the python 3
10711 ;; version?
10712 #:tests? #f
10713 ,@(package-arguments amqp))))))
10714
10715 (define-public python-kombu
10716 (package
10717 (name "python-kombu")
10718 (version "3.0.37")
10719 (source
10720 (origin
10721 (method url-fetch)
10722 (uri (pypi-uri "kombu" version))
10723 (sha256
10724 (base32
10725 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
10726 (build-system python-build-system)
10727 (native-inputs
10728 `(("python-mock" ,python-mock)
10729 ("python-nose" ,python-nose)))
10730 (propagated-inputs
10731 `(("python-anyjson" ,python-anyjson)
10732 ("python-amqp" ,python-amqp)
10733 ("python-redis" ,python-redis)))
10734 (home-page "http://kombu.readthedocs.org")
10735 (synopsis "Message passing library for Python")
10736 (description "The aim of Kombu is to make messaging in Python as easy as
10737 possible by providing an idiomatic high-level interface for the AMQ protocol,
10738 and also provide proven and tested solutions to common messaging problems.
10739 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
10740 message orientation, queuing, routing, reliability and security, for which the
10741 RabbitMQ messaging server is the most popular implementation.")
10742 (license license:bsd-3)
10743 (properties `((python2-variant . ,(delay python2-kombu))))))
10744
10745 (define-public python2-kombu
10746 (let ((kombu (package-with-python2
10747 (strip-python2-variant python-kombu))))
10748 (package
10749 (inherit kombu)
10750 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
10751 ;; It works fine on the python3 variant.
10752 #:tests? #f
10753 ,@(package-arguments kombu)))
10754 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10755 ,@(package-native-inputs kombu))))))
10756
10757 (define-public python-billiard
10758 (package
10759 (name "python-billiard")
10760 (version "3.3.0.23")
10761 (source
10762 (origin
10763 (method url-fetch)
10764 (uri (pypi-uri "billiard" version))
10765 (sha256
10766 (base32
10767 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
10768 (build-system python-build-system)
10769 (native-inputs
10770 `(("python-nose" ,python-nose)))
10771 (home-page "https://github.com/celery/billiard")
10772 (synopsis
10773 "Python multiprocessing fork with improvements and bugfixes")
10774 (description
10775 "Billiard is a fork of the Python 2.7 multiprocessing package. The
10776 multiprocessing package itself is a renamed and updated version of R Oudkerk's
10777 pyprocessing package. This standalone variant is intended to be compatible with
10778 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
10779 (license license:bsd-3)
10780 (properties `((python2-variant . ,(delay python2-billiard))))))
10781
10782 (define-public python2-billiard
10783 (let ((billiard (package-with-python2
10784 (strip-python2-variant python-billiard))))
10785 (package
10786 (inherit billiard)
10787 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10788 ("python2-mock" ,python2-mock)
10789 ,@(package-native-inputs billiard))))))
10790
10791 (define-public python-celery
10792 (package
10793 (name "python-celery")
10794 (version "3.1.24")
10795 (source
10796 (origin
10797 (method url-fetch)
10798 (uri (pypi-uri "celery" version))
10799 (sha256
10800 (base32
10801 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
10802 (build-system python-build-system)
10803 (arguments
10804 `(#:phases
10805 (modify-phases %standard-phases
10806 ;; These tests break with Python 3.5:
10807 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
10808 (replace 'check
10809 (lambda _
10810 (zero?
10811 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
10812 (native-inputs
10813 `(("python-nose" ,python-nose)))
10814 (propagated-inputs
10815 `(("python-pytz" ,python-pytz)
10816 ("python-billiard" ,python-billiard)
10817 ("python-kombu" ,python-kombu)))
10818 (home-page "http://celeryproject.org")
10819 (synopsis "Distributed Task Queue")
10820 (description "Celery is an asynchronous task queue/job queue based on
10821 distributed message passing. It is focused on real-time operation, but
10822 supports scheduling as well. The execution units, called tasks, are executed
10823 concurrently on a single or more worker servers using multiprocessing,
10824 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
10825 synchronously (wait until ready).")
10826 (license license:bsd-3)
10827 (properties `((python2-variant . ,(delay python2-celery))))))
10828
10829 (define-public python2-celery
10830 (let ((celery (package-with-python2
10831 (strip-python2-variant python-celery))))
10832 (package
10833 (inherit celery)
10834 (native-inputs `(("python2-unittest2" ,python2-unittest2)
10835 ("python2-mock" ,python2-mock)
10836 ,@(package-native-inputs celery))))))
10837
10838 (define-public python-translitcodec
10839 (package
10840 (name "python-translitcodec")
10841 (version "0.4.0")
10842 (source
10843 (origin
10844 (method url-fetch)
10845 (uri (pypi-uri "translitcodec" version))
10846 (sha256
10847 (base32
10848 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
10849 (build-system python-build-system)
10850 (arguments
10851 `(#:tests? #f)) ; no tests provided
10852 (home-page
10853 "https://github.com/claudep/translitcodec")
10854 (synopsis
10855 "Unicode to 8-bit charset transliteration codec")
10856 (description
10857 "This package contains codecs for transliterating ISO 10646 texts into
10858 best-effort representations using smaller coded character sets (ASCII,
10859 ISO 8859, etc.).")
10860 (license license:expat)))
10861
10862 (define-public python2-translitcodec
10863 (package-with-python2 python-translitcodec))
10864
10865 (define-public python-editor
10866 (package
10867 (name "python-editor")
10868 (version "0.5")
10869 (source
10870 (origin
10871 (method url-fetch)
10872 (uri (pypi-uri "python-editor" version))
10873 (sha256
10874 (base32
10875 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
10876 (build-system python-build-system)
10877 (home-page
10878 "https://github.com/fmoo/python-editor")
10879 (synopsis
10880 "Programmatically open an editor, capture the result")
10881 (description
10882 "python-editor is a library that provides the editor module for
10883 programmatically interfacing with your system's $EDITOR.")
10884 (license license:asl2.0)))
10885
10886 (define-public python2-editor
10887 (package-with-python2 python-editor))
10888
10889 (define-public python-sphinxcontrib-programoutput
10890 (package
10891 (name "python-sphinxcontrib-programoutput")
10892 (version "0.10")
10893 (source (origin
10894 (method url-fetch)
10895 (uri (pypi-uri "sphinxcontrib-programoutput" version))
10896 (sha256
10897 (base32
10898 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
10899 (build-system python-build-system)
10900 (arguments
10901 ;; FIXME: Many tests are failing and the upstream is gone.
10902 '(#:tests? #f))
10903 (propagated-inputs
10904 `(("python-sphinx" ,python-sphinx)))
10905 (synopsis "Sphinx extension to include program output")
10906 (description "A Sphinx extension to literally insert the output of arbitrary
10907 commands into documents, helping you to keep your command examples up to date.")
10908 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
10909 (license license:bsd-2)))
10910
10911 (define-public python2-sphinxcontrib-programoutput
10912 (package-with-python2 python-sphinxcontrib-programoutput))
10913
10914 (define-public python-sphinx-repoze-autointerface
10915 (package
10916 (name "python-sphinx-repoze-autointerface")
10917 (version "0.8")
10918 (source (origin
10919 (method url-fetch)
10920 (uri (pypi-uri "repoze.sphinx.autointerface" version))
10921 (sha256
10922 (base32
10923 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
10924 (build-system python-build-system)
10925 (arguments '(#:tests? #f)) ; No tests.
10926 (propagated-inputs
10927 `(("python-sphinx" ,python-sphinx)
10928 ("python-zope-interface" ,python-zope-interface)))
10929 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
10930 (description "This package defines an extension for the Sphinx documentation
10931 system. The extension allows generation of API documentation by
10932 introspection of @code{zope.interface} instances in code.")
10933 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
10934 (license license:repoze)))
10935
10936 (define-public python2-sphinx-repoze-autointerface
10937 (package-with-python2 python-sphinx-repoze-autointerface))
10938
10939 (define-public python-psycopg2
10940 (package
10941 (name "python-psycopg2")
10942 (version "2.7.3.1")
10943 (source
10944 (origin
10945 (method url-fetch)
10946 (uri (pypi-uri "psycopg2" version))
10947 (sha256
10948 (base32
10949 "0rda1j02ds6s28752fhmpwg761sh6jsxi1gpczqkrd28cki1cywv"))))
10950 (build-system python-build-system)
10951 (arguments
10952 ;; Tests would require a postgresql database "psycopg2_test"
10953 ;; and a running postgresql database management service.
10954 `(#:tests? #f)) ; TODO re-enable after providing a test-db.
10955 (inputs
10956 `(("postgresql" ,postgresql))) ; libpq
10957 (home-page "http://initd.org/psycopg/")
10958 (synopsis "Python PostgreSQL adapter")
10959 (description
10960 "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
10961 (license license:lgpl3+)))
10962
10963 (define-public python2-psycopg2
10964 (package-with-python2 python-psycopg2))
10965
10966 (define-public python-vobject
10967 (package
10968 (name "python-vobject")
10969 (version "0.9.5")
10970 (source (origin
10971 (method url-fetch)
10972 (uri (pypi-uri "vobject" version))
10973 (sha256
10974 (base32
10975 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
10976 (build-system python-build-system)
10977 (arguments
10978 '(;; The test suite relies on some non-portable Windows interfaces.
10979 #:tests? #f))
10980 (propagated-inputs
10981 `(("python-dateutil" ,python-dateutil)
10982 ("python-pyicu" ,python-pyicu)))
10983 (synopsis "Parse and generate vCard and vCalendar files")
10984 (description "Vobject is intended to be a full featured Python package for
10985 parsing and generating vCard and vCalendar files. Currently, iCalendar files
10986 are supported and well tested. vCard 3.0 files are supported, and all data
10987 should be imported, but only a few components are understood in a sophisticated
10988 way.")
10989 (home-page "http://eventable.github.io/vobject/")
10990 (license license:asl2.0)))
10991
10992 (define-public python2-vobject
10993 (package-with-python2 python-vobject))
10994
10995 (define-public python-munkres
10996 (package
10997 (name "python-munkres")
10998 (version "1.0.8")
10999 (source (origin
11000 (method url-fetch)
11001 (uri (pypi-uri "munkres" version))
11002 (sha256
11003 (base32
11004 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
11005 (build-system python-build-system)
11006 (arguments
11007 '(#:tests? #f)) ; no test suite
11008 (home-page "http://software.clapper.org/munkres/")
11009 (synopsis "Implementation of the Munkres algorithm")
11010 (description "The Munkres module provides an implementation of the Munkres
11011 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
11012 useful for solving the Assignment Problem.")
11013 (license license:bsd-3)))
11014
11015 (define-public python2-munkres
11016 (package-with-python2 python-munkres))
11017
11018 (define-public python-flask
11019 (package
11020 (name "python-flask")
11021 (version "0.11.1")
11022 (source (origin
11023 (method url-fetch)
11024 (uri (pypi-uri "Flask" version))
11025 (sha256
11026 (base32
11027 "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
11028 (build-system python-build-system)
11029 (propagated-inputs
11030 `(("python-itsdangerous" ,python-itsdangerous)
11031 ("python-jinja2" ,python-jinja2)
11032 ("python-click" ,python-click)
11033 ("python-werkzeug" ,python-werkzeug)))
11034 (home-page "https://github.com/mitsuhiko/flask/")
11035 (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
11036 (description "Flask is a micro web framework based on the Werkzeug toolkit
11037 and Jinja2 template engine. It is called a micro framework because it does not
11038 presume or force a developer to use a particular tool or library.")
11039 (license license:bsd-3)))
11040
11041 (define-public python2-flask
11042 (package-with-python2 python-flask))
11043
11044 (define-public python-flask-wtf
11045 (package
11046 (name "python-flask-wtf")
11047 (version "0.13.1")
11048 (source
11049 (origin
11050 (method url-fetch)
11051 (uri (pypi-uri "Flask-WTF" version))
11052 (sha256
11053 (base32
11054 "04l5743j2dici46038sqlzvf0xzpg8rf7s9ld2x24xv7f4idg990"))))
11055 (build-system python-build-system)
11056 (arguments
11057 '(#:phases
11058 (modify-phases %standard-phases
11059 (add-before 'check 'drop-failing-test
11060 (lambda _
11061 ;; FIXME: This file tries resolving an external server, which
11062 ;; fails. Try to patch out the offending section instead of
11063 ;; deleting the whole thing.
11064 (delete-file "tests/test_recaptcha.py")
11065 #t)))))
11066 (propagated-inputs
11067 `(("python-flask-babel" ,python-flask-babel)
11068 ("python-babel" ,python-babel)
11069 ("python-wtforms" ,python-wtforms)))
11070 (native-inputs
11071 `(("python-nose" ,python-nose)))
11072 (home-page "https://github.com/lepture/flask-wtf")
11073 (synopsis "Simple integration of Flask and WTForms")
11074 (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
11075 upload, and reCAPTCHA.")
11076 (license license:bsd-3)))
11077
11078 (define-public python2-flask-wtf
11079 (package-with-python2 python-flask-wtf))
11080
11081 (define-public python-flask-multistatic
11082 (package
11083 (name "python-flask-multistatic")
11084 (version "1.0")
11085 (source
11086 (origin
11087 (method url-fetch)
11088 (uri (pypi-uri "flask-multistatic" version))
11089 (sha256
11090 (base32
11091 "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
11092 (build-system python-build-system)
11093 (propagated-inputs
11094 `(("python-flask" ,python-flask)))
11095 (home-page "https://pagure.io/flask-multistatic")
11096 (synopsis "Flask plugin to allow overriding static files")
11097 (description "@code{flask-multistatic} is a flask plugin that adds support
11098 for overriding static files.")
11099 (license license:gpl3+)))
11100
11101 (define-public python2-flask-multistatic
11102 (package-with-python2 python-flask-multistatic))
11103
11104 (define-public python-cookies
11105 (package
11106 (name "python-cookies")
11107 (version "2.2.1")
11108 (source (origin
11109 (method url-fetch)
11110 (uri (pypi-uri "cookies" version))
11111 (sha256
11112 (base32
11113 "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
11114 (build-system python-build-system)
11115 (arguments
11116 `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
11117 #:tests? #f))
11118 (native-inputs
11119 `(("python-pytest" ,python2-pytest)))
11120 (synopsis "HTTP cookie parser and renderer")
11121 (description "A RFC 6265-compliant HTTP cookie parser and renderer in
11122 Python.")
11123 (home-page "https://gitlab.com/sashahart/cookies")
11124 (license license:expat)))
11125
11126 (define-public python2-cookies
11127 (package-with-python2 python-cookies))
11128
11129 (define-public python-responses
11130 (package
11131 (name "python-responses")
11132 (version "0.5.1")
11133 (source (origin
11134 (method url-fetch)
11135 (uri (pypi-uri "responses" version))
11136 (sha256
11137 (base32
11138 "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
11139 (build-system python-build-system)
11140 (arguments
11141 `(;; Test suite is not distributed:
11142 ;; https://github.com/getsentry/responses/issues/38
11143 #:tests? #f))
11144 (native-inputs
11145 `(("python-mock" ,python-mock)))
11146 (propagated-inputs
11147 `(("python-requests" ,python-requests)
11148 ("python-cookies" ,python-cookies)
11149 ("python-six" ,python-six)))
11150 (home-page "https://github.com/getsentry/responses")
11151 (synopsis "Utility for mocking out the `requests` Python library")
11152 (description "A utility library for mocking out the `requests` Python
11153 library.")
11154 (license license:asl2.0)))
11155
11156 (define-public python2-responses
11157 (package-with-python2 python-responses))
11158
11159 (define-public python-whoosh
11160 (package
11161 (name "python-whoosh")
11162 (version "2.7.4")
11163 (source
11164 (origin
11165 (method url-fetch)
11166 (uri (pypi-uri "Whoosh" version))
11167 (sha256
11168 (base32
11169 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
11170 (build-system python-build-system)
11171 (native-inputs
11172 `(("python-pytest" ,python-pytest)))
11173 (home-page "http://bitbucket.org/mchaput/whoosh")
11174 (synopsis "Full text indexing, search, and spell checking library")
11175 (description
11176 "Whoosh is a fast, pure-Python full text indexing, search, and spell
11177 checking library.")
11178 (license license:bsd-2)))
11179
11180 (define-public python2-whoosh
11181 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
11182 (package (inherit whoosh)
11183 (propagated-inputs
11184 `(("python2-backport-ssl-match-hostname"
11185 ,python2-backport-ssl-match-hostname)
11186 ,@(package-propagated-inputs whoosh))))))
11187
11188 (define-public python-pathlib
11189 (package
11190 (name "python-pathlib")
11191 (version "1.0.1")
11192 (source (origin
11193 (method url-fetch)
11194 (uri (pypi-uri "pathlib" version))
11195 (sha256
11196 (base32
11197 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
11198 (build-system python-build-system)
11199 ;; The tests depend on the internal "test" module, which does not provide
11200 ;; a stable interface.
11201 (arguments `(#:tests? #f))
11202 (home-page "https://pathlib.readthedocs.org/")
11203 (synopsis "Object-oriented file system paths")
11204 (description "Pathlib offers a set of classes to handle file system paths.
11205 It offers the following advantages over using string objects:
11206
11207 @enumerate
11208 @item No more cumbersome use of os and os.path functions. Everything can
11209 be done easily through operators, attribute accesses, and method calls.
11210 @item Embodies the semantics of different path types. For example,
11211 comparing Windows paths ignores casing.
11212 @item Well-defined semantics, eliminating any inconsistencies or
11213 ambiguities (forward vs. backward slashes, etc.).
11214 @end enumerate
11215
11216 Note: In Python 3.4, pathlib is now part of the standard library. For other
11217 Python versions please consider python-pathlib2 instead, which tracks the
11218 standard library module. This module (python-pathlib) isn't maintained
11219 anymore.")
11220 (license license:expat)))
11221
11222 (define-public python2-pathlib
11223 (package-with-python2 python-pathlib))
11224
11225 (define-public python2-pathlib2
11226 (package
11227 (name "python2-pathlib2")
11228 (version "2.1.0")
11229 (source (origin
11230 (method url-fetch)
11231 (uri (pypi-uri "pathlib2" version))
11232 (sha256
11233 (base32
11234 "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy"))))
11235 (build-system python-build-system)
11236 ;; We only need the the Python 2 variant, since for Python 3 our minimum
11237 ;; version is 3.4 which already includes this package as part of the
11238 ;; standard library.
11239 (arguments
11240 `(#:python ,python-2))
11241 (native-inputs
11242 `(("python2-six" ,python2-six)))
11243 (home-page "http://pypi.python.org/pypi/pathlib2/")
11244 (synopsis "Object-oriented file system paths - backport of standard
11245 pathlib module")
11246 (description "The goal of pathlib2 is to provide a backport of standard
11247 pathlib module which tracks the standard library module, so all the newest
11248 features of the standard pathlib can be used also on older Python versions.
11249
11250 Pathlib offers a set of classes to handle file system paths. It offers the
11251 following advantages over using string objects:
11252
11253 @enumerate
11254 @item No more cumbersome use of os and os.path functions. Everything can
11255 be done easily through operators, attribute accesses, and method calls.
11256 @item Embodies the semantics of different path types. For example,
11257 comparing Windows paths ignores casing.
11258 @item Well-defined semantics, eliminating any inconsistencies or
11259 ambiguities (forward vs. backward slashes, etc.).
11260 @end enumerate")
11261 (license license:expat)))
11262
11263 (define-public python-jellyfish
11264 (package
11265 (name "python-jellyfish")
11266 (version "0.5.6")
11267 (source (origin
11268 (method url-fetch)
11269 (uri (pypi-uri "jellyfish" version))
11270 (sha256
11271 (base32
11272 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
11273 (build-system python-build-system)
11274 (native-inputs
11275 `(("python-pytest" ,python-pytest)))
11276 (home-page "https://github.com/jamesturk/jellyfish")
11277 (synopsis "Approximate and phonetic matching of strings")
11278 (description "Jellyfish uses a variety of string comparison and phonetic
11279 encoding algorithms to do fuzzy string matching.")
11280 (license license:bsd-2)
11281 (properties `((python2-variant . ,(delay python2-jellyfish))))))
11282
11283 (define-public python2-jellyfish
11284 (let ((jellyfish (package-with-python2
11285 (strip-python2-variant python-jellyfish))))
11286 (package (inherit jellyfish)
11287 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
11288 ,@(package-native-inputs jellyfish))))))
11289
11290 (define-public python2-unicodecsv
11291 (package
11292 (name "python2-unicodecsv")
11293 (version "0.14.1")
11294 (source (origin
11295 (method url-fetch)
11296 ;; The test suite is not included in the PyPi release.
11297 ;; https://github.com/jdunck/python-unicodecsv/issues/19
11298 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
11299 "archive/" version ".tar.gz"))
11300 (file-name (string-append name "-" version ".tar.gz"))
11301 (sha256
11302 (base32
11303 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
11304 (build-system python-build-system)
11305 (arguments
11306 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
11307 #:python ,python-2))
11308 (native-inputs
11309 `(("python2-unittest2" ,python2-unittest2)))
11310 (home-page "https://github.com/jdunck/python-unicodecsv")
11311 (synopsis "Unicode CSV module for Python 2")
11312 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
11313 module, adding support for Unicode strings.")
11314 (license license:bsd-2)))
11315
11316 (define-public python-rarfile
11317 (package
11318 (name "python-rarfile")
11319 (version "2.8")
11320 (source (origin
11321 (method url-fetch)
11322 (uri (pypi-uri "rarfile" version))
11323 (sha256
11324 (base32
11325 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
11326 (build-system python-build-system)
11327 (arguments
11328 '(#:phases
11329 (modify-phases %standard-phases
11330 (replace 'check
11331 ;; Many tests fail, but the installation proceeds.
11332 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
11333 (native-inputs
11334 `(("which" ,which))) ; required for tests
11335 (propagated-inputs
11336 `(("libarchive" ,libarchive)))
11337 (home-page "https://github.com/markokr/rarfile")
11338 (synopsis "RAR archive reader for Python")
11339 (description "This is Python module for RAR archive reading. The interface
11340 is made as zipfile like as possible.")
11341 (license license:isc)))
11342
11343 (define-public python2-rarfile
11344 (package-with-python2 python-rarfile))
11345
11346 (define-public python-magic
11347 (package
11348 (name "python-magic")
11349 (version "0.4.3")
11350 (source
11351 (origin
11352 (method url-fetch)
11353 (uri (string-append "https://github.com/ahupp/python-magic/archive/"
11354 version ".tar.gz"))
11355 (sha256
11356 (base32
11357 "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
11358 (file-name (string-append name "-" version "-checkout"))))
11359 (build-system python-build-system)
11360 (arguments
11361 ;; The tests are unreliable, so don't run them. The tests fail
11362 ;; under Python3 because they were written for Python2 and
11363 ;; contain import statements that do not work in Python3. One of
11364 ;; the tests fails under Python2 because its assertions are
11365 ;; overly stringent; it relies on comparing output strings which
11366 ;; are brittle and can change depending on the version of
11367 ;; libmagic being used and the system on which the test is
11368 ;; running. In my case, under GuixSD 0.10.0, only one test
11369 ;; failed, and it seems to have failed only because the version
11370 ;; of libmagic that is packaged in Guix outputs a slightly
11371 ;; different (but not wrong) string than the one that the test
11372 ;; expected.
11373 '(#:tests? #f
11374 #:phases (modify-phases %standard-phases
11375 ;; Replace a specific method call with a hard-coded
11376 ;; path to the necessary libmagic.so file in the
11377 ;; store. If we don't do this, then the method call
11378 ;; will fail to find the libmagic.so file, which in
11379 ;; turn will cause any application using
11380 ;; python-magic to fail.
11381 (add-before 'build 'hard-code-path-to-libmagic
11382 (lambda* (#:key inputs #:allow-other-keys)
11383 (let ((file (assoc-ref inputs "file")))
11384 (substitute* "magic.py"
11385 (("ctypes.util.find_library\\('magic'\\)")
11386 (string-append "'" file "/lib/libmagic.so'")))
11387 #t)))
11388 (add-before 'install 'disable-egg-compression
11389 (lambda _
11390 (let ((port (open-file "setup.cfg" "a")))
11391 (display "\n[easy_install]\nzip_ok = 0\n"
11392 port)
11393 (close-port port)
11394 #t))))))
11395 (inputs
11396 ;; python-magic needs to be able to find libmagic.so.
11397 `(("file" ,file)))
11398 (home-page "https://github.com/ahupp/python-magic")
11399 (synopsis "File type identification using libmagic")
11400 (description
11401 "This module uses ctypes to access the libmagic file type
11402 identification library. It makes use of the local magic database and
11403 supports both textual and MIME-type output. Note that this module and
11404 the python-file module both provide a \"magic.py\" file; these two
11405 modules, which are different and were developed separately, both serve
11406 the same purpose: to provide Python bindings for libmagic.")
11407 (license license:expat)))
11408
11409 (define-public python2-magic
11410 (package-with-python2 python-magic))
11411
11412 (define-public python2-s3cmd
11413 (package
11414 (name "python2-s3cmd")
11415 (version "1.6.1")
11416 (source
11417 (origin
11418 (method url-fetch)
11419 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
11420 "s3cmd-" version ".tar.gz"))
11421 (sha256
11422 (base32
11423 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
11424 (build-system python-build-system)
11425 (arguments
11426 ;; s3cmd is written for python2 only and contains no tests.
11427 `(#:python ,python-2
11428 #:tests? #f))
11429 (propagated-inputs
11430 `(("python2-dateutil" ,python2-dateutil)
11431 ;; The python-file package also provides a magic.py module.
11432 ;; This is an unfortunate state of affairs; however, s3cmd
11433 ;; fails to install if it cannot find specifically the
11434 ;; python-magic package. Thus we include it, instead of using
11435 ;; python-file. Ironically, s3cmd sometimes works better
11436 ;; without libmagic bindings at all:
11437 ;; https://github.com/s3tools/s3cmd/issues/198
11438 ("python2-magic" ,python2-magic)))
11439 (home-page "http://s3tools.org/s3cmd")
11440 (synopsis "Command line tool for S3-compatible storage services")
11441 (description
11442 "S3cmd is a command line tool for uploading, retrieving and managing data
11443 in storage services that are compatible with the Amazon Simple Storage
11444 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
11445 GnuPG encryption, and more. It also supports management of Amazon's
11446 CloudFront content delivery network.")
11447 (license license:gpl2+)))
11448
11449 (define-public python-pkgconfig
11450 (package
11451 (name "python-pkgconfig")
11452 (version "1.1.0")
11453 (source
11454 (origin
11455 (method url-fetch)
11456 (uri (pypi-uri "pkgconfig" version))
11457 (sha256
11458 (base32
11459 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
11460 (build-system python-build-system)
11461 (native-inputs
11462 `(("python-nose" ,python-nose)))
11463 (inputs
11464 `(("pkg-config" ,pkg-config)))
11465 (arguments
11466 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
11467 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
11468 #:tests? #f
11469 ;; Hard-code the path to pkg-config.
11470 #:phases
11471 (modify-phases %standard-phases
11472 (add-before
11473 'build 'patch
11474 (lambda _
11475 (substitute* "pkgconfig/pkgconfig.py"
11476 (("cmd = 'pkg-config")
11477 (string-append "cmd = '" (which "pkg-config"))))
11478 #t)))))
11479 (home-page "https://github.com/matze/pkgconfig")
11480 (synopsis "Python interface for pkg-config")
11481 (description "This module provides a Python interface to pkg-config. It
11482 can be used to find all pkg-config packages, check if a package exists,
11483 check if a package meets certain version requirements, query CFLAGS and
11484 LDFLAGS and parse the output to build extensions with setup.py.")
11485 (license license:expat)))
11486
11487 (define-public python2-pkgconfig
11488 (package-with-python2 python-pkgconfig))
11489
11490 (define-public python-bz2file
11491 (package
11492 (name "python-bz2file")
11493 (version "0.98")
11494 (source
11495 (origin
11496 (method url-fetch)
11497 (uri (pypi-uri "bz2file" version))
11498 (sha256
11499 (base32
11500 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
11501 (build-system python-build-system)
11502 (arguments
11503 `(#:tests? #f)) ; Tests use deprecated python modules.
11504 (home-page "https://github.com/nvawda/bz2file")
11505 (synopsis "Read and write bzip2-compressed files")
11506 (description
11507 "Bz2file is a Python library for reading and writing bzip2-compressed
11508 files. It contains a drop-in replacement for the I/O interface in the
11509 standard library's @code{bz2} module, including features from the latest
11510 development version of CPython that are not available in older releases.")
11511 (license license:asl2.0)
11512 (properties `((python2-variant . ,(delay python2-bz2file))))))
11513
11514 (define-public python2-bz2file
11515 (let ((base (package-with-python2
11516 (strip-python2-variant python-bz2file))))
11517 (package
11518 (inherit base)
11519 (arguments
11520 `(#:python ,python-2
11521 #:phases
11522 (modify-phases %standard-phases
11523 ;; 'python setup.py test' does not work as of 0.98.
11524 ;; There is only the one test file, so we run it directly.
11525 (replace 'check
11526 (lambda _ (zero? (system* "python"
11527 "test_bz2file.py"))))))))))
11528
11529 (define-public python-future
11530 (package
11531 (name "python-future")
11532 (version "0.16.0")
11533 (source
11534 (origin
11535 (method url-fetch)
11536 (uri (pypi-uri "future" version))
11537 (sha256
11538 (base32
11539 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
11540 (build-system python-build-system)
11541 ;; Many tests connect to the network or are otherwise flawed.
11542 ;; https://github.com/PythonCharmers/python-future/issues/210
11543 (arguments
11544 `(#:tests? #f))
11545 (home-page "http://python-future.org")
11546 (synopsis "Single-source support for Python 3 and 2")
11547 (description
11548 "@code{python-future} is the missing compatibility layer between Python 2 and
11549 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
11550 to support both Python 2 and Python 3 with minimal overhead.")
11551 (license license:expat)))
11552
11553 (define-public python2-future
11554 (package-with-python2 python-future))
11555
11556 (define-public python-cysignals
11557 (package
11558 (name "python-cysignals")
11559 (version "1.1.0")
11560 (source
11561 (origin
11562 (method url-fetch)
11563 (uri (pypi-uri "cysignals" version ".tar.bz2"))
11564 (sha256
11565 (base32
11566 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
11567 (build-system python-build-system)
11568 (native-inputs
11569 `(("python-cython" ,python-cython)
11570 ("python-sphinx" ,python-sphinx)))
11571 (inputs
11572 `(("pari-gp" ,pari-gp)))
11573 (arguments
11574 `(#:modules ((guix build python-build-system)
11575 ((guix build gnu-build-system) #:prefix gnu:)
11576 (guix build utils))
11577 ;; FIXME: Tests are executed after installation and currently fail
11578 ;; when not installing into standard locations; the author is working
11579 ;; on a fix.
11580 #:tests? #f
11581 #:phases
11582 (modify-phases %standard-phases
11583 (add-before
11584 'build 'configure
11585 (assoc-ref gnu:%standard-phases 'configure)))))
11586 (home-page
11587 "https://github.com/sagemath/cysignals")
11588 (synopsis
11589 "Handling of interrupts and signals for Cython")
11590 (description
11591 "The cysignals package provides mechanisms to handle interrupts (and
11592 other signals and errors) in Cython code, using two related approaches,
11593 for mixed Cython/Python code or external C libraries and pure Cython code,
11594 respectively.")
11595 (license license:lgpl3+)))
11596
11597 (define-public python2-cysignals
11598 (package-with-python2 python-cysignals))
11599
11600 (define-public python2-shedskin
11601 (package
11602 (name "python2-shedskin")
11603 (version "0.9.4")
11604 (source
11605 (origin
11606 (method url-fetch)
11607 (uri (string-append "https://github.com/shedskin/shedskin/"
11608 "releases/download/v" version
11609 "/shedskin-" version ".tgz"))
11610 (sha256
11611 (base32
11612 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
11613 (build-system python-build-system)
11614 (arguments
11615 `(#:python ,python-2
11616 #:phases (modify-phases %standard-phases
11617 (add-after 'unpack 'fix-resulting-include-libs
11618 (lambda* (#:key inputs #:allow-other-keys)
11619 (let ((libgc (assoc-ref inputs "libgc"))
11620 (pcre (assoc-ref inputs "pcre")))
11621 (substitute* "shedskin/makefile.py"
11622 (("variable == 'CCFLAGS':[ ]*")
11623 (string-append "variable == 'CCFLAGS':\n"
11624 " line += ' -I " pcre "/include"
11625 " -I " libgc "/include'"))
11626 (("variable == 'LFLAGS':[ ]*")
11627 (string-append "variable == 'LFLAGS':\n"
11628 " line += ' -L" pcre "/lib"
11629 " -L " libgc "/lib'")))
11630 #t))))))
11631 (inputs `(("pcre" ,pcre)
11632 ("libgc" ,libgc)))
11633 (home-page "https://shedskin.github.io/")
11634 (synopsis "Experimental Python-2 to C++ Compiler")
11635 (description (string-append "This is an experimental compiler for a subset of
11636 Python. It generates C++ code and a Makefile."))
11637 (license (list license:gpl3 license:bsd-3 license:expat))))
11638
11639 (define-public python2-rope
11640 (package
11641 (name "python2-rope")
11642 (version "0.10.3")
11643 (source
11644 (origin
11645 (method url-fetch)
11646 (uri (pypi-uri "rope" version))
11647 (sha256
11648 (base32
11649 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
11650 (arguments
11651 ;; Rope is currently python-2 only.
11652 ;; https://github.com/python-rope/rope/issues/57
11653 `(#:python ,python-2))
11654 (build-system python-build-system)
11655 (native-inputs
11656 `(("python2-unittest2" ,python2-unittest2)))
11657 (home-page "https://github.com/python-rope/rope")
11658 (synopsis "Refactoring library for Python")
11659 (description "Rope is a refactoring library for Python. It facilitates
11660 the renaming, moving and extracting of attributes, functions, modules, fields
11661 and parameters in Python 2 source code. These refactorings can also be applied
11662 to occurrences in strings and comments.")
11663 (license license:gpl2)))
11664
11665 (define-public python-py3status
11666 (package
11667 (name "python-py3status")
11668 (version "3.1")
11669 (source
11670 (origin
11671 (method url-fetch)
11672 (uri (pypi-uri "py3status" version))
11673 (sha256
11674 (base32
11675 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
11676 (build-system python-build-system)
11677 (inputs
11678 `(("file" ,file)))
11679 (arguments
11680 '(#:phases
11681 (modify-phases %standard-phases
11682 ;; 'file' is used for detection of configuration file encoding
11683 ;; let's make link the dependency to particular input
11684 (add-before 'build 'patch-file-path
11685 (lambda* (#:key inputs #:allow-other-keys)
11686 (let ((file-path (assoc-ref inputs "file")))
11687 (substitute* "py3status/parse_config.py"
11688 (("check_output\\(\\['file'")
11689 (string-append "check_output(['" file-path "/bin/file'")))
11690 #t))))
11691 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
11692 (home-page "https://github.com/ultrabug/py3status")
11693 (synopsis "Extensible i3status wrapper written in Python")
11694 (description "py3status is an i3status wrapper which extends i3status
11695 functionality in a modular way, allowing you to extend your panel with your
11696 own code, responding to click events and updating clock every second.")
11697 (license license:bsd-3)))
11698
11699 (define-public python-tblib
11700 (package
11701 (name "python-tblib")
11702 (version "1.3.0")
11703 (source (origin
11704 (method url-fetch)
11705 (uri (pypi-uri "tblib" version))
11706 (sha256 (base32
11707 "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
11708 (build-system python-build-system)
11709 (arguments
11710 `(#:phases
11711 (modify-phases %standard-phases
11712 (replace 'check
11713 (lambda _
11714 ;; Upstream runs tests after installation and the package itself
11715 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
11716 ;; found.
11717 (setenv "PYTHONPATH"
11718 (string-append (getcwd) "/build/lib:"
11719 (getenv "PYTHONPATH")))
11720 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
11721 (native-inputs
11722 `(("python-pytest" ,python-pytest)
11723 ("python-six" ,python-six)))
11724 (home-page "https://github.com/ionelmc/python-tblib")
11725 (synopsis "Traceback serialization library")
11726 (description
11727 "Traceback serialization allows you to:
11728
11729 @enumerate
11730 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
11731 different processes. This allows better error handling when running code over
11732 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
11733
11734 @item Parse traceback strings and raise with the parsed tracebacks.
11735 @end enumerate\n")
11736 (license license:bsd-3)))
11737
11738 (define-public python2-tblib
11739 (package-with-python2 python-tblib))
11740
11741 (define-public python-sqlparse
11742 (package
11743 (name "python-sqlparse")
11744 (version "0.1.19")
11745 (source (origin
11746 (method url-fetch)
11747 (uri (pypi-uri "sqlparse" version))
11748 (sha256
11749 (base32
11750 "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
11751 (build-system python-build-system)
11752 (arguments
11753 `(#:phases
11754 (modify-phases %standard-phases
11755 (replace 'check
11756 (lambda* _
11757 ;; setup.py-integrated 2to3 only affects the build files, but
11758 ;; py.test is using the source files. So we need to convert them
11759 ;; manually.
11760 (when (zero? (system* "python3"))
11761 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests"))
11762 (zero? (system* "py.test")))))))
11763 (native-inputs
11764 `(("python-pytest" ,python-pytest)))
11765 (home-page "https://github.com/andialbrecht/sqlparse")
11766 (synopsis "Non-validating SQL parser")
11767 (description "Sqlparse is a non-validating SQL parser for Python. It
11768 provides support for parsing, splitting and formatting SQL statements.")
11769 (license license:bsd-3)))
11770
11771 (define-public python2-sqlparse
11772 (package-with-python2 python-sqlparse))
11773
11774 (define-public python-greenlet
11775 (package
11776 (name "python-greenlet")
11777 (version "0.4.11")
11778 (source (origin
11779 (method url-fetch)
11780 (uri (pypi-uri "greenlet" version))
11781 (sha256
11782 (base32
11783 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
11784 (build-system python-build-system)
11785 (home-page "https://greenlet.readthedocs.io/")
11786 (synopsis "Lightweight in-process concurrent programming")
11787 (description
11788 "Greenlet package is a spin-off of Stackless, a version of CPython
11789 that supports micro-threads called \"tasklets\". Tasklets run
11790 pseudo-concurrently (typically in a single or a few OS-level threads) and
11791 are synchronized with data exchanges on \"channels\".")
11792 (license (list license:psfl license:expat))))
11793
11794 (define-public python2-greenlet
11795 (package-with-python2 python-greenlet))
11796
11797 (define-public python-gevent
11798 (package
11799 (name "python-gevent")
11800 (version "1.1.1")
11801 (source (origin
11802 (method url-fetch)
11803 (uri (pypi-uri "gevent" version))
11804 (sha256
11805 (base32
11806 "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf"))
11807 (modules '((guix build utils)))
11808 (snippet
11809 '(begin
11810 ;; unbunding libev and c-ares
11811 (for-each delete-file-recursively '("libev" "c-ares"))
11812 ;; fixing testsuite
11813 (call-with-output-file "greentest/__init__.py" noop)
11814 (substitute* "greentest/testrunner.py"
11815 (("import util") "from . import util")
11816 (("from util import log") "from .util import log"))))))
11817 (build-system python-build-system)
11818 (propagated-inputs
11819 `(("python-greenlet" ,python-greenlet)))
11820 (native-inputs
11821 `(("python-six" ,python-six)))
11822 (inputs
11823 `(("c-ares" ,c-ares)
11824 ("libev" ,libev)))
11825 (home-page "http://www.gevent.org/")
11826 (synopsis "Coroutine-based network library")
11827 (description
11828 "gevent is a coroutine-based Python networking library that uses greenlet
11829 to provide a high-level synchronous API on top of the libev event loop.")
11830 (license license:expat)))
11831
11832 (define-public python2-gevent
11833 (package-with-python2 python-gevent))
11834
11835 (define-public python-geventhttpclient
11836 (package
11837 (name "python-geventhttpclient")
11838 (version "1.3.1")
11839 (source (origin
11840 (method url-fetch)
11841 (uri (pypi-uri "geventhttpclient" version))
11842 (sha256
11843 (base32
11844 "07d0q3wzmml75227r6y6mrl5a0zpf4v9gj0ni5rhbyzmaj4az1xx"))
11845 (modules '((guix build utils)))
11846 (snippet
11847 '(begin
11848 ;; Delete pre-compiled files.
11849 (for-each delete-file (find-files "src/geventhttpclient"
11850 ".*\\.pyc"))
11851 #t))))
11852 (build-system python-build-system)
11853 (arguments
11854 '(#:phases
11855 (modify-phases %standard-phases
11856 (add-after 'unpack 'delete-network-tests
11857 (lambda _
11858 (delete-file "src/geventhttpclient/tests/test_client.py")
11859 #t))
11860 (delete 'check)
11861 (add-after 'install 'check
11862 (lambda* (#:key inputs outputs #:allow-other-keys)
11863 (add-installed-pythonpath inputs outputs)
11864 (zero? (system* "py.test" "src/geventhttpclient/tests" "-v")))))))
11865 (native-inputs
11866 `(("python-pytest" ,python-pytest)))
11867 (propagated-inputs
11868 `(("python-certifi" ,python-certifi)
11869 ("python-gevent" ,python-gevent)
11870 ("python-six" ,python-six)))
11871 (home-page "https://github.com/gwik/geventhttpclient")
11872 (synopsis "HTTP client library for gevent")
11873 (description "@code{python-geventhttpclient} is a high performance,
11874 concurrent HTTP client library for python using @code{gevent}.")
11875 (license license:expat)))
11876
11877 (define-public python2-geventhttpclient
11878 (package-with-python2 python-geventhttpclient))
11879
11880 (define-public python-fastimport
11881 (package
11882 (name "python-fastimport")
11883 (version "0.9.6")
11884 (source
11885 (origin
11886 (method url-fetch)
11887 (uri (pypi-uri "fastimport" version))
11888 (sha256
11889 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
11890 (build-system python-build-system)
11891 (home-page "https://github.com/jelmer/python-fastimport")
11892 (synopsis "VCS fastimport parser and generator in Python")
11893 (description "This package provides a parser for and generator of the Git
11894 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
11895 format.")
11896 (license license:gpl2+)))
11897
11898 (define-public python2-fastimport
11899 (package-with-python2 python-fastimport))
11900
11901 (define-public python-twisted
11902 (package
11903 (name "python-twisted")
11904 (version "17.1.0")
11905 (source (origin
11906 (method url-fetch)
11907 (uri (pypi-uri "Twisted" version ".tar.bz2"))
11908 (sha256
11909 (base32
11910 "1p245mg15hkxp7hy5cyq2fgvlgjkb4cg0gwkwd148nzy1bbi3wnv"))))
11911 (build-system python-build-system)
11912 (arguments
11913 '(#:tests? #f)) ; FIXME: Some tests are failing.
11914 ;; #:phases
11915 ;; (modify-phases %standard-phases
11916 ;; (replace 'check
11917 ;; (lambda _
11918 ;; (zero? (system* "./bin/trial" "twisted")))))
11919 (propagated-inputs
11920 `(("python-zope-interface" ,python-zope-interface)
11921 ("python-incremental" ,python-incremental)
11922 ("python-constantly" ,python-constantly)
11923 ("python-automat" ,python-automat)))
11924 (home-page "https://twistedmatrix.com/")
11925 (synopsis "Asynchronous networking framework written in Python")
11926 (description
11927 "Twisted is an extensible framework for Python programming, with special
11928 focus on event-based network programming and multiprotocol integration.")
11929 (license license:expat)))
11930
11931 (define-public python2-twisted
11932 (package-with-python2 python-twisted))
11933
11934 (define-public python-pika
11935 (package
11936 (name "python-pika")
11937 (version "0.10.0")
11938 (source
11939 (origin
11940 (method url-fetch)
11941 (uri (pypi-uri "pika" version))
11942 (sha256
11943 (base32
11944 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
11945 (build-system python-build-system)
11946 (native-inputs
11947 `(("python-pyev" ,python-pyev)
11948 ("python-tornado" ,python-tornado)
11949 ("python-twisted" ,python-twisted)))
11950 (home-page "https://pika.readthedocs.org")
11951 (synopsis "Pure Python AMQP Client Library")
11952 (description
11953 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
11954 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
11955 network support library.")
11956 (license license:bsd-3)))
11957
11958 (define-public python2-pika
11959 (package-with-python2 python-pika))
11960
11961 (define-public python-ply
11962 (package
11963 (name "python-ply")
11964 (version "3.9")
11965 (source
11966 (origin
11967 (method url-fetch)
11968 (uri (pypi-uri "ply" version))
11969 (sha256
11970 (base32
11971 "0gpl0yli3w03ipyqfrp3w5nf0iawhsq65anf5wwm2wf5p502jzhd"))))
11972 (build-system python-build-system)
11973 (home-page "http://www.dabeaz.com/ply/")
11974 (synopsis "Python Lex & Yacc")
11975 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
11976 It uses LR parsing and does extensive error checking.")
11977 (license license:bsd-3)))
11978
11979 (define-public python2-ply
11980 (package-with-python2 python-ply))
11981
11982 (define-public python-tabulate
11983 (package
11984 (name "python-tabulate")
11985 (version "0.7.7")
11986 (source (origin
11987 (method url-fetch)
11988 (uri (pypi-uri "tabulate" version))
11989 (sha256
11990 (base32
11991 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
11992 (build-system python-build-system)
11993 (arguments
11994 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
11995 ;; and the latest release is not tagged in the upstream repository.
11996 '(#:tests? #f))
11997 (home-page "https://bitbucket.org/astanin/python-tabulate")
11998 (synopsis "Pretty-print tabular data")
11999 (description
12000 "Tabulate is a library and command-line utility to pretty-print tabular
12001 data in Python.")
12002 (license license:expat)))
12003
12004 (define-public python2-tabulate
12005 (package-with-python2 python-tabulate))
12006
12007 (define-public python-kazoo
12008 (package
12009 (name "python-kazoo")
12010 (version "2.2.1")
12011 (source
12012 (origin
12013 (method url-fetch)
12014 (uri (pypi-uri "kazoo" version))
12015 (sha256
12016 (base32
12017 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
12018 (build-system python-build-system)
12019 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
12020 (propagated-inputs
12021 `(("python-six" ,python-six)))
12022 (home-page "https://kazoo.readthedocs.org")
12023 (synopsis "High-level Zookeeper client library")
12024 (description
12025 "Kazoo is a Python client library for the Apache Zookeeper distributed
12026 application service. It is designed to be easy to use and to avoid common
12027 programming errors.")
12028 (license license:asl2.0)))
12029
12030 (define-public python2-kazoo
12031 (package-with-python2 python-kazoo))
12032
12033 (define-public python-pykafka
12034 (package
12035 (name "python-pykafka")
12036 (version "2.4.0")
12037 (source (origin
12038 (method url-fetch)
12039 (uri (string-append
12040 "https://pypi.python.org/packages/8b/3e/"
12041 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
12042 "pykafka-" version ".tar.gz"))
12043 (sha256
12044 (base32
12045 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
12046 (build-system python-build-system)
12047 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
12048 (propagated-inputs
12049 `(("python-gevent" ,python-gevent)
12050 ("python-kazoo" ,python-kazoo)
12051 ("python-tabulate" ,python-tabulate)))
12052 (inputs
12053 `(("librdkafka" ,librdkafka)))
12054 (home-page "https://pykafka.readthedocs.io/")
12055 (synopsis "Apache Kafka client for Python")
12056 (description
12057 "PyKafka is a client for the Apache Kafka distributed messaging system.
12058 It includes Python implementations of Kafka producers and consumers, which
12059 are optionally backed by a C extension built on librdkafka.")
12060 (license license:asl2.0)))
12061
12062 (define-public python2-pykafka
12063 (package-with-python2 python-pykafka))
12064
12065 (define-public python-wcwidth
12066 (package
12067 (name "python-wcwidth")
12068 (version "0.1.7")
12069 (source
12070 (origin
12071 (method url-fetch)
12072 (uri (pypi-uri "wcwidth" version))
12073 (sha256
12074 (base32
12075 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
12076 (build-system python-build-system)
12077 (home-page "https://github.com/jquast/wcwidth")
12078 (synopsis "Measure number of terminal column cells of wide-character codes")
12079 (description "Wcwidth measures the number of terminal column cells of
12080 wide-character codes. It is useful for those implementing a terminal emulator,
12081 or programs that carefully produce output to be interpreted by one. It is a
12082 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
12083 specified in POSIX.1-2001 and POSIX.1-2008.")
12084 (license license:expat)))
12085
12086 (define-public python2-wcwidth
12087 (package-with-python2 python-wcwidth))
12088
12089 (define-public python2-jsonrpclib
12090 (package
12091 (name "python2-jsonrpclib")
12092 (version "0.1.7")
12093 (source (origin
12094 (method url-fetch)
12095 (uri (string-append
12096 "https://pypi.python.org/packages/source/j/jsonrpclib/"
12097 "jsonrpclib-" version ".tar.gz"))
12098 (sha256
12099 (base32
12100 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
12101 (build-system python-build-system)
12102 (arguments
12103 `(#:tests? #f
12104 #:python ,python-2))
12105 (home-page "https://github.com/joshmarshall/jsonrpclib/")
12106 (synopsis "Implementation of JSON-RPC specification for Python")
12107 (description
12108 "This library is an implementation of the JSON-RPC specification.
12109 It supports both the original 1.0 specification, as well as the
12110 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
12111 etc.")
12112 (license license:asl2.0)))
12113
12114 (define-public python-chai
12115 (package
12116 (name "python-chai")
12117 (version "1.1.1")
12118 (source (origin
12119 (method url-fetch)
12120 (uri (pypi-uri "chai" version))
12121 (sha256
12122 (base32
12123 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
12124 (build-system python-build-system)
12125 (home-page "https://github.com/agoragames/chai")
12126 (synopsis "Mocking framework for Python")
12127 (description
12128 "Chai provides an api for mocking, stubbing and spying your python
12129 objects, patterned after the Mocha library for Ruby.")
12130 (license license:bsd-3)))
12131
12132 (define-public python2-chai
12133 (package-with-python2 python-chai))
12134
12135 (define-public python-arrow
12136 (package
12137 (name "python-arrow")
12138 (version "0.10.0")
12139 (source (origin
12140 (method url-fetch)
12141 (uri (pypi-uri "arrow" version))
12142 (sha256
12143 (base32
12144 "08n7q2l69hlainds1byd4lxhwrq7zsw7s640zkqc3bs5jkq0cnc0"))))
12145 (build-system python-build-system)
12146 (native-inputs
12147 `(;; For testing
12148 ("python-chai" ,python-chai)
12149 ("python-simplejson" ,python-simplejson)))
12150 (propagated-inputs
12151 `(("python-dateutil" ,python-dateutil)))
12152 (home-page "https://github.com/crsmithdev/arrow/")
12153 (synopsis "Dates and times for Python")
12154 (description
12155 "Arrow is a Python library to creating, manipulating, formatting and
12156 converting dates, times, and timestamps. It implements and updates the
12157 datetime type.")
12158 (license license:asl2.0)))
12159
12160 (define-public python2-arrow
12161 (package-with-python2 python-arrow))
12162
12163 (define-public python-inflection
12164 (package
12165 (name "python-inflection")
12166 (version "0.3.1")
12167 (source
12168 (origin (method url-fetch)
12169 (uri (pypi-uri "inflection" version))
12170 (sha256
12171 (base32
12172 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
12173 (build-system python-build-system)
12174 (native-inputs
12175 `(("python-pytest" ,python-pytest)))
12176 (home-page "https://github.com/jpvanhal/inflection")
12177 (synopsis "Python string transformation library")
12178 (description
12179 "Inflection is a string transformation library. It singularizes
12180 and pluralizes English words, and transforms strings from CamelCase to
12181 underscored string.")
12182 (license license:expat)))
12183
12184 (define-public python2-inflection
12185 (package-with-python2 python-inflection))
12186
12187 (define-public python-pylev
12188 (package
12189 (name "python-pylev")
12190 (version "1.3.0")
12191 (source (origin
12192 (method url-fetch)
12193 (uri (pypi-uri "pylev" version))
12194 (sha256
12195 (base32
12196 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
12197 (build-system python-build-system)
12198 (home-page "https://github.com/toastdriven/pylev")
12199 (synopsis "Levenshtein distance implementation in Python")
12200 (description "Pure Python Levenshtein implementation, based off the
12201 Wikipedia code samples at
12202 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
12203 (license license:bsd-3)))
12204
12205 (define-public python2-pylev
12206 (package-with-python2 python-pylev))
12207
12208 (define-public python-cleo
12209 (package
12210 (name "python-cleo")
12211 (version "0.6.1")
12212 (source (origin
12213 (method url-fetch)
12214 (uri (pypi-uri "cleo" version))
12215 (sha256
12216 (base32
12217 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
12218 (build-system python-build-system)
12219 (native-inputs
12220 `(;; For testing
12221 ("python-mock" ,python-mock)
12222 ("python-pytest-mock" ,python-pytest-mock)
12223 ("python-pytest" ,python-pytest)))
12224 (propagated-inputs
12225 `(("python-backpack" ,python-backpack)
12226 ("python-pastel" ,python-pastel)
12227 ("python-pylev" ,python-pylev)))
12228 (home-page "https://github.com/sdispater/cleo")
12229 (synopsis "Command-line arguments library for Python")
12230 (description
12231 "Cleo allows you to create command-line commands with signature in
12232 docstring and colored output.")
12233 (license license:expat)))
12234
12235 (define-public python2-cleo
12236 (package-with-python2 python-cleo))
12237
12238 (define-public python-lazy-object-proxy
12239 (package
12240 (name "python-lazy-object-proxy")
12241 (version "1.2.2")
12242 (source (origin
12243 (method url-fetch)
12244 (uri (pypi-uri "lazy-object-proxy" version))
12245 (sha256
12246 (base32
12247 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
12248 (build-system python-build-system)
12249 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
12250 (synopsis "Lazy object proxy for python")
12251 (description
12252 "Lazy object proxy is an object that wraps a callable but defers the call
12253 until the object is actually required, and caches the result of said call.")
12254 (license license:bsd-2)))
12255
12256 (define-public python2-lazy-object-proxy
12257 (package-with-python2 python-lazy-object-proxy))
12258
12259 (define-public python-dnspython
12260 (package
12261 (name "python-dnspython")
12262 (version "1.15.0")
12263 (source (origin
12264 (method url-fetch)
12265 (uri (string-append "http://www.dnspython.org/kits/"
12266 version "/dnspython-" version ".tar.gz"))
12267 (sha256
12268 (base32
12269 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
12270 (build-system python-build-system)
12271 (arguments '(#:tests? #f)) ; XXX: requires internet access
12272 (home-page "http://www.dnspython.org")
12273 (synopsis "DNS toolkit for Python")
12274 (description
12275 "dnspython is a DNS toolkit for Python. It supports almost all record
12276 types. It can be used for queries, zone transfers, and dynamic updates.
12277 It supports TSIG authenticated messages and EDNS0.")
12278 (license license:expat)))
12279
12280 (define-public python2-dnspython
12281 (package-with-python2 python-dnspython))
12282
12283 (define-public python-email-validator
12284 (package
12285 (name "python-email-validator")
12286 (version "1.0.2")
12287 (source
12288 (origin (method url-fetch)
12289 (uri (pypi-uri "email_validator" version))
12290 (sha256
12291 (base32
12292 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
12293 (build-system python-build-system)
12294 (arguments
12295 '(#:phases
12296 (modify-phases %standard-phases
12297 (add-before 'build 'use-dnspython
12298 (lambda _
12299 (substitute* "setup.py"
12300 (("dnspython3") "dnspython"))
12301 #t)))))
12302 (propagated-inputs
12303 `(("python-dnspython" ,python-dnspython)
12304 ("python-idna" ,python-idna)))
12305 (home-page "https://github.com/JoshData/python-email-validator")
12306 (synopsis "Email address validation library for Python")
12307 (description
12308 "This library validates email address syntax and deliverability.")
12309 (license license:cc0)))
12310
12311 (define-public python2-email-validator
12312 (package-with-python2 python-email-validator))
12313
12314 (define-public python-ukpostcodeparser
12315 (package
12316 (name "python-ukpostcodeparser")
12317 (version "1.0.3")
12318 (source (origin
12319 (method url-fetch)
12320 (uri (pypi-uri "UkPostcodeParser" version))
12321 (sha256
12322 (base32
12323 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
12324 (build-system python-build-system)
12325 (home-page "https://github.com/hamstah/ukpostcodeparser")
12326 (synopsis "UK Postcode parser for Python")
12327 (description
12328 "This library provides the @code{parse_uk_postcode} function for
12329 parsing UK postcodes.")
12330 (license license:expat)))
12331
12332 (define-public python2-ukpostcodeparser
12333 (package-with-python2 python-ukpostcodeparser))
12334
12335 (define-public python-faker
12336 (package
12337 (name "python-faker")
12338 (version "0.7.9")
12339 (source (origin
12340 (method url-fetch)
12341 (uri (pypi-uri "Faker" version))
12342 (sha256
12343 (base32
12344 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
12345 (patches
12346 (search-patches "python-faker-fix-build-32bit.patch"))
12347 (modules '((guix build utils)))
12348 (snippet
12349 '(begin
12350 (for-each delete-file (find-files "." "\\.pyc$"))
12351 #t))))
12352 (build-system python-build-system)
12353 (arguments
12354 '(#:phases
12355 (modify-phases %standard-phases
12356 (replace 'check
12357 (lambda _
12358 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
12359 (native-inputs
12360 `(;; For testing
12361 ("python-email-validator" ,python-email-validator)
12362 ("python-mock" ,python-mock)
12363 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
12364 (propagated-inputs
12365 `(("python-dateutil" ,python-dateutil)
12366 ("python-six" ,python-six)))
12367 (home-page "https://github.com/joke2k/faker")
12368 (synopsis "Python package that generates fake data")
12369 (description
12370 "Faker is a Python package that generates fake data such as names,
12371 addresses, and phone numbers.")
12372 (license license:expat)
12373 (properties `((python2-variant . ,(delay python2-faker))))))
12374
12375 (define-public python2-faker
12376 (let ((base (package-with-python2 (strip-python2-variant
12377 python-faker))))
12378 (package
12379 (inherit base)
12380 (propagated-inputs
12381 `(("python2-ipaddress" ,python2-ipaddress)
12382 ,@(package-propagated-inputs base))))))
12383
12384 (define-public python-pyaml
12385 (package
12386 (name "python-pyaml")
12387 (version "17.7.2")
12388 (source (origin
12389 (method url-fetch)
12390 (uri (pypi-uri "pyaml" version))
12391 (sha256
12392 (base32
12393 "132grrw0ajq4nrappi3ldbkb952k7yn9b6c7csi2rmvzm1g6ppp2"))))
12394 (build-system python-build-system)
12395 (native-inputs
12396 `(("python-unidecode" ,python-unidecode)))
12397 (propagated-inputs
12398 `(("python-pyyaml" ,python-pyyaml)))
12399 (home-page "https://github.com/mk-fg/pretty-yaml")
12400 (synopsis "YAML pretty-print library for Python")
12401 (description
12402 "pyaml is a PyYAML based python module to produce pretty and readable
12403 YAML-serialized data.")
12404 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
12405
12406 (define-public python2-pyaml
12407 (package-with-python2 python-pyaml))
12408
12409 (define-public python-backpack
12410 (package
12411 (name "python-backpack")
12412 (version "0.1")
12413 (source
12414 (origin
12415 (method url-fetch)
12416 (uri (pypi-uri "backpack" version))
12417 (sha256
12418 (base32
12419 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
12420 (build-system python-build-system)
12421 (native-inputs
12422 `(("python-pytest" ,python-pytest)
12423 ("python-nose" ,python-nose)))
12424 (propagated-inputs
12425 `(("python-simplejson" ,python-simplejson)))
12426 (home-page "https://github.com/sdispater/backpack")
12427 (synopsis "Utilities for working with Python collections")
12428 (description "Backpack provides some useful utilities for working with
12429 collections of data.")
12430 (license license:expat)))
12431
12432 (define-public python2-backpack
12433 (package-with-python2 python-backpack))
12434
12435 (define-public python-flexmock
12436 (package
12437 (name "python-flexmock")
12438 (version "0.10.2")
12439 (source (origin
12440 (method url-fetch)
12441 (uri (pypi-uri "flexmock" version))
12442 (sha256
12443 (base32
12444 "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
12445 (build-system python-build-system)
12446 (home-page "https://flexmock.readthedocs.org")
12447 (synopsis "Testing library for Python")
12448 (description
12449 "flexmock is a testing library for Python that makes it easy to create
12450 mocks, stubs and fakes.")
12451 (license license:bsd-3)))
12452
12453 (define-public python2-flexmock
12454 (package-with-python2 python-flexmock))
12455
12456 (define-public python-prompt-toolkit
12457 (package
12458 (name "python-prompt-toolkit")
12459 (version "1.0.9")
12460 (source
12461 (origin
12462 (method url-fetch)
12463 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
12464 (sha256
12465 (base32
12466 "172r15k9kwdw2lnajvpz1632dd16nqz1kcal1p0lq5ywdarj6rfd"))))
12467 (build-system python-build-system)
12468 (arguments
12469 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
12470 (propagated-inputs
12471 `(("python-wcwidth" ,python-wcwidth)
12472 ("python-six" ,python-six)
12473 ("python-pygments" ,python-pygments)))
12474 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
12475 (synopsis "Library for building command line interfaces in Python")
12476 (description
12477 "Prompt-Toolkit is a library for building interactive command line
12478 interfaces in Python. It's like GNU Readline but it also features syntax
12479 highlighting while typing, out-of-the-box multi-line input editing, advanced
12480 code completion, incremental search, support for Chinese double-width
12481 characters, mouse support, and auto suggestions.")
12482 (license license:bsd-3)))
12483
12484 (define-public python2-prompt-toolkit
12485 (package-with-python2 python-prompt-toolkit))
12486
12487 (define-public python-jedi
12488 (package
12489 (name "python-jedi")
12490 (version "0.9.0")
12491 (source
12492 (origin
12493 (method url-fetch)
12494 (uri (pypi-uri "jedi" version))
12495 (sha256
12496 (base32
12497 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
12498 (build-system python-build-system)
12499 (arguments
12500 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
12501 '(#:tests? #f))
12502 (native-inputs
12503 `(("python-pytest" ,python-pytest)))
12504 (home-page "https://github.com/davidhalter/jedi")
12505 (synopsis
12506 "Autocompletion for Python that can be used for text editors")
12507 (description
12508 "Jedi is an autocompletion tool for Python that can be used for text editors.")
12509 (license license:expat)))
12510
12511 (define-public python2-jedi
12512 (package-with-python2 python-jedi))
12513
12514 (define-public ptpython
12515 (package
12516 (name "ptpython")
12517 (version "0.34")
12518 (source (origin
12519 (method url-fetch)
12520 (uri (pypi-uri "ptpython" version))
12521 (sha256
12522 (base32
12523 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
12524 (build-system python-build-system)
12525 (arguments
12526 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
12527 (propagated-inputs
12528 `(("python-docopt" ,python-docopt)
12529 ("python-jedi" ,python-jedi)
12530 ("python-prompt-toolkit" ,python-prompt-toolkit)
12531 ("python-pygments" ,python-pygments)))
12532 (home-page "https://github.com/jonathanslenders/ptpython")
12533 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
12534 (description
12535 "ptpython is a Python read-eval-print loop with IDE-like features.
12536 It supports syntax highlighting, multiline editing, autocompletion, mouse,
12537 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
12538 etc.")
12539 (license license:bsd-3)
12540 (properties `((python2-variant . ,(delay ptpython-2))))))
12541
12542 (define-public ptpython-2
12543 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
12544 (package
12545 (inherit base)
12546 (name "ptpython2"))))
12547
12548 (define-public python-requests-oauthlib
12549 (package
12550 (name "python-requests-oauthlib")
12551 (version "0.6.2")
12552 (source
12553 (origin
12554 (method url-fetch)
12555 (uri (pypi-uri "requests-oauthlib" version))
12556 (sha256
12557 (base32
12558 "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
12559 (build-system python-build-system)
12560 (arguments
12561 `(#:phases
12562 (modify-phases %standard-phases
12563 ;; removes tests that require network access
12564 (add-before 'check 'pre-check
12565 (lambda _
12566 (delete-file "tests/test_core.py")
12567 #t)))))
12568 (native-inputs
12569 `(("python-requests-mock" ,python-requests-mock)
12570 ("python-mock" ,python-mock)))
12571 (propagated-inputs
12572 `(("python-oauthlib" ,python-oauthlib)
12573 ("python-requests" ,python-requests)))
12574 (home-page
12575 "https://github.com/requests/requests-oauthlib")
12576 (synopsis
12577 "OAuthlib authentication support for Requests")
12578 (description
12579 "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
12580 provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
12581 (license license:isc)))
12582
12583 (define-public python2-requests-oauthlib
12584 (package-with-python2 python-requests-oauthlib))
12585
12586 (define-public python-stem
12587 (package
12588 (name "python-stem")
12589 (version "1.5.4")
12590 (source
12591 (origin
12592 (method url-fetch)
12593 (uri (pypi-uri "stem" version))
12594 (sha256
12595 (base32
12596 "1j7pnblrn0yr6jmxvsq6y0ihmxmj5x50jl2n2606w67f6wq16j9n"))))
12597 (build-system python-build-system)
12598 (arguments
12599 `(#:phases
12600 (modify-phases %standard-phases
12601 (replace 'check
12602 (lambda _
12603 (zero? (system* "./run_tests.py" "--unit")))))))
12604 (native-inputs
12605 `(("python-mock" ,python-mock)
12606 ("python-pep8" ,python-pep8)
12607 ("python-pyflakes" ,python-pyflakes)))
12608 (home-page "https://stem.torproject.org/")
12609 (synopsis
12610 "Python controller library that allows applications to interact with Tor")
12611 (description
12612 "Stem is a Python controller library for Tor. With it you can use Tor's
12613 control protocol to script against the Tor process and read descriptor data
12614 relays publish about themselves.")
12615 (license license:lgpl3)))
12616
12617 (define-public python2-stem
12618 (package-with-python2 python-stem))
12619
12620 (define-public python-pyserial
12621 (package
12622 (name "python-pyserial")
12623 (version "3.1.1")
12624 (source
12625 (origin
12626 (method url-fetch)
12627 (uri (pypi-uri "pyserial" version))
12628 (sha256
12629 (base32
12630 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
12631 (build-system python-build-system)
12632 (arguments
12633 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
12634 ;; #:phases
12635 ;; (modify-phases %standard-phases
12636 ;; (replace 'check
12637 ;; (lambda _
12638 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
12639 (home-page
12640 "https://github.com/pyserial/pyserial")
12641 (synopsis "Python Serial Port Bindings")
12642 (description "@code{pyserial} provide serial port bindings for Python. It
12643 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
12644 and/or Xon/Xoff. The port is accessed in RAW mode.")
12645 (license license:bsd-3)))
12646
12647 (define-public python2-pyserial
12648 (package-with-python2 python-pyserial))
12649
12650 (define-public python-kivy
12651 (package
12652 (name "python-kivy")
12653 (version "1.9.1")
12654 (source
12655 (origin
12656 (method url-fetch)
12657 (uri (pypi-uri "kivy" version))
12658 (file-name (string-append name "-" version ".tar.gz"))
12659 (sha256
12660 (base32
12661 "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
12662 (build-system python-build-system)
12663 (arguments
12664 `(#:tests? #f ; Tests require many optional packages
12665 #:phases
12666 (modify-phases %standard-phases
12667 (replace 'build (lambda _ (zero? (system* "make" "force"))))
12668 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
12669 (lambda* (#:key inputs #:allow-other-keys)
12670 (setenv "KIVY_SDL2_PATH"
12671 (string-append (assoc-ref inputs "sdl-union")
12672 "/include/SDL2"))
12673 #t)))))
12674 (native-inputs
12675 `(("pkg-config" ,pkg-config)
12676 ("python-cython" ,python-cython)))
12677 (inputs
12678 `(("gstreamer" ,gstreamer)
12679 ("mesa" ,mesa)
12680 ("sdl-union"
12681 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
12682 (home-page "http://kivy.org")
12683 (synopsis
12684 "Multitouch application framework")
12685 (description
12686 "A software library for rapid development of
12687 hardware-accelerated multitouch applications.")
12688 (license license:expat)))
12689
12690 (define-public python2-kivy
12691 (package-with-python2 python-kivy))
12692
12693 (define-public python-kivy-next
12694 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
12695 (revision "1"))
12696 (package (inherit python-kivy)
12697 (name "python-kivy-next")
12698 (version (string-append "1.9.1-" revision "."
12699 (string-take commit 7)))
12700 (source
12701 (origin
12702 (method git-fetch)
12703 (uri (git-reference
12704 (url "https://github.com/kivy/kivy")
12705 (commit commit)))
12706 (file-name (string-append name "-" version "-checkout"))
12707 (sha256
12708 (base32
12709 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
12710
12711 (define-public python2-kivy-next
12712 (package-with-python2 python-kivy-next))
12713
12714 (define-public python-binaryornot
12715 (package
12716 (name "python-binaryornot")
12717 (version "0.4.0")
12718 (source (origin
12719 (method url-fetch)
12720 (uri (pypi-uri "binaryornot" version))
12721 (sha256
12722 (base32
12723 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
12724 (build-system python-build-system)
12725 (propagated-inputs
12726 `(("python-chardet" ,python-chardet)
12727 ("python-hypothesis" ,python-hypothesis)))
12728 (home-page "https://github.com/audreyr/binaryornot")
12729 (synopsis "Package to check if a file is binary or text")
12730 (description "Ultra-lightweight pure Python package to check if a file is
12731 binary or text.")
12732 (license license:bsd-3)
12733 (properties `((python2-variant . ,(delay python2-binaryornot))))))
12734
12735 (define-public python2-binaryornot
12736 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
12737 (package (inherit base)
12738 (propagated-inputs
12739 `(("python2-enum34" ,python2-enum34)
12740 ,@(package-propagated-inputs base))))))
12741
12742 (define-public python-nltk
12743 (package
12744 (name "python-nltk")
12745 (version "3.2.1")
12746 (source (origin
12747 (method url-fetch)
12748 (uri (pypi-uri "nltk" version))
12749 (sha256
12750 (base32
12751 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
12752 (build-system python-build-system)
12753 (arguments
12754 '(;; The tests require some extra resources to be downloaded.
12755 ;; TODO Try packaging these resources.
12756 #:tests? #f))
12757 (home-page "http://nltk.org/")
12758 (synopsis "Natural Language Toolkit")
12759 (description "It provides interfaces to over 50 corpora and lexical
12760 resources such as WordNet, along with a suite of text processing libraries
12761 for classification, tokenization, stemming, tagging, parsing, and semantic
12762 reasoning, wrappers for natural language processing libraries.")
12763 (license license:asl2.0)))
12764
12765 (define-public python2-nltk
12766 (package-with-python2 python-nltk))
12767
12768 (define-public python-pymongo
12769 (package
12770 (name "python-pymongo")
12771 (version "3.3.0")
12772 (source (origin
12773 (method url-fetch)
12774 (uri (pypi-uri "pymongo" version))
12775 (sha256
12776 (base32
12777 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
12778 (build-system python-build-system)
12779 (propagated-inputs
12780 `(("python-certifi" ,python-certifi)))
12781 (home-page "https://github.com/mongodb/mongo-python-driver")
12782 (synopsis "Python driver for MongoDB")
12783 (description "Python driver for MongoDB.")
12784 (license license:asl2.0)))
12785
12786 (define-public python2-pymongo
12787 (package-with-python2 python-pymongo))
12788
12789 (define-public python-sh
12790 (package
12791 (name "python-sh")
12792 (version "1.11")
12793 (source (origin
12794 (method url-fetch)
12795 (uri (pypi-uri "sh" version))
12796 (sha256
12797 (base32
12798 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
12799 (build-system python-build-system)
12800 (arguments
12801 `(#:tests? #f)) ; no tests
12802 (home-page "https://github.com/amoffat/sh")
12803 (synopsis "Python subprocess interface")
12804 (description "Abstracts process invocation by providing a function
12805 interface for programs.")
12806 (license license:expat)))
12807
12808 (define-public python2-sh
12809 (package-with-python2 python-sh))
12810
12811 (define-public python-consul
12812 (package
12813 (name "python-consul")
12814 (version "0.6.1")
12815 (source
12816 (origin
12817 (method url-fetch)
12818 (uri (pypi-uri "python-consul" version))
12819 (sha256
12820 (base32
12821 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
12822 (build-system python-build-system)
12823 (native-inputs
12824 `(("python-pytest" ,python-pytest)))
12825 (propagated-inputs
12826 `(("python-requests" ,python-requests)
12827 ("python-six" ,python-six)))
12828 (home-page "https://github.com/cablehead/python-consul")
12829 (synopsis "Python client for Consul")
12830 (description
12831 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
12832 discovery, monitoring and configuration.")
12833 (license license:expat)))
12834
12835 (define-public python2-consul
12836 (package-with-python2 python-consul))
12837
12838 (define-public python-schematics
12839 (package
12840 (name "python-schematics")
12841 (version "1.1.1")
12842 (source
12843 (origin
12844 (method url-fetch)
12845 (uri (string-append
12846 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
12847 (file-name (string-append name "-" version ".tar.gz"))
12848 (sha256
12849 (base32
12850 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
12851 (build-system python-build-system)
12852 (propagated-inputs
12853 `(("python-six" ,python-six)))
12854 (arguments
12855 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
12856 ; version requirements (eg python-coveralls)
12857 (home-page "https://github.com/schematics/schematics")
12858 (synopsis "Python Data Structures for Humans")
12859 (description "Python Data Structures for Humans.")
12860 (license license:bsd-3)))
12861
12862 (define-public python2-schematics
12863 (package-with-python2 python-schematics))
12864
12865 (define-public python-publicsuffix
12866 (package
12867 (name "python-publicsuffix")
12868 (version "1.1.0")
12869 (source (origin
12870 (method url-fetch)
12871 (uri (pypi-uri "publicsuffix" version))
12872 (sha256
12873 (base32
12874 "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
12875 (build-system python-build-system)
12876 (arguments
12877 `(#:tests? #f)) ; tests use the internet
12878 (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
12879 (synopsis "Get suffix for a domain name")
12880 (description "Get a public suffix for a domain name using the Public Suffix
12881 List.")
12882 (license license:expat)))
12883
12884 (define-public python2-publicsuffix
12885 (package-with-python2 python-publicsuffix))
12886
12887 (define-public python-publicsuffix2
12888 (package
12889 (name "python-publicsuffix2")
12890 (version "2.20160818")
12891 (source
12892 (origin
12893 (method url-fetch)
12894 (uri (pypi-uri "publicsuffix2" version ".tar.bz2"))
12895 (sha256
12896 (base32
12897 "1bb55yka9vkn7i6y1kjzxa516kh6v4gsrxa90w5wdz5p5n968r68"))))
12898 (build-system python-build-system)
12899 (arguments
12900 '(#:tests? #f)) ; The test suite requires network access.
12901 (home-page "https://github.com/pombredanne/python-publicsuffix2")
12902 (synopsis "Get a public suffix for a domain name using the Public Suffix List")
12903 (description "Get a public suffix for a domain name using the Public Suffix
12904 List. Forked from and using the same API as the publicsuffix package.")
12905 (license (list license:expat license:mpl2.0))))
12906
12907 (define-public python2-publicsuffix2
12908 (package-with-python2 python-publicsuffix2))
12909
12910 (define-public python-url
12911 (package
12912 (name "python-url")
12913 (version "0.2.0")
12914 (source (origin
12915 (method url-fetch)
12916 (uri (pypi-uri "url" version))
12917 (sha256
12918 (base32
12919 "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
12920 (build-system python-build-system)
12921 (propagated-inputs
12922 `(("python-publicsuffix" ,python-publicsuffix)))
12923 (native-inputs
12924 `(("python-coverage" ,python-coverage)
12925 ("python-nose" ,python-nose)))
12926 (arguments
12927 `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
12928 (home-page "https://github.com/seomoz/url-py")
12929 (synopsis "URL Parsing")
12930 (description "Library for parsing urls.")
12931 (license license:expat)
12932 (properties `((python2-variant . ,(delay python2-url))))))
12933
12934 (define-public python2-url
12935 (let ((base (package-with-python2 (strip-python2-variant python-url))))
12936 (package (inherit base)
12937 (propagated-inputs
12938 `(("python2-publicsuffix" ,python2-publicsuffix))))))
12939
12940 (define-public python-freezegun
12941 (package
12942 (name "python-freezegun")
12943 (version "0.3.8")
12944 (source
12945 (origin
12946 (method url-fetch)
12947 (uri (pypi-uri "freezegun" version))
12948 (sha256
12949 (base32
12950 "1sf38d3ibv1jhhvr52x7dhrsiyqk1hm165dfv8w8wh0fhmgxg151"))))
12951 (build-system python-build-system)
12952 (native-inputs
12953 `(("python-mock" ,python-mock)
12954 ("python-nose" ,python-nose)
12955 ("python-coverage" ,python-coverage)))
12956 (propagated-inputs
12957 `(("python-six" ,python-six)
12958 ("python-dateutil" ,python-dateutil)))
12959 (arguments
12960 `(#:phases (modify-phases %standard-phases
12961 ;; The tests are normally executed via `make test`, but the PyPi
12962 ;; package does not include the Makefile.
12963 (replace 'check
12964 (lambda _
12965 (zero? (system* "nosetests" "./tests/")))))))
12966 (home-page "https://github.com/spulec/freezegun")
12967 (synopsis "Test utility for mocking the datetime module")
12968 (description
12969 "FreezeGun is a library that allows your python tests to travel through
12970 time by mocking the datetime module.")
12971 (license license:asl2.0)))
12972
12973 (define-public python2-freezegun
12974 (package-with-python2 python-freezegun))
12975
12976
12977 (define-public python-odfpy
12978 (package
12979 (name "python-odfpy")
12980 (version "1.3.3")
12981 (source (origin
12982 (method url-fetch)
12983 (uri (pypi-uri "odfpy" version))
12984 (sha256
12985 (base32
12986 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
12987 (arguments
12988 `(#:modules ((srfi srfi-1)
12989 (guix build python-build-system)
12990 (guix build utils))
12991 #:phases
12992 (modify-phases %standard-phases
12993 (replace 'check
12994 ;; The test runner invokes python2 and python3 for test*.py.
12995 ;; To avoid having both in inputs, we replicate it here.
12996 (lambda _
12997 (every (lambda (test-file)
12998 (zero? (system* "python" test-file)))
12999 (find-files "tests" "^test.*\\.py$")))))))
13000 (build-system python-build-system)
13001 (home-page "https://github.com/eea/odfpy")
13002 (synopsis "Python API and tools to manipulate OpenDocument files")
13003 (description "Collection of libraries and utility programs written in
13004 Python to manipulate OpenDocument 1.2 files.")
13005 (license
13006 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
13007 ;; number of files with other licenses.
13008 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
13009
13010 (define-public python2-odfpy
13011 (package-with-python2 python-odfpy))
13012
13013 (define-public python-cachecontrol
13014 (package
13015 (name "python-cachecontrol")
13016 (version "0.11.6")
13017 (source
13018 (origin
13019 (method url-fetch)
13020 ;; Pypi does not have tests.
13021 (uri (string-append
13022 "https://github.com/ionrock/cachecontrol/archive/v"
13023 version ".tar.gz"))
13024 (file-name (string-append name "-" version ".tar.gz"))
13025 (sha256
13026 (base32
13027 "0yj60d0f69a2l8p7y86k4zhzzm6rnxpq74sfl240pry9l0lfw2vw"))))
13028 (build-system python-build-system)
13029 (arguments
13030 `(#:phases
13031 (modify-phases %standard-phases
13032 (replace 'check
13033 (lambda _
13034 ;; Drop test that requires internet access.
13035 (delete-file "tests/test_regressions.py")
13036 (setenv "PYTHONPATH"
13037 (string-append (getcwd) "/build/lib:"
13038 (getenv "PYTHONPATH")))
13039 (zero? (system* "py.test" "-vv")))))))
13040 (native-inputs
13041 `(("python-pytest" ,python-pytest)
13042 ("python-redis" ,python-redis)
13043 ("python-webtest" ,python-webtest)
13044 ("python-mock" ,python-mock)))
13045 (propagated-inputs
13046 `(("python-requests" ,python-requests)
13047 ("python-lockfile" ,python-lockfile)))
13048 (home-page "https://github.com/ionrock/cachecontrol")
13049 (synopsis "The httplib2 caching algorithms for use with requests")
13050 (description "CacheControl is a port of the caching algorithms in
13051 @code{httplib2} for use with @code{requests} session objects.")
13052 (license license:asl2.0)))
13053
13054 (define-public python2-cachecontrol
13055 (package-with-python2 python-cachecontrol))
13056
13057 (define-public python-lit
13058 (package
13059 (name "python-lit")
13060 (version "0.5.0")
13061 (source
13062 (origin
13063 (method url-fetch)
13064 (uri (pypi-uri "lit" version))
13065 (sha256
13066 (base32
13067 "135m2b9cwih85g66rjggavck328z7lj37srgpq3jxszbg0g2b91y"))))
13068 (build-system python-build-system)
13069 (home-page "http://llvm.org/")
13070 (synopsis "LLVM Software Testing Tool")
13071 (description "@code{lit} is a portable tool for executing LLVM and Clang
13072 style test suites, summarizing their results, and providing indication of
13073 failures.")
13074 (license license:ncsa)))
13075
13076 (define-public python2-lit
13077 (package-with-python2 python-lit))
13078
13079 (define-public python-pytest-pep8
13080 (package
13081 (name "python-pytest-pep8")
13082 (version "1.0.6")
13083 (source (origin
13084 (method url-fetch)
13085 (uri (pypi-uri "pytest-pep8" version))
13086 (sha256
13087 (base32
13088 "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"))))
13089 (build-system python-build-system)
13090 (arguments
13091 `(#:tests? #f)) ; Fails with recent pytest and pep8. See upstream issues #8 and #12.
13092 (native-inputs
13093 `(("python-pytest" ,python-pytest)))
13094 (propagated-inputs
13095 `(("python-pep8" ,python-pep8)))
13096 (home-page "https://bitbucket.org/pytest-dev/pytest-pep8")
13097 (synopsis "Py.test plugin to check PEP8 requirements")
13098 (description "Pytest plugin for checking PEP8 compliance.")
13099 (license license:expat)))
13100
13101 (define-public python2-pytest-pep8
13102 (package-with-python2 python-pytest-pep8))
13103
13104 (define-public python-pytest-flakes
13105 (package
13106 (name "python-pytest-flakes")
13107 (version "1.0.1")
13108 (source (origin
13109 (method url-fetch)
13110 (uri (pypi-uri "pytest-flakes" version))
13111 (sha256
13112 (base32
13113 "0flag3n33kbhyjrhzmq990rvg4yb8hhhl0i48q9hw0ll89jp28lw"))))
13114 (build-system python-build-system)
13115 (arguments
13116 `(#:phases
13117 (modify-phases %standard-phases
13118 (delete 'check)
13119 (add-after 'install 'check
13120 (lambda* (#:key outputs inputs #:allow-other-keys)
13121 ;; It's easier to run tests after install.
13122 ;; Make installed package available for running the tests
13123 (add-installed-pythonpath inputs outputs)
13124 (zero? (system* "py.test" "-vv")))))))
13125 (native-inputs
13126 `(("python-coverage" ,python-coverage)
13127 ("python-pytest" ,python-pytest)
13128 ("python-pytest-cache" ,python-pytest-cache)
13129 ("python-pytest-pep8" ,python-pytest-pep8)))
13130 (propagated-inputs
13131 `(("python-pyflakes" ,python-pyflakes)))
13132 (home-page "https://github.com/fschulze/pytest-flakes")
13133 (synopsis "Py.test plugin to check source code with pyflakes")
13134 (description "Pytest plugin for checking Python source code with pyflakes.")
13135 (license license:expat)))
13136
13137 (define-public python2-pytest-flakes
13138 (package-with-python2 python-pytest-flakes))
13139
13140 (define-public python-natsort
13141 (package
13142 (name "python-natsort")
13143 (version "5.0.2")
13144 (source (origin
13145 (method url-fetch)
13146 (uri (pypi-uri "natsort" version))
13147 (sha256
13148 (base32
13149 "0bh6j0l8iapjnsgg3bs6q075cnzjl6zw1vlgqyv3qrygm2cxypkn"))))
13150 (build-system python-build-system)
13151 (arguments
13152 `(#:phases
13153 (modify-phases %standard-phases
13154 (add-before 'check 'set-cachedir
13155 ;; Tests require write access to $HOME by default
13156 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
13157 (native-inputs
13158 `(("python-hypothesis" ,python-hypothesis)
13159 ("python-pytest-cache" ,python-pytest-cache)
13160 ("python-pytest-cov" ,python-pytest-cov)
13161 ("python-pytest-flakes" ,python-pytest-flakes)
13162 ("python-pytest-pep8" ,python-pytest-pep8)))
13163 (propagated-inputs ; TODO: Add python-fastnumbers.
13164 `(("python-pyicu" ,python-pyicu)))
13165 (home-page "https://github.com/SethMMorton/natsort")
13166 (synopsis "Natural sorting for python and shell")
13167 (description
13168 "Natsort lets you apply natural sorting on lists instead of
13169 lexicographical. If you use the built-in @code{sorted} method in python
13170 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
13171 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
13172 function @code{natsorted} that identifies numbers and sorts them separately
13173 from strings. It can also sort version numbers, real numbers, mixed types
13174 and more, and comes with a shell command @command{natsort} that exposes this
13175 functionality in the command line.")
13176 (license license:expat)
13177 (properties `((python2-variant . ,(delay python2-natsort))))))
13178
13179 (define-public python2-natsort
13180 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
13181 (package (inherit base)
13182 (native-inputs
13183 `(("python2-pathlib" ,python2-pathlib)
13184 ("python2-mock" ,python2-mock)
13185 ("python2-enum34" ,python2-enum34)
13186 ,@(package-native-inputs base))))))
13187
13188 (define-public python-glances
13189 (package
13190 (name "python-glances")
13191 (version "2.7.1")
13192 (source
13193 (origin
13194 (method url-fetch)
13195 (uri (pypi-uri "Glances" version))
13196 (sha256
13197 (base32
13198 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
13199 (build-system python-build-system)
13200 (propagated-inputs
13201 `(("python-psutil" ,python-psutil)))
13202 (home-page
13203 "https://github.com/nicolargo/glances")
13204 (synopsis
13205 "A cross-platform curses-based monitoring tool")
13206 (description
13207 "Glances is a curses-based monitoring tool for a wide variety of platforms.
13208 Glances uses the PsUtil library to get information from your system. It monitors
13209 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
13210 (license license:lgpl3+)))
13211
13212 (define-public python2-glances
13213 (package-with-python2 python-glances))
13214
13215 (define-public python-graphql-core
13216 (package
13217 (name "python-graphql-core")
13218 (version "0.5.3")
13219 (source
13220 (origin
13221 (method url-fetch)
13222 (uri (pypi-uri "graphql-core" version))
13223 (sha256
13224 (base32
13225 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
13226 (build-system python-build-system)
13227 (arguments
13228 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
13229 #:phases
13230 (modify-phases %standard-phases
13231 (add-after 'unpack 'patch-hardcoded-version
13232 (lambda _ (substitute*
13233 "setup.py"
13234 (("'gevent==1.1rc1'") "'gevent'"))
13235 #t)))))
13236 (native-inputs
13237 `(("python-gevent" ,python-gevent)
13238 ("python-mock" ,python-mock)
13239 ("python-pytest-mock" ,python-pytest-mock)))
13240 (propagated-inputs
13241 `(("python-promise" ,python-promise)
13242 ("python-six" ,python-six)))
13243 (home-page "https://github.com/graphql-python/graphql-core")
13244 (synopsis "GraphQL implementation for Python")
13245 (description
13246 "GraphQL implementation for Python. GraphQL is a data query language and
13247 runtime designed and used to request and deliver data to mobile and web apps.
13248 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
13249 to Python.")
13250 (license license:expat)))
13251
13252 (define-public python2-graphql-core
13253 (package-with-python2 python-graphql-core))
13254
13255 (define-public python-graphql-relay
13256 (package
13257 (name "python-graphql-relay")
13258 (version "0.4.5")
13259 (source
13260 (origin
13261 (method url-fetch)
13262 (uri (pypi-uri "graphql-relay" version))
13263 (sha256
13264 (base32
13265 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
13266 (build-system python-build-system)
13267 (native-inputs
13268 `(("python-pytest" ,python-pytest)))
13269 (propagated-inputs
13270 `(("python-graphql-core" ,python-graphql-core)
13271 ("python-promise" ,python-promise)
13272 ("python-six" ,python-six)))
13273 (home-page "https://github.com/graphql-python/graphql-relay-py")
13274 (synopsis "Relay implementation for Python")
13275 (description
13276 "This is a library to allow the easy creation of Relay-compliant servers
13277 using the GraphQL Python reference implementation of a GraphQL server. It
13278 should be noted that the code is a exact port of the original
13279 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
13280 from Facebook.")
13281 (license license:expat)))
13282
13283 (define-public python2-graphql-relay
13284 (package-with-python2 python-graphql-relay))
13285
13286 (define-public python-graphene
13287 (package
13288 (name "python-graphene")
13289 (version "0.10.2")
13290 (source
13291 (origin
13292 (method url-fetch)
13293 (uri (pypi-uri "graphene" version))
13294 (sha256
13295 (base32
13296 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
13297 (build-system python-build-system)
13298 (propagated-inputs
13299 `(("python-graphql-core" ,python-graphql-core)
13300 ("python-graphql-relay" ,python-graphql-relay)
13301 ("python-iso8601" ,python-iso8601)
13302 ("python-promise" ,python-promise)
13303 ("python-six" ,python-six)))
13304 (arguments
13305 `(#:tests? #f)) ; no tests/ in the PyPI tarball
13306 (home-page "http://graphene-python.org/")
13307 (synopsis "GraphQL Framework for Python")
13308 (description
13309 "Graphene is a Python library for building GraphQL schemas/types.
13310 A GraphQL schema describes your data model, and provides a GraphQL server
13311 with an associated set of resolve methods that know how to fetch data.")
13312 (properties `((python2-variant . ,(delay python2-graphene))))
13313 (license license:expat)))
13314
13315 (define-public python2-graphene
13316 (let ((base (package-with-python2
13317 (strip-python2-variant python-graphene))))
13318 (package (inherit base)
13319 (native-inputs
13320 `(("python2-sqlalchemy" ,python2-sqlalchemy)
13321 ,@(package-native-inputs base))))))
13322
13323 (define-public python-nautilus
13324 (package
13325 (name "python-nautilus")
13326 (version "0.4.9")
13327 (source
13328 (origin
13329 (method url-fetch)
13330 (uri (pypi-uri "nautilus" version))
13331 (sha256
13332 (base32
13333 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
13334 (build-system python-build-system)
13335 (arguments `(#:tests? #f)) ; fails to import test modules
13336 (propagated-inputs
13337 `(("python-bcrypt" ,python-bcrypt)
13338 ("python-click" ,python-click)
13339 ("python-consul" ,python-consul)
13340 ("python-graphene" ,python-graphene)
13341 ("python-jinja2" ,python-jinja2)
13342 ("python-peewee" ,python-peewee)
13343 ("python-pika" ,python-pika)
13344 ("python-tornado" ,python-tornado)
13345 ("python-wtforms" ,python-wtforms)))
13346 (native-inputs
13347 `(("python-nose2" ,python-nose2)))
13348 (home-page "https://github.com/AlecAivazis/nautilus")
13349 (synopsis "Library for creating microservice applications")
13350 (description
13351 "Nautilus is a framework for flux based microservices that looks to
13352 provide extendible implementations of common aspects of a cloud so that you can
13353 focus on building massively scalable web applications.")
13354 (license license:expat)))
13355
13356 (define-public python-snowballstemmer
13357 (package
13358 (name "python-snowballstemmer")
13359 (version "1.2.1")
13360 (source (origin
13361 (method url-fetch)
13362 (uri (pypi-uri "snowballstemmer" version))
13363 (sha256
13364 (base32
13365 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
13366 (build-system python-build-system)
13367 (arguments
13368 `(;; No tests exist
13369 #:tests? #f))
13370 (home-page "https://github.com/shibukawa/snowball_py")
13371 (synopsis "Snowball stemming library collection for Python")
13372 (description "This package provides 16 word stemmer algorithms generated
13373 from Snowball algorithms. It includes the 15 original ones plus the Poerter
13374 English stemmer.")
13375 (license license:bsd-3)))
13376
13377 (define-public python2-snowballstemmer
13378 (package-with-python2 python-snowballstemmer))
13379
13380 (define-public python-sphinx-cloud-sptheme
13381 (package
13382 (name "python-sphinx-cloud-sptheme")
13383 (version "1.8.0")
13384 (source (origin
13385 (method url-fetch)
13386 (uri (pypi-uri "cloud_sptheme" version))
13387 (sha256
13388 (base32
13389 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
13390 (build-system python-build-system)
13391 ;; FIXME: The 'pypi' release archive does not contain tests.
13392 (arguments '(#:tests? #f))
13393 (native-inputs
13394 `(("python-sphinx" ,python-sphinx)))
13395 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
13396 (synopsis "'Cloud' theme for Sphinx documenter")
13397 (description "This package contains the \"Cloud\" theme for Sphinx and some
13398 related extensions.")
13399 (license license:bsd-3)))
13400
13401 (define-public python2-sphinx-cloud-sptheme
13402 (package-with-python2 python-sphinx-cloud-sptheme))
13403
13404 (define-public python-sphinx-alabaster-theme
13405 (package
13406 (name "python-sphinx-alabaster-theme")
13407 (version "0.7.9")
13408 (source (origin
13409 (method url-fetch)
13410 (uri (pypi-uri "alabaster" version))
13411 (sha256
13412 (base32
13413 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
13414 (build-system python-build-system)
13415 (propagated-inputs
13416 `(("python-pygments" ,python-pygments)))
13417 (home-page "https://alabaster.readthedocs.io/")
13418 (synopsis "Configurable sidebar-enabled Sphinx theme")
13419 (description "Alabaster is a visually (c)lean, responsive, configurable
13420 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
13421 (license license:bsd-3)))
13422
13423 (define-public python2-sphinx-alabaster-theme
13424 (package-with-python2 python-sphinx-alabaster-theme))
13425
13426 (define-public python-betamax
13427 (package
13428 (name "python-betamax")
13429 (version "0.8.0")
13430 (source
13431 (origin
13432 (method url-fetch)
13433 (uri (pypi-uri "betamax" version))
13434 (sha256
13435 (base32
13436 "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42"))))
13437 (build-system python-build-system)
13438 (arguments
13439 '(;; Many tests fail because they require networking.
13440 #:tests? #f))
13441 (propagated-inputs
13442 `(("python-requests" ,python-requests)))
13443 (home-page "https://github.com/sigmavirus24/betamax")
13444 (synopsis "Record HTTP interactions with python-requests")
13445 (description "Betamax will record your test suite's HTTP interactions and
13446 replay them during future tests. It is designed to work with python-requests.")
13447 (license license:expat)))
13448
13449 (define-public python2-betamax
13450 (package-with-python2 python-betamax))
13451
13452 (define-public python-betamax-matchers
13453 (package
13454 (name "python-betamax-matchers")
13455 (version "0.4.0")
13456 (source
13457 (origin
13458 (method url-fetch)
13459 (uri (pypi-uri "betamax-matchers" version))
13460 (sha256
13461 (base32
13462 "07qpwjyq2i2aqhz5iwghnj4pqr2ys5n45v1vmpcfx9r5mhwrsq43"))))
13463 (build-system python-build-system)
13464 (propagated-inputs
13465 `(("python-betamax" ,python-betamax)
13466 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13467 (home-page "https://github.com/sigmavirus24/betamax_matchers")
13468 (synopsis "VCR imitation for python-requests")
13469 (description "@code{betamax-matchers} provides a set of Matchers for
13470 Betamax.")
13471 (license license:asl2.0)))
13472
13473 (define-public python2-betamax-matchers
13474 (package-with-python2 python-betamax-matchers))
13475
13476 (define-public python-s3transfer
13477 (package
13478 (name "python-s3transfer")
13479 (version "0.1.11")
13480 (source (origin
13481 (method url-fetch)
13482 (uri (pypi-uri "s3transfer" version))
13483 (sha256
13484 (base32
13485 "0yfrfnf404cxzn3iswibqjxklsl0b1lwgqiml6pwiqj79a7zbwbn"))))
13486 (build-system python-build-system)
13487 (arguments
13488 `(#:phases
13489 (modify-phases %standard-phases
13490 (replace 'check
13491 (lambda _
13492 ;; 7 of the 'integration' tests require network access or login
13493 ;; credentials.
13494 (zero? (system* "nosetests" "--exclude=integration")))))))
13495 (native-inputs
13496 `(("python-docutils" ,python-docutils)
13497 ("python-mock" ,python-mock)
13498 ("python-nose" ,python-nose)))
13499 (propagated-inputs
13500 `(("python-botocore" ,python-botocore)))
13501 (synopsis "Amazon S3 Transfer Manager")
13502 (description "S3transfer is a Python library for managing Amazon S3
13503 transfers.")
13504 (home-page "https://github.com/boto/s3transfer")
13505 (license license:asl2.0)
13506 (properties `((python2-variant . ,(delay python2-s3transfer))))))
13507
13508 (define-public python2-s3transfer
13509 (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
13510 (package
13511 (inherit base)
13512 (native-inputs
13513 `(("python2-futures" ,python2-futures)
13514 ,@(package-native-inputs base))))))
13515
13516 (define-public python-setproctitle
13517 (package
13518 (name "python-setproctitle")
13519 (version "1.1.10")
13520 (source
13521 (origin
13522 (method url-fetch)
13523 (uri (pypi-uri "setproctitle" version))
13524 (sha256
13525 (base32
13526 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
13527 (build-system python-build-system)
13528 (arguments
13529 '(#:phases
13530 (modify-phases %standard-phases
13531 (add-before 'check 'patch-Makefile
13532 ;; Stricly this is only required for the python2 variant.
13533 ;; But adding a phase in an inherited package seems to be
13534 ;; cumbersum. So we patch even for python3.
13535 (lambda _
13536 (let ((nose (assoc-ref %build-inputs "python2-nose")))
13537 (when nose
13538 (substitute* "Makefile"
13539 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
13540 (string-append nose "/bin/nosetests "))))
13541 #t)))
13542 (replace 'check
13543 (lambda _
13544 (setenv "PYTHON" (or (which "python3") (which "python")))
13545 (setenv "PYCONFIG" (or (which "python3-config")
13546 (which "python-config")))
13547 (setenv "CC" "gcc")
13548 ;; No need to extend PYTHONPATH to find the built package, since
13549 ;; the Makefile will build anyway
13550 (zero? (system* "make" "check")))))))
13551 (native-inputs
13552 `(("procps" ,procps))) ; required for tests
13553 (home-page
13554 "https://github.com/dvarrazzo/py-setproctitle")
13555 (synopsis
13556 "Setproctitle implementation for Python to customize the process title")
13557 (description "The library allows a process to change its title (as displayed
13558 by system tools such as ps and top).
13559
13560 Changing the title is mostly useful in multi-process systems, for
13561 example when a master process is forked: changing the children's title
13562 allows to identify the task each process is busy with. The technique
13563 is used by PostgreSQL and the OpenSSH Server for example.")
13564 (license license:bsd-3)
13565 (properties `((python2-variant . ,(delay python2-setproctitle))))))
13566
13567 (define-public python2-setproctitle
13568 (let ((base (package-with-python2
13569 (strip-python2-variant python-setproctitle))))
13570 (package
13571 (inherit base)
13572 (native-inputs `(("python2-nose" ,python2-nose)
13573 ,@(package-native-inputs base))))))
13574
13575 (define-public python-validictory
13576 (package
13577 (name "python-validictory")
13578 (version "1.0.1")
13579 (source
13580 (origin
13581 (method url-fetch)
13582 (uri (pypi-uri "validictory" version))
13583 (sha256
13584 (base32
13585 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
13586 (build-system python-build-system)
13587 (arguments
13588 '(#:phases
13589 (modify-phases %standard-phases
13590 (add-after 'unpack 'bootstrap
13591 ;; Move the tests out of the package directory to avoid
13592 ;; packaging them.
13593 (lambda* _
13594 (rename-file "validictory/tests" "tests")
13595 (delete-file "tests/__init__.py")))
13596 (replace 'check
13597 (lambda _
13598 ;; Extend PYTHONPATH so the built package will be found.
13599 (setenv "PYTHONPATH"
13600 (string-append (getcwd) "/build/lib:"
13601 (getenv "PYTHONPATH")))
13602 (zero? (system* "py.test" "-vv" )))))))
13603 (native-inputs
13604 `(("python-pytest" ,python-pytest)))
13605 (home-page
13606 "https://github.com/jamesturk/validictory")
13607 (synopsis "General purpose Python data validator")
13608 (description "It allows validation of arbitrary Python data structures.
13609
13610 The schema format is based on the JSON Schema
13611 proposal (http://json-schema.org), so combined with json the library is also
13612 useful as a validator for JSON data.")
13613 (license license:expat)))
13614
13615 (define-public python2-validictory
13616 (package-with-python2 python-validictory))
13617
13618 (define-public python-aniso8601
13619 (package
13620 (name "python-aniso8601")
13621 (version "1.3.0")
13622 (source
13623 (origin
13624 (method url-fetch)
13625 (uri (pypi-uri "aniso8601" version))
13626 (sha256
13627 (base32
13628 "1waj54iv3n3lw1fapbz8a93yjgrybgpc86wif5baxdh1arpj9df3"))))
13629 (build-system python-build-system)
13630 (propagated-inputs
13631 `(("python-dateutil" ,python-dateutil)))
13632 (home-page
13633 "https://bitbucket.org/nielsenb/aniso8601")
13634 (synopsis
13635 "Python library for parsing ISO 8601 strings")
13636 (description
13637 "This package contains a library for parsing ISO 8601 datetime strings.")
13638 (license license:bsd-3)))
13639
13640 (define-public python2-aniso8601
13641 (package-with-python2 python-aniso8601))
13642
13643 (define-public python-flask-restful
13644 (package
13645 (name "python-flask-restful")
13646 (version "0.3.5")
13647 (source
13648 (origin
13649 (method url-fetch)
13650 (uri (pypi-uri "Flask-RESTful" version))
13651 (sha256
13652 (base32
13653 "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
13654 (build-system python-build-system)
13655 (propagated-inputs
13656 `(("python-aniso8601" ,python-aniso8601)
13657 ("python-flask" ,python-flask)
13658 ("python-pycrypto" ,python-pycrypto)
13659 ("python-pytz" ,python-pytz)))
13660 (native-inputs
13661 `(;; Optional dependency of Flask. Tests need it.
13662 ("python-blinker" ,python-blinker)
13663 ("python-mock" ,python-mock) ; For tests
13664 ("python-nose" ,python-nose) ; For tests
13665 ("python-sphinx" ,python-sphinx)))
13666 (home-page
13667 "https://www.github.com/flask-restful/flask-restful/")
13668 (synopsis
13669 "Flask module for creating REST APIs")
13670 (description
13671 "This package contains a Flask module for creating REST APIs.")
13672 (license license:bsd-3)))
13673
13674 (define-public python-flask-basicauth
13675 (package
13676 (name "python-flask-basicauth")
13677 (version "0.2.0")
13678 (source
13679 (origin
13680 (method url-fetch)
13681 (uri (pypi-uri "Flask-BasicAuth" version))
13682 (sha256
13683 (base32
13684 "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
13685 (build-system python-build-system)
13686 (propagated-inputs
13687 `(("python-flask" ,python-flask)))
13688 (home-page
13689 "https://github.com/jpvanhal/flask-basicauth")
13690 (synopsis
13691 "HTTP basic access authentication for Flask")
13692 (description
13693 "This package provides HTTP basic access authentication for Flask.")
13694 (license license:bsd-3)))
13695
13696 (define-public python-flask-sqlalchemy
13697 (package
13698 (name "python-flask-sqlalchemy")
13699 (version "2.1")
13700 (source
13701 (origin
13702 (method url-fetch)
13703 (uri (pypi-uri "Flask-SQLAlchemy" version))
13704 (sha256
13705 (base32
13706 "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"))))
13707 (build-system python-build-system)
13708 (propagated-inputs
13709 `(("python-flask" ,python-flask)
13710 ("python-sqlalchemy" ,python-sqlalchemy)))
13711 (home-page
13712 "https://github.com/mitsuhiko/flask-sqlalchemy")
13713 (synopsis
13714 "Module adding SQLAlchemy support to your Flask application")
13715 (description
13716 "This package adds SQLAlchemy support to your Flask application.")
13717 (license license:bsd-3)))
13718
13719 (define-public python-pyev
13720 (package
13721 (name "python-pyev")
13722 (version "0.9.0")
13723 (source
13724 (origin
13725 (method url-fetch)
13726 (uri (pypi-uri "pyev" version))
13727 (sha256
13728 (base32
13729 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
13730 (build-system python-build-system)
13731 (arguments
13732 `(#:tests? #f ; no test suite
13733 #:phases
13734 (modify-phases %standard-phases
13735 (add-after 'unpack 'patch
13736 (lambda* (#:key inputs #:allow-other-keys)
13737 (let ((libev (string-append (assoc-ref inputs "libev")
13738 "/lib/libev.so.4")))
13739 (substitute* "setup.py"
13740 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
13741 (string-append "libev_dll_name = \"" libev "\"")))))))))
13742 (inputs
13743 `(("libev" ,libev)))
13744 (home-page "http://pythonhosted.org/pyev/")
13745 (synopsis "Python libev interface")
13746 (description "Pyev provides a Python interface to libev.")
13747 (license license:gpl3)))
13748
13749 (define-public python2-pyev
13750 (package-with-python2 python-pyev))
13751
13752 (define-public python-imagesize
13753 (package
13754 (name "python-imagesize")
13755 (version "0.7.1")
13756 (source
13757 (origin
13758 (method url-fetch)
13759 (uri (pypi-uri "imagesize" version))
13760 (sha256
13761 (base32
13762 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
13763 (build-system python-build-system)
13764 (arguments
13765 '(;; Test files are not distributed on PyPi:
13766 ;; https://github.com/shibukawa/imagesize_py/issues/7
13767 #:tests? #f))
13768 (home-page "https://github.com/shibukawa/imagesize_py")
13769 (synopsis "Gets image size of files in variaous formats in Python")
13770 (description
13771 "This package allows determination of image size from
13772 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
13773 (license license:expat)))
13774
13775 (define-public python2-imagesize
13776 (package-with-python2 python-imagesize))
13777
13778 (define-public python-axolotl-curve25519
13779 (package
13780 (name "python-axolotl-curve25519")
13781 (version "0.1")
13782 (source
13783 (origin
13784 (method git-fetch)
13785 (uri (git-reference
13786 (url "https://github.com/tgalal/python-axolotl-curve25519")
13787 (commit "e4a9c4de0eae27223200579c58d1f8f6d20637e2")))
13788 (file-name (string-append name "-" version "-checkout"))
13789 (sha256
13790 (base32
13791 "0agap5q0hmvf6cwzjqc05kw53pjgf6942pcivpazksmg1vk400ra"))))
13792 (build-system python-build-system)
13793 (arguments
13794 `(;; Prevent creation of the egg. This works around
13795 ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765
13796 #:configure-flags '("--root=/")))
13797 (home-page "https://github.com/tgalal/python-axolotl-curve25519")
13798 (synopsis "Python wrapper for curve25519 library")
13799 (description "This is a python wrapper for the curve25519 library
13800 with ed25519 signatures. The C code was pulled from
13801 libaxolotl-android. At the moment this wrapper is meant for use by
13802 python-axolotl.")
13803 (license (list license:gpl3 ; Most files
13804 license:bsd-3)))) ; curve/curve25519-donna.c
13805
13806 (define-public python2-axolotl-curve25519
13807 (package-with-python2 python-axolotl-curve25519))
13808
13809 (define-public python-axolotl
13810 (package
13811 (name "python-axolotl")
13812 (version "0.1.35")
13813 (source
13814 (origin
13815 (method url-fetch)
13816 (uri (string-append
13817 "https://github.com/tgalal/python-axolotl/archive/"
13818 version ".tar.gz"))
13819 (file-name (string-append name "-" version ".tar.gz"))
13820 (sha256
13821 (base32 "1z8d89p7v40p4bwywjm9h4z28fdvra79ddw06azlkrfjbl7dxmz8"))))
13822 (build-system python-build-system)
13823 (arguments
13824 `(#:phases
13825 (modify-phases %standard-phases
13826 ;; Don't install tests
13827 (add-before 'install 'remove-tests
13828 (lambda _
13829 (for-each delete-file-recursively
13830 '("axolotl/tests" "build/lib/axolotl/tests"))
13831 #t)))))
13832 (propagated-inputs
13833 `(("python-axolotl-curve25519" ,python-axolotl-curve25519)
13834 ("python-dateutil" ,python-dateutil)
13835 ("python-protobuf" ,python-protobuf)
13836 ("python-pycrypto" ,python-pycrypto)))
13837 (home-page "https://github.com/tgalal/python-axolotl")
13838 (synopsis "Python port of libaxolotl-android")
13839 (description "This is a python port of libaxolotl-android. This
13840 is a ratcheting forward secrecy protocol that works in synchronous and
13841 asynchronous messaging environments.")
13842 (license license:gpl3)))
13843
13844 (define-public python2-axolotl
13845 (package-with-python2 python-axolotl))
13846
13847 (define-public python-termstyle
13848 (package
13849 (name "python-termstyle")
13850 (version "0.1.11")
13851 (source
13852 (origin
13853 (method url-fetch)
13854 (uri (pypi-uri "termstyle" version))
13855 (sha256
13856 (base32
13857 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
13858 (build-system python-build-system)
13859 (arguments
13860 '(#:phases
13861 (modify-phases %standard-phases
13862 (replace 'check
13863 (lambda _
13864 (zero? (system* "python" "test3.py")))))))
13865 (home-page "https://github.com/gfxmonk/termstyle")
13866 (synopsis "Console text coloring for Python")
13867 (description "This package provides console text coloring for Python.")
13868 (license license:bsd-3)))
13869
13870 (define-public python-rednose
13871 (package
13872 (name "python-rednose")
13873 (version "1.2.1")
13874 (source
13875 (origin
13876 (method url-fetch)
13877 (uri (pypi-uri "rednose" version))
13878 (sha256
13879 (base32
13880 "0b0bsna217lr1nykyhl5fgjly15zhdvqd4prg4wy1zrgfv7al6m0"))))
13881 (build-system python-build-system)
13882 (arguments
13883 `(#:phases
13884 (modify-phases %standard-phases
13885 (add-after 'unpack 'fix-deps
13886 (lambda _
13887 ;; See <https://github.com/JBKahn/rednose/issues/12>
13888 (substitute* "setup.py"
13889 (("python-termstyle") "termstyle"))
13890 #t)))))
13891 (propagated-inputs
13892 `(("python-colorama" ,python-colorama)
13893 ("python-termstyle" ,python-termstyle)))
13894 (native-inputs
13895 `(("python-six" ,python-six)
13896 ("python-nose" ,python-nose)))
13897 (home-page "https://github.com/JBKahn/rednose")
13898 (synopsis "Colored output for Python nosetests")
13899 (description "This package provides colored output for the
13900 @command{nosetests} command of the Python Nose unit test framework.")
13901 (license license:bsd-3)))
13902
13903 (define-public python2-rednose
13904 (package-with-python2 python-rednose))
13905
13906 (define-public python-flask-restplus
13907 (package
13908 (name "python-flask-restplus")
13909 (version "0.9.2")
13910 (source
13911 (origin
13912 (method url-fetch)
13913 (uri (pypi-uri "flask-restplus" version))
13914 (sha256
13915 (base32
13916 "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
13917 (build-system python-build-system)
13918 (arguments
13919 '(#:tests? #f)) ; FIXME: 35/882 tests failing.
13920 ;; #:phases
13921 ;; (modify-phases %standard-phases
13922 ;; (replace 'check
13923 ;; (lambda _
13924 ;; (zero? (system* "nosetests")))))))
13925 (propagated-inputs
13926 `(("python-aniso8601" ,python-aniso8601)
13927 ("python-flask" ,python-flask)
13928 ("python-jsonschema" ,python-jsonschema)
13929 ("python-pytz" ,python-pytz)
13930 ("python-six" ,python-six)))
13931 (native-inputs
13932 `(("python-tzlocal" ,python-tzlocal)
13933 ("python-blinker" ,python-blinker)
13934 ("python-nose" ,python-nose)
13935 ("python-rednose" ,python-rednose)))
13936 (home-page "https://github.com/noirbizarre/flask-restplus")
13937 (synopsis "Framework for documented API development with Flask")
13938 (description "This package provides a framework for API development with
13939 the Flask web framework in Python. It is similar to package
13940 @code{python-flask-restful} but supports the @code{python-swagger}
13941 documentation builder.")
13942 (license license:expat)))
13943
13944 (define-public python-sadisplay
13945 (package
13946 (name "python-sadisplay")
13947 (version "0.4.6")
13948 (source
13949 (origin
13950 (method url-fetch)
13951 (uri (pypi-uri "sadisplay" version))
13952 (sha256
13953 (base32
13954 "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
13955 (build-system python-build-system)
13956 (propagated-inputs
13957 `(("python-sqlalchemy" ,python-sqlalchemy)))
13958 (native-inputs
13959 `(("python-nose" ,python-nose)))
13960 (home-page "https://bitbucket.org/estin/sadisplay")
13961 (synopsis "SQLAlchemy schema displayer")
13962 (description "This package provides a program to build Entity
13963 Relationship diagrams from a SQLAlchemy model (or directly from the
13964 database).")
13965 (license license:bsd-3)))
13966
13967 (define-public python2-sadisplay
13968 (package-with-python2 python-sadisplay))
13969
13970 (define-public python-flask-restful-swagger
13971 (package
13972 (name "python-flask-restful-swagger")
13973 (version "0.19")
13974 (source
13975 (origin
13976 (method url-fetch)
13977 (uri (pypi-uri "flask-restful-swagger" version))
13978 (sha256
13979 (base32
13980 "16msl8hd5xjmj833bpy264v98cpl5hkw5bgl5gf5vgndxbv3rm6v"))))
13981 (build-system python-build-system)
13982 (propagated-inputs
13983 `(("python-flask-restful" ,python-flask-restful)))
13984 (home-page "https://github.com/rantav/flask-restful-swagger")
13985 (synopsis "Extract Swagger specs from Flask-Restful projects")
13986 (description "This package lets you extract Swagger API documentation
13987 specs from your Flask-Restful projects.")
13988 (license license:expat)))
13989
13990 (define-public python2-flask-restful-swagger
13991 (package-with-python2 python-flask-restful-swagger))
13992
13993 (define-public python-argcomplete
13994 (package
13995 (name "python-argcomplete")
13996 (version "1.7.0")
13997 (source
13998 (origin
13999 (method url-fetch)
14000 (uri (pypi-uri "argcomplete" version))
14001 (sha256
14002 (base32
14003 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
14004 (build-system python-build-system)
14005 (native-inputs
14006 `(("python-pexpect" ,python-pexpect)
14007 ("tcsh" ,tcsh)
14008 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
14009 (home-page "https://github.com/kislyuk/argcomplete")
14010 (synopsis "Shell tab completion for Python argparse")
14011 (description "argcomplete provides extensible command line tab completion
14012 of arguments and options for Python scripts using @code{argparse}. It's
14013 particularly useful for programs with many options or sub-parsers that can
14014 dynamically suggest completions; for example, when browsing resources over the
14015 network.")
14016 (license license:asl2.0)))
14017
14018 (define-public python2-argcomplete
14019 (package-with-python2 python-argcomplete))
14020
14021 (define-public python-xopen
14022 (package
14023 (name "python-xopen")
14024 (version "0.1.1")
14025 (source
14026 (origin
14027 (method url-fetch)
14028 (uri (pypi-uri "xopen" version))
14029 (sha256
14030 (base32
14031 "1wx6mylzcsyhjl19ycb83qq6iqpmr927lz62njfsar6ldsj0qcni"))
14032 (file-name (string-append name "-" version ".tar.gz"))))
14033 (build-system python-build-system)
14034 (home-page "https://github.com/marcelm/xopen/")
14035 (synopsis "Open compressed files transparently")
14036 (description "This module provides an @code{xopen} function that works like
14037 Python's built-in @code{open} function, but can also deal with compressed files.
14038 Supported compression formats are gzip, bzip2 and, xz, and are automatically
14039 recognized by their file extensions. The focus is on being as efficient as
14040 possible on all supported Python versions.")
14041 (license license:expat)))
14042
14043 (define-public python2-xopen
14044 (package-with-python2 python-xopen))
14045
14046 (define-public python2-cheetah
14047 (package
14048 (name "python2-cheetah")
14049 (version "2.4.4")
14050 (source
14051 (origin
14052 (method url-fetch)
14053 (uri (pypi-uri "Cheetah" version))
14054 (sha256
14055 (base32
14056 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
14057 (build-system python-build-system)
14058 (arguments
14059 `(#:python ,python-2))
14060 (propagated-inputs
14061 `(("python2-markdown" ,python2-markdown)))
14062 (home-page "https://pythonhosted.org/Cheetah/")
14063 (synopsis "Template engine")
14064 (description "Cheetah is a text-based template engine and Python code
14065 generator.
14066
14067 Cheetah can be used as a standalone templating utility or referenced as
14068 a library from other Python applications. It has many potential uses,
14069 but web developers looking for a viable alternative to ASP, JSP, PHP and
14070 PSP are expected to be its principle user group.
14071
14072 Features:
14073 @enumerate
14074 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
14075 text-based format.
14076 @item Cleanly separates content, graphic design, and program code.
14077 @item Blends the power and flexibility of Python with a simple template language
14078 that non-programmers can understand.
14079 @item Gives template writers full access to any Python data structure, module,
14080 function, object, or method in their templates.
14081 @item Makes code reuse easy by providing an object-orientated interface to
14082 templates that is accessible from Python code or other Cheetah templates.
14083 One template can subclass another and selectively reimplement sections of it.
14084 @item Provides a simple, yet powerful, caching mechanism that can dramatically
14085 improve the performance of a dynamic website.
14086 @item Compiles templates into optimized, yet readable, Python code.
14087 @end enumerate")
14088 (license (license:x11-style "file://LICENSE"))))
14089
14090 (define-public python-dulwich
14091 (package
14092 (name "python-dulwich")
14093 (version "0.16.3")
14094 (source
14095 (origin
14096 (method url-fetch)
14097 (uri (list (string-append "https://www.dulwich.io/releases/"
14098 "dulwich-" version ".tar.gz")
14099 (pypi-uri "dulwich" version)))
14100 (sha256
14101 (base32 "0fl47vzfgc3w3rmhn8naii905cjqcp0vc68iyvymxp7567hh6als"))))
14102 (build-system python-build-system)
14103 (arguments
14104 `(#:phases
14105 (modify-phases %standard-phases
14106 (add-before 'check 'fix-tests
14107 (lambda* (#:key inputs #:allow-other-keys)
14108 ;; The tests use Popen with a custom environment which doesn't
14109 ;; include PATH.
14110 (substitute* "dulwich/tests/compat/utils.py"
14111 (("'git'") (string-append "'"
14112 (which "git")
14113 "'")))
14114 (substitute* '("dulwich/tests/test_repository.py"
14115 "dulwich/tests/test_hooks.py")
14116 (("#!/bin/sh") (string-append "#!" (which "sh"))))
14117 (setenv "TEST_RUNNER" "unittest")
14118 (setenv "PYTHONHASHSEED" "random")
14119 #t)))))
14120 (propagated-inputs
14121 `(("python-fastimport" ,python-fastimport)))
14122 (native-inputs
14123 `(("python-mock" ,python-mock)
14124 ("python-geventhttpclient" ,python-geventhttpclient)
14125 ("git" ,git)))
14126 (home-page "https://www.dulwich.io/")
14127 (synopsis "Git implementation in Python")
14128 (description "Dulwich is an implementation of the Git file formats and
14129 protocols written in pure Python.")
14130 ;; Can be used with either license.
14131 (license (list license:asl2.0 license:gpl2+))))
14132
14133 (define-public python2-dulwich
14134 (package-with-python2 python-dulwich))
14135
14136 (define-public python-pbkdf2
14137 (package
14138 (name "python-pbkdf2")
14139 (version "1.3")
14140 (source
14141 (origin
14142 (method url-fetch)
14143 (uri (pypi-uri "pbkdf2" version))
14144 (sha256
14145 (base32
14146 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
14147 (build-system python-build-system)
14148 (arguments
14149 '(#:phases
14150 (modify-phases %standard-phases
14151 (replace 'check
14152 (lambda _
14153 (setenv "PYTHONPATH"
14154 (string-append (getcwd) "/build/lib:"
14155 (getenv "PYTHONPATH")))
14156 (zero? (system* "python" "test/test_pbkdf2.py")))))))
14157 (propagated-inputs
14158 `(("python-pycrypto" ,python-pycrypto))) ; optional
14159 (home-page "http://www.dlitz.net/software/python-pbkdf2/")
14160 (synopsis "Password-based key derivation")
14161 (description "This module implements the password-based key derivation
14162 function, PBKDF2, specified in RSA PKCS#5 v2.0.
14163
14164 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
14165 is part of the RSA Public Key Cryptography Standards series. The provided
14166 implementation takes a password or a passphrase and a salt value (and
14167 optionally a iteration count, a digest module, and a MAC module) and provides
14168 a file-like object from which an arbitrarly-sized key can be read.")
14169 (license license:expat)))
14170
14171 (define-public python2-pbkdf2
14172 (package-with-python2 python-pbkdf2))
14173
14174 (define-public python-qrcode
14175 (package
14176 (name "python-qrcode")
14177 (version "5.3")
14178 (source
14179 (origin
14180 (method url-fetch)
14181 (uri (pypi-uri "qrcode" version))
14182 (sha256
14183 (base32
14184 "0kljfrfq0c2rmxf8am57333ia41kd0snbm2rnqbdy816hgpcq5a1"))))
14185 (build-system python-build-system)
14186 (arguments
14187 ;; FIXME: Tests require packaging 'pymaging'.
14188 '(#:tests? #f))
14189 (propagated-inputs
14190 `(("python-lxml" ,python-lxml) ; for SVG output
14191 ("python-pillow" ,python-pillow) ; for PNG output
14192 ("python-six" ,python-six)))
14193 (home-page "https://github.com/lincolnloop/python-qrcode")
14194 (synopsis "QR Code image generator")
14195 (description "This package provides a pure Python QR Code generator
14196 module. It uses the Python Imaging Library (PIL) to allow for the generation
14197 of QR Codes.
14198
14199 In addition this package provides a command line tool to generate QR codes and
14200 either write these QR codes to a file or do the output as ascii art at the
14201 console.")
14202 (license license:bsd-3)))
14203
14204 (define-public python2-qrcode
14205 (package-with-python2 python-qrcode))
14206
14207 ;; SlowAES isn't compatible with Python 3.
14208 (define-public python2-slowaes
14209 (package
14210 (name "python2-slowaes")
14211 (version "0.1a1")
14212 (source
14213 (origin
14214 (method url-fetch)
14215 (uri (pypi-uri "slowaes" version))
14216 (sha256
14217 (base32
14218 "02dzajm83a7lqgxf6r3hgj64wfmcxz8gs4nvgxpvj5n19kjqlrc3"))))
14219 (build-system python-build-system)
14220 (arguments `(#:python ,python-2))
14221 (home-page "http://code.google.com/p/slowaes/")
14222 (synopsis "Implementation of AES in Python")
14223 (description "This package contains an implementation of AES in Python.
14224 This implementation is slow (hence the project name) but still useful when
14225 faster ones are not available.")
14226 (license license:asl2.0)))
14227
14228 (define-public python-rst2ansi
14229 (package
14230 (name "python-rst2ansi")
14231 (version "0.1.5")
14232 (source
14233 (origin
14234 (method url-fetch)
14235 (uri (pypi-uri "rst2ansi" version))
14236 (sha256
14237 (base32
14238 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
14239 (build-system python-build-system)
14240 (propagated-inputs
14241 `(("python-docutils" ,python-docutils)))
14242 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
14243 (synopsis "Convert RST to ANSI-decorated console output")
14244 (description
14245 "Python module dedicated to rendering RST (reStructuredText) documents
14246 to ansi-escaped strings suitable for display in a terminal.")
14247 (license license:expat)))
14248
14249 (define-public python-ansi2html
14250 (package
14251 (name "python-ansi2html")
14252 (version "1.2.0")
14253 (source
14254 (origin
14255 (method url-fetch)
14256 (uri (pypi-uri "ansi2html" version))
14257 (sha256
14258 (base32
14259 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
14260 (build-system python-build-system)
14261 (native-inputs
14262 `(("python-mock" ,python-mock)
14263 ("python-nose" ,python-nose)))
14264 (propagated-inputs
14265 `(("python-six" ,python-six)))
14266 (home-page "http://github.com/ralphbean/ansi2html")
14267 (synopsis "Convert ANSI-decorated console output to HTML")
14268 (description
14269 "@command{ansi2html} is a Python library and command line utility for
14270 convering text with ANSI color codes to HTML or LaTeX.")
14271 (license license:gpl3+)))
14272
14273 (define-public python2-ansi2html
14274 (package-with-python2 python-ansi2html))
14275
14276 (define-public python-ddt
14277 (package
14278 (name "python-ddt")
14279 (version "1.1.1")
14280 (source
14281 (origin
14282 (method url-fetch)
14283 (uri (pypi-uri "ddt" version))
14284 (sha256
14285 (base32
14286 "1c00ikkxr7lha97c81k938bzhgd4pbwamkjn0h4nkhr3xk00zp6n"))))
14287 (build-system python-build-system)
14288 (native-inputs
14289 `(("python-mock" ,python-mock)
14290 ("python-nose" ,python-nose)))
14291 (propagated-inputs
14292 `(("python-six" ,python-six)
14293 ("python-pyyaml" ,python-pyyaml)))
14294 (home-page "https://github.com/txels/ddt")
14295 (synopsis "Data-Driven Tests")
14296 (description
14297 "DDT (Data-Driven Tests) allows you to multiply one test case by running
14298 it with different test data, and make it appear as multiple test cases.")
14299 (license license:expat)))
14300
14301 (define-public python2-ddt
14302 (package-with-python2 python-ddt))
14303
14304 (define-public python-pycosat
14305 (package
14306 (name "python-pycosat")
14307 (version "0.6.1")
14308 (source
14309 (origin
14310 (method url-fetch)
14311 (uri (pypi-uri "pycosat" version))
14312 (sha256
14313 (base32
14314 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
14315 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
14316 (build-system python-build-system)
14317 (home-page "https://github.com/ContinuumIO/pycosat")
14318 (synopsis "Bindings to picosat (a SAT solver)")
14319 (description
14320 "This package provides efficient Python bindings to @code{picosat} on
14321 the C level. When importing pycosat, the @code{picosat} solver becomes part
14322 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
14323 Problem} (SAT) solver.")
14324 (license license:expat)))
14325
14326 (define-public python2-pycosat
14327 (package-with-python2 python-pycosat))
14328
14329 (define-public python2-ruamel.ordereddict
14330 (package
14331 (name "python2-ruamel.ordereddict")
14332 (version "0.4.9")
14333 (source
14334 (origin
14335 (method url-fetch)
14336 (uri (pypi-uri "ruamel.ordereddict" version))
14337 (sha256
14338 (base32
14339 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
14340 (build-system python-build-system)
14341 (arguments
14342 `(#:python ,python-2
14343 #:phases
14344 (modify-phases %standard-phases
14345 (delete 'check)
14346 (add-after 'install 'check
14347 (lambda* (#:key inputs outputs #:allow-other-keys)
14348 (add-installed-pythonpath inputs outputs)
14349 (zero? (system* "python" "test/testordereddict.py")))))))
14350 (home-page "https://bitbucket.org/ruamel/ordereddict")
14351 (synopsis "Version of dict that keeps keys in insertion order")
14352 (description
14353 "This is an implementation of an ordered dictionary with @dfn{Key
14354 Insertion Order} (KIO: updates of values do not affect the position of the
14355 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
14356 removed and put at the back). The standard library module @code{OrderedDict},
14357 implemented later, implements a subset of @code{ordereddict} functionality.
14358 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
14359 Order} (KSO, no sorting function can be specified, but a transform can be
14360 specified to apply on the key before comparison (e.g. @code{string.lower})).")
14361 (license license:expat)))
14362
14363 (define-public python-pypeg2
14364 (package
14365 (name "python-pypeg2")
14366 (version "2.15.2")
14367 (source
14368 (origin
14369 (method url-fetch)
14370 (uri (pypi-uri "pyPEG2" version))
14371 (sha256
14372 (base32
14373 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
14374 (build-system python-build-system)
14375 (propagated-inputs `(("python-lxml" ,python-lxml)))
14376 (arguments
14377 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
14378 '(#:tests? #f))
14379 (home-page "https://fdik.org/pyPEG/")
14380 (synopsis "Parsering Expression Grammars in Python")
14381 (description "PyPEG is an intrinsic parser interpreter framework for
14382 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
14383 parse many formal languages.")
14384 (license license:gpl2)))
14385
14386 (define-public python-incremental
14387 (package
14388 (name "python-incremental")
14389 (version "17.5.0")
14390 (source
14391 (origin
14392 (method url-fetch)
14393 (uri (pypi-uri "incremental" version))
14394 (sha256
14395 (base32
14396 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
14397 (build-system python-build-system)
14398 (home-page "https://github.com/hawkowl/incremental")
14399 (synopsis "Library for versioning Python projects")
14400 (description "Incremental is a small library that versions your Python
14401 projects.")
14402 (license license:expat)))
14403
14404 (define-public python2-incremental
14405 (package-with-python2 python-incremental))
14406
14407 (define-public python-automat
14408 (package
14409 (name "python-automat")
14410 (version "0.6.0")
14411 (source (origin
14412 (method url-fetch)
14413 (uri (pypi-uri "Automat" version))
14414 (sha256
14415 (base32
14416 "1a7nsrljysfmdqmpn2apfa1gg6rfah4y9sizvns8gb08rx7d07rw"))))
14417 (build-system python-build-system)
14418 ;; We disable the tests because they require python-twisted, while
14419 ;; python-twisted depends on python-automat. Twisted is optional, but the
14420 ;; tests fail if it is not available. Also see
14421 ;; <https://github.com/glyph/automat/issues/71>.
14422 (arguments '(#:tests? #f))
14423 (native-inputs
14424 `(("python-m2r" ,python-m2r)
14425 ("python-setuptools-scm" ,python-setuptools-scm)
14426 ("python-graphviz" ,python-graphviz)))
14427 (propagated-inputs
14428 `(("python-six" ,python-six)
14429 ("python-attrs" ,python-attrs)))
14430 (home-page "https://github.com/glyph/Automat")
14431 (synopsis "Self-service finite-state machines")
14432 (description "Automat is a library for concise, idiomatic Python
14433 expression of finite-state automata (particularly deterministic finite-state
14434 transducers).")
14435 (license license:expat)))
14436
14437 (define-public python2-automat
14438 (package-with-python2 python-automat))
14439
14440 (define-public python-m2r
14441 (package
14442 (name "python-m2r")
14443 (version "0.1.12")
14444 (source (origin
14445 (method url-fetch)
14446 (uri (pypi-uri "m2r" version))
14447 (sha256
14448 (base32
14449 "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd"))))
14450 (build-system python-build-system)
14451 (propagated-inputs
14452 `(("python-docutils" ,python-docutils)
14453 ("python-mistune" ,python-mistune)))
14454 (native-inputs
14455 `(("python-pygments" ,python-pygments)
14456 ("python-mock" ,python-mock)))
14457 (home-page "https://github.com/miyakogi/m2r")
14458 (synopsis "Markdown to reStructuredText converter")
14459 (description "M2R converts a markdown file including reST markups to valid
14460 reST format.")
14461 (license license:expat)))
14462
14463 (define-public python2-m2r
14464 (package-with-python2 python-m2r))
14465
14466 (define-public python-constantly
14467 (package
14468 (name "python-constantly")
14469 (version "15.1.0")
14470 (source (origin
14471 (method url-fetch)
14472 (uri (pypi-uri "constantly" version))
14473 (sha256
14474 (base32
14475 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
14476 (build-system python-build-system)
14477 (home-page "https://github.com/twisted/constantly")
14478 (synopsis "Symbolic constants in Python")
14479 (description "Constantly is a Python library that provides symbolic
14480 constant support. It includes collections and constants with text, numeric,
14481 and bit flag values.")
14482 (license license:expat)))
14483
14484 (define-public python2-constantly
14485 (package-with-python2 python-constantly))
14486
14487 (define-public python-attrs
14488 (package
14489 (name "python-attrs")
14490 (version "17.2.0")
14491 (source (origin
14492 (method url-fetch)
14493 (uri (pypi-uri "attrs" version))
14494 (sha256
14495 (base32
14496 "04gx08ikpk26wnq22f7l42gapcvk8iz1512r927k6sadz6cinkax"))))
14497 (build-system python-build-system)
14498 (native-inputs
14499 `(("python-pytest" ,python-pytest)
14500 ("python-hypothesis" ,python-hypothesis)
14501 ("python-zope-interface" ,python-zope-interface)
14502 ("python-six" ,python-six)))
14503 (home-page "https://github.com/python-attrs/attrs/")
14504 (synopsis "Attributes without boilerplate")
14505 (description "@code{attrs} is a Python package with class decorators that
14506 ease the chores of implementing the most common attribute-related object
14507 protocols.")
14508 (license license:expat)))
14509
14510 (define-public python2-attrs
14511 (package-with-python2 python-attrs))
14512
14513 (define-public python2-cliapp
14514 (package
14515 (name "python2-cliapp")
14516 (version "1.20170823")
14517 (source
14518 (origin
14519 (method url-fetch)
14520 (uri (string-append
14521 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
14522 version ".tar.gz"))
14523 (sha256
14524 (base32
14525 "1i9gik0xrj6jmi95s5w988jl1y265baz5xm5pbqdyvsh8h9ln6yq"))))
14526 (build-system python-build-system)
14527 (arguments
14528 `(#:python ,python-2
14529 #:phases
14530 (modify-phases %standard-phases
14531 ;; check phase needs to be run before the build phase. If not,
14532 ;; coverage-test-runner looks for tests for the built source files,
14533 ;; and fails.
14534 (delete 'check)
14535 (add-before 'build 'check
14536 (lambda _
14537 ;; Disable python3 tests
14538 (substitute* "check"
14539 (("python3") "# python3"))
14540 (zero? (system* "./check")))))))
14541 (native-inputs
14542 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
14543 ("python2-pep8" ,python2-pep8)))
14544 (propagated-inputs
14545 `(("python2-pyaml" ,python2-pyaml)))
14546 (home-page "https://liw.fi/cliapp/")
14547 (synopsis "Python framework for command line programs")
14548 (description "@code{python2-cliapp} is a python framework for
14549 command line programs. It contains the typical stuff such programs
14550 need to do, such as parsing the command line for options, and
14551 iterating over input files.")
14552 (license license:gpl2+)))
14553
14554 (define-public python2-ttystatus
14555 (package
14556 (name "python2-ttystatus")
14557 (version "0.35")
14558 (source
14559 (origin
14560 (method url-fetch)
14561 (uri (string-append
14562 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
14563 version ".tar.gz"))
14564 (sha256
14565 (base32
14566 "0vivqbw7ddhsq1zj3g9cvvv4f0phl0pis2smsnwcr2szz2fk3hl6"))))
14567 (build-system python-build-system)
14568 (native-inputs
14569 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
14570 ("python2-pep8" ,python2-pep8)))
14571 (arguments
14572 `(#:python ,python-2
14573 #:phases
14574 (modify-phases %standard-phases
14575 ;; check phase needs to be run before the build phase. If not,
14576 ;; coverage-test-runner looks for tests for the built source files,
14577 ;; and fails.
14578 (delete 'check)
14579 (add-before 'build 'check
14580 (lambda _
14581 (zero? (system* "make" "check")))))))
14582 (home-page "https://liw.fi/ttystatus/")
14583 (synopsis "Python library for showing progress reporting and
14584 status updates on terminals")
14585 (description "@code{python2-ttystatus} is a python library for
14586 showing progress reporting and status updates on terminals, for
14587 command line programs. Output is automatically adapted to the width
14588 of the terminal: truncated if it does not fit, and resized if the
14589 terminal size changes.")
14590 (license license:gpl3+)))
14591
14592 (define-public python2-tracing
14593 (package
14594 (name "python2-tracing")
14595 (version "0.10")
14596 (source
14597 (origin
14598 (method url-fetch)
14599 (uri (string-append
14600 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
14601 version ".tar.gz"))
14602 (sha256
14603 (base32
14604 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
14605 (build-system python-build-system)
14606 (arguments
14607 `(#:python ,python-2))
14608 (home-page "https://liw.fi/tracing/")
14609 (synopsis "Python debug logging helper")
14610 (description "@code{python2-tracing} is a python library for
14611 logging debug messages. It provides a way to turn debugging messages
14612 on and off, based on the filename they occur in. It is much faster
14613 than using @code{logging.Filter} to accomplish the same thing, which
14614 matters when code is run in production mode. The actual logging still
14615 happens using the @code{logging} library.")
14616 (license license:gpl3+)))
14617
14618 (define-public python2-larch
14619 (package
14620 (name "python2-larch")
14621 (version "1.20151025")
14622 (source
14623 (origin
14624 (method url-fetch)
14625 (uri (string-append
14626 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
14627 version ".tar.gz"))
14628 (patches (search-patches
14629 "python2-larch-coverage-4.0a6-compatibility.patch"))
14630 (sha256
14631 (base32
14632 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
14633 (build-system python-build-system)
14634 (arguments
14635 `(#:python ,python-2
14636 #:phases
14637 (modify-phases %standard-phases
14638 ;; check phase needs to be run before the build phase. If not,
14639 ;; coverage-test-runner looks for tests for the built source files,
14640 ;; and fails.
14641 (delete 'check)
14642 (add-before 'build 'check
14643 (lambda _
14644 (zero? (system* "make" "check")))))))
14645 (native-inputs
14646 `(("cmdtest" ,cmdtest)
14647 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
14648 (propagated-inputs
14649 `(("python2-tracing" ,python2-tracing)))
14650 (home-page "https://liw.fi/larch/")
14651 (synopsis "Python copy-on-write B-tree library")
14652 (description "@code{python2-larch} is an implementation of
14653 particular kind of B-tree, based on research by Ohad Rodeh. See
14654 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
14655 on the data structure.
14656
14657 The distinctive feature of this B-tree is that a node is never
14658 (conceptually) modified. Instead, all updates are done by
14659 copy-on-write. This makes it easy to clone a tree, and modify only the
14660 clone, while other processes access the original tree.")
14661 (license license:gpl3+)))
14662
14663 (define-public python-htmlmin
14664 (package
14665 (name "python-htmlmin")
14666 (version "0.1.10")
14667 (source
14668 (origin
14669 (method url-fetch)
14670 (uri (pypi-uri "htmlmin" version))
14671 (sha256
14672 (base32
14673 "0qxa93j3p1ak32qh8d9kshqv8v3z0hkc13dwbhp5cn7sn3xmsp6a"))))
14674 (arguments
14675 `(#:tests? #f)) ;htmlmin has no tests
14676 (build-system python-build-system)
14677 (home-page "https://htmlmin.readthedocs.org/en/latest/")
14678 (synopsis "HTML minifier")
14679 (description "@code{htmlmin} is an HTML minifier that just works.
14680 It comes with safe defaults and easily configurable options.")
14681 (license license:bsd-3)))
14682
14683 (define-public python2-htmlmin
14684 (package-with-python2 python-htmlmin))
14685
14686 (define-public python-flask-htmlmin
14687 (package
14688 (name "python-flask-htmlmin")
14689 (version "1.2")
14690 (source
14691 (origin
14692 (method url-fetch)
14693 (uri (pypi-uri "Flask-HTMLmin" version))
14694 (sha256
14695 (base32
14696 "1n6zlq72kakkw0z2jpq6nh74lfsmxybm4g053pwhc14fbr809348"))))
14697 (propagated-inputs
14698 `(("python-flask" ,python-flask)
14699 ("python-htmlmin" ,python-htmlmin)))
14700 (build-system python-build-system)
14701 (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
14702 (synopsis "HTML response minifier for Flask")
14703 (description
14704 "Minify @code{text/html} MIME type responses when using @code{Flask}.")
14705 (license license:bsd-3)))
14706
14707 (define-public python2-flask-htmlmin
14708 (package-with-python2 python-flask-htmlmin))
14709
14710 (define-public python-flask-login
14711 (package
14712 (name "python-flask-login")
14713 (version "0.4.0")
14714 (source
14715 (origin
14716 (method url-fetch)
14717 (uri (string-append "https://github.com/maxcountryman/flask-login/archive/"
14718 version ".tar.gz"))
14719 (file-name (string-append name "-" version ".tar.gz"))
14720 (sha256
14721 (base32
14722 "1pdqp7a2gyb7k06xda004x0fi2w66s6kn2i0ndkqndmg12d83f9w"))))
14723 (arguments
14724 ;; Tests fail PEP8 compliance. See:
14725 ;; https://github.com/maxcountryman/flask-login/issues/340
14726 `(#:tests? #f))
14727 (build-system python-build-system)
14728 (home-page "https://github.com/maxcountryman/flask-login")
14729 (synopsis "User session management for Flask")
14730 (description
14731 "@code{Flask-Login} provides user session management for Flask. It
14732 handles the common tasks of logging in, logging out, and remembering your
14733 users' sessions over extended periods of time.")
14734 (license license:expat)))
14735
14736 (define-public python2-flask-login
14737 (package-with-python2 python-flask-login))
14738
14739 (define-public python-astroid
14740 (package
14741 (name "python-astroid")
14742 (version "1.5.3")
14743 (source
14744 (origin
14745 (method url-fetch)
14746 (uri (string-append
14747 "https://github.com/PyCQA/astroid/archive/astroid-"
14748 version ".tar.gz"))
14749 (sha256
14750 (base32
14751 "0isn5p7f9n48hmksgbrj7dkm9dyglnayzn5jngk37qywg8a74ngn"))))
14752 (build-system python-build-system)
14753 (propagated-inputs
14754 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
14755 ("python-six" ,python-six)
14756 ("python-wrapt" ,python-wrapt)))
14757 (arguments
14758 `(#:phases
14759 (modify-phases %standard-phases
14760 (replace 'check
14761 (lambda _
14762 (zero? (system* "python" "-m" "unittest" "discover"
14763 "-p" "unittest*.py")))))))
14764 (home-page "https://github.com/PyCQA/astroid")
14765 (synopsis "Common base representation of python source code for pylint and
14766 other projects")
14767 (description "@code{python-astroid} provides a common base representation
14768 of python source code for projects such as pychecker, pyreverse, pylint, etc.
14769
14770 It provides a compatible representation which comes from the _ast module. It
14771 rebuilds the tree generated by the builtin _ast module by recursively walking
14772 down the AST and building an extended ast. The new node classes have
14773 additional methods and attributes for different usages. They include some
14774 support for static inference and local name scopes. Furthermore, astroid
14775 builds partial trees by inspecting living objects.")
14776 (license license:lgpl2.1+)
14777 (properties `((python2-variant . ,(delay python2-astroid))))))
14778
14779 (define-public python2-astroid
14780 (let ((base (package-with-python2
14781 (strip-python2-variant python-astroid))))
14782 (package (inherit base)
14783 (propagated-inputs
14784 `(("python2-backports-functools-lru-cache"
14785 ,python2-backports-functools-lru-cache)
14786 ("python2-enum34" ,python2-enum34)
14787 ("python2-singledispatch" ,python2-singledispatch)
14788 ,@(package-propagated-inputs base))))))
14789
14790 (define-public python-isort
14791 (package
14792 (name "python-isort")
14793 (version "4.2.5")
14794 (source
14795 (origin
14796 (method url-fetch)
14797 (uri (string-append
14798 "https://github.com/timothycrosley/isort/archive/"
14799 version ".tar.gz"))
14800 (file-name (string-append name "-" version ".tar.gz"))
14801 (sha256
14802 (base32
14803 "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh"))))
14804 (build-system python-build-system)
14805 (native-inputs
14806 `(("python-mock" ,python-mock)
14807 ("python-pytest" ,python-pytest)))
14808 (home-page "https://github.com/timothycrosley/isort")
14809 (synopsis "Python utility/library to sort python imports")
14810 (description "@code{python-isort} is a python utility/library to sort
14811 imports alphabetically, and automatically separated into sections. It
14812 provides a command line utility, a python library and plugins for various
14813 editors.")
14814 (license license:expat)))
14815
14816 (define-public python2-isort
14817 (package-with-python2 python-isort))
14818
14819 (define-public python2-backports-functools-lru-cache
14820 (package
14821 (name "python2-backports-functools-lru-cache")
14822 (version "1.3")
14823 (source
14824 (origin
14825 (method url-fetch)
14826 ;; only the pypi tarballs contain the necessary metadata
14827 (uri (pypi-uri "backports.functools_lru_cache" version))
14828 (sha256
14829 (base32
14830 "158ysf2hb0q4p4695abfiym9x1ywg0dgh8a3apd7gqaaxjy22jj4"))))
14831 (build-system python-build-system)
14832 (native-inputs
14833 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
14834 (arguments
14835 `(#:python ,python-2))
14836 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
14837 (synopsis "Backport of functools.lru_cache from Python 3.3")
14838 (description "@code{python2-backports-functools-lru-cache} is a backport
14839 of @code{functools.lru_cache} from python 3.3.")
14840 (license license:expat)))
14841
14842 (define-public python-configparser
14843 (package
14844 (name "python-configparser")
14845 (version "3.5.0")
14846 (source
14847 (origin
14848 (method url-fetch)
14849 (uri (string-append
14850 "https://bitbucket.org/ambv/configparser/get/"
14851 version ".tar.bz2"))
14852 (file-name (string-append name "-" version ".tar.gz"))
14853 (sha256
14854 (base32
14855 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
14856 (build-system python-build-system)
14857 (home-page "http://docs.python.org/py3k/library/configparser.html")
14858 (synopsis "Backport of configparser from python 3.5")
14859 (description "@code{python-configparser} is a backport of
14860 @code{configparser} from Python 3.5 so that it can be used directly
14861 in other versions.")
14862 (license license:expat)))
14863
14864 (define-public python2-configparser
14865 (package-with-python2 python-configparser))
14866
14867 (define-public python2-coverage-test-runner
14868 (package
14869 (name "python2-coverage-test-runner")
14870 (version "1.11")
14871 (source
14872 (origin
14873 (method url-fetch)
14874 (uri (string-append
14875 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/"
14876 "coverage-test-runner/snapshot/coverage-test-runner-"
14877 version ".tar.gz"))
14878 (sha256
14879 (base32
14880 "0y1m7z3dl63kmhcmydl1mwg0hacnf6ghrx9dah17j9iasssfa3g7"))))
14881 (build-system python-build-system)
14882 (arguments
14883 `(#:python ,python-2
14884 #:phases
14885 (modify-phases %standard-phases
14886 (replace 'check
14887 (lambda _
14888 (zero? (system* "./testrun")))))))
14889 (propagated-inputs
14890 `(("python2-coverage" ,python2-coverage)))
14891 (home-page "https://liw.fi/coverage-test-runner/")
14892 (synopsis "Python module for running unit tests")
14893 (description "@code{CoverageTestRunner} is a python module for running
14894 unit tests and failing them if the unit test module does not exercise all
14895 statements in the module it tests.")
14896 (license license:gpl3+)))
14897
14898 (define-public python-pylint
14899 (package
14900 (name "python-pylint")
14901 (version "1.7.2")
14902 (source
14903 (origin
14904 (method url-fetch)
14905 (uri (string-append
14906 "https://github.com/PyCQA/pylint/archive/pylint-"
14907 version ".tar.gz"))
14908 (sha256
14909 (base32
14910 "0mzn1czhf1mgr2wiqfihb274sja02h899b85kywdpivppa9nwrmp"))))
14911 (build-system python-build-system)
14912 (native-inputs
14913 `(("python-pytest" ,python-pytest)
14914 ("python-pytest-runner" ,python-pytest-runner)
14915 ("python-tox" ,python-tox)))
14916 (propagated-inputs
14917 `(("python-astroid" ,python-astroid)
14918 ("python-isort" ,python-isort)
14919 ("python-mccabe" ,python-mccabe)
14920 ("python-six" ,python-six)))
14921 (arguments
14922 `(#:phases
14923 (modify-phases %standard-phases
14924 (replace 'check
14925 (lambda _
14926 ;; Somehow, tests for python2-pylint
14927 ;; fail if run from the build directory
14928 (let ((work "/tmp/work"))
14929 (mkdir-p work)
14930 (setenv "PYTHONPATH"
14931 (string-append (getenv "PYTHONPATH") ":" work))
14932 (copy-recursively "." work)
14933 (with-directory-excursion "/tmp"
14934 (zero? (system* "python" "-m" "unittest" "discover"
14935 "-s" (string-append work "/pylint/test")
14936 "-p" "*test_*.py")))))))))
14937 (home-page "https://github.com/PyCQA/pylint")
14938 (synopsis "Python source code analyzer which looks for coding standard
14939 errors")
14940 (description "Pylint is a Python source code analyzer which looks
14941 for programming errors, helps enforcing a coding standard and sniffs
14942 for some code smells (as defined in Martin Fowler's Refactoring book).
14943
14944 Pylint has many rules enabled by default, way too much to silence them
14945 all on a minimally sized program. It's highly configurable and handle
14946 pragmas to control it from within your code. Additionally, it is
14947 possible to write plugins to add your own checks.")
14948 (properties `((python2-variant . ,(delay python2-pylint))))
14949 (license license:gpl2+)))
14950
14951 (define-public python2-pylint
14952 (let ((pylint (package-with-python2
14953 (strip-python2-variant python-pylint))))
14954 (package (inherit pylint)
14955 (propagated-inputs
14956 `(("python2-backports-functools-lru-cache"
14957 ,python2-backports-functools-lru-cache)
14958 ("python2-configparser" ,python2-configparser)
14959 ,@(package-propagated-inputs pylint))))))
14960
14961 (define-public python-paramunittest
14962 (package
14963 (name "python-paramunittest")
14964 (version "0.2")
14965 (source
14966 (origin
14967 (method url-fetch)
14968 (uri (pypi-uri "ParamUnittest" version))
14969 (sha256
14970 (base32
14971 "0kp793hws5xv1wvycxq7jw2pwy36f35k39jg8hx5qikij5a0jid1"))))
14972 (build-system python-build-system)
14973 (home-page
14974 "https://github.com/rik0/ParamUnittest")
14975 (synopsis
14976 "Simple extension to have parametrized unit tests")
14977 (description
14978 "This package allows to create parametrized unit-tests that work with the standard
14979 unittest package. A parametrized test case is automatically converted to multiple test
14980 cases. Since they are TestCase subclasses, they work with other test suites that
14981 recognize TestCases.")
14982 (license license:bsd-2)))
14983
14984 (define-public python2-python-paramunittest
14985 (package-with-python2 python-paramunittest))
14986
14987 (define-public python-mando
14988 (package
14989 (name "python-mando")
14990 (version "0.5")
14991 (source
14992 (origin
14993 (method url-fetch)
14994 (uri (pypi-uri "mando" version))
14995 (sha256
14996 (base32
14997 "0q05h66439gqdmlk4jqm6xrwrzfdgs4mwk70barxhr2y83qbbdc0"))))
14998 (build-system python-build-system)
14999 (propagated-inputs
15000 `(("python-rst2ansi" ,python-rst2ansi)))
15001 (native-inputs
15002 `(("python-sphinx" ,python-sphinx-1.5.3)
15003 ("python-paramunittest" ,python-paramunittest)))
15004 (home-page "https://mando.readthedocs.org/")
15005 (synopsis
15006 "Wrapper around argparse, allowing creation of complete CLI applications")
15007 (description
15008 "This package is a wrapper around argparse, allowing you to write complete CLI
15009 applications in seconds while maintaining all the flexibility.")
15010 (license license:expat)))
15011
15012 (define-public python2-mando
15013 (package-with-python2 python-mando))
15014
15015 (define-public python-mando-0.3.1
15016 ;; python-radon (version 1.5.0) has a requirement
15017 ;; for mando<0.4,>=0.3
15018 (package
15019 (inherit python-mando)
15020 (name "python-mando")
15021 (version "0.3.1")
15022 (source
15023 (origin
15024 (method url-fetch)
15025 (uri (string-append "https://github.com/rubik/mando/archive/v"
15026 version
15027 ".tar.gz"))
15028 (sha256
15029 (base32
15030 "17jlkdpqw22z1nyml5ybslilqkzmnk0dxxjml8bfghav1l5hbwd2"))))))
15031
15032 (define-public python-fudge
15033 (package
15034 (name "python-fudge")
15035 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
15036 ;; package, which is currently the only use of this package.
15037 (version "0.9.6")
15038 (source
15039 (origin
15040 (method url-fetch)
15041 (uri (pypi-uri "fudge" version))
15042 (sha256
15043 (base32
15044 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
15045 (build-system python-build-system)
15046 (arguments
15047 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
15048 (home-page "https://github.com/fudge-py/fudge")
15049 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
15050 (description
15051 "Fudge is a Python module for using fake objects (mocks and stubs) to
15052 test real ones.
15053
15054 In readable Python code, you declare the methods available on your fake object
15055 and how they should be called. Then you inject that into your application and
15056 start testing. This declarative approach means you don’t have to record and
15057 playback actions and you don’t have to inspect your fakes after running code.
15058 If the fake object was used incorrectly then you’ll see an informative
15059 exception message with a traceback that points to the culprit.")
15060 (license license:expat)))
15061
15062 (define-public python2-fudge
15063 (package-with-python2 python-fudge))
15064
15065 (define-public python-oauth2client
15066 (package
15067 (name "python-oauth2client")
15068 (version "4.0.0")
15069 (source
15070 (origin
15071 (method url-fetch)
15072 (uri (pypi-uri "oauth2client" version))
15073 (sha256
15074 (base32
15075 "1irqqap2zibysf8dba8sklfqikia579srd0phm5n754ni0h59gl0"))))
15076 (build-system python-build-system)
15077 (arguments
15078 `(#:tests? #f))
15079 (propagated-inputs
15080 `(("python-httplib2" ,python-httplib2)
15081 ("python-pyasn1" ,python-pyasn1)
15082 ("python-pyasn1-modules" ,python-pyasn1-modules)
15083 ("python-rsa" ,python-rsa)
15084 ("python-six" ,python-six)))
15085 (home-page "http://github.com/google/oauth2client/")
15086 (synopsis "OAuth 2.0 client library")
15087 (description "@code{python-oauth2client} provides an OAuth 2.0 client
15088 library for Python")
15089 (license license:asl2.0)))
15090
15091 (define-public python-flask-oidc
15092 (package
15093 (name "python-flask-oidc")
15094 (version "1.1.1")
15095 (source
15096 (origin
15097 (method url-fetch)
15098 (uri (pypi-uri "flask-oidc" version))
15099 (sha256
15100 (base32
15101 "1ay5j0mf174bix7i67hclr95gv16z81fpx0dijvi0gydvdj3ddy2"))))
15102 (build-system python-build-system)
15103 (propagated-inputs
15104 `(("python-flask" ,python-flask)
15105 ("python-itsdangerous" ,python-itsdangerous)
15106 ("python-oauth2client" ,python-oauth2client)
15107 ("python-six" ,python-six)))
15108 (native-inputs
15109 `(("python-nose" ,python-nose)
15110 ("python-mock" ,python-mock)))
15111 (home-page "https://github.com/puiterwijk/flask-oidc")
15112 (synopsis "OpenID Connect extension for Flask")
15113 (description "@code{python-flask-oidc} provides an OpenID Connect extension
15114 for Flask.")
15115 (license license:bsd-2)))
15116
15117 (define-public python-mwclient
15118 (package
15119 (name "python-mwclient")
15120 (version "0.8.4")
15121 (source
15122 (origin
15123 (method url-fetch)
15124 ;; The PyPI version wouldn't contain tests.
15125 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
15126 "v" version ".tar.gz"))
15127 (sha256
15128 (base32
15129 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
15130 (build-system python-build-system)
15131 (propagated-inputs
15132 `(("python-requests" ,python-requests)
15133 ("python-requests-oauthlib"
15134 ,python-requests-oauthlib)
15135 ("python-six" ,python-six)))
15136 (native-inputs
15137 `(("python-mock" ,python-mock)
15138 ("python-pytest" ,python-pytest)
15139 ("python-pytest-pep8" ,python-pytest-pep8)
15140 ("python-pytest-cache" ,python-pytest-cache)
15141 ("python-pytest-cov" ,python-pytest-cov)
15142 ("python-responses" ,python-responses)))
15143 (home-page "https://github.com/btongminh/mwclient")
15144 (synopsis "MediaWiki API client")
15145 (description "This package provides a MediaWiki API client.")
15146 (license license:expat)))
15147
15148 (define-public python2-mwclient
15149 (package-with-python2 python-mwclient))
15150
15151 (define-public python-pytest-warnings
15152 (package
15153 (name "python-pytest-warnings")
15154 (version "0.2.0")
15155 (source
15156 (origin
15157 (method url-fetch)
15158 (uri (pypi-uri "pytest-warnings" version))
15159 (sha256
15160 (base32
15161 "0gf2dpahpl5igb7jh1sr9acj3z3gp7zahqdqb69nk6wx01c8kc1g"))))
15162 (build-system python-build-system)
15163 (propagated-inputs
15164 `(("pytest" ,python-pytest-3.0)))
15165 (home-page "https://github.com/fschulze/pytest-warnings")
15166 (synopsis "Pytest plugin to list Python warnings in pytest report")
15167 (description
15168 "Python-pytest-warnings is a pytest plugin to list Python warnings in
15169 pytest report.")
15170 (license license:expat)))
15171
15172 (define-public python2-pytest-warnings
15173 (package-with-python2 python-pytest-warnings))
15174
15175 (define-public python-pytest-capturelog
15176 (package
15177 (name "python-pytest-capturelog")
15178 (version "0.7")
15179 (source
15180 (origin
15181 (method url-fetch)
15182 (uri (pypi-uri "pytest-capturelog" version ".tar.gz"))
15183 (sha256
15184 (base32
15185 "038049nyjl7di59ycnxvc9nydivc5m8np3hqq84j2iirkccdbs5n"))))
15186 (build-system python-build-system)
15187 (propagated-inputs
15188 `(("pytest" ,python-pytest-3.0)))
15189 (home-page "http://bitbucket.org/memedough/pytest-capturelog/overview")
15190 (synopsis "Pytest plugin to catch log messages")
15191 (description
15192 "Python-pytest-catchlog is a pytest plugin to catch log messages.")
15193 (license license:expat)))
15194
15195 (define-public python2-pytest-capturelog
15196 (package-with-python2 python-pytest-capturelog))
15197
15198 (define-public python-pytest-catchlog
15199 (package
15200 (name "python-pytest-catchlog")
15201 (version "1.2.2")
15202 (source
15203 (origin
15204 (method url-fetch)
15205 (uri (pypi-uri "pytest-catchlog" version ".zip"))
15206 (sha256
15207 (base32
15208 "1w7wxh27sbqwm4jgwrjr9c2gy384aca5jzw9c0wzhl0pmk2mvqab"))))
15209 (build-system python-build-system)
15210 (native-inputs
15211 `(("unzip" ,unzip)))
15212 (propagated-inputs
15213 `(("pytest" ,python-pytest-3.0)))
15214 (home-page "https://github.com/eisensheng/pytest-catchlog")
15215 (synopsis "Pytest plugin to catch log messages")
15216 (description
15217 "Python-pytest-catchlog is a pytest plugin to catch log messages. This is
15218 a fork of pytest-capturelog.")
15219 (license license:expat)))
15220
15221 (define-public python2-pytest-catchlog
15222 (package-with-python2 python-pytest-catchlog))
15223
15224 (define-public python-utils
15225 (package
15226 (name "python-utils")
15227 (version "2.1.0")
15228 (source (origin
15229 (method url-fetch)
15230 (uri (pypi-uri "python-utils" version))
15231 (sha256
15232 (base32
15233 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
15234 (build-system python-build-system)
15235 (native-inputs
15236 `(("pytest-runner" ,python-pytest-runner)
15237 ("pytest" ,python-pytest)
15238 ("six" ,python-six)))
15239 (home-page "https://github.com/WoLpH/python-utils")
15240 (synopsis "Convenient utilities not included with the standard Python install")
15241 (description
15242 "Python Utils is a collection of small Python functions and classes which
15243 make common patterns shorter and easier.")
15244 (license license:bsd-2)))
15245
15246 (define-public python2-utils
15247 (package-with-python2 python-utils))
15248
15249 (define-public python-webassets
15250 (package
15251 (name "python-webassets")
15252 (version "0.12.1")
15253 (source
15254 (origin
15255 (method url-fetch)
15256 (uri (pypi-uri "webassets" version))
15257 (sha256
15258 (base32
15259 "1nrqkpb7z46h2b77xafxihqv3322cwqv6293ngaky4j3ff4cing7"))))
15260 (build-system python-build-system)
15261 (native-inputs
15262 `(("python-jinja2" ,python-jinja2)
15263 ("python-mock" ,python-mock)
15264 ("python-nose" ,python-nose)
15265 ("python-pytest" ,python-pytest)))
15266 (home-page "https://github.com/miracle2k/webassets")
15267 (synopsis "Media asset management")
15268 (description "Merges, minifies and compresses Javascript and CSS files,
15269 supporting a variety of different filters, including YUI, jsmin, jspacker or
15270 CSS tidy. Also supports URL rewriting in CSS files.")
15271 (license license:bsd-2)))
15272
15273 (define-public python-sphinx-me
15274 (package
15275 (name "python-sphinx-me")
15276 (version "0.3")
15277 (source
15278 (origin
15279 (method url-fetch)
15280 (uri (pypi-uri "sphinx-me" version))
15281 (sha256
15282 (base32
15283 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
15284 (build-system python-build-system)
15285 (home-page "https://github.com/stephenmcd/sphinx-me")
15286 (synopsis "Create a Sphinx documentation shell")
15287 (description
15288 "Create a Sphinx documentation shell for your project and include the
15289 README file as the documentation index. It handles extracting the required
15290 meta data such as the project name, author and version from your project for
15291 use in your Sphinx docs.")
15292 (license license:bsd-2)))
15293
15294 (define-public python2-sphinx-me
15295 (package-with-python2 python-sphinx-me))
15296
15297 (define-public python-cssmin
15298 (package
15299 (name "python-cssmin")
15300 (version "0.2.0")
15301 (source
15302 (origin
15303 (method url-fetch)
15304 (uri (pypi-uri "cssmin" version))
15305 (sha256
15306 (base32
15307 "1dk723nfm2yf8cp4pj785giqlwv42l0kj8rk40kczvq1hk6g04p0"))))
15308 (build-system python-build-system)
15309 (home-page "https://github.com/zacharyvoase/cssmin")
15310 (synopsis "Python port of the YUI CSS Compressor")
15311 (description "Python port of the YUI CSS Compressor.")
15312 (license (list license:expat license:bsd-3))))
15313
15314 (define-public python2-cssmin
15315 (package-with-python2 python-cssmin))
15316
15317 (define-public python-diff-match-patch
15318 (package
15319 (name "python-diff-match-patch")
15320 (version "20121119")
15321 (source
15322 (origin
15323 (method url-fetch)
15324 (uri (pypi-uri "diff-match-patch" version))
15325 (sha256
15326 (base32
15327 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
15328 (build-system python-build-system)
15329 (home-page "https://code.google.com/p/google-diff-match-patch")
15330 (synopsis "Synchronize plain text")
15331 (description "Diff Match and Patch libraries offer robust algorithms to
15332 perform the operations required for synchronizing plain text.")
15333 (license license:asl2.0)))
15334
15335 (define-public python2-diff-match-patch
15336 (package-with-python2 python-diff-match-patch))
15337
15338 (define-public python-dirsync
15339 (package
15340 (name "python-dirsync")
15341 (version "2.2.2")
15342 (source
15343 (origin
15344 (method url-fetch)
15345 (uri (pypi-uri "dirsync" version ".zip"))
15346 (sha256
15347 (base32
15348 "1hcdvmkwd5512zbxpin0k7bx5bkgzy3swjx7d0kj1y45af6r75v2"))))
15349 (build-system python-build-system)
15350 (native-inputs
15351 `(("unzip" ,unzip)))
15352 (propagated-inputs
15353 `(("six" ,python-six)))
15354 (home-page "https://bitbucket.org/tkhyn/dirsync")
15355 (synopsis "Advanced directory tree synchronisation tool")
15356 (description "Advanced directory tree synchronisation tool.")
15357 (license license:expat)))
15358
15359 (define-public python2-dirsync
15360 (package-with-python2 python-dirsync))
15361
15362 (define-public python-nosexcover
15363 (package
15364 (name "python-nosexcover")
15365 (version "1.0.11")
15366 (source (origin
15367 (method url-fetch)
15368 (uri (pypi-uri "nosexcover" version))
15369 (sha256
15370 (base32
15371 "10xqr12qv62k2flxwqhh8cr00cjhn7sfjrm6p35gd1x5bmjkr319"))))
15372 (build-system python-build-system)
15373 (propagated-inputs
15374 `(("python-coverage" ,python-coverage)
15375 ("python-nose" ,python-nose)))
15376 (home-page "http://github.com/cmheisel/nose-xcover")
15377 (synopsis "Extends nose.plugins.cover to add Cobertura-style XML reports")
15378 (description "Nose-xcover is a companion to the built-in
15379 @code{nose.plugins.cover}. This plugin will write out an XML coverage report
15380 to a file named coverage.xml.
15381
15382 It will honor all the options you pass to the Nose coverage plugin,
15383 especially -cover-package.")
15384 (license license:expat)))
15385
15386 (define-public python2-nosexcover
15387 (package-with-python2 python-nosexcover))
15388
15389 (define-public python-elasticsearch
15390 (package
15391 (name "python-elasticsearch")
15392 (version "1.0.0")
15393 (source
15394 (origin
15395 (method url-fetch)
15396 (uri (pypi-uri "elasticsearch" version))
15397 (sha256
15398 (base32
15399 "1sdw1r05cw7ihnmng8ra9v968fj7bq6sji8i1dikymsnkcpgc69g"))))
15400 (build-system python-build-system)
15401 (native-inputs
15402 `(("python-mock" ,python-mock)
15403 ("python-nosexcover" ,python-nosexcover)
15404 ("python-pyaml" ,python-pyaml)
15405 ("python-requests" ,python-requests)))
15406 (propagated-inputs
15407 `(("urllib3" ,python-urllib3)))
15408 (arguments
15409 ;; tests require the test_elasticsearch module but it is not distributed.
15410 `(#:tests? #f))
15411 (home-page "https://github.com/elastic/elasticsearch-py")
15412 (synopsis "Low-level client for Elasticsearch")
15413 (description "Official low-level client for Elasticsearch. Its goal is to
15414 provide common ground for all Elasticsearch-related code in Python; because of
15415 this it tries to be opinion-free and very extendable.")
15416 (license license:expat)))
15417
15418 (define-public python2-elasticsearch
15419 (package-with-python2 python-elasticsearch))
15420
15421 (define-public python-levenshtein
15422 (package
15423 (name "python-levenshtein")
15424 (version "0.12.0")
15425 (source
15426 (origin
15427 (method url-fetch)
15428 (uri (pypi-uri "python-Levenshtein" version))
15429 (sha256
15430 (base32
15431 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
15432 (build-system python-build-system)
15433 (home-page "https://github.com/ztane/python-Levenshtein")
15434 (synopsis "Fast computation of Levenshtein distance and string similarity")
15435 (description
15436 "The Levenshtein Python C extension module contains functions for fast computation of
15437 @enumerate
15438 @item Levenshtein (edit) distance, and edit operations
15439 @item string similarity
15440 @item approximate median strings, and generally string averaging
15441 @item string sequence and set similarity
15442 @end enumerate
15443 It supports both normal and Unicode strings.")
15444 (license license:gpl2+)))
15445
15446 (define-public python2-levenshtein
15447 (package-with-python2 python-levenshtein))
15448
15449 (define-public python-scandir
15450 (package
15451 (name "python-scandir")
15452 (version "1.4")
15453 (source
15454 (origin
15455 (method url-fetch)
15456 (uri (pypi-uri "scandir" version))
15457 (sha256
15458 (base32 "0yjrgp0mxp3d8bjkq2m1ac2ys8n76wykksvgyjrnil9gr3fx7a5d"))))
15459 (build-system python-build-system)
15460 (home-page "https://github.com/benhoyt/scandir")
15461 (synopsis "Directory iteration function")
15462 (description
15463 "Directory iteration function like os.listdir(), except that instead of
15464 returning a list of bare filenames, it yields DirEntry objects that include
15465 file type and stat information along with the name. Using scandir() increases
15466 the speed of os.walk() by 2-20 times (depending on the platform and file
15467 system) by avoiding unnecessary calls to os.stat() in most cases.")
15468 (license license:bsd-3)))
15469
15470 (define-public python2-scandir
15471 (package-with-python2 python-scandir))
15472
15473 (define-public python2-stemming
15474 (package
15475 (name "python2-stemming")
15476 (version "1.0.1")
15477 (source
15478 (origin
15479 (method url-fetch)
15480 (uri (pypi-uri "stemming" version))
15481 (sha256
15482 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
15483 (build-system python-build-system)
15484 (arguments
15485 `(#:python ,python-2))
15486 (home-page "https://bitbucket.org/mchaput/stemming/overview")
15487 (synopsis "Python implementations of various stemming algorithms")
15488 (description
15489 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
15490 stemming algorithms for English. These implementations are straightforward and
15491 efficient, unlike some Python versions of the same algorithms available on the
15492 Web. This package is an extraction of the stemming code included in the Whoosh
15493 search engine.")
15494 (license license:public-domain)))
15495
15496 (define-public python-factory-boy
15497 (package
15498 (name "python-factory-boy")
15499 (version "2.8.1")
15500 (source
15501 (origin
15502 (method url-fetch)
15503 (uri (pypi-uri "factory_boy" version))
15504 (sha256
15505 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
15506 (build-system python-build-system)
15507 (arguments
15508 ;; Tests are not included in the tarball.
15509 `(#:tests? #f))
15510 (propagated-inputs
15511 `(("faker" ,python-faker)))
15512 (home-page "https://github.com/benhoyt/scandir")
15513 (synopsis "Versatile test fixtures replacement")
15514 (description
15515 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
15516
15517 As a fixtures replacement tool, it aims to replace static, hard to maintain
15518 fixtures with easy-to-use factories for complex object.
15519
15520 Instead of building an exhaustive test setup with every possible combination
15521 of corner cases, factory_boy allows you to use objects customized for the
15522 current test, while only declaring the test-specific fields")
15523 (license license:expat)))
15524
15525 (define-public python2-factory-boy
15526 (package-with-python2 python-factory-boy))
15527
15528 (define-public python-translate-toolkit
15529 (package
15530 (name "python-translate-toolkit")
15531 (version "2.1.0")
15532 (source
15533 (origin
15534 (method url-fetch)
15535 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
15536 (sha256
15537 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
15538 (build-system python-build-system)
15539 (native-inputs
15540 `(("python-pytest" ,python-pytest)
15541 ("python-sphinx" ,python-sphinx)))
15542 (propagated-inputs
15543 `(("python-babel" ,python-babel)
15544 ("python-beautifulsoup4" ,python-beautifulsoup4)
15545 ("python-chardet" ,python-chardet)
15546 ("python-diff-match-patch" ,python-diff-match-patch)
15547 ("python-levenshtein" ,python-levenshtein)
15548 ("python-lxml" ,python-lxml)
15549 ("python-six" ,python-six)
15550 ("python-vobject" ,python-vobject)
15551 ("python-pyyaml" ,python-pyyaml)))
15552 (arguments
15553 ;; TODO: tests are not run, because they end with
15554 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
15555 ;; 'parse_funcs'
15556 ;; during test setup.
15557 `(#:tests? #f))
15558 (home-page "http://toolkit.translatehouse.org")
15559 (synopsis "Tools and API for translation and localization engineering")
15560 (description
15561 "Tools and API for translation and localization engineering. It contains
15562 several utilities, as well as an API for building localization tools.")
15563 (license license:gpl2+)))
15564
15565 (define-public python2-translate-toolkit
15566 (package-with-python2 python-translate-toolkit))
15567
15568 (define-public python-mysqlclient
15569 (package
15570 (name "python-mysqlclient")
15571 (version "1.3.10")
15572 (source
15573 (origin
15574 (method url-fetch)
15575 (uri (pypi-uri "mysqlclient" version))
15576 (sha256
15577 (base32
15578 "0qkj570x4rbsblji6frvsvp2v1ap32dqzj1lq62zp9515ffsyaj5"))))
15579 (build-system python-build-system)
15580 (native-inputs
15581 `(("mariadb" ,mariadb)
15582 ("nose" ,python-nose)
15583 ("mock" ,python-mock)
15584 ("py.test" ,python-pytest)))
15585 (inputs
15586 `(("mysql" ,mysql)
15587 ("libz" ,zlib)
15588 ("openssl" ,openssl)))
15589 (home-page "https://github.com/PyMySQL/mysqlclient-python")
15590 (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
15591 (description "MySQLdb is an interface to the popular MySQL database server
15592 for Python. The design goals are:
15593 @enumerate
15594 @item Compliance with Python database API version 2.0 [PEP-0249],
15595 @item Thread-safety,
15596 @item Thread-friendliness (threads will not block each other).
15597 @end enumerate")
15598 (license license:gpl2)))
15599
15600 (define-public python2-mysqlclient
15601 (package-with-python2 python-mysqlclient))
15602
15603 (define-public python-hiredis
15604 (package
15605 (name "python-hiredis")
15606 (version "0.2.0")
15607 (source
15608 (origin
15609 (method url-fetch)
15610 (uri (pypi-uri "hiredis" version))
15611 (sha256
15612 (base32
15613 "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa"))))
15614 (build-system python-build-system)
15615 (arguments
15616 ;; no tests
15617 `(#:tests? #f))
15618 (home-page "https://github.com/redis/hiredis-py")
15619 (synopsis "Python extension that wraps protocol parsing code in hiredis")
15620 (description "Python-hiredis is a python extension that wraps protocol
15621 parsing code in hiredis. It primarily speeds up parsing of multi bulk replies.")
15622 (license license:bsd-3)))
15623
15624 (define-public python2-hiredis
15625 (package-with-python2 python-hiredis))
15626
15627 (define-public python-fakeredis
15628 (package
15629 (name "python-fakeredis")
15630 (version "0.8.2")
15631 (source
15632 (origin
15633 (method url-fetch)
15634 (uri (pypi-uri "fakeredis" version))
15635 (sha256
15636 (base32
15637 "0zncahj3byyasyfx9i7k991ph0n0lq8v3a21pqri5qxn9564bk9r"))))
15638 (build-system python-build-system)
15639 (arguments
15640 ;; no tests
15641 `(#:tests? #f))
15642 (home-page "https://github.com/jamesls/fakeredis")
15643 (synopsis "Fake implementation of redis API for testing purposes")
15644 (description "Fakeredis is a pure python implementation of the redis-py
15645 python client that simulates talking to a redis server. This was created for a
15646 single purpose: to write unittests. Setting up redis is not hard, but many time
15647 you want to write unittests that do not talk to an external server (such as
15648 redis). This module now allows tests to simply use this module as a reasonable
15649 substitute for redis.")
15650 (license license:bsd-3)))
15651
15652 (define-public python2-fakeredis
15653 (package-with-python2 python-fakeredis))
15654
15655 (define-public python-behave-web-api
15656 (package
15657 (name "python-behave-web-api")
15658 (version "1.0.6")
15659 (source
15660 (origin
15661 (method url-fetch)
15662 (uri (pypi-uri "behave-web-api" version))
15663 (sha256
15664 (base32
15665 "03kpq2xsy1gab3jy0dccbxlsg7vwfy4lagss0qldwmx3xz6b3i19"))))
15666 (build-system python-build-system)
15667 (arguments
15668 `(#:phases
15669 (modify-phases %standard-phases
15670 (add-after 'unpack 'fix-dependencies
15671 (lambda _
15672 (substitute* "setup.py"
15673 (("'wheel'") "") ; We don't use it.
15674 (("'ordereddict==1.1'") ""))))))) ; Python >= 2.7 has it built-in.
15675 (propagated-inputs
15676 `(("behave" ,behave)
15677 ("python-requests" ,python-requests)))
15678 (home-page "https://github.com/jefersondaniel/behave-web-api")
15679 (synopsis "Provides testing for JSON APIs with Behave for Python")
15680 (description "This package provides testing utility modules for testing
15681 JSON APIs with Behave.")
15682 (license license:expat)))
15683
15684 (define-public python2-behave-web-api
15685 (package-with-python2 python-behave-web-api))
15686
15687 (define-public python-flask-script
15688 (package
15689 (name "python-flask-script")
15690 (version "2.0.5")
15691 (source
15692 (origin
15693 (method url-fetch)
15694 (uri (pypi-uri "Flask-Script" version))
15695 (sha256
15696 (base32
15697 "0zqh2yq8zk7m9b4xw1ryqmrljkdigfb3hk5155a3b5hkfnn6xxyf"))))
15698 (build-system python-build-system)
15699 (propagated-inputs
15700 `(("python-flask" ,python-flask)
15701 ("python-argcomplete" ,python-argcomplete)
15702 ("python-werkzeug" ,python-werkzeug)))
15703 (native-inputs
15704 `(("python-pytest" ,python-pytest)))
15705 (home-page
15706 "http://github.com/smurfix/flask-script")
15707 (synopsis "Scripting support for Flask")
15708 (description "The Flask-Script extension provides support for writing
15709 external scripts in Flask. This includes running a development server,
15710 a customised Python shell, scripts to set up your database, cronjobs,
15711 and other command-line tasks that belong outside the web application
15712 itself.")
15713 (license license:bsd-3)))
15714
15715 (define-public python2-flask-script
15716 (package-with-python2 python-flask-script))
15717
15718 (define-public python-flask-migrate
15719 (package
15720 (name "python-flask-migrate")
15721 (version "2.0.3")
15722 (source
15723 (origin
15724 (method url-fetch)
15725 (uri (pypi-uri "Flask-Migrate" version))
15726 (sha256
15727 (base32
15728 "107x78lkqsnbg92dld3dkagg07jvchp3ib3y0sivc4ipz6n1y7rk"))))
15729 (build-system python-build-system)
15730 (propagated-inputs
15731 `(("python-flask" ,python-flask)
15732 ("python-alembic" ,python-alembic)
15733 ("python-sqlalchemy" ,python-sqlalchemy)
15734 ("python-flask-script" ,python-flask-script)
15735 ("python-flask-sqlalchemy" ,python-flask-sqlalchemy)))
15736 (home-page "http://github.com/miguelgrinberg/flask-migrate/")
15737 (synopsis "SQLAlchemy database migrations for Flask programs using
15738 Alembic")
15739 (description "This package contains SQLAlchemy database migration tools
15740 for Flask programs that are using @code{python-alembic}.")
15741 (license license:expat)))
15742
15743 (define-public python2-flask-migrate
15744 (package-with-python2 python-flask-migrate))
15745
15746 (define-public python-packaging
15747 (package
15748 (name "python-packaging")
15749 (version "16.8")
15750 (source
15751 (origin
15752 (method url-fetch)
15753 (uri (pypi-uri "packaging" version))
15754 (sha256
15755 (base32
15756 "17k1xbjshackwvbsnxqixbph8rbqhz4bf4g3al5xyzhavxgq6l2x"))))
15757 (build-system python-build-system)
15758 (native-inputs
15759 `(("python-pretend" ,python-pretend)
15760 ("python-pytest" ,python-pytest)))
15761 (propagated-inputs
15762 `(("python-pyparsing" ,python-pyparsing)
15763 ("python-six" ,python-six)))
15764 (home-page "https://github.com/pypa/packaging")
15765 (synopsis "Core utilities for Python packages")
15766 (description "Packaging is a Python module for dealing with Python packages.
15767 It offers an interface for working with package versions, names, and dependency
15768 information.")
15769 ;; From 'LICENSE': This software is made available under the terms of
15770 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
15771 ;; Contributions to this software is made under the terms of *both* these
15772 ;; licenses.
15773 (license (list license:asl2.0 license:bsd-2))))
15774
15775 (define-public python2-packaging
15776 (package-with-python2 python-packaging))
15777
15778 (define-public python-sql
15779 (package
15780 (name "python-sql")
15781 (version "0.9")
15782 (source
15783 (origin
15784 (method url-fetch)
15785 (uri (pypi-uri "python-sql" version))
15786 (sha256
15787 (base32
15788 "0p6kaqj02vz0habmdx37zjk6hjxdfm8aw737zs059vvpr70ird87"))))
15789 (build-system python-build-system)
15790 (home-page "https://python-sql.tryton.org/")
15791 (synopsis "Library to write SQL queries in a pythonic way")
15792 (description "@code{python-sql} is a library to write SQL queries, that
15793 transforms idiomatic python function calls to well-formed SQL queries.")
15794 (license license:bsd-3)))
15795
15796 (define-public python2-sql
15797 (package-with-python2 python-sql))
15798
15799 (define-public python-genshi
15800 (package
15801 (name "python-genshi")
15802 (version "0.7")
15803 (source
15804 (origin
15805 (method url-fetch)
15806 (uri (string-append
15807 "https://ftp.edgewall.org/pub/genshi/Genshi-"
15808 version ".tar.gz"))
15809 (patches
15810 (search-patches
15811 ;; The first 4 patches are in the master branch upstream.
15812 ;; See this as a reference https://genshi.edgewall.org/ticket/582
15813 ;; The last 2 are NOT in any branch.
15814 ;; They were sent as attachments to a ticket opened at
15815 ;; https://genshi.edgewall.org/ticket/602#no1
15816 "python-genshi-stripping-of-unsafe-script-tags.patch"
15817 "python-genshi-disable-speedups-on-python-3.3.patch"
15818 "python-genshi-isstring-helper.patch"
15819 "python-genshi-add-support-for-python-3.4-AST.patch"
15820 "python-genshi-fix-tests-on-python-3.5.patch"
15821 "python-genshi-buildable-on-python-2.7.patch"))
15822 (sha256
15823 (base32
15824 "0lkkbp6fbwzv0zda5iqc21rr7rdldkwh3hfabfjl9i4bwq14858x"))))
15825 (build-system python-build-system)
15826 (home-page "https://genshi.edgewall.org/")
15827 (synopsis "Toolkit for generation of output for the web")
15828 (description "Genshi is a Python library that provides an integrated set
15829 of components for parsing, generating, and processing HTML, XML or other
15830 textual content for output generation on the web.")
15831 (license license:bsd-3)))
15832
15833 ;; The linter here claims that patch file names should start with the package
15834 ;; name. But, in this case the patches are inherited from python-genshi with
15835 ;; the "python-genshi-" prefix instead of "python2-genshi-".
15836 (define-public python2-genshi
15837 (package-with-python2 python-genshi))
15838
15839 (define-public python-relatorio
15840 (package
15841 (name "python-relatorio")
15842 (version "0.6.4")
15843 (source
15844 (origin
15845 (method url-fetch)
15846 (uri (pypi-uri "relatorio" version))
15847 (sha256
15848 (base32
15849 "0lincq79mzgazwd9gh41dybjh9c3n87r83pl8nk3j79aihyfk84z"))))
15850 (build-system python-build-system)
15851 (propagated-inputs
15852 `(("python-lxml" ,python-lxml)
15853 ("python-genshi" ,python-genshi)))
15854 (home-page "https://relatorio.tryton.org/")
15855 (synopsis "Templating library able to output ODT and PDF files")
15856 (description "Relatorio is a templating library which provides a way to
15857 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
15858 for more filetypes can be easily added by creating plugins for them.")
15859 (license license:gpl3+)))
15860
15861 (define-public python2-relatorio
15862 (package-with-python2 python-relatorio))
15863
15864 (define-public python-radon
15865 (package
15866 (name "python-radon")
15867 (version "1.5.0")
15868 (source
15869 (origin
15870 (method url-fetch)
15871 (uri (pypi-uri "radon" version))
15872 (sha256
15873 (base32
15874 "1h6jv36am0i827182a04ki6291lyx4kp957xfr5njgprj4nd0qsl"))))
15875 (build-system python-build-system)
15876 (propagated-inputs
15877 `(("python-colorama" ,python-colorama)
15878 ("python-flake8-polyfill" ,python-flake8-polyfill)
15879 ("python-mando" ,python-mando-0.3.1)))
15880 (native-inputs
15881 `(("python-flake8" ,python-flake8)
15882 ("python-tox" ,python-tox)
15883 ("python-pytest" ,python-pytest)
15884 ("python-paramunittest" ,python-paramunittest)))
15885 (home-page "https://radon.readthedocs.org/")
15886 (synopsis "Code Metrics in Python")
15887 (description "Radon is a Python tool which computes various code metrics.
15888 Supported metrics are:
15889 @itemize @bullet
15890 @item raw metrics: SLOC, comment lines, blank lines, &c.
15891 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
15892 @item Halstead metrics (all of them)
15893 @item the Maintainability Index (a Visual Studio metric)
15894 @end itemize")
15895 (license license:expat)))
15896
15897 (define-public python2-radon
15898 (package-with-python2 python-radon))
15899
15900 (define-public python-sure
15901 (package
15902 (name "python-sure")
15903 (version "1.4.6")
15904 (source
15905 (origin
15906 (method url-fetch)
15907 (uri (pypi-uri "sure" version))
15908 (sha256
15909 (base32
15910 "1iyqsy2d6radi88g1qf0lziy5b39h5cpb3g5jiqyb4xi46ig3x1z"))))
15911 (build-system python-build-system)
15912 (propagated-inputs
15913 `(("python-mock" ,python-mock)
15914 ("python-six" ,python-six)))
15915 (native-inputs
15916 `(("python-nose" ,python-nose)))
15917 (home-page "https://github.com/gabrielfalcao/sure")
15918 (synopsis "Automated testing library in python for python")
15919 (description
15920 "Sure is a python library that leverages a DSL for writing assertions.
15921 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
15922 (license license:gpl3+)))
15923
15924 (define-public python2-sure
15925 (package-with-python2 python-sure))
15926
15927 (define-public python2-couleur
15928 ;; This package does not seem to support python3 at all, hence,
15929 ;; only the python2 variant definition is provided.
15930 (package
15931 (name "python2-couleur")
15932 (version "0.6.2")
15933 (source
15934 (origin
15935 (method url-fetch)
15936 (uri (pypi-uri "couleur" version))
15937 (sha256
15938 (base32
15939 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
15940 (build-system python-build-system)
15941 (arguments
15942 `(#:python ,python-2))
15943 (home-page "https://github.com/gabrielfalcao/couleur")
15944 (synopsis
15945 "ANSI terminal tool for python, colored shell and other handy fancy features")
15946 (description
15947 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
15948 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
15949 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
15950 ;; https://github.com/gabrielfalcao/couleur/issues/11
15951 (license license:lgpl3+)))
15952
15953 (define-public python-misaka
15954 (package
15955 (name "python-misaka")
15956 (version "2.1.0")
15957 (source
15958 (origin
15959 (method url-fetch)
15960 (uri (pypi-uri "misaka" version))
15961 (sha256
15962 (base32
15963 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
15964 (build-system python-build-system)
15965 (arguments
15966 `(;; Line 37 of setup.py calls self.run_command('develop')
15967 ;; in the 'check' phase. This command seems to be trying
15968 ;; to write to
15969 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
15970 ;; for which it does not have the permission to write.
15971 #:tests? #f))
15972 (propagated-inputs
15973 `(("python-cffi" ,python-cffi)))
15974 (home-page "https://github.com/FSX/misaka")
15975 (synopsis "Python binding for Hoedown")
15976 (description
15977 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
15978 library written in C. It features a fast HTML renderer and functionality to make custom
15979 renderers (e.g. man pages or LaTeX).")
15980 (license license:expat)))
15981
15982 (define-public python2-misaka
15983 (package-with-python2 python-misaka))
15984
15985 (define-public python2-steadymark
15986 ;; This is forced into being a python2 only variant
15987 ;; due to its dependence on couleur that has no support
15988 ;; for python3
15989 (package
15990 (name "python2-steadymark")
15991 (version "0.7.3")
15992 (source
15993 (origin
15994 (method url-fetch)
15995 (uri (pypi-uri "steadymark" version))
15996 (sha256
15997 (base32
15998 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
15999 (build-system python-build-system)
16000 (native-inputs
16001 `(("python-couleur" ,python2-couleur)
16002 ("python-sure" ,python2-sure)
16003 ("python-misaka" ,python2-misaka)))
16004 (arguments
16005 `(#:python ,python-2
16006 #:phases
16007 (modify-phases %standard-phases
16008 (add-before 'build 'patch-setup-py
16009 (lambda _
16010 ;; Update requirements from dependency==version
16011 ;; to dependency>=version
16012 (substitute* "setup.py"
16013 (("==") ">="))
16014 #t)))))
16015 (home-page "https://github.com/gabrielfalcao/steadymark")
16016 (synopsis "Markdown-based test runner for python")
16017 (description
16018 "@code{Steadymark} allows documentation to be written in github-flavoured
16019 markdown. The documentation may contain snippets of code surrounded by python
16020 code blocks and @code{Steadymark} will find these snippets and run them, making
16021 sure that there are no old malfunctional examples in the documentation examples.")
16022 (license license:expat)))
16023
16024 (define-public python-nose-randomly
16025 (package
16026 (name "python-nose-randomly")
16027 (version "1.2.5")
16028 (source
16029 (origin
16030 (method url-fetch)
16031 (uri (pypi-uri "nose-randomly" version))
16032 (sha256
16033 (base32
16034 "1cw9dlr1zh3w4i438kin7z0rm8092ki52hayisyc43h9pcplq7rn"))))
16035 (build-system python-build-system)
16036 (native-inputs
16037 `(("python-nose" ,python-nose)
16038 ("python-numpy" ,python-numpy)))
16039 (home-page "https://github.com/adamchainz/nose-randomly")
16040 (synopsis
16041 "Nose plugin to randomly order tests and control random.seed")
16042 (description
16043 "This is a @code{Nose} plugin to randomly order tests which can be quite
16044 powerful in discovering hidden flaws in the tests themselves, while helping to
16045 reduce inter-test dependencies. It also helps in controlling @code{random.seed},
16046 by resetting it to a repeatable number for each test, enabling the tests to
16047 create data based on random numbers and yet remain repeatable.")
16048 (license license:bsd-3)))
16049
16050 (define-public python2-nose-randomly
16051 (package-with-python2 python-nose-randomly))
16052
16053 (define-public python-jsonpointer
16054 (package
16055 (name "python-jsonpointer")
16056 (version "1.10")
16057 (source
16058 (origin
16059 (method url-fetch)
16060 (uri (pypi-uri "jsonpointer" version))
16061 (sha256
16062 (base32
16063 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
16064 (build-system python-build-system)
16065 (home-page "https://github.com/stefankoegl/python-json-pointer")
16066 (synopsis "Identify specific nodes in a JSON document")
16067 (description "@code{jsonpointer} allows you to access specific nodes
16068 by path in a JSON document (see RFC 6901).")
16069 (license license:bsd-3)))
16070
16071 (define-public python2-jsonpointer
16072 (package-with-python2 python-jsonpointer))
16073
16074 (define-public python-jsonpatch
16075 (package
16076 (name "python-jsonpatch")
16077 (version "1.16")
16078 (source
16079 (origin
16080 (method url-fetch)
16081 ;; pypi version lacks tests.js
16082 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
16083 "archive/v" version ".tar.gz"))
16084 (file-name (string-append name "-" version ".tar.gz"))
16085 (sha256
16086 (base32
16087 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
16088 (build-system python-build-system)
16089 (native-inputs
16090 `(("python-jsonpointer" ,python-jsonpointer)))
16091 (home-page "https://github.com/stefankoegl/python-json-patch")
16092 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
16093 (description "@code{jsonpatch} is a library and program that allows
16094 applying JSON Patches according to RFC 6902.")
16095 (license license:bsd-3)))
16096
16097 (define-public python2-jsonpatch
16098 (package-with-python2 python-jsonpatch))
16099
16100 (define-public python-jsonpatch-0.4
16101 (package (inherit python-jsonpatch)
16102 (name "python-jsonpatch")
16103 (version "0.4")
16104 (source
16105 (origin
16106 (method url-fetch)
16107 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
16108 "archive/v" version ".tar.gz"))
16109 (file-name (string-append name "-" version ".tar.gz"))
16110 (sha256
16111 (base32
16112 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
16113
16114 (define-public python2-jsonpatch-0.4
16115 (package-with-python2 python-jsonpatch-0.4))
16116
16117 (define-public python-rfc3987
16118 (package
16119 (name "python-rfc3987")
16120 (version "1.3.7")
16121 (source
16122 (origin
16123 (method url-fetch)
16124 (uri (pypi-uri "rfc3987" version))
16125 (sha256
16126 (base32
16127 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
16128 (build-system python-build-system)
16129 (home-page "http://pypi.python.org/pypi/rfc3987")
16130 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
16131 (description "@code{rfc3987} provides routines for parsing and
16132 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
16133 (license license:gpl3+)))
16134
16135 (define-public python2-rfc3987
16136 (package-with-python2 python-rfc3987))
16137
16138 (define-public python-validate-email
16139 (package
16140 (name "python-validate-email")
16141 (version "1.3")
16142 (source
16143 (origin
16144 (method url-fetch)
16145 (uri (pypi-uri "validate_email" version))
16146 (sha256
16147 (base32
16148 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
16149 (build-system python-build-system)
16150 (home-page "http://github.com/syrusakbary/validate_email")
16151 (synopsis "Verifies if an email address is valid and really exists")
16152 (description "@code{validate_email} can be used to verify if an email
16153 address is valid and really exists.")
16154 (license license:lgpl3+)))
16155
16156 (define-public python2-validate-email
16157 (package-with-python2 python-validate-email))
16158
16159 (define-public python-flex
16160 (package
16161 (name "python-flex")
16162 (version "6.10.0")
16163 (source
16164 (origin
16165 (method url-fetch)
16166 (uri (pypi-uri "flex" version))
16167 (sha256
16168 (base32
16169 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
16170 (build-system python-build-system)
16171 (propagated-inputs
16172 `(("python-click" ,python-click)
16173 ("python-iso8601" ,python-iso8601)
16174 ("python-jsonpointer" ,python-jsonpointer)
16175 ("python-pyyaml" ,python-pyyaml)
16176 ("python-requests" ,python-requests)
16177 ("python-rfc3987" ,python-rfc3987)
16178 ("python-six" ,python-six)
16179 ("python-validate-email" ,python-validate-email)))
16180 (home-page "https://github.com/pipermerriam/flex")
16181 (synopsis "Validates Swagger schemata")
16182 (description "@code{flex} can be used to validate Swagger schemata.")
16183 (license license:bsd-3)))
16184
16185 (define-public python2-flex
16186 (package-with-python2 python-flex))
16187
16188 (define-public python-marshmallow
16189 (package
16190 (name "python-marshmallow")
16191 (version "3.0.0b3")
16192 (source
16193 (origin
16194 (method url-fetch)
16195 (uri (pypi-uri "marshmallow" version))
16196 (sha256
16197 (base32
16198 "07mcrij1yvk85lvgx44wwr9pc80xryghvlgayb057g1cazcypysd"))))
16199 (build-system python-build-system)
16200 (propagated-inputs
16201 `(("python-dateutil" ,python-dateutil)
16202 ("python-simplejson" ,python-simplejson)))
16203 (native-inputs
16204 `(("python-pytest-3.0" ,python-pytest-3.0)
16205 ("python-pytz" ,python-pytz)))
16206 (home-page "https://github.com/marshmallow-code/marshmallow")
16207 (synopsis "Convert complex datatypes to and from native
16208 Python datatypes.")
16209 (description "@code{marshmallow} provides a library for converting
16210 complex datatypes to and from native Python datatypes.")
16211 (license license:expat)))
16212
16213 (define-public python2-marshmallow
16214 (package-with-python2 python-marshmallow))
16215
16216 (define-public python-bottle
16217 (package
16218 (name "python-bottle")
16219 (version "0.12.13")
16220 (source
16221 (origin
16222 (method url-fetch)
16223 (uri (pypi-uri "bottle" version))
16224 (sha256
16225 (base32
16226 "0m9k2a7yxvggc4kw8fsvj381vgsvfcdshg5nzy6vwrxiw2p53drr"))))
16227 (build-system python-build-system)
16228 (home-page "http://bottlepy.org/")
16229 (synopsis "WSGI framework for small web-applications.")
16230 (description "@code{python-bottle} is a WSGI framework for small web-applications.")
16231 (license license:expat)))
16232
16233 (define-public python2-bottle
16234 (package-with-python2 python-bottle))
16235
16236 (define-public python-apispec
16237 (package
16238 (name "python-apispec")
16239 (version "0.25.3")
16240 (source
16241 (origin
16242 (method url-fetch)
16243 (uri (pypi-uri "apispec" version))
16244 (sha256
16245 (base32
16246 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
16247 (build-system python-build-system)
16248 (propagated-inputs
16249 `(("python-pyyaml" ,python-pyyaml)))
16250 (native-inputs
16251 `(("python-pytest-3.0" ,python-pytest-3.0)
16252 ("python-flask" ,python-flask)
16253 ("python-marshmallow" ,python-marshmallow)
16254 ("python-tornado" ,python-tornado)
16255 ("python-bottle" ,python-bottle)
16256 ("python-mock" ,python-mock)))
16257 (home-page "https://github.com/marshmallow-code/apispec")
16258 (synopsis "Swagger 2.0 API specification generator")
16259 (description "@code{python-apispec} is a pluggable API specification
16260 generator. Currently supports the OpenAPI specification (f.k.a.
16261 Swagger 2.0).")
16262 (license license:expat)))
16263
16264 (define-public python2-apispec
16265 (package-with-python2 python-apispec))
16266
16267 (define-public python-flasgger
16268 (package
16269 (name "python-flasgger")
16270 (version "0.6.3")
16271 (source
16272 (origin
16273 (method url-fetch)
16274 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
16275 version ".tar.gz"))
16276 (file-name (string-append name "-" version ".tar.gz"))
16277 (sha256
16278 (base32
16279 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
16280 (build-system python-build-system)
16281 (arguments
16282 `(#:phases
16283 (modify-phases %standard-phases
16284 (replace 'check
16285 (lambda* (#:key inputs outputs #:allow-other-keys)
16286 (substitute* "Makefile"
16287 (("flake8 flasgger --ignore=F403")
16288 "flake8 flasgger --ignore=E731,F403"))
16289 (setenv "PYTHONPATH" (string-append (getcwd)
16290 ":"
16291 (getenv "PYTHONPATH")))
16292 (zero? (system* "py.test")))))))
16293 (propagated-inputs
16294 `(("python-flask" ,python-flask)
16295 ("python-pyyaml" ,python-pyyaml)
16296 ("python-jsonschema" ,python-jsonschema)
16297 ("python-mistune" ,python-mistune)
16298 ("python-six" ,python-six)))
16299 (native-inputs
16300 `(("python-decorator" ,python-decorator)
16301 ("python-flake8" ,python-flake8)
16302 ("python-flask-restful" ,python-flask-restful)
16303 ("python-flex" ,python-flex)
16304 ("python-pytest-3.0" ,python-pytest-3.0)
16305 ("python-pytest-cov" ,python-pytest-cov)
16306 ("python-marshmallow" ,python-marshmallow)
16307 ("python-apispec" ,python-apispec)))
16308 (home-page "https://github.com/rochacbruno/flasgger/")
16309 (synopsis "Extract Swagger specs from your Flask project")
16310 (description "@code{python-flasgger} allows extracting Swagger specs
16311 from your Flask project. It is a fork of Flask-Swagger.")
16312 (license license:expat)))
16313
16314 (define-public python2-flasgger
16315 (package-with-python2 python-flasgger))
16316
16317 (define-public python-swagger-spec-validator
16318 (package
16319 (name "python-swagger-spec-validator")
16320 (version "2.1.0")
16321 (source
16322 (origin
16323 (method url-fetch)
16324 (uri (pypi-uri "swagger-spec-validator" version))
16325 (sha256
16326 (base32
16327 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
16328 (build-system python-build-system)
16329 (propagated-inputs
16330 `(("python-jsonschema" ,python-jsonschema)
16331 ("python-six" ,python-six)))
16332 (home-page
16333 "http://github.com/Yelp/swagger_spec_validator")
16334 (synopsis "Validation of Swagger specifications")
16335 (description "@code{swagger_spec_validator} provides a library for
16336 validating Swagger API specifications.")
16337 (license license:asl2.0)))
16338
16339 (define-public python2-swagger-spec-validator
16340 (package-with-python2 python-swagger-spec-validator))
16341
16342 (define-public python-apache-libcloud
16343 (package
16344 (name "python-apache-libcloud")
16345 (version "2.0.0")
16346 (source
16347 (origin
16348 (method url-fetch)
16349 (uri (pypi-uri "apache-libcloud" version))
16350 (sha256
16351 (base32
16352 "1a71z02ckcxld72k4qgmdnkjan52c4wczncs3p2mp5yafh7dsan7"))))
16353 (build-system python-build-system)
16354 (arguments
16355 `(#:phases
16356 (modify-phases %standard-phases
16357 (add-after 'unpack 'patch-ssh
16358 (lambda* (#:key inputs #:allow-other-keys)
16359 (substitute* "libcloud/compute/ssh.py"
16360 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
16361 "/bin/ssh" "'")))
16362 #t))
16363 (add-after 'unpack 'patch-tests
16364 (lambda _
16365 (substitute* "./libcloud/test/test_file_fixtures.py"
16366 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
16367 (("def _ascii") "def _raw_data(self, method, url, body, headers):
16368 return (httplib.OK,
16369 \"1234abcd\",
16370 {\"test\": \"value\"},
16371 httplib.responses[httplib.OK])
16372 def _ascii"))
16373 (substitute* "libcloud/test/compute/test_ssh_client.py"
16374 (("class ShellOutSSHClientTests")
16375 "@unittest.skip(\"Guix container doesn't have ssh service\")
16376 class ShellOutSSHClientTests")
16377 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
16378 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
16379 (("'.xF0', '.x90', '.x8D', '.x88'")
16380 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
16381 #t)))))
16382 (inputs
16383 `(("openssh" ,openssh)))
16384 (propagated-inputs
16385 `(("python-paramiko" ,python-paramiko)
16386 ("python-requests" ,python-requests)))
16387 (native-inputs
16388 `(("python-lockfile" ,python-lockfile)
16389 ("python-mock" ,python-mock)
16390 ("python-requests-mock" ,python-requests-mock)))
16391 (home-page "https://libcloud.apache.org/")
16392 (synopsis "Unified Cloud API")
16393 (description "@code{libcloud} is a Python library for interacting with
16394 many of the popular cloud service providers using a unified API.")
16395 (license license:asl2.0)))
16396
16397 (define-public python2-apache-libcloud
16398 (package-with-python2 python-apache-libcloud))
16399
16400 (define-public python-smmap2
16401 (package
16402 (name "python-smmap2")
16403 (version "2.0.3")
16404 (source
16405 (origin
16406 (method url-fetch)
16407 (uri (pypi-uri "smmap2" version))
16408 (sha256
16409 (base32
16410 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
16411 (build-system python-build-system)
16412 (native-inputs
16413 `(("python-nosexcover" ,python-nosexcover)))
16414 (home-page "https://github.com/Byron/smmap")
16415 (synopsis "Python sliding window memory map manager")
16416 (description "@code{smmap2} is a pure Python implementation of a sliding
16417 window memory map manager.")
16418 (license license:bsd-3)))
16419
16420 (define-public python2-smmap2
16421 (package-with-python2 python-smmap2))
16422
16423 (define-public python-regex
16424 (package
16425 (name "python-regex")
16426 (version "2017.06.07")
16427 (source (origin
16428 (method url-fetch)
16429 (uri (pypi-uri "regex" version))
16430 (sha256
16431 (base32
16432 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
16433 (build-system python-build-system)
16434 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
16435 (synopsis "Alternative regular expression module")
16436 (description "This regular expression implementation is backwards-
16437 compatible with the standard @code{re} module, but offers additional
16438 functionality like full case-folding for case-insensitive matches in Unicode.")
16439 (license license:psfl)))
16440
16441 (define-public python2-regex
16442 (package-with-python2 python-regex))
16443
16444 (define-public python2-pyopengl
16445 (package
16446 (name "python2-pyopengl")
16447 (version "3.1.0")
16448 (source
16449 (origin
16450 (method url-fetch)
16451 (uri (pypi-uri "PyOpenGL" version))
16452 (sha256
16453 (base32
16454 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
16455 (arguments
16456 `(#:python ,python-2))
16457 (build-system python-build-system)
16458 (home-page "http://pyopengl.sourceforge.net")
16459 (synopsis "Standard OpenGL bindings for Python")
16460 (description
16461 "PyOpenGL is the most common cross platform Python binding to OpenGL and
16462 related APIs. The binding is created using the standard @code{ctypes}
16463 library.")
16464 (license license:bsd-3)))
16465
16466 (define-public python-rencode
16467 (package
16468 (name "python-rencode")
16469 (version "1.0.3")
16470 (source
16471 (origin
16472 (method url-fetch)
16473 (uri (pypi-uri "rencode" version))
16474 (sha256
16475 (base32
16476 "08if5yax1xn5yfp8p3765ccjmfcv9di7i4m5jckgnwvdsgznwkbj"))))
16477 (build-system python-build-system)
16478 (native-inputs `(("pkg-config" ,pkg-config)
16479 ("python-cython", python-cython)))
16480 (home-page "https://github.com/aresch/rencode")
16481 (synopsis "Serialization of heterogeneous data structures")
16482 (description
16483 "The @code{rencode} module is a data structure serialization library,
16484 similar to @code{bencode} from the BitTorrent project. For complex,
16485 heterogeneous data structures with many small elements, r-encoding stake up
16486 significantly less space than b-encodings. This version of rencode is a
16487 complete rewrite in Cython to attempt to increase the performance over the
16488 pure Python module.")
16489 (license license:bsd-3)))
16490
16491 (define-public python2-rencode
16492 (package-with-python2 python-rencode))
16493
16494 (define-public python-xenon
16495 (package
16496 (name "python-xenon")
16497 (version "0.5.1")
16498 (source
16499 (origin
16500 (method url-fetch)
16501 (uri (pypi-uri "xenon" version))
16502 (sha256
16503 (base32
16504 "14kby2y48vp3sgwxqlm5d5789yibqwb1qli5fwcmdqg3iayrbklc"))))
16505 (build-system python-build-system)
16506 (native-inputs
16507 `(("python-pyyaml" ,python-pyyaml)
16508 ("python-radon" ,python-radon)
16509 ("python-requests" ,python-requests)
16510 ("python-flake8" ,python-flake8)
16511 ("python-tox" ,python-tox)))
16512 (arguments
16513 `(#:phases
16514 (modify-phases %standard-phases
16515 (add-before 'build 'patch-test-requirements
16516 (lambda* (#:key inputs #:allow-other-keys)
16517 ;; Update requirements from dependency==version to
16518 ;; dependency>=version.
16519 (substitute* "requirements.txt"
16520 (("==") ">=")
16521 ((",<1.5.0") ""))
16522 ;; Remove httpretty dependency for tests.
16523 (substitute* "setup.py"
16524 (("httpretty") ""))
16525 #t)))))
16526 (home-page "https://xenon.readthedocs.org/")
16527 (synopsis "Monitor code metrics for Python on your CI server")
16528 (description
16529 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
16530 Ideally, @code{xenon} is run every time code is committed. Through command
16531 line options, various thresholds can be set for the complexity of code. It
16532 will fail (i.e. it will exit with a non-zero exit code) when any of these
16533 requirements is not met.")
16534 (license license:expat)))
16535
16536 (define-public python2-xenon
16537 (package-with-python2 python-xenon))
16538
16539 (define-public python-flask-principal
16540 (package
16541 (name "python-flask-principal")
16542 (version "0.4.0")
16543 (source
16544 (origin
16545 (method url-fetch)
16546 (uri (pypi-uri "Flask-Principal" version))
16547 (sha256
16548 (base32
16549 "0lwlr5smz8vfm5h9a9i7da3q1c24xqc6vm9jdywdpgxfbi5i7mpm"))))
16550 (build-system python-build-system)
16551 (propagated-inputs
16552 `(("python-blinker" ,python-blinker)))
16553 (native-inputs
16554 `(("python-flask" ,python-flask)
16555 ("python-nose" ,python-nose)))
16556 (home-page "http://packages.python.org/Flask-Principal/")
16557 (synopsis "Identity management for Flask")
16558 (description "@code{flask_principal} is a identity management library for
16559 Flask. It supports managing both authentication and authorization data in a
16560 thread-local variable.")
16561 (license license:expat)))
16562
16563 (define-public python2-flask-principal
16564 (package-with-python2 python-flask-principal))
16565
16566 (define-public python-flask-httpauth
16567 (package
16568 (name "python-flask-httpauth")
16569 (version "3.2.3")
16570 (source
16571 (origin
16572 (method url-fetch)
16573 (uri (pypi-uri "Flask-HTTPAuth" version))
16574 (sha256
16575 (base32
16576 "13gff5w1mqpzm5nccyg02v3ifb9ifqh5k866cssjhghhg6msfjsz"))))
16577 (build-system python-build-system)
16578 (native-inputs
16579 `(("python-flask" ,python-flask)))
16580 (home-page "http://github.com/miguelgrinberg/flask-httpauth/")
16581 (synopsis "Basic and Digest HTTP authentication for Flask routes")
16582 (description "@code{flask_httpauth} provides Basic and Digest HTTP
16583 authentication for Flask routes.")
16584 (license license:expat)))
16585
16586 (define-public python2-flask-httpauth
16587 (package-with-python2 python-flask-httpauth))
16588
16589 (define-public python-pysocks
16590 (package
16591 (name "python-pysocks")
16592 (version "1.6.7")
16593 (source
16594 (origin
16595 (method url-fetch)
16596 (uri (pypi-uri "PySocks" version))
16597 (sha256
16598 (base32
16599 "1krkiss578zqwcg4c8iqz1hwscwhsvy2djp3xyvps5gsgvr2j0yh"))))
16600 (build-system python-build-system)
16601 (arguments `(#:tests? #f))
16602 (home-page "https://github.com/Anorov/PySocks")
16603 (synopsis "SOCKS client module")
16604 (description "@code{pysocks} is an updated and semi-actively maintained
16605 version of @code{SocksiPy} with bug fixes and extra features.")
16606 (license license:bsd-3)))
16607
16608 (define-public python2-pysocks
16609 (package-with-python2 python-pysocks))
16610
16611 (define-public python-pyaes
16612 (package
16613 (name "python-pyaes")
16614 (version "1.6.0")
16615 (source
16616 (origin
16617 (method url-fetch)
16618 (uri (pypi-uri "pyaes" version))
16619 (sha256
16620 (base32
16621 "0bp9bjqy1n6ij1zb86wz9lqa1dhla8qr1d7w2kxyn7jbj56sbmcw"))))
16622 (build-system python-build-system)
16623 (home-page "https://github.com/ricmoo/pyaes")
16624 (synopsis "Implementation of AES in Python")
16625 (description "This package contains a pure-Python implementation of the
16626 AES block cipher algorithm and the common modes of operation (CBC, CFB, CTR,
16627 ECB and OFB).")
16628 (license license:expat)))
16629
16630 (define-public python2-pyaes
16631 (package-with-python2 python-pyaes))
16632
16633 (define-public python-uritemplate
16634 (package
16635 (name "python-uritemplate")
16636 (version "3.0.0")
16637 (source
16638 (origin
16639 (method url-fetch)
16640 (uri (pypi-uri "uritemplate" version))
16641 (sha256
16642 (base32
16643 "0781gm9g34wa0asc19dx81ng0nqq07igzv3bbvdqmz13pv7469n0"))))
16644 (build-system python-build-system)
16645 (home-page "https://uritemplate.readthedocs.org")
16646 (synopsis "Library to deal with URI Templates")
16647 (description "@code{uritemplate} provides Python library to deal with URI
16648 Templates.")
16649 (license license:bsd-2)))
16650
16651 (define-public python2-uritemplate
16652 (package-with-python2 python-uritemplate))
16653
16654 (define-public python-pydiff
16655 (package
16656 (name "python-pydiff")
16657 (version "0.2")
16658 (source
16659 (origin
16660 (method url-fetch)
16661 (uri (pypi-uri "pydiff" version))
16662 (sha256
16663 (base32
16664 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
16665 (build-system python-build-system)
16666 (home-page "https://github.com/myint/pydiff")
16667 (synopsis "Library to diff two Python files at the bytecode level")
16668 (description
16669 "@code{pydiff} makes it easy to look for actual code changes while
16670 ignoring formatting changes.")
16671 (license license:expat)))
16672
16673 (define-public python2-pydiff
16674 (package-with-python2 python-pydiff))
16675
16676 (define-public python-nose-timer
16677 (package
16678 (name "python-nose-timer")
16679 (version "0.7.0")
16680 (source
16681 (origin
16682 (method url-fetch)
16683 (uri (pypi-uri "nose-timer" version))
16684 (patches
16685 (search-patches
16686 ;; This patch will not be needed in the next version.
16687 ;; It is taken from the master branch.
16688 "python-nose-timer-drop-ordereddict.patch"))
16689 (sha256
16690 (base32
16691 "1s32ymsnby8lz2qk55ifj9zi50dqcg6swnj5cz2rmwxg2jsslsxp"))))
16692 (build-system python-build-system)
16693 (propagated-inputs
16694 `(("python-nose" ,python-nose)
16695 ("python-termcolor" ,python-termcolor)))
16696 (home-page "https://github.com/mahmoudimus/nose-timer")
16697 (synopsis "Timer plugin for nosetests")
16698 (description "Shows how much time was needed to run individual tests.")
16699 (license license:expat)))
16700
16701 (define-public python2-nose-timer
16702 (package-with-python2 python-nose-timer))
16703
16704 (define-public python-tqdm
16705 (package
16706 (name "python-tqdm")
16707 (version "4.15.0")
16708 (source
16709 (origin
16710 (method url-fetch)
16711 (uri (pypi-uri "tqdm" version))
16712 (sha256
16713 (base32
16714 "0lwrmby8qz23gvqwkpivfrv4q8nfh90cz9ml6slwvwmcxxsdrhbf"))))
16715 (build-system python-build-system)
16716 (native-inputs
16717 `(("python-flake8" ,python-flake8)
16718 ("python-nose" ,python-nose)
16719 ("python-nose-timer" ,python-nose-timer)
16720 ("python-coverage" ,python-coverage)
16721 ("python-virtualenv" ,python-virtualenv)))
16722 (home-page "https://github.com/tqdm/tqdm")
16723 (synopsis "Fast, extensible progress meter")
16724 (description
16725 "Make loops show a progress bar on the console by just wrapping any
16726 iterable with @code{|tqdm(iterable)|}. Offers many options to define
16727 design and layout.")
16728 (license (list license:mpl2.0 license:expat))))
16729
16730 (define-public python2-tqdm
16731 (package-with-python2 python-tqdm))
16732
16733 (define-public python-pkginfo
16734 (package
16735 (name "python-pkginfo")
16736 (version "1.4.1")
16737 (source
16738 (origin
16739 (method url-fetch)
16740 (uri (pypi-uri "pkginfo" version))
16741 (sha256
16742 (base32
16743 "17pqjfpq3c6xzdmk8pski6jcjgjv78q00zjf2bgzb668pzm6l6mv"))))
16744 (build-system python-build-system)
16745 (arguments
16746 ;; The tests are broken upstream.
16747 '(#:tests? #f))
16748 (home-page
16749 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
16750 (synopsis
16751 "Query metadatdata from sdists, bdists, and installed packages")
16752 (description
16753 "API to query the distutils metadata written in @file{PKG-INFO} inside a
16754 source distriubtion (an sdist) or a binary distribution (e.g., created by
16755 running bdist_egg). It can also query the EGG-INFO directory of an installed
16756 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
16757 created by running @code{python setup.py develop}).")
16758 (license license:expat)))
16759
16760 (define-public python2-pkginfo
16761 (package-with-python2 python-pkginfo))
16762
16763 (define-public python-twine
16764 (package
16765 (name "python-twine")
16766 (version "1.9.1")
16767 (source
16768 (origin
16769 (method url-fetch)
16770 (uri (pypi-uri "twine" version))
16771 (sha256
16772 (base32
16773 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
16774 (build-system python-build-system)
16775 (propagated-inputs
16776 `(("python-tqdm" ,python-tqdm)
16777 ("python-pkginfo", python-pkginfo)
16778 ("python-requests" ,python-requests)
16779 ("python-requests-toolbelt" ,python-requests-toolbelt)))
16780 (home-page "https://github.com/pypa/twine")
16781 (synopsis "Collection of utilities for interacting with PyPI")
16782 (description
16783 "@code{twine} currently supports registering projects and uploading
16784 distributions. It authenticates the user over HTTPS, allows them to pre-sign
16785 their files and supports any packaging format (including wheels).")
16786 (license license:asl2.0)))
16787
16788 (define-public python2-twine
16789 (package-with-python2 python-twine))
16790
16791 (define-public python-linecache2
16792 (package
16793 (name "python-linecache2")
16794 (version "1.0.0")
16795 (source
16796 (origin
16797 (method url-fetch)
16798 (uri (pypi-uri "linecache2" version))
16799 (sha256
16800 (base32
16801 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
16802 (build-system python-build-system)
16803 (arguments
16804 `(;; The tests depend on unittest2, and our version is a bit too old.
16805 #:tests? #f))
16806 (native-inputs
16807 `(("python-pbr" ,python-pbr)))
16808 (home-page
16809 "https://github.com/testing-cabal/linecache2")
16810 (synopsis "Backports of the linecache module")
16811 (description
16812 "The linecache module allows one to get any line from any file, while
16813 attempting to optimize internally, using a cache, the common case where many
16814 lines are read from a single file.")
16815 (license license:psfl)))
16816
16817 (define-public python2-linecache2
16818 (package-with-python2 python-linecache2))
16819
16820 (define-public python-traceback2
16821 (package
16822 (name "python-traceback2")
16823 (version "1.4.0")
16824 (source
16825 (origin
16826 (method url-fetch)
16827 (uri (pypi-uri "traceback2" version))
16828 (sha256
16829 (base32
16830 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
16831 (build-system python-build-system)
16832 (arguments
16833 `(;; python-traceback2 and python-unittest2 depend on one another.
16834 #:tests? #f))
16835 (native-inputs
16836 `(("python-pbr" ,python-pbr)))
16837 (propagated-inputs
16838 `(("python-linecache2" ,python-linecache2)))
16839 (home-page
16840 "https://github.com/testing-cabal/traceback2")
16841 (synopsis "Backports of the traceback module")
16842 (description
16843 "This module provides a standard interface to extract, format and print
16844 stack traces of Python programs. It exactly mimics the behavior of the Python
16845 interpreter when it prints a stack trace.")
16846 (license license:psfl)))
16847
16848 (define-public python2-traceback2
16849 (package-with-python2 python-traceback2))
16850
16851 (define-public python-ratelimiter
16852 (package
16853 (name "python-ratelimiter")
16854 (version "1.2.0")
16855 (source
16856 (origin
16857 (method url-fetch)
16858 (uri (pypi-uri "ratelimiter" version))
16859 (sha256
16860 (base32
16861 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
16862 (build-system python-build-system)
16863 (arguments
16864 '(#:tests? #f)) ; There are no tests in the pypi archive.
16865 (home-page "https://github.com/RazerM/ratelimiter")
16866 (synopsis "Simple rate limiting object")
16867 (description
16868 "The @code{ratelimiter} module ensures that an operation will not be
16869 executed more than a given number of times during a given period.")
16870 (license license:asl2.0)))
16871
16872 (define-public python2-ratelimiter
16873 (package-with-python2 python-ratelimiter))