Correct name and Email for ng0.
[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, 2018 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, 2018 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, 2018 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 Nils Gillmann <ng0@n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017, 2018 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, 2017 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, 2018 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, 2018 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, 2018 Kei Kebreau <kkebreau@posteo.net>
45 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
47 ;;; Copyright © 2017 Brendan Tildesley <brendan.tildesley@openmailbox.org>
48 ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
49 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
50 ;;;
51 ;;; This file is part of GNU Guix.
52 ;;;
53 ;;; GNU Guix is free software; you can redistribute it and/or modify it
54 ;;; under the terms of the GNU General Public License as published by
55 ;;; the Free Software Foundation; either version 3 of the License, or (at
56 ;;; your option) any later version.
57 ;;;
58 ;;; GNU Guix is distributed in the hope that it will be useful, but
59 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
60 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
61 ;;; GNU General Public License for more details.
62 ;;;
63 ;;; You should have received a copy of the GNU General Public License
64 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
65
66 (define-module (gnu packages python)
67 #:use-module ((guix licenses) #:prefix license:)
68 #:use-module (gnu packages)
69 #:use-module (gnu packages algebra)
70 #:use-module (gnu packages adns)
71 #:use-module (gnu packages attr)
72 #:use-module (gnu packages backup)
73 #:use-module (gnu packages bash)
74 #:use-module (gnu packages check)
75 #:use-module (gnu packages compression)
76 #:use-module (gnu packages crypto)
77 #:use-module (gnu packages databases)
78 #:use-module (gnu packages file)
79 #:use-module (gnu packages fontutils)
80 #:use-module (gnu packages gcc)
81 #:use-module (gnu packages geo)
82 #:use-module (gnu packages ghostscript)
83 #:use-module (gnu packages gl)
84 #:use-module (gnu packages glib)
85 #:use-module (gnu packages graphviz)
86 #:use-module (gnu packages graphics)
87 #:use-module (gnu packages gstreamer)
88 #:use-module (gnu packages gtk)
89 #:use-module (gnu packages icu4c)
90 #:use-module (gnu packages image)
91 #:use-module (gnu packages imagemagick)
92 #:use-module (gnu packages libevent)
93 #:use-module (gnu packages libffi)
94 #:use-module (gnu packages linux)
95 #:use-module (gnu packages machine-learning)
96 #:use-module (gnu packages man)
97 #:use-module (gnu packages maths)
98 #:use-module (gnu packages multiprecision)
99 #:use-module (gnu packages networking)
100 #:use-module (gnu packages ncurses)
101 #:use-module (gnu packages openstack)
102 #:use-module (gnu packages password-utils)
103 #:use-module (gnu packages pcre)
104 #:use-module (gnu packages perl)
105 #:use-module (gnu packages pkg-config)
106 #:use-module (gnu packages python-crypto)
107 #:use-module (gnu packages python-web)
108 #:use-module (gnu packages qt)
109 #:use-module (gnu packages readline)
110 #:use-module (gnu packages sdl)
111 #:use-module (gnu packages search)
112 #:use-module (gnu packages shells)
113 #:use-module (gnu packages ssh)
114 #:use-module (gnu packages statistics)
115 #:use-module (gnu packages terminals)
116 #:use-module (gnu packages tex)
117 #:use-module (gnu packages texinfo)
118 #:use-module (gnu packages time)
119 #:use-module (gnu packages tls)
120 #:use-module (gnu packages version-control)
121 #:use-module (gnu packages video)
122 #:use-module (gnu packages web)
123 #:use-module (gnu packages base)
124 #:use-module (gnu packages xml)
125 #:use-module (gnu packages xorg)
126 #:use-module (gnu packages xdisorg)
127 #:use-module (gnu packages tcl)
128 #:use-module (gnu packages bdw-gc)
129 #:use-module (guix packages)
130 #:use-module (guix download)
131 #:use-module (guix git-download)
132 #:use-module (guix utils)
133 #:use-module (guix build-system gnu)
134 #:use-module (guix build-system cmake)
135 #:use-module (guix build-system python)
136 #:use-module (guix build-system trivial)
137 #:use-module (srfi srfi-1))
138
139 (define-public python-2.7
140 (package
141 (name "python")
142 (version "2.7.14")
143 (source
144 (origin
145 (method url-fetch)
146 (uri (string-append "https://www.python.org/ftp/python/"
147 version "/Python-" version ".tar.xz"))
148 (sha256
149 (base32
150 "0rka541ys16jwzcnnvjp2v12m4cwgd2jp6wj4kj511p715pb5zvi"))
151 (patches (search-patches "python-2.7-search-paths.patch"
152 "python-2-deterministic-build-info.patch"
153 "python-2.7-site-prefixes.patch"
154 "python-2.7-source-date-epoch.patch"
155 "python-2.7-adjust-tests.patch"))
156 (modules '((guix build utils)))
157 ;; suboptimal to delete failing tests here, but if we delete them in the
158 ;; arguments then we need to make sure to strip out that phase when it
159 ;; gets inherited by python and python-minimal.
160 (snippet
161 '(begin
162 (for-each delete-file
163 '("Lib/test/test_compileall.py"
164 "Lib/test/test_ctypes.py" ; fails on mips64el
165 "Lib/test/test_distutils.py"
166 "Lib/test/test_import.py"
167 "Lib/test/test_shutil.py"
168 "Lib/test/test_socket.py"
169 "Lib/test/test_subprocess.py"))
170 #t))))
171 (outputs '("out"
172 "tk")) ;tkinter; adds 50 MiB to the closure
173 (build-system gnu-build-system)
174 (arguments
175 `(;; 356 tests OK.
176 ;; 6 tests failed:
177 ;; test_compileall test_distutils test_import test_shutil test_socket
178 ;; test_subprocess
179 ;; 39 tests skipped:
180 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
181 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
182 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
183 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
184 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
185 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
186 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
187 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
188 ;; test_winreg test_winsound test_zipfile64
189 ;; 4 skips unexpected on linux2:
190 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
191 #:test-target "test"
192 #:configure-flags
193 (list "--enable-shared" ;allow embedding
194 "--with-system-ffi" ;build ctypes
195 "--with-ensurepip=install" ;install pip and setuptools
196 "--enable-unicode=ucs4"
197 (string-append "LDFLAGS=-Wl,-rpath="
198 (assoc-ref %outputs "out") "/lib"))
199
200 #:modules ((ice-9 ftw) (ice-9 match)
201 (guix build utils) (guix build gnu-build-system))
202 #:phases
203 (modify-phases %standard-phases
204 (add-before
205 'configure 'patch-lib-shells
206 (lambda _
207 ;; Filter for existing files, since some may not exist in all
208 ;; versions of python that are built with this recipe.
209 (substitute* (filter file-exists?
210 '("Lib/subprocess.py"
211 "Lib/popen2.py"
212 "Lib/distutils/tests/test_spawn.py"
213 "Lib/test/support/__init__.py"
214 "Lib/test/test_subprocess.py"))
215 (("/bin/sh") (which "sh")))
216
217 ;; Use zero as the timestamp in .pyc files so that builds are
218 ;; deterministic. TODO: Remove it when this variable is set in
219 ;; gnu-build-system.scm.
220 (setenv "SOURCE_DATE_EPOCH" "1")
221 #t))
222 (add-before 'configure 'do-not-record-configure-flags
223 (lambda* (#:key configure-flags #:allow-other-keys)
224 ;; Remove configure flags from the installed '_sysconfigdata.py'
225 ;; and 'Makefile' so we don't end up keeping references to the
226 ;; build tools.
227 ;;
228 ;; Preserve at least '--with-system-ffi' since otherwise the
229 ;; thing tries to build libffi, fails, and we end up with a
230 ;; Python that lacks ctypes.
231 (substitute* "configure"
232 (("^CONFIG_ARGS=.*$")
233 (format #f "CONFIG_ARGS='~a'\n"
234 (if (member "--with-system-ffi" configure-flags)
235 "--with-system-ffi"
236 ""))))
237 #t))
238 (add-before
239 'check 'pre-check
240 (lambda _
241 ;; 'Lib/test/test_site.py' needs a valid $HOME
242 (setenv "HOME" (getcwd))
243 #t))
244 (add-after
245 'unpack 'set-source-file-times-to-1980
246 ;; XXX One of the tests uses a ZIP library to pack up some of the
247 ;; source tree, and fails with "ZIP does not support timestamps
248 ;; before 1980". Work around this by setting the file times in the
249 ;; source tree to sometime in early 1980.
250 (lambda _
251 (let ((circa-1980 (* 10 366 24 60 60)))
252 (ftw "." (lambda (file stat flag)
253 (utime file circa-1980 circa-1980)
254 #t))
255 #t)))
256 (add-after 'install 'remove-tests
257 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
258 ;; because these files are used by some libraries out there.
259 (lambda* (#:key outputs #:allow-other-keys)
260 (let ((out (assoc-ref outputs "out")))
261 (match (scandir (string-append out "/lib")
262 (lambda (name)
263 (string-prefix? "python" name)))
264 ((pythonX.Y)
265 (let ((testdir (string-append out "/lib/" pythonX.Y
266 "/test")))
267 (with-directory-excursion testdir
268 (for-each delete-file-recursively
269 (scandir testdir
270 (match-lambda
271 ((or "." "..") #f)
272 (file
273 (not
274 (string-prefix? "test_support."
275 file))))))
276 (call-with-output-file "__init__.py" (const #t))
277 #t)))))))
278 (add-before 'strip 'make-libraries-writable
279 (lambda* (#:key outputs #:allow-other-keys)
280 ;; Make .so files writable so they can be stripped.
281 (let ((out (assoc-ref outputs "out")))
282 (for-each (lambda (file)
283 (chmod file #o755))
284 (find-files (string-append out "/lib")
285 "\\.so"))
286 #t)))
287 (add-after 'install 'move-tk-inter
288 (lambda* (#:key outputs #:allow-other-keys)
289 ;; When Tkinter support is built move it to a separate output so
290 ;; that the main output doesn't contain a reference to Tcl/Tk.
291 (let ((out (assoc-ref outputs "out"))
292 (tk (assoc-ref outputs "tk")))
293 (when tk
294 (match (find-files out "tkinter.*\\.so")
295 ((tkinter.so)
296 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
297 ;; want it under TK/lib/pythonX.Y/site-packages.
298 (let* ((len (string-length out))
299 (target (string-append
300 tk "/"
301 (string-drop
302 (dirname (dirname tkinter.so))
303 len)
304 "/site-packages")))
305 (install-file tkinter.so target)
306 (delete-file tkinter.so)))))
307 #t))))))
308 (inputs
309 `(("bzip2" ,bzip2)
310 ("gdbm" ,gdbm)
311 ("libffi" ,libffi) ; for ctypes
312 ("sqlite" ,sqlite) ; for sqlite extension
313 ("openssl" ,openssl)
314 ("readline" ,readline)
315 ("zlib" ,zlib)
316 ("tcl" ,tcl)
317 ("tk" ,tk))) ; for tkinter
318 (native-inputs
319 `(("pkg-config" ,pkg-config)))
320 (native-search-paths
321 (list (search-path-specification
322 (variable "PYTHONPATH")
323 (files '("lib/python2.7/site-packages")))))
324 (home-page "https://www.python.org")
325 (synopsis "High-level, dynamically-typed programming language")
326 (description
327 "Python is a remarkably powerful dynamic programming language that
328 is used in a wide variety of application domains. Some of its key
329 distinguishing features include: clear, readable syntax; strong
330 introspection capabilities; intuitive object orientation; natural
331 expression of procedural code; full modularity, supporting hierarchical
332 packages; exception-based error handling; and very high level dynamic
333 data types.")
334 (license license:psfl)))
335
336 ;; Current 2.x version.
337 (define-public python-2 python-2.7)
338
339 (define-public python-3.6
340 (package (inherit python-2)
341 (version "3.6.3")
342 (source (origin
343 (method url-fetch)
344 (uri (string-append "https://www.python.org/ftp/python/"
345 version "/Python-" version ".tar.xz"))
346 (patches (search-patches
347 "python-fix-tests.patch"
348 "python-3-fix-tests.patch"
349 "python-3-deterministic-build-info.patch"
350 "python-3-search-paths.patch"))
351 (patch-flags '("-p0"))
352 (sha256
353 (base32
354 "1nl1raaagr4car787a2hmjv2dw6gqny53xfd6wisbgx4r5kxk9yd"))
355 (snippet
356 '(begin
357 (for-each delete-file
358 '("Lib/ctypes/test/test_structures.py" ; fails on aarch64
359 "Lib/ctypes/test/test_win32.py" ; fails on aarch64
360 "Lib/test/test_fcntl.py")) ; fails on aarch64
361 #t))))
362 (arguments (substitute-keyword-arguments (package-arguments python-2)
363 ((#:tests? _) #t)))
364 (native-search-paths
365 (list (search-path-specification
366 (variable "PYTHONPATH")
367 (files (list (string-append "lib/python"
368 (version-major+minor version)
369 "/site-packages"))))))))
370
371 ;; Current 3.x version.
372 (define-public python-3 python-3.6)
373
374 ;; Current major version.
375 (define-public python python-3)
376
377 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
378 ;; Python (Tk -> libxcb -> Python.)
379
380 (define-public python2-minimal
381 (package (inherit python-2)
382 (name "python-minimal")
383 (outputs '("out"))
384
385 ;; Keep zlib, which is used by 'pip' (via the 'zipimport' module), which
386 ;; is invoked upon 'make install'. 'pip' also expects 'ctypes' and thus
387 ;; libffi.
388 (inputs `(("libffi" ,libffi)
389 ("zlib" ,zlib)))))
390
391 (define-public python-minimal
392 (package (inherit python)
393 (name "python-minimal")
394 (outputs '("out"))
395
396 ;; Build fails due to missing ctypes without libffi.
397 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
398 ;; zlib is required by 'zipimport', used by pip.
399 (inputs `(("libffi" ,libffi)
400 ("openssl" ,openssl)
401 ("zlib" ,zlib)))))
402
403 (define* (wrap-python3 python
404 #:optional
405 (name (string-append (package-name python) "-wrapper")))
406 (package (inherit python)
407 (name name)
408 (source #f)
409 (build-system trivial-build-system)
410 (outputs '("out"))
411 (inputs `(("bash" ,bash)))
412 (propagated-inputs `(("python" ,python)))
413 (arguments
414 `(#:modules ((guix build utils))
415 #:builder
416 (begin
417 (use-modules (guix build utils))
418 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
419 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
420 (mkdir-p bin)
421 (for-each
422 (lambda (old new)
423 (symlink (string-append python old)
424 (string-append bin "/" new)))
425 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
426 `("python" ,"pydoc" ,"idle" ,"pip"))
427 ;; python-config outputs search paths based upon its location,
428 ;; use a bash wrapper to avoid changing its outputs.
429 (let ((bash (string-append (assoc-ref %build-inputs "bash")
430 "/bin/bash"))
431 (old (string-append python "python3-config"))
432 (new (string-append bin "/python-config")))
433 (with-output-to-file new
434 (lambda ()
435 (format #t "#!~a~%" bash)
436 (format #t "exec \"~a\" \"$@\"~%" old)
437 (chmod new #o755)
438 #t)))))))
439 (synopsis "Wrapper for the Python 3 commands")
440 (description
441 "This package provides wrappers for the commands of Python@tie{}3.x such
442 that they can be invoked under their usual name---e.g., @command{python}
443 instead of @command{python3}.")))
444
445 (define-public python-wrapper (wrap-python3 python))
446 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
447
448 (define-public python-psutil
449 (package
450 (name "python-psutil")
451 (version "5.4.3")
452 (source
453 (origin
454 (method url-fetch)
455 (uri (pypi-uri "psutil" version))
456 (sha256
457 (base32
458 "063v69x7spyclyaxrd3gmzj3p16q5ayg97xqhwb1kyn22a9pwip2"))))
459 (build-system python-build-system)
460 (arguments
461 ;; FIXME: some tests does not return and times out.
462 '(#:tests? #f))
463 (home-page "https://www.github.com/giampaolo/psutil")
464 (synopsis "Library for retrieving information on running processes")
465 (description
466 "psutil (Python system and process utilities) is a library for retrieving
467 information on running processes and system utilization (CPU, memory, disks,
468 network) in Python. It is useful mainly for system monitoring, profiling and
469 limiting process resources and management of running processes. It implements
470 many functionalities offered by command line tools such as: ps, top, lsof,
471 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
472 pidof, tty, taskset, pmap.")
473 (properties `((python2-variant . ,(delay python2-psutil))))
474 (license license:bsd-3)))
475
476 (define-public python2-psutil
477 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
478 (package
479 (inherit base)
480 (propagated-inputs
481 `(("python2-enum34" ,python2-enum34) ;optional
482 ,@(package-propagated-inputs base))))))
483
484 (define-public python-shapely
485 (package
486 (name "python-shapely")
487 (version "1.6.3")
488 (source
489 (origin
490 (method url-fetch)
491 (uri (pypi-uri "Shapely" version))
492 (sha256
493 (base32
494 "0svc58dzcw9gj92b4sgq35sdxkf85z0qwlzxarkzq4bp3h8jy58l"))))
495 (build-system python-build-system)
496 (native-inputs
497 `(("python-cython" ,python-cython)
498 ("python-matplotlib" ,python-matplotlib)
499 ("python-pytest" ,python-pytest)
500 ("python-pytest-cov" ,python-pytest-cov)))
501 (inputs
502 `(("geos" ,geos)))
503 (propagated-inputs
504 `(("python-numpy" ,python-numpy)))
505 (arguments
506 `(#:phases
507 (modify-phases %standard-phases
508 (add-after 'unpack 'patch-geos-path
509 (lambda* (#:key inputs #:allow-other-keys)
510 (let ((geos (assoc-ref inputs "geos"))
511 (glibc (assoc-ref inputs ,(if (%current-target-system)
512 "cross-libc" "libc"))))
513 (substitute* "shapely/geos.py"
514 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
515 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
516 geos "/lib/libgeos_c.so'])"))
517 (("free = load_dll\\('c'\\)\\.free")
518 (string-append "free = load_dll('c', fallbacks=['"
519 glibc "/lib/libc.so.6']).free"))))
520 #t)))))
521 (home-page "https://github.com/Toblerity/Shapely")
522 (synopsis "Library for the manipulation and analysis of geometric objects")
523 (description "Shapely is a Python package for manipulation and analysis of
524 planar geometric objects. It is based on the @code{GEOS} library.")
525 (license license:bsd-3)))
526
527 (define-public python2-shapely
528 (package-with-python2 python-shapely))
529
530 (define-public python-clyent
531 (package
532 (name "python-clyent")
533 (version "1.2.1")
534 (source
535 (origin
536 (method url-fetch)
537 (uri (pypi-uri "clyent" version))
538 (sha256
539 (base32
540 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
541 (build-system python-build-system)
542 (native-inputs
543 `(("python-mock" ,python-mock)))
544 (home-page "https://github.com/binstar/clyent")
545 (synopsis "Command line client library")
546 (description "Clyent is a Python command line utiliy library. It is used
547 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
548 (license license:bsd-3)))
549
550 (define-public python2-clyent
551 (package-with-python2 python-clyent))
552
553 (define-public python-babel
554 (package
555 (name "python-babel")
556 (version "2.3.4")
557 (source
558 (origin
559 (method url-fetch)
560 (uri (pypi-uri "Babel" version))
561 (sha256
562 (base32
563 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
564 (build-system python-build-system)
565 (propagated-inputs
566 `(("python-pytz" ,python-pytz)))
567 (arguments `(#:tests? #f)) ; no test target
568 (home-page "http://babel.pocoo.org/")
569 (synopsis
570 "Tools for internationalizing Python applications")
571 (description
572 "Babel is composed of two major parts:
573 - tools to build and work with gettext message catalogs
574 - a Python interface to the CLDR (Common Locale Data Repository), providing
575 access to various locale display names, localized number and date formatting,
576 etc. ")
577 (license license:bsd-3)))
578
579 (define-public python2-babel
580 (package-with-python2 python-babel))
581
582 (define-public python2-backport-ssl-match-hostname
583 (package
584 (name "python2-backport-ssl-match-hostname")
585 (version "3.5.0.1")
586 (source
587 (origin
588 (method url-fetch)
589 (uri (string-append
590 "https://pypi.python.org/packages/source/b/"
591 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
592 version ".tar.gz"))
593 (sha256
594 (base32
595 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
596 (build-system python-build-system)
597 (arguments
598 `(#:python ,python-2
599 #:tests? #f)) ; no test target
600 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
601 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
602 (description
603 "This backport brings the ssl.match_hostname() function to users of
604 earlier versions of Python. The function checks the hostname in the
605 certificate returned by the server to which a connection has been established,
606 and verifies that it matches the intended target hostname.")
607 (license license:psfl)))
608
609 (define-public python-hdf4
610 (package
611 (name "python-hdf4")
612 (version "0.9")
613 (source
614 (origin
615 (method url-fetch)
616 (uri (pypi-uri name version))
617 (sha256
618 (base32
619 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
620 (build-system python-build-system)
621 (native-inputs `(("nose" ,python-nose)))
622 (propagated-inputs `(("numpy" ,python-numpy)))
623 (inputs
624 `(("hdf4" ,hdf4)
625 ("libjpeg" ,libjpeg)
626 ("zlib" ,zlib)))
627 (arguments
628 `(#:phases
629 (modify-phases %standard-phases
630 (replace 'check
631 (lambda _
632 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
633 ;; on to import numpy. Somehow this works on their CI system.
634 ;; Let's just manage PYTHONPATH here instead.
635 (substitute* "runexamples.sh"
636 (("export PYTHONPATH=.*") ""))
637 (setenv "PYTHONPATH"
638 (string-append (getcwd) ":"
639 (getenv "PYTHONPATH")))
640 (and (zero? (system* "./runexamples.sh"))
641 (zero? (system* "nosetests" "-v"))))))))
642 (home-page "https://github.com/fhs/python-hdf4")
643 (synopsis "Python interface to the NCSA HDF4 library")
644 (description
645 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
646 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
647 NetCDF files can also be read and modified. Python-HDF4 is a fork of
648 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
649 (license license:expat)))
650
651 (define-public python2-hdf4
652 (package-with-python2 python-hdf4))
653
654 (define-public python-h5py
655 (package
656 (name "python-h5py")
657 (version "2.7.0")
658 (source
659 (origin
660 (method url-fetch)
661 (uri (pypi-uri "h5py" version))
662 (sha256
663 (base32
664 "0433sdv6xc9p7v1xs1gvbxp7p152ywi3nplgjb258q9fvw9469br"))))
665 (build-system python-build-system)
666 (arguments
667 `(#:tests? #f ; no test target
668 #:phases
669 (modify-phases %standard-phases
670 (add-after 'unpack 'fix-hdf5-paths
671 (lambda* (#:key inputs #:allow-other-keys)
672 (let ((prefix (assoc-ref inputs "hdf5")))
673 (substitute* "setup_build.py"
674 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
675 (string-append "['" prefix "/lib" "']"))
676 (("'/opt/local/include', '/usr/local/include'")
677 (string-append "'" prefix "/include" "'")))
678 (substitute* "setup_configure.py"
679 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
680 (string-append "['" prefix "/lib" "']")))
681 #t))))))
682 (propagated-inputs
683 `(("python-six" ,python-six)
684 ("python-numpy" ,python-numpy)))
685 (inputs
686 `(("hdf5" ,hdf5)))
687 (native-inputs
688 `(("python-cython" ,python-cython)
689 ("python-pkgconfig" ,python-pkgconfig)))
690 (home-page "http://www.h5py.org/")
691 (synopsis "Read and write HDF5 files from Python")
692 (description
693 "The h5py package provides both a high- and low-level interface to the
694 HDF5 library from Python. The low-level interface is intended to be a
695 complete wrapping of the HDF5 API, while the high-level component supports
696 access to HDF5 files, datasets and groups using established Python and NumPy
697 concepts.")
698 (license license:bsd-3)))
699
700 (define-public python2-h5py
701 (package-with-python2 python-h5py))
702
703 (define-public python-netcdf4
704 (package
705 (name "python-netcdf4")
706 (version "1.2.9")
707 (source
708 (origin
709 (method url-fetch)
710 (uri (pypi-uri "netCDF4" version))
711 (sha256
712 (base32
713 "1h6jq338amlbk0ilzvjyl7cck80i0bah9a5spn9in71vy2qxm7i5"))))
714 (build-system python-build-system)
715 (native-inputs
716 `(("python-cython" ,python-cython)))
717 (propagated-inputs
718 `(("python-numpy" ,python-numpy)))
719 (inputs
720 `(("netcdf" ,netcdf)
721 ("hdf4" ,hdf4)
722 ("hdf5" ,hdf5)))
723 (arguments
724 '(#:phases
725 (modify-phases %standard-phases
726 (replace 'check
727 (lambda _
728 (setenv "NO_NET" "1") ; disable opendap tests
729 (with-directory-excursion "test"
730 (setenv "PYTHONPATH" ; find and add the library we just built
731 (string-append
732 (car (find-files "../build" "lib.*"
733 #:directories? #:t
734 #:fail-on-error? #:t))
735 ":" (getenv "PYTHONPATH")))
736 (zero? (system* "python" "run_all.py"))))))))
737 (home-page
738 "https://github.com/Unidata/netcdf4-python")
739 (synopsis "Python/numpy interface to the netCDF library")
740 (description "Netcdf4-python is a Python interface to the netCDF C
741 library. netCDF version 4 has many features not found in earlier
742 versions of the library and is implemented on top of HDF5. This module
743 can read and write files in both the new netCDF 4 and the old netCDF 3
744 format, and can create files that are readable by HDF5 clients. The
745 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
746 to users of that module.")
747 ;; The software is mainly ISC, but includes some files covered
748 ;; by the Expat license.
749 (license (list license:isc license:expat))))
750
751 (define-public python2-netcdf4
752 (package-with-python2 python-netcdf4))
753
754 (define-public python-lockfile
755 (package
756 (name "python-lockfile")
757 (version "0.12.2")
758 (source
759 (origin
760 (method url-fetch)
761 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
762 "lockfile-" version ".tar.gz"))
763 (sha256
764 (base32
765 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
766 (build-system python-build-system)
767 (arguments '(#:test-target "check"))
768 (native-inputs
769 `(("python-pbr" ,python-pbr)))
770 (home-page "https://launchpad.net/pylockfile")
771 (synopsis "Platform-independent file locking module")
772 (description
773 "The lockfile package exports a LockFile class which provides a simple
774 API for locking files.")
775 (license license:expat)))
776
777 (define-public python2-lockfile
778 (package-with-python2 python-lockfile))
779
780 (define-public python-setuptools
781 (package
782 (name "python-setuptools")
783 (version "31.0.0")
784 (source
785 (origin
786 (method url-fetch)
787 (uri (pypi-uri "setuptools" version))
788 (sha256
789 (base32
790 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
791 (modules '((guix build utils)))
792 (snippet
793 '(begin
794 ;; Remove included binaries which are used to build self-extracting
795 ;; installers for Windows.
796 ;; TODO: Find some way to build them ourself so we can include them.
797 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
798 #t))))
799 (build-system python-build-system)
800 ;; FIXME: Tests require pytest, which itself relies on setuptools.
801 ;; One could bootstrap with an internal untested setuptools.
802 (arguments
803 `(#:tests? #f))
804 (home-page "https://pypi.python.org/pypi/setuptools")
805 (synopsis
806 "Library designed to facilitate packaging Python projects")
807 (description
808 "Setuptools is a fully-featured, stable library designed to facilitate
809 packaging Python projects, where packaging includes:
810 Python package and module definitions,
811 distribution package metadata,
812 test hooks,
813 project installation,
814 platform-specific details,
815 Python 3 support.")
816 ;; TODO: setuptools now bundles the following libraries:
817 ;; packaging, pyparsing, six and appdirs. How to unbundle?
818 (license (list license:psfl ; setuptools itself
819 license:expat ; six, appdirs, pyparsing
820 license:asl2.0 ; packaging is dual ASL2/BSD-2
821 license:bsd-2))))
822
823 (define-public python2-setuptools
824 (package-with-python2 python-setuptools))
825
826 (define-public python-uniseg
827 (package
828 (name "python-uniseg")
829 (version "0.7.1")
830 (source
831 (origin
832 (method url-fetch)
833 (uri (pypi-uri "uniseg" version ".zip"))
834 (sha256
835 (base32
836 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
837 (build-system python-build-system)
838 (arguments
839 '(#:tests? #f)) ; The test suite requires network access.
840 (native-inputs
841 `(("unzip" ,unzip)))
842 (home-page
843 "https://bitbucket.org/emptypage/uniseg-python")
844 (synopsis
845 "Python library to determine Unicode text segmentations")
846 (description
847 "Uniseg is a Python package used to determine Unicode text segmentations.
848 Supported segmentations include:
849 @enumerate
850 @item @dfn{Code point} (any value in the Unicode codespace)
851 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
852 multiple Unicode code points, e.g. \"G\" + acute-accent)
853 @item Word break
854 @item Sentence break
855 @item Line break
856 @end enumerate")
857 (license license:expat)))
858
859 (define-public python2-uniseg
860 (package-with-python2 python-uniseg))
861
862 (define-public python-humanfriendly
863 (package
864 (name "python-humanfriendly")
865 (version "4.4.1")
866 (source
867 (origin
868 (method url-fetch)
869 (uri (pypi-uri "humanfriendly" version))
870 (sha256
871 (base32
872 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
873 (build-system python-build-system)
874 (arguments
875 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
876 #:tests? #f))
877 (propagated-inputs
878 `(("python-monotonic" ,python-monotonic)))
879 (home-page "https://humanfriendly.readthedocs.io")
880 (synopsis "Human-friendly input and output in Python")
881 (description
882 "The functions and classes in @code{humanfriendly} can be used to make
883 text interfaces more user-friendly. It includes tools to parse and format
884 numbers, file sizes, and timespans, timers for long-running operations, menus
885 to allow the user to choose from a list of options, and terminal interaction
886 helpers.")
887 (license license:expat)))
888
889 (define-public python2-humanfriendly
890 (package-with-python2 python-humanfriendly))
891
892 (define-public python-capturer
893 (package
894 (name "python-capturer")
895 (version "2.4")
896 (source
897 (origin
898 (method url-fetch)
899 (uri (pypi-uri "capturer" version))
900 (sha256
901 (base32
902 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
903 (build-system python-build-system)
904 (arguments
905 `(#:tests? #f))
906 (propagated-inputs
907 `(("python-humanfriendly" ,python-humanfriendly)))
908 (home-page "https://capturer.readthedocs.io")
909 (synopsis "Capture stdout and stderr streams of the current process")
910 (description
911 "The capturer package makes it easy to capture the stdout and stderr
912 streams of the current process and subprocesses. Output can be relayed
913 to the terminal in real time but is also available to the Python program
914 for additional processing.")
915 (license license:expat)))
916
917 (define-public python2-capturer
918 (package-with-python2 python-capturer))
919
920 (define-public python-verboselogs
921 (package
922 (name "python-verboselogs")
923 (version "1.7")
924 (source
925 (origin
926 (method url-fetch)
927 (uri (pypi-uri "verboselogs" version))
928 (sha256
929 (base32
930 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
931 (build-system python-build-system)
932 (native-inputs
933 `(("python-mock" ,python-mock)
934 ("python-astroid" ,python-astroid)
935 ("python-pylint" ,python-pylint)))
936 (home-page "https://verboselogs.readthedocs.io")
937 (synopsis "Verbose logging level for Python's logging module")
938 (description
939 "The @code{verboselogs} package extends Python's @code{logging} module to
940 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
941 (license license:expat)))
942
943 (define-public python2-verboselogs
944 (package-with-python2 python-verboselogs))
945
946 (define-public python-coloredlogs
947 (package
948 (name "python-coloredlogs")
949 (version "7.3")
950 (source
951 (origin
952 (method url-fetch)
953 (uri (pypi-uri "coloredlogs" version))
954 (sha256
955 (base32
956 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
957 (build-system python-build-system)
958 (arguments
959 `(;Tests require some updated modules
960 #:tests? #f))
961 (propagated-inputs
962 `(("python-capturer" ,python-capturer)))
963 (home-page "https://coloredlogs.readthedocs.io")
964 (synopsis "Colored stream handler for Python's logging module")
965 (description
966 "The @code{coloredlogs} package enables colored terminal output for
967 Python's logging module. The @code{ColoredFormatter} class inherits from
968 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
969 messages in color.")
970 (license license:expat)))
971
972 (define-public python2-coloredlogs
973 (package-with-python2 python-coloredlogs))
974
975 (define-public python-eventlet
976 (package
977 (name "python-eventlet")
978 (version "0.20.1")
979 (source
980 (origin
981 (method url-fetch)
982 (uri (pypi-uri "eventlet" version))
983 (sha256
984 (base32
985 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
986 (build-system python-build-system)
987 (propagated-inputs
988 `(("python-greenlet" ,python-greenlet)))
989 (arguments
990 ;; TODO: Requires unpackaged 'enum-compat'.
991 '(#:tests? #f))
992 (home-page "http://eventlet.net")
993 (synopsis "Concurrent networking library for Python")
994 (description
995 "Eventlet is a concurrent networking library for Python that
996 allows you to change how you run your code, not how you write it.
997 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
998 Coroutines ensure that the developer uses a blocking style of programming
999 that is similar to threading, but provide the benefits of non-blocking I/O.
1000 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1001 from the Python interpreter, or as a small part of a larger application.")
1002 (license license:expat)))
1003
1004 (define-public python2-eventlet
1005 (let ((base (package-with-python2
1006 (strip-python2-variant python-eventlet))))
1007 (package (inherit base)
1008 (propagated-inputs
1009 `(("python2-enum34" ,python2-enum34)
1010 ,@(package-propagated-inputs base))))))
1011
1012 (define-public python-six
1013 (package
1014 (name "python-six")
1015 (version "1.11.0")
1016 (source
1017 (origin
1018 (method url-fetch)
1019 (uri (pypi-uri "six" version))
1020 (sha256
1021 (base32
1022 "1scqzwc51c875z23phj48gircqjgnn3af8zy2izjwmnlxrxsgs3h"))))
1023 (build-system python-build-system)
1024 (arguments
1025 `(#:phases
1026 (modify-phases %standard-phases
1027 (replace 'check
1028 (lambda _
1029 (zero? (system* "py.test" "-v")))))))
1030 (native-inputs
1031 `(("python-py" ,python-py)
1032 ("python-pytest" ,python-pytest-bootstrap)))
1033 (home-page "https://pypi.python.org/pypi/six/")
1034 (synopsis "Python 2 and 3 compatibility utilities")
1035 (description
1036 "Six is a Python 2 and 3 compatibility library. It provides utility
1037 functions for smoothing over the differences between the Python versions with
1038 the goal of writing Python code that is compatible on both Python versions.
1039 Six supports every Python version since 2.5. It is contained in only one
1040 Python file, so it can be easily copied into your project.")
1041 (license license:x11)))
1042
1043 (define-public python2-six
1044 (package-with-python2 python-six))
1045
1046 (define-public python-schedule
1047 (package
1048 (name "python-schedule")
1049 (version "0.4.3")
1050 (source
1051 (origin
1052 (method url-fetch)
1053 (uri (pypi-uri "schedule" version))
1054 (sha256
1055 (base32
1056 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1057 (build-system python-build-system)
1058 (native-inputs
1059 `(("python-pytest" ,python-pytest)
1060 ("python-mock" ,python-mock)))
1061 (home-page "https://github.com/dbader/schedule")
1062 (synopsis "Schedule periodic function calls in Python")
1063 (description
1064 "Schedule is an in-process scheduler for periodic jobs that uses the
1065 builder pattern for configuration. Schedule lets you run Python functions (or
1066 any other callable) periodically at pre-determined intervals using a simple,
1067 human-friendly syntax.")
1068 (license license:expat)))
1069
1070 (define-public python2-schedule
1071 (package-with-python2 python-schedule))
1072
1073 (define-public python-pandas
1074 (package
1075 (name "python-pandas")
1076 (version "0.22.0")
1077 (source
1078 (origin
1079 (method url-fetch)
1080 (uri (pypi-uri "pandas" version))
1081 (sha256
1082 (base32 "0v0fi2i10kwnmlpsl6f1fgajcpx3q6766qf6xqi5kw3ivn8l1aa4"))))
1083 (build-system python-build-system)
1084 (arguments
1085 `(#:modules ((guix build utils)
1086 (guix build python-build-system)
1087 (ice-9 ftw)
1088 (srfi srfi-26))
1089 #:phases (modify-phases %standard-phases
1090 (replace 'check
1091 (lambda _
1092 (let ((build-directory
1093 (string-append
1094 (getcwd) "/build/"
1095 (car (scandir "build"
1096 (cut string-prefix? "lib." <>))))))
1097 (with-directory-excursion build-directory
1098 ;; Delete tests that require "moto" which is not yet in Guix.
1099 (for-each delete-file
1100 '("pandas/tests/io/conftest.py"
1101 "pandas/tests/io/json/test_compression.py"
1102 "pandas/tests/io/test_excel.py"))
1103 (invoke "pytest" "-v" "pandas" "-k"
1104 (string-append
1105 "not network and not disabled"
1106 ;; XXX: Due to the deleted tests above.
1107 " and not test_read_s3_jsonl")))))))))
1108 (propagated-inputs
1109 `(("python-numpy" ,python-numpy)
1110 ("python-pytz" ,python-pytz)
1111 ("python-dateutil" ,python-dateutil)))
1112 (native-inputs
1113 `(("python-cython" ,python-cython)
1114 ("python-lxml" ,python-lxml)
1115 ("python-nose" ,python-nose)
1116 ("python-pytest" ,python-pytest)))
1117 (home-page "https://pandas.pydata.org")
1118 (synopsis "Data structures for data analysis, time series, and statistics")
1119 (description
1120 "Pandas is a Python package providing fast, flexible, and expressive data
1121 structures designed to make working with structured (tabular,
1122 multidimensional, potentially heterogeneous) and time series data both easy
1123 and intuitive. It aims to be the fundamental high-level building block for
1124 doing practical, real world data analysis in Python.")
1125 (license license:bsd-3)))
1126
1127 (define-public python2-pandas
1128 (package-with-python2 python-pandas))
1129
1130 (define-public python2-mechanize
1131 (package
1132 (name "python2-mechanize")
1133 (version "0.2.5")
1134 (source
1135 (origin
1136 (method url-fetch)
1137 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1138 version ".tar.gz"))
1139 (sha256
1140 (base32
1141 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1142 (build-system python-build-system)
1143 (arguments
1144 `(#:python ,python-2 ; apparently incompatible with Python 3
1145 #:tests? #f))
1146 ;; test fails with message
1147 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1148 ;; (python-3.3.2) or
1149 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1150 ;; (python-2.7.5).
1151 ;; The source code is from March 2011 and probably not up-to-date
1152 ;; with respect to python unit tests.
1153 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1154 (synopsis
1155 "Stateful programmatic web browsing in Python")
1156 (description
1157 "Mechanize implements stateful programmatic web browsing in Python,
1158 after Andy Lester’s Perl module WWW::Mechanize.")
1159 (license (license:non-copyleft
1160 "file://COPYING"
1161 "See COPYING in the distribution."))))
1162
1163
1164 (define-public python-simplejson
1165 (package
1166 (name "python-simplejson")
1167 (version "3.13.2")
1168 (source
1169 (origin
1170 (method url-fetch)
1171 (uri (pypi-uri "simplejson" version))
1172 (sha256
1173 (base32
1174 "02jg5nixffqyicfqdl4dil82fh1z9p2as758wp0nqwalw0hcykjc"))))
1175 (build-system python-build-system)
1176 (home-page "http://simplejson.readthedocs.org/en/latest/")
1177 (synopsis
1178 "Json library for Python")
1179 (description
1180 "JSON (JavaScript Object Notation) is a subset of JavaScript
1181 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1182 format.
1183
1184 Simplejson exposes an API familiar to users of the standard library marshal
1185 and pickle modules. It is the externally maintained version of the json
1186 library contained in Python 2.6, but maintains compatibility with Python 2.5
1187 and (currently) has significant performance advantages, even without using
1188 the optional C extension for speedups. Simplejson is also supported on
1189 Python 3.3+.")
1190 (license license:x11)))
1191
1192 (define-public python2-simplejson
1193 (package-with-python2 python-simplejson))
1194
1195
1196 (define-public python-pyicu
1197 (package
1198 (name "python-pyicu")
1199 (version "1.9.8")
1200 (source
1201 (origin
1202 (method url-fetch)
1203 (uri (pypi-uri "PyICU" version))
1204 (sha256
1205 (base32
1206 "05nz4p2dpkhwj6y9kik24xbvmfxji39nl0xw0sc0nvp9fgzf6xnd"))))
1207 (build-system python-build-system)
1208 (inputs
1209 `(("icu4c" ,icu4c)))
1210 (native-inputs
1211 `(("python-pytest" ,python-pytest)
1212 ("python-six" ,python-six)))
1213 (home-page "https://github.com/ovalhub/pyicu")
1214 (synopsis "Python extension wrapping the ICU C++ API")
1215 (description
1216 "PyICU is a python extension wrapping the ICU C++ API.")
1217 (properties `((python2-variant . ,(delay python2-pyicu))))
1218 (license license:x11)))
1219
1220 (define-public python2-pyicu
1221 (let ((base (package-with-python2
1222 (strip-python2-variant python-pyicu))))
1223 (package
1224 (inherit base)
1225 (arguments
1226 `(,@(package-arguments base)
1227 #:phases
1228 (modify-phases %standard-phases
1229 (add-before 'check 'delete-failing-test
1230 (λ _
1231 ;; XXX: This fails due to Unicode issues unique to Python 2,
1232 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1233 (delete-file "test/test_Script.py")
1234 #t))))))))
1235
1236 (define-public python2-dogtail
1237 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1238 ;; spaces in indentation" with Python 3.
1239 (package
1240 (name "python2-dogtail")
1241 (version "0.9.9")
1242 (source (origin
1243 (method url-fetch)
1244 (uri (pypi-uri "dogtail" version))
1245 (sha256
1246 (base32
1247 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1248 (build-system python-build-system)
1249 (arguments `(#:python ,python-2
1250 #:tests? #f)) ; invalid command "test"
1251 ;; Currently no offical homepage.
1252 (home-page "https://pypi.python.org/pypi/dogtail/")
1253 (synopsis "GUI test tool and automation framework written in Python")
1254 (description
1255 "Dogtail is a GUI test tool and automation framework written in Python.
1256 It uses Accessibility (a11y) technologies to communicate with desktop
1257 applications. dogtail scripts are written in Python and executed like any
1258 other Python program.")
1259 (license license:gpl2+)))
1260
1261 (define-public python2-empy
1262 (package
1263 (name "python2-empy")
1264 (version "3.3")
1265 (source (origin
1266 (method url-fetch)
1267 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1268 version ".tar.gz"))
1269 (sha256
1270 (base32
1271 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1272 (build-system python-build-system)
1273 (arguments
1274 `(#:python ,python-2
1275 #:phases
1276 (modify-phases %standard-phases
1277 (replace 'check
1278 (lambda _
1279 (zero? (system* "./test.sh")))))))
1280 (home-page "http://www.alcyone.com/software/empy/")
1281 (synopsis "Templating system for Python")
1282 (description
1283 "EmPy is a system for embedding Python expressions and statements in
1284 template text; it takes an EmPy source file, processes it, and produces
1285 output. This is accomplished via expansions, which are special signals to the
1286 EmPy system and are set off by a special prefix (by default the at sign, @@).
1287 EmPy can expand arbitrary Python expressions and statements in this way, as
1288 well as a variety of special forms. Textual data not explicitly delimited in
1289 this way is sent unaffected to the output, allowing Python to be used in
1290 effect as a markup language. Also supported are callbacks via hooks,
1291 recording and playback via diversions, and dynamic, chainable filters. The
1292 system is highly configurable via command line options and embedded
1293 commands.")
1294 (license license:lgpl2.1+)))
1295
1296 (define-public python2-element-tree
1297 (package
1298 (name "python2-element-tree")
1299 (version "1.2.6")
1300 (source (origin
1301 (method url-fetch)
1302 (uri (string-append
1303 "http://effbot.org/media/downloads/elementtree-"
1304 version "-20050316.tar.gz"))
1305 (sha256
1306 (base32
1307 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1308 (build-system python-build-system)
1309 (arguments
1310 `(#:python ,python-2 ; seems to be part of Python 3
1311 #:tests? #f)) ; no 'test' sub-command
1312 (synopsis "Toolkit for XML processing in Python")
1313 (description
1314 "ElementTree is a Python library supporting lightweight XML processing.")
1315 (home-page "http://effbot.org/zone/element-index.htm")
1316 (license (license:x11-style
1317 "http://docs.python.org/2/license.html"
1318 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1319
1320 (define-public python2-pybugz
1321 (package
1322 (name "python2-pybugz")
1323 (version "0.6.11")
1324 (source (origin
1325 (method url-fetch)
1326 (uri (string-append
1327 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1328 version ".tar.gz"))
1329 (sha256
1330 (base32
1331 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1332 (patches (search-patches "pybugz-stty.patch"
1333 "pybugz-encode-error.patch"))))
1334 (build-system python-build-system)
1335 (arguments
1336 `(#:python ,python-2 ; SyntaxError with Python 3
1337 #:tests? #f)) ; no 'test' sub-command
1338 (propagated-inputs
1339 `(("element-tree" ,python2-element-tree)))
1340 (synopsis "Python and command-line interface to Bugzilla")
1341 (description
1342 "PyBugz is a Python library and command-line tool to query the Bugzilla
1343 bug tracking system. It is meant as an aid to speed up interaction with the
1344 bug tracker.")
1345 (home-page "http://www.liquidx.net/pybugz/")
1346 (license license:gpl2)))
1347
1348 (define-public python2-enum
1349 (package
1350 (name "python2-enum")
1351 (version "0.4.6")
1352 (source (origin
1353 (method url-fetch)
1354 (uri (pypi-uri "enum" version))
1355 (sha256
1356 (base32
1357 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1358 (build-system python-build-system)
1359 (arguments
1360 `(#:python ,python-2))
1361 (home-page "http://pypi.python.org/pypi/enum/")
1362 (synopsis "Robust enumerated type support in Python")
1363 (description
1364 "This provides a module for robust enumerations in Python. It has
1365 been superseded by the Python standard library and is provided only for
1366 compatibility.")
1367 ;; Choice of either license.
1368 (license (list license:gpl3+ license:psfl))))
1369
1370 (define-public python-enum34
1371 (package
1372 (name "python-enum34")
1373 (version "1.1.6")
1374 (source
1375 (origin
1376 (method url-fetch)
1377 (uri (pypi-uri "enum34" version))
1378 (sha256
1379 (base32
1380 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1381 (build-system python-build-system)
1382 (home-page "https://pypi.python.org/pypi/enum34")
1383 (synopsis "Backported Python 3.4 Enum")
1384 (description
1385 "Enum34 is the new Python stdlib enum module available in Python 3.4
1386 backported for previous versions of Python from 2.4 to 3.3.")
1387 (license license:bsd-3)))
1388
1389 (define-public python2-enum34
1390 (package-with-python2 python-enum34))
1391
1392 (define-public python-parse-type
1393 (package
1394 (name "python-parse-type")
1395 (version "0.4.2")
1396 (source
1397 (origin
1398 (method url-fetch)
1399 (uri (pypi-uri "parse_type" version))
1400 (sha256
1401 (base32
1402 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1403 (build-system python-build-system)
1404 (propagated-inputs
1405 `(("python-six" ,python-six)
1406 ("python-parse" ,python-parse)))
1407 (native-inputs
1408 `(("python-pytest" ,python-pytest)
1409 ("python-pytest-runner" ,python-pytest-runner)))
1410 (home-page "https://github.com/jenisys/parse_type")
1411 (synopsis "Extended parse module")
1412 (description
1413 "Parse_type extends the python parse module.")
1414 (properties
1415 `((python2-variant . ,(delay python2-parse-type))))
1416 (license license:bsd-3)))
1417
1418 (define-public python2-parse-type
1419 (let ((base (package-with-python2
1420 (strip-python2-variant python-parse-type))))
1421 (package (inherit base)
1422 (propagated-inputs
1423 `(("python2-enum34" ,python2-enum34)
1424 ,@(package-propagated-inputs base))))))
1425
1426 (define-public python-parse
1427 (package
1428 (name "python-parse")
1429 (version "1.8.2")
1430 (source
1431 (origin
1432 (method url-fetch)
1433 (uri (pypi-uri "parse" version))
1434 (sha256
1435 (base32
1436 "1lj9v1q4imszyhvipb6drsm3xdl35nan011mqxxas1yaypixsj40"))))
1437 (build-system python-build-system)
1438 (arguments
1439 `(#:phases
1440 (modify-phases %standard-phases
1441 (replace 'check
1442 (lambda _ (invoke "python" "test_parse.py"))))))
1443 (home-page "https://github.com/r1chardj0n3s/parse")
1444 (synopsis "Parse strings")
1445 (description
1446 "Parse strings using a specification based on the Python format()
1447 syntax.")
1448 (license license:x11)))
1449
1450 (define-public python-polib
1451 (package
1452 (name "python-polib")
1453 (version "1.0.8")
1454 (source (origin
1455 (method url-fetch)
1456 (uri (pypi-uri "polib" version))
1457 (sha256
1458 (base32
1459 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1460 (build-system python-build-system)
1461 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1462 (synopsis "Manipulate, create and modify gettext files")
1463 (description "Polib can manipulate any gettext format (po, pot and mo)
1464 files. It can be used to create po files from scratch or to modify
1465 existing ones.")
1466 (license license:expat)))
1467
1468 (define-public python2-polib
1469 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1470 (package
1471 (inherit base)
1472 (arguments `(,@(package-arguments base)
1473 ;; Tests don't work with python2.
1474 #:tests? #f)))))
1475
1476 (define-public scons
1477 (package
1478 (name "scons")
1479 (version "3.0.1")
1480 (source (origin
1481 (method url-fetch)
1482 (uri (string-append "mirror://sourceforge/scons/scons/" version
1483 "/scons-" version ".tar.gz"))
1484 (sha256
1485 (base32
1486 "0wzid419mlwqw9llrg8gsx4nkzhqy16m4m40r0xnh6cwscw5wir4"))))
1487 (build-system python-build-system)
1488 (arguments
1489 `(#:use-setuptools? #f ; still relies on distutils
1490 #:tests? #f)) ; no 'python setup.py test' command
1491 (home-page "http://scons.org/")
1492 (synopsis "Software construction tool written in Python")
1493 (description
1494 "SCons is a software construction tool. Think of SCons as an improved,
1495 cross-platform substitute for the classic Make utility with integrated
1496 functionality similar to autoconf/automake and compiler caches such as ccache.
1497 In short, SCons is an easier, more reliable and faster way to build
1498 software.")
1499 (license license:x11)))
1500
1501 (define-public scons-python2
1502 (package
1503 (inherit (package-with-python2 scons))
1504 (name "scons-python2")))
1505
1506 (define-public python-extras
1507 (package
1508 (name "python-extras")
1509 (version "1.0.0")
1510 (source
1511 (origin
1512 (method url-fetch)
1513 (uri (pypi-uri "extras" version))
1514 (sha256
1515 (base32
1516 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1517 (build-system python-build-system)
1518 (arguments
1519 ;; FIXME: Circular dependency on testtools.
1520 '(#:tests? #f))
1521 (home-page "https://github.com/testing-cabal/extras")
1522 (synopsis "Useful extensions to the Python standard library")
1523 (description
1524 "Extras is a set of extensions to the Python standard library.")
1525 (license license:expat)))
1526
1527 (define-public python2-extras
1528 (package-with-python2 python-extras))
1529
1530 (define-public python-mimeparse
1531 (package
1532 (name "python-mimeparse")
1533 (version "0.1.4")
1534 (source
1535 (origin
1536 (method url-fetch)
1537 (uri (string-append
1538 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1539 version ".tar.gz"))
1540 (sha256
1541 (base32
1542 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1543 (build-system python-build-system)
1544 (arguments
1545 '(#:tests? #f)) ; no setup.py test command
1546 (home-page
1547 "https://github.com/dbtsai/python-mimeparse")
1548 (synopsis "Python library for parsing MIME types")
1549 (description
1550 "Mimeparse provides basic functions for parsing MIME type names and
1551 matching them against a list of media-ranges.")
1552 (license license:expat)))
1553
1554 (define-public python2-mimeparse
1555 (package-with-python2 python-mimeparse))
1556
1557 (define-public python-pafy
1558 (package
1559 (name "python-pafy")
1560 (version "0.5.3.1")
1561 (source
1562 (origin
1563 (method url-fetch)
1564 (uri (pypi-uri "pafy" version))
1565 (sha256
1566 (base32
1567 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1568 (build-system python-build-system)
1569 (arguments
1570 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1571 (propagated-inputs
1572 ;; Youtube-dl is a python package which is imported in the file
1573 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1574 `(("youtube-dl" ,youtube-dl)))
1575 (home-page "https://np1.github.io/pafy/")
1576 (synopsis "Retrieve YouTube content and metadata")
1577 (description
1578 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1579 (license license:lgpl3+)))
1580
1581 (define-public python2-funcsigs
1582 (package
1583 (name "python2-funcsigs")
1584 (version "1.0.2")
1585 (source (origin
1586 (method url-fetch)
1587 (uri (pypi-uri "funcsigs" version))
1588 (sha256
1589 (base32
1590 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1591 (build-system python-build-system)
1592 (arguments
1593 `(#:python ,python-2))
1594 (native-inputs
1595 `(("python2-unittest2" ,python2-unittest2)))
1596 (home-page "http://funcsigs.readthedocs.org")
1597 (synopsis "Python function signatures from PEP362")
1598 (description
1599 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1600 (license license:asl2.0)))
1601
1602 (define-public python-pafy
1603 (package
1604 (name "python-pafy")
1605 (version "0.5.3.1")
1606 (source
1607 (origin
1608 (method url-fetch)
1609 (uri (pypi-uri "pafy" version))
1610 (sha256
1611 (base32
1612 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1613 (build-system python-build-system)
1614 (arguments
1615 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1616 (propagated-inputs
1617 ;; Youtube-dl is a python package which is imported in the file
1618 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1619 `(("youtube-dl" ,youtube-dl)))
1620 (home-page "https://np1.github.io/pafy/")
1621 (synopsis "Retrieve YouTube content and metadata")
1622 (description
1623 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1624 (license license:lgpl3+)))
1625
1626 (define-public python-py
1627 (package
1628 (name "python-py")
1629 (version "1.4.34")
1630 (source
1631 (origin
1632 (method url-fetch)
1633 (uri (pypi-uri "py" version))
1634 (sha256
1635 (base32
1636 "1qyd5z0hv8ymxy84v5vig3vps2fvhcf4bdlksb3r03h549fmhb8g"))))
1637 (build-system python-build-system)
1638 (arguments
1639 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1640 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1641 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1642 ;; Is this module globally installed?"
1643 '(#:tests? #f))
1644 (home-page "http://pylib.readthedocs.org/")
1645 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1646 (description
1647 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1648 code introspection, and logging.")
1649 (license license:expat)))
1650
1651 (define-public python2-py
1652 (package-with-python2 python-py))
1653
1654 ;; Recent versions of python-fixtures and python-testrepository need
1655 ;; python-pbr for packaging, which itself needs these two packages for
1656 ;; testing.
1657 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1658 ;; same source, just without any test dependencies and with tests disabled.
1659 ;; python-pbr-minmal is then used to package python-fixtures and
1660 ;; python-testrepository.
1661 ;; Strictly speaking we currently could remove the test-requirements from the
1662 ;; normal python-pbr package (and save this package) since test are disabled
1663 ;; there anyway. But this may change in future.
1664 (define-public python-pbr-minimal
1665 (package
1666 (name "python-pbr-minimal")
1667 (version "3.0.1")
1668 (source
1669 (origin
1670 (method url-fetch)
1671 (uri (pypi-uri "pbr" version))
1672 (sha256
1673 (base32
1674 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1675 (build-system python-build-system)
1676 (arguments
1677 `(#:tests? #f))
1678 (home-page "http://docs.openstack.org/developer/pbr/")
1679 (synopsis "Minimal build of python-pbr used for bootstrapping")
1680 (description
1681 "Used only for bootstrapping python2-pbr, you should not need this.")
1682 (license license:asl2.0)))
1683
1684 (define-public python2-pbr-minimal
1685 (package-with-python2 python-pbr-minimal))
1686
1687 (define-public python-pbr
1688 (package
1689 (inherit python-pbr-minimal)
1690 (name "python-pbr")
1691 (arguments
1692 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1693 (propagated-inputs
1694 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1695 (native-inputs
1696 `(("python-fixtures" ,python-fixtures-bootstrap)
1697 ;; discover, coverage, hacking, subunit
1698 ("python-mock" ,python-mock)
1699 ("python-six" ,python-six)
1700 ("python-sphinx" ,python-sphinx)
1701 ("python-testrepository" ,python-testrepository-bootstrap)
1702 ("python-testresources" ,python-testresources-bootstrap)
1703 ("python-testscenarios" ,python-testscenarios-bootstrap)
1704 ("python-testtools" ,python-testtools-bootstrap)
1705 ("python-virtualenv" ,python-virtualenv)))
1706 (synopsis "Enhance the default behavior of Python’s setuptools")
1707 (description
1708 "Python Build Reasonableness (PBR) is a library that injects some useful
1709 and sensible default behaviors into your setuptools run. It will set
1710 versions, process requirements files and generate AUTHORS and ChangeLog file
1711 from git information.
1712 ")))
1713
1714 (define-public python2-pbr
1715 (package-with-python2 python-pbr))
1716
1717 (define-public python-exif-read
1718 (package
1719 (name "python-exif-read")
1720 (version "2.1.2")
1721 (source (origin
1722 (method url-fetch)
1723 (uri (pypi-uri "ExifRead" version))
1724 (sha256
1725 (base32
1726 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1727 (build-system python-build-system)
1728 (arguments `(#:tests? #f)) ; no tests
1729 (home-page "https://github.com/ianare/exif-py")
1730 (synopsis "Python library to extract EXIF data from image files")
1731 (description
1732 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1733 files.")
1734 (license license:bsd-3)))
1735
1736 (define-public python2-exif-read
1737 (package-with-python2 python-exif-read))
1738
1739 (define-public python-pyld
1740 (package
1741 (name "python-pyld")
1742 (version "0.7.1")
1743 (source (origin
1744 (method url-fetch)
1745 (uri (pypi-uri "PyLD" version))
1746 (sha256
1747 (base32
1748 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
1749 (build-system python-build-system)
1750 (arguments `(#:tests? #f)) ; no tests
1751 (home-page "https://github.com/digitalbazaar/pyld")
1752 (synopsis "Python implementation of the JSON-LD specification")
1753 (description
1754 "PyLD is an implementation of the JSON-LD specification.")
1755 (license license:bsd-3)))
1756
1757 (define-public python2-pyld
1758 (package-with-python2 python-pyld))
1759
1760 (define-public python-click
1761 (package
1762 (name "python-click")
1763 (version "6.7")
1764 (source
1765 (origin
1766 (method url-fetch)
1767 (uri (pypi-uri "click" version))
1768 (sha256
1769 (base32
1770 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
1771 (build-system python-build-system)
1772 (arguments
1773 `(;; The tests are fragile, depending on a specific version of pytest:
1774 ;; <https://github.com/pallets/click/issues/823>
1775 #:tests? #f
1776 #:phases
1777 (modify-phases %standard-phases
1778 (add-after 'unpack 'fix-paths
1779 (lambda* (#:key inputs #:allow-other-keys)
1780 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1781 "cross-libc" "libc"))))
1782 (substitute* "click/_unicodefun.py"
1783 (("'locale'")
1784 (string-append "'" glibc "/bin/locale'"))))
1785 #t)))))
1786 (native-inputs
1787 `(("python-pytest" ,python-pytest)))
1788 (home-page "http://click.pocoo.org")
1789 (synopsis "Command line library for Python")
1790 (description
1791 "Click is a Python package for creating command line interfaces in a
1792 composable way with as little code as necessary. Its name stands for
1793 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1794 with sensible defaults out of the box.")
1795 (license license:bsd-3)))
1796
1797 (define-public python2-click
1798 (package-with-python2 python-click))
1799
1800 (define-public python-wheel
1801 (package
1802 (name "python-wheel")
1803 (version "0.30.0a0")
1804 (source
1805 (origin
1806 (method url-fetch)
1807 (uri (pypi-uri "wheel" version))
1808 (sha256
1809 (base32
1810 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
1811 (build-system python-build-system)
1812 (native-inputs
1813 `(("python-jsonschema" ,python-jsonschema)
1814 ("python-pytest-cov" ,python-pytest-cov)))
1815 (home-page "https://bitbucket.org/pypa/wheel/")
1816 (synopsis "Format for built Python packages")
1817 (description
1818 "A wheel is a ZIP-format archive with a specially formatted filename and
1819 the @code{.whl} extension. It is designed to contain all the files for a PEP
1820 376 compatible install in a way that is very close to the on-disk format. Many
1821 packages will be properly installed with only the @code{Unpack} step and the
1822 unpacked archive preserves enough information to @code{Spread} (copy data and
1823 scripts to their final locations) at any later time. Wheel files can be
1824 installed with a newer @code{pip} or with wheel's own command line utility.")
1825 (license license:expat)
1826 (properties `((python2-variant . ,(delay python2-wheel))))))
1827
1828 (define-public python2-wheel
1829 (let ((wheel (package-with-python2
1830 (strip-python2-variant python-wheel))))
1831 (package (inherit wheel)
1832 (native-inputs `(("python2-functools32" ,python2-functools32)
1833 ,@(package-native-inputs wheel))))))
1834
1835 (define-public python-vcversioner
1836 (package
1837 (name "python-vcversioner")
1838 (version "2.16.0.0")
1839 (source
1840 (origin
1841 (method url-fetch)
1842 (uri (pypi-uri "vcversioner" version))
1843 (sha256
1844 (base32
1845 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1846 (build-system python-build-system)
1847 (synopsis "Python library for version number discovery")
1848 (description "Vcversioner is a Python library that inspects tagging
1849 information in a variety of version control systems in order to discover
1850 version numbers.")
1851 (home-page "https://github.com/habnabit/vcversioner")
1852 (license license:isc)))
1853
1854 (define-public python2-vcversioner
1855 (package-with-python2 python-vcversioner))
1856
1857 (define-public python-jsonschema
1858 (package
1859 (name "python-jsonschema")
1860 (version "2.6.0")
1861 (source (origin
1862 (method url-fetch)
1863 (uri
1864 (string-append
1865 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
1866 version ".tar.gz"))
1867 (sha256
1868 (base32
1869 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
1870 (build-system python-build-system)
1871 (arguments
1872 '(#:phases
1873 (modify-phases %standard-phases
1874 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
1875 (native-inputs
1876 `(("python-nose" ,python-nose)
1877 ("python-vcversioner" ,python-vcversioner)))
1878 (home-page "https://github.com/Julian/jsonschema")
1879 (synopsis "Implementation of JSON Schema for Python")
1880 (description
1881 "Jsonschema is an implementation of JSON Schema for Python.")
1882 (license license:expat)
1883 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1884
1885 (define-public python2-jsonschema
1886 (let ((jsonschema (package-with-python2
1887 (strip-python2-variant python-jsonschema))))
1888 (package (inherit jsonschema)
1889 (native-inputs
1890 `(("python2-mock" ,python2-mock)
1891 ,@(package-native-inputs jsonschema)))
1892 (propagated-inputs
1893 `(("python2-functools32" ,python2-functools32))))))
1894
1895 (define-public python-schema
1896 (package
1897 (name "python-schema")
1898 (version "0.6.6")
1899 (source
1900 (origin
1901 (method url-fetch)
1902 (uri (pypi-uri "schema" version))
1903 (sha256
1904 (base32
1905 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
1906 (build-system python-build-system)
1907 (native-inputs
1908 `(("python-pytest" ,python-pytest)))
1909 (home-page "https://github.com/keleshev/schema")
1910 (synopsis "Simple data validation library")
1911 (description
1912 "@code{python-schema} is a library for validating Python data
1913 structures, such as those obtained from config-files, forms, external
1914 services or command-line parsing, converted from JSON/YAML (or
1915 something else) to Python data-types.")
1916 (license license:psfl)))
1917
1918 (define-public python2-schema
1919 (package-with-python2 python-schema))
1920
1921 (define-public python-schema-0.5
1922 (package (inherit python-schema)
1923 (version "0.5.0")
1924 (source
1925 (origin
1926 (method url-fetch)
1927 (uri (pypi-uri "schema" version))
1928 (sha256
1929 (base32
1930 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
1931
1932 (define-public python2-schema-0.5
1933 (package-with-python2 python-schema-0.5))
1934
1935 (define-public python-kitchen
1936 (package
1937 (name "python-kitchen")
1938 (version "1.2.5")
1939 (source
1940 (origin
1941 (method url-fetch)
1942 (uri (pypi-uri "kitchen" version))
1943 (sha256
1944 (base32
1945 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
1946 (build-system python-build-system)
1947 (propagated-inputs
1948 `(("python-chardet" ,python-chardet)))
1949 (home-page "https://github.com/fedora-infra/kitchen")
1950 (synopsis "Python API for snippets")
1951 (description "@code{kitchen} module provides a python API for all sorts of
1952 little useful snippets of code that everybody ends up writing for their projects
1953 but never seem big enough to build an independent release. Use kitchen and stop
1954 cutting and pasting that code over and over.")
1955 (license (list license:lgpl2.1+
1956 ;; subprocess.py, test_subprocess.py,
1957 ;; kitchen/pycompat25/defaultdict.py:
1958 license:psfl))))
1959
1960 (define-public python2-kitchen
1961 (package-with-python2 python-kitchen))
1962
1963 (define-public python-unidecode
1964 (package
1965 (name "python-unidecode")
1966 (version "0.04.21")
1967 (source (origin
1968 (method url-fetch)
1969 (uri (pypi-uri "Unidecode" version))
1970 (sha256
1971 (base32
1972 "0lfhp9c5xrbpjvbpr12ji52g1lx04404bzzdg6pvabhzisw6l2i8"))))
1973 (build-system python-build-system)
1974 (home-page "https://pypi.python.org/pypi/Unidecode")
1975 (synopsis "ASCII transliterations of Unicode text")
1976 (description
1977 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
1978 useful when integrating with legacy code that doesn't support Unicode, or for
1979 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
1980 machine identifiers from human-readable Unicode strings that should still be
1981 somewhat intelligible.")
1982 (license license:gpl2+)))
1983
1984 (define-public python2-unidecode
1985 (package-with-python2 python-unidecode))
1986
1987 (define-public python-pyjwt
1988 (package
1989 (name "python-pyjwt")
1990 (version "1.5.3")
1991 (source
1992 (origin
1993 (method url-fetch)
1994 (uri (pypi-uri "PyJWT" version))
1995 (sha256
1996 (base32
1997 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
1998 (modules '((guix build utils)))
1999 (snippet
2000 '(begin
2001 (for-each delete-file-recursively
2002 (find-files "." "\\.pyc$"))
2003 #t))))
2004 (build-system python-build-system)
2005 (native-inputs
2006 `(("python-pytest" ,python-pytest)
2007 ("python-pytest-cov" ,python-pytest-cov)
2008 ("python-pytest-runner" ,python-pytest-runner)))
2009 (home-page "https://github.com/progrium/pyjwt")
2010 (synopsis "JSON Web Token implementation in Python")
2011 (description
2012 "PyJWT is a JSON Web Token implementation written in Python.")
2013 (license license:expat)))
2014
2015 (define-public python2-pyjwt
2016 (package-with-python2 python-pyjwt))
2017
2018 (define-public python-pykka
2019 (package
2020 (name "python-pykka")
2021 (version "1.2.1")
2022 (source
2023 (origin
2024 (method url-fetch)
2025 (uri (pypi-uri "Pykka" version))
2026 (sha256
2027 (base32
2028 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2029 (build-system python-build-system)
2030 (native-inputs
2031 `(("python-mock" ,python-mock)
2032 ("python-nose" ,python-nose)
2033 ("python-gevent" ,python-gevent)
2034 ("python-eventlet" ,python-eventlet)))
2035 (home-page "https://www.pykka.org/")
2036 (synopsis "Pykka is a Python implementation of the actor model")
2037 (description
2038 "Pykka is a Python implementation of the actor model.
2039 The actor model introduces some simple rules to control the sharing
2040 of state and cooperation between execution units, which makes it
2041 easier to build concurrent applications.")
2042 (license license:asl2.0)))
2043
2044 (define-public python2-pykka
2045 (package-with-python2 python-pykka))
2046
2047 (define-public python-itsdangerous
2048 (package
2049 (name "python-itsdangerous")
2050 (version "0.24")
2051 (source
2052 (origin
2053 (method url-fetch)
2054 (uri (string-append
2055 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2056 version ".tar.gz"))
2057 (sha256
2058 (base32
2059 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2060 (build-system python-build-system)
2061 (home-page "https://github.com/mitsuhiko/itsdangerous")
2062 (synopsis "Python library for passing data to/from untrusted environments")
2063 (description
2064 "Itsdangerous provides various helpers to pass trusted data to untrusted
2065 environments and back.")
2066 (license license:bsd-3)))
2067
2068 (define-public python2-itsdangerous
2069 (package-with-python2 python-itsdangerous))
2070
2071 (define-public python-pyyaml
2072 (package
2073 (name "python-pyyaml")
2074 (version "3.12")
2075 (source
2076 (origin
2077 (method url-fetch)
2078 (uri (pypi-uri "PyYAML" version))
2079 (sha256
2080 (base32
2081 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
2082 (build-system python-build-system)
2083 (inputs
2084 `(("libyaml" ,libyaml)))
2085 (home-page "http://pyyaml.org/wiki/PyYAML")
2086 (synopsis "YAML parser and emitter for Python")
2087 (description
2088 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2089 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2090 API, and sensible error messages. PyYAML supports standard YAML tags and
2091 provides Python-specific tags that allow to represent an arbitrary Python
2092 object.")
2093 (license license:expat)))
2094
2095 (define-public python2-pyyaml
2096 (package-with-python2 python-pyyaml))
2097
2098 (define-public python-virtualenv
2099 (package
2100 (name "python-virtualenv")
2101 (version "15.0.3")
2102 (source
2103 (origin
2104 (method url-fetch)
2105 (uri (pypi-uri "virtualenv" version))
2106 (sha256
2107 (base32
2108 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
2109 (build-system python-build-system)
2110 (arguments
2111 `(#:phases
2112 (modify-phases %standard-phases
2113 (replace 'check
2114 (lambda _
2115 ;; Disable failing test. See upstream bug report
2116 ;; https://github.com/pypa/virtualenv/issues/957
2117 (substitute* "tests/test_virtualenv.py"
2118 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2119 (zero? (system* "py.test")))))))
2120 (native-inputs
2121 `(("python-mock" ,python-mock)
2122 ("python-pytest" ,python-pytest)))
2123 (home-page "https://virtualenv.pypa.io/")
2124 (synopsis "Virtual Python environment builder")
2125 (description
2126 "Virtualenv is a tool to create isolated Python environments.")
2127 (license license:expat)))
2128
2129 (define-public python2-virtualenv
2130 (package-with-python2 python-virtualenv))
2131
2132 (define-public python-markupsafe
2133 (package
2134 (name "python-markupsafe")
2135 (version "0.23")
2136 (source
2137 (origin
2138 (method url-fetch)
2139 (uri (string-append
2140 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2141 version ".tar.gz"))
2142 (sha256
2143 (base32
2144 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2145 (build-system python-build-system)
2146 (home-page "https://github.com/mitsuhiko/markupsafe")
2147 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2148 (description
2149 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2150 for Python.")
2151 (license license:bsd-3)))
2152
2153 (define-public python2-markupsafe
2154 (package-with-python2 python-markupsafe))
2155
2156 (define-public python-jinja2
2157 (package
2158 (name "python-jinja2")
2159 (version "2.9.6")
2160 (source
2161 (origin
2162 (method url-fetch)
2163 (uri (pypi-uri "Jinja2" version))
2164 (sha256
2165 (base32
2166 "1zzrkywhziqffrzks14kzixz7nd4yh2vc0fb04a68vfd2ai03anx"))))
2167 (build-system python-build-system)
2168 (propagated-inputs
2169 `(("python-markupsafe" ,python-markupsafe)))
2170 (home-page "http://jinja.pocoo.org/")
2171 (synopsis "Python template engine")
2172 (description
2173 "Jinja2 is a small but fast and easy to use stand-alone template engine
2174 written in pure Python.")
2175 (license license:bsd-3)))
2176
2177 (define-public python2-jinja2
2178 (package-with-python2 python-jinja2))
2179
2180 (define-public python-pystache
2181 (package
2182 (name "python-pystache")
2183 (version "0.5.4")
2184 (source (origin
2185 (method url-fetch)
2186 (uri (pypi-uri "pystache" version))
2187 (sha256
2188 (base32
2189 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2190 (build-system python-build-system)
2191 (arguments
2192 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2193 (home-page "http://defunkt.io/pystache/")
2194 (synopsis "Python logic-less template engine")
2195 (description
2196 "Pystache is a Python implementation of the framework agnostic,
2197 logic-free templating system Mustache.")
2198 (license license:expat)
2199 (properties `((python2-variant . ,(delay python2-pystache))))))
2200
2201 (define-public python2-pystache
2202 (package (inherit (package-with-python2
2203 (strip-python2-variant python-pystache)))
2204 (arguments
2205 `(#:python ,python-2
2206 #:phases
2207 (modify-phases %standard-phases
2208 (replace 'check
2209 (lambda _
2210 (zero? (system* "python" "test_pystache.py")))))))))
2211
2212 (define-public python-joblib
2213 (package
2214 (name "python-joblib")
2215 (version "0.10.3")
2216 (source (origin
2217 (method url-fetch)
2218 (uri (pypi-uri "joblib" version))
2219 (sha256
2220 (base32
2221 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2222 (modules '((guix build utils)))
2223 (snippet
2224 '(begin
2225 ;; Remove pre-compiled .pyc files from source.
2226 (for-each delete-file-recursively
2227 (find-files "." "__pycache__" #:directories? #t))
2228 (for-each delete-file (find-files "." "\\.pyc$"))
2229 #t))))
2230 (build-system python-build-system)
2231 (arguments
2232 `(#:phases
2233 (modify-phases %standard-phases
2234 (add-before 'check 'disable-failing-tests
2235 (lambda _
2236 ;; This numpydoc tests fails for unknown reasons
2237 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2238 ;; This numpydoc test depends on matplotlib, which is not a
2239 ;; required input.
2240 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2241 ;; These tests fail to execute sys.executable
2242 (substitute* "joblib/test/test_parallel.py"
2243 (("import nose" line)
2244 (string-append "from nose.plugins.skip import SkipTest\n" line))
2245 (("def test_nested_parallel_warnings" line)
2246 (string-append "@SkipTest\n" line))
2247 (("def test_parallel_with_interactively_defined_functions" line)
2248 (string-append "@SkipTest\n" line)))
2249 #t)))))
2250 ;; Provide nose to enable tests command
2251 (native-inputs
2252 `(("python-nose" ,python-nose)
2253 ("python-sphinx" ,python-sphinx)
2254 ("python-docutils" ,python-docutils)
2255 ("python-numpydoc" ,python-numpydoc)))
2256 (home-page "http://pythonhosted.org/joblib/")
2257 (synopsis "Using Python functions as pipeline jobs")
2258 (description
2259 "Joblib is a set of tools to provide lightweight pipelining in Python.
2260 In particular, joblib offers: transparent disk-caching of the output values
2261 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2262 logging and tracing of the execution.")
2263 (license license:bsd-3)))
2264
2265 (define-public python2-joblib
2266 (package-with-python2 python-joblib))
2267
2268 (define-public python-docutils
2269 (package
2270 (name "python-docutils")
2271 (version "0.14")
2272 (source
2273 (origin
2274 (method url-fetch)
2275 (uri (pypi-uri "docutils" version))
2276 (sha256
2277 (base32
2278 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2279 (build-system python-build-system)
2280 (arguments
2281 '(#:tests? #f)) ; no setup.py test command
2282 (home-page "http://docutils.sourceforge.net/")
2283 (synopsis "Python Documentation Utilities")
2284 (description
2285 "Docutils is a modular system for processing documentation into useful
2286 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2287 reStructuredText.")
2288 ;; Most of the source code is public domain, but some source files are
2289 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2290 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2291
2292 (define-public python2-docutils
2293 (package-with-python2 python-docutils))
2294
2295 (define-public python-pygments
2296 (package
2297 (name "python-pygments")
2298 (version "2.2.0")
2299 (source
2300 (origin
2301 (method url-fetch)
2302 (uri (pypi-uri "Pygments" version))
2303 (sha256
2304 (base32
2305 "1k78qdvir1yb1c634nkv6rbga8wv4289xarghmsbbvzhvr311bnv"))))
2306 (build-system python-build-system)
2307 (arguments
2308 ;; FIXME: Tests require sphinx, which depends on this.
2309 '(#:tests? #f))
2310 (home-page "http://pygments.org/")
2311 (synopsis "Syntax highlighting")
2312 (description
2313 "Pygments is a syntax highlighting package written in Python.")
2314 (license license:bsd-2)))
2315
2316 (define-public python2-pygments
2317 (package-with-python2 python-pygments))
2318
2319 (define-public python-sphinxcontrib-websupport
2320 (package
2321 (name "python-sphinxcontrib-websupport")
2322 (version "1.0.1")
2323 (source (origin
2324 (method url-fetch)
2325 (uri (pypi-uri "sphinxcontrib-websupport" version))
2326 (sha256
2327 (base32
2328 "1f9f0wjpi9nhikbyaz6d19s7qvzdf1nq2g5dsh640fma4q9rd1bs"))))
2329 (build-system python-build-system)
2330 (propagated-inputs
2331 `(("python-mock" ,python-mock)
2332 ("python-pytest" ,python-pytest)
2333 ("python-xapian-bindings" ,python-xapian-bindings)))
2334 ;; Needed for running the test suite
2335 (native-inputs
2336 `(("python-six" ,python-six)
2337 ("python-jinja2" ,python-jinja2)
2338 ("python-docutils" ,python-docutils)
2339 ("python-sphinx" ,python-sphinx)
2340 ("python-sqlalchemy" ,python-sqlalchemy)
2341 ("python-whoosh" ,python-whoosh)))
2342 (home-page "http://sphinx-doc.org/")
2343 (synopsis "Sphinx API for web applications")
2344 (description "This package provides a Python API to easily integrate
2345 Sphinx documentation into your web application. It provides tools to
2346 integrate Sphinx documents in web templates and to handle searches.")
2347 (license license:bsd-3)))
2348
2349 (define-public python-sphinx
2350 (package
2351 (name "python-sphinx")
2352 (version "1.5.1")
2353 (source
2354 (origin
2355 (method url-fetch)
2356 (uri (pypi-uri "Sphinx" version))
2357 (sha256
2358 (base32
2359 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
2360 (build-system python-build-system)
2361 (arguments
2362 `(#:phases
2363 (modify-phases %standard-phases
2364 (replace 'check
2365 (lambda _
2366 ;; Requires Internet access.
2367 (delete-file "tests/test_build_linkcheck.py")
2368 (zero? (system* "make" "test")))))))
2369 (propagated-inputs
2370 `(("python-imagesize" ,python-imagesize)
2371 ("python-sphinx-alabaster-theme"
2372 ,python-sphinx-alabaster-theme)
2373 ("python-babel" ,python-babel)
2374 ("python-snowballstemmer" ,python-snowballstemmer)
2375 ("python-docutils" ,python-docutils)
2376 ("python-jinja2" ,python-jinja2)
2377 ("python-pygments" ,python-pygments)
2378 ("python-requests" ,python-requests)
2379 ("python-six" ,python-six)))
2380 (native-inputs
2381 `(("graphviz" ,graphviz)
2382 ("python-html5lib" ,python-html5lib)
2383 ("python-mock" ,python-mock)
2384 ("python-nose" ,python-nose)))
2385 (home-page "http://sphinx-doc.org/")
2386 (synopsis "Python documentation generator")
2387 (description "Sphinx is a tool that makes it easy to create documentation
2388 for Python projects or other documents consisting of multiple reStructuredText
2389 sources.")
2390 (license license:bsd-3)
2391 (properties `((python2-variant . ,(delay python2-sphinx))))))
2392
2393 (define-public python-sphinx-1.6
2394 (package (inherit python-sphinx)
2395 (name "python-sphinx")
2396 (version "1.6.3")
2397 (source (origin
2398 (method url-fetch)
2399 (uri (pypi-uri "Sphinx" version))
2400 (sha256
2401 (base32
2402 "1rj6f3i8hmrx2qlkshi5kp5xcy98dlynwlyl05yvflj5f66dp2xg"))))
2403 (arguments
2404 `(#:phases
2405 (modify-phases %standard-phases
2406 (replace 'check
2407 (lambda _
2408 ;; Requires Internet access.
2409 (delete-file "tests/test_build_linkcheck.py")
2410 (substitute* "tests/test_build_latex.py"
2411 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
2412 "@pytest.mark.skip()"))
2413 (zero? (system* "make" "test")))))))
2414 (propagated-inputs
2415 `(("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)
2416 ,@(package-propagated-inputs python-sphinx)))
2417 (native-inputs
2418 `(("python-pytest" ,python-pytest)
2419 ("imagemagick" ,imagemagick) ; for "convert"
2420 ,@(package-native-inputs python-sphinx)))
2421 (properties `((python2-variant . ,(delay python2-sphinx-1.6))))))
2422
2423 (define-public python2-sphinx-1.6
2424 (let ((base (package-with-python2 (strip-python2-variant python-sphinx-1.6))))
2425 (package
2426 (inherit base)
2427 (propagated-inputs
2428 `(("python2-typing" ,python2-typing)
2429 ,@(package-propagated-inputs base)))
2430 (native-inputs `(("python2-enum34" ,python2-enum34)
2431 ,@(package-native-inputs base))))))
2432
2433 (define-public python-sphinx-1.5.3
2434 (package
2435 (inherit python-sphinx)
2436 (name "python-sphinx")
2437 (version "1.5.3")
2438 (source
2439 (origin
2440 (method url-fetch)
2441 (uri (pypi-uri "Sphinx" version))
2442 (sha256
2443 (base32
2444 "0kw1axswbvaavr8ggyf4qr6hnisnrzlbkkcdada69vk1x9xjassg"))))
2445 (native-inputs
2446 `(("python-pytest" ,python-pytest)
2447 ,@(package-native-inputs python-sphinx)))))
2448
2449 (define-public python2-sphinx
2450 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
2451 (package
2452 (inherit base)
2453 (native-inputs `(("python2-mock" ,python2-mock)
2454 ("python2-enum34" ,python2-enum34)
2455 ,@(package-native-inputs base)))
2456 (propagated-inputs `(("python2-pytz" ,python2-pytz)
2457 ,@(package-propagated-inputs base))))))
2458
2459 (define-public python-sphinx-rtd-theme
2460 (package
2461 (name "python-sphinx-rtd-theme")
2462 (version "0.2.4")
2463 (source
2464 (origin
2465 (method url-fetch)
2466 (uri (pypi-uri "sphinx_rtd_theme" version))
2467 (sha256
2468 (base32
2469 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
2470 (build-system python-build-system)
2471 (arguments '(#:tests? #f)) ; No tests.
2472 (propagated-inputs
2473 `(("python-sphinx" ,python-sphinx)))
2474 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2475 (synopsis "ReadTheDocs.org theme for Sphinx")
2476 (description "A theme for Sphinx used by ReadTheDocs.org.")
2477 (license license:expat)))
2478
2479 (define-public python2-sphinx-rtd-theme
2480 (package-with-python2 python-sphinx-rtd-theme))
2481
2482 (define-public python-guzzle-sphinx-theme
2483 (package
2484 (name "python-guzzle-sphinx-theme")
2485 (version "0.7.11")
2486 (source
2487 (origin
2488 (method url-fetch)
2489 (uri (pypi-uri "guzzle_sphinx_theme" version))
2490 (sha256
2491 (base32
2492 "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
2493 (build-system python-build-system)
2494 (propagated-inputs
2495 `(("python-sphinx" ,python-sphinx)))
2496 (home-page "https://github.com/guzzle/guzzle_sphinx_theme")
2497 (synopsis "Sphinx theme used by Guzzle")
2498 (description "This package provides guzzle_sphinx_theme, a theme for the
2499 Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
2500 and several other projects.")
2501 (license license:expat)))
2502
2503 (define-public python2-guzzle-sphinx-theme
2504 (package-with-python2 python-guzzle-sphinx-theme))
2505
2506 (define-public python-rst.linker
2507 (package
2508 (name "python-rst.linker")
2509 (version "1.7")
2510 (source
2511 (origin
2512 (method url-fetch)
2513 (uri (pypi-uri "rst.linker" version))
2514 (sha256
2515 (base32
2516 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
2517 (build-system python-build-system)
2518 (propagated-inputs
2519 `(("python-dateutil" ,python-dateutil)
2520 ("python-six" ,python-six)))
2521 (native-inputs
2522 `(("python-setuptools-scm" ,python-setuptools-scm)))
2523 ;; Test would require path.py, which would introduce a cyclic dependence.
2524 (arguments `(#:tests? #f))
2525 ;; Note: As of version 1.7 the documentation is not worth building.
2526 (home-page "https://github.com/jaraco/rst.linker")
2527 (synopsis "Sphinx plugin to add links and timestamps")
2528 (description "rst.linker allows to automatically replace text by a
2529 reStructuredText external reference or timestamps. It's primary purpose is to
2530 augment the changelog, but it can be used for other documents, too.")
2531 (license license:expat)))
2532
2533 (define-public python2-rst.linker
2534 (package-with-python2 python-rst.linker))
2535
2536 (define-public python-feedgenerator
2537 (package
2538 (name "python-feedgenerator")
2539 (version "1.9")
2540 (source
2541 (origin
2542 (method url-fetch)
2543 (uri (pypi-uri "feedgenerator" version))
2544 (sha256
2545 (base32
2546 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2547 (modules '((guix build utils)))
2548 (snippet
2549 '(begin
2550 ;; Remove pre-compiled .pyc files from source.
2551 (for-each delete-file-recursively
2552 (find-files "." "__pycache__" #:directories? #t))
2553 (for-each delete-file (find-files "." "\\.pyc$"))
2554 #t))))
2555 (build-system python-build-system)
2556 (propagated-inputs
2557 `(("python-pytz" ,python-pytz)
2558 ("python-six" ,python-six)))
2559 (home-page "https://github.com/getpelican/feedgenerator")
2560 (synopsis
2561 "Standalone version of Django's Atom/RSS feed generator")
2562 (description
2563 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2564 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2565 (license license:bsd-3)))
2566
2567 (define-public python2-feedgenerator
2568 (package-with-python2 python-feedgenerator))
2569
2570 (define-public python-blinker
2571 (package
2572 (name "python-blinker")
2573 (version "1.4")
2574 (source
2575 (origin
2576 (method url-fetch)
2577 (uri (pypi-uri "blinker" version))
2578 (sha256
2579 (base32
2580 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2581 (build-system python-build-system)
2582 (home-page "http://pythonhosted.org/blinker/")
2583 (synopsis "Fast, simple object-to-object and broadcast signaling")
2584 (description
2585 "Blinker provides a fast dispatching system that allows any number of
2586 interested parties to subscribe to events, or \"signals\".")
2587 (license license:expat)))
2588
2589 (define-public python2-blinker
2590 (package-with-python2 python-blinker))
2591
2592 (define-public pelican
2593 (package
2594 (name "pelican")
2595 (version "3.6.3")
2596 (source
2597 (origin
2598 (method url-fetch)
2599 (uri (pypi-uri "pelican" version))
2600 (sha256
2601 (base32
2602 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
2603 (build-system python-build-system)
2604 (propagated-inputs
2605 `(("python-feedgenerator" ,python-feedgenerator)
2606 ("python-jinja2" ,python-jinja2)
2607 ("python-pygments" ,python-pygments)
2608 ("python-docutils" ,python-docutils)
2609 ("python-pytz" ,python-pytz)
2610 ("python-blinker" ,python-blinker)
2611 ("python-unidecode" ,python-unidecode)
2612 ("python-six" ,python-six)
2613 ("python-dateutil" ,python-dateutil)
2614 ("python-markdown" ,python-markdown)))
2615 (home-page "http://getpelican.com/")
2616 (arguments
2617 `(;; XXX Requires a lot more packages to do unit tests :P
2618 #:tests? #f
2619 #:phases (modify-phases %standard-phases
2620 (add-before
2621 'install 'adjust-requires
2622 ;; Since feedgenerator is installed from git, it doesn't
2623 ;; conform to the version requirements.
2624 ;;
2625 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2626 ;; version requirement so setuptools doesn't get confused.
2627 (lambda _
2628 (substitute* "setup.py"
2629 (("['\"]feedgenerator.*?['\"]")
2630 "'feedgenerator'")))))))
2631 (synopsis "Python-based static site publishing system")
2632 (description
2633 "Pelican is a tool to generate a static blog from reStructuredText,
2634 Markdown input files, and more. Pelican uses Jinja2 for templating
2635 and is very extensible.")
2636 (license license:agpl3+)))
2637
2638 (define-public python-scikit-image
2639 (package
2640 (name "python-scikit-image")
2641 (version "0.11.3")
2642 (source
2643 (origin
2644 (method url-fetch)
2645 (uri (string-append
2646 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
2647 version ".tar.gz"))
2648 (sha256
2649 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
2650 (build-system python-build-system)
2651 (arguments
2652 ;; TODO: Some tests require running X11 server. Disable them?
2653 '(#:tests? #f))
2654 ;; See DEPENDS.txt for the list of build and run time requiremnts
2655 (propagated-inputs
2656 `(("python-matplotlib" ,python-matplotlib)
2657 ("python-networkx" ,python-networkx)
2658 ("python-scipy" ,python-scipy)
2659 ("python-pillow" ,python-pillow)))
2660 (native-inputs
2661 `(("python-numpy" ,python-numpy)
2662 ("python-cython" ,python-cython)
2663 ("python-six" ,python-six)))
2664 (home-page "http://scikit-image.org/")
2665 (synopsis "Image processing in Python")
2666 (description
2667 "Scikit-image is a collection of algorithms for image processing.")
2668 (license license:bsd-3)))
2669
2670 (define-public python2-scikit-image
2671 (package-with-python2 python-scikit-image))
2672
2673 (define-public python-cython
2674 (package
2675 (name "python-cython")
2676 (version "0.27")
2677 (source
2678 (origin
2679 (method url-fetch)
2680 (uri (pypi-uri "Cython" version))
2681 (sha256
2682 (base32
2683 "02y0pp1nx77b8s1mpxc6da2dccl6wd31pp4ksi9via479qcvacmr"))))
2684 (build-system python-build-system)
2685 ;; we need the full python package and not just the python-wrapper
2686 ;; because we need libpython3.3m.so
2687 (inputs
2688 `(("python" ,python)))
2689 (arguments
2690 `(#:phases
2691 (modify-phases %standard-phases
2692 (add-before 'check 'set-HOME
2693 ;; some tests require access to "$HOME/.cython"
2694 (lambda _ (setenv "HOME" "/tmp") #t))
2695 (replace 'check
2696 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
2697 (home-page "http://cython.org/")
2698 (synopsis "C extensions for Python")
2699 (description "Cython is an optimising static compiler for both the Python
2700 programming language and the extended Cython programming language. It makes
2701 writing C extensions for Python as easy as Python itself.")
2702 (license license:asl2.0)
2703 (properties `((python2-variant . ,(delay python2-cython))))))
2704
2705 (define-public python2-cython
2706 (package (inherit (package-with-python2
2707 (strip-python2-variant python-cython)))
2708 (name "python2-cython")
2709 (inputs
2710 `(("python-2" ,python-2))))) ; this is not automatically changed
2711
2712 ;; The RPython toolchain currently does not support Python 3.
2713 (define-public python2-rpython
2714 (package
2715 (name "python2-rpython")
2716 (version "0.2.1")
2717 (source
2718 (origin
2719 (method url-fetch)
2720 (uri (pypi-uri "rpython" version))
2721 (sha256
2722 (base32
2723 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
2724 (build-system python-build-system)
2725 (arguments `(#:python ,python-2))
2726 (native-inputs
2727 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
2728 (home-page "https://rpython.readthedocs.org")
2729 (synopsis "Framework for implementing interpreters and virtual machines")
2730 (description "RPython is a translation and support framework for
2731 producing implementations of dynamic languages, emphasizing a clean separation
2732 between language specification and implementation aspects.")
2733 (license license:expat)))
2734
2735 ;; NOTE: when upgrading numpy please make sure that python-pandas and
2736 ;; python-scipy still build, as these three packages are often used together.
2737 (define-public python-numpy
2738 (package
2739 (name "python-numpy")
2740 (version "1.14.0")
2741 (source
2742 (origin
2743 (method url-fetch)
2744 (uri (string-append
2745 "https://github.com/numpy/numpy/releases/download/v"
2746 version "/numpy-" version ".tar.gz"))
2747 (sha256
2748 (base32
2749 "1kh7y2ay21s9mcc11mq59g2f1yc75v152z2k2vlh0xmh9c9rjpf4"))))
2750 (build-system python-build-system)
2751 (inputs
2752 `(("openblas" ,openblas)
2753 ("lapack" ,lapack)))
2754 (native-inputs
2755 `(("python-cython" ,python-cython)
2756 ("python-nose" ,python-nose)
2757 ("gfortran" ,gfortran)))
2758 (arguments
2759 `(#:phases
2760 (modify-phases %standard-phases
2761 (add-before 'build 'configure-blas-lapack
2762 (lambda* (#:key inputs #:allow-other-keys)
2763 (call-with-output-file "site.cfg"
2764 (lambda (port)
2765 (format port
2766 "[openblas]
2767 libraries = openblas
2768 library_dirs = ~a/lib
2769 include_dirs = ~a/include
2770
2771 # backslash-n to make emacs happy
2772 \n[lapack]
2773 lapack_libs = lapack
2774 library_dirs = ~a/lib
2775 include_dirs = ~a/include
2776 "
2777 (assoc-ref inputs "openblas")
2778 (assoc-ref inputs "openblas")
2779 (assoc-ref inputs "lapack")
2780 (assoc-ref inputs "lapack"))))
2781 #t))
2782 (add-before 'build 'fix-executable-paths
2783 (lambda* (#:key inputs #:allow-other-keys)
2784 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
2785 ;; instead of /bin/sh.
2786 (substitute* "numpy/distutils/exec_command.py"
2787 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
2788 (string-append match-start (assoc-ref inputs "bash") match-end)))
2789 ;; Use "gcc" executable, not "cc".
2790 (substitute* "numpy/distutils/system_info.py"
2791 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
2792 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2793 #t))
2794 ;; Tests can only be run after the library has been installed and not
2795 ;; within the source directory.
2796 (delete 'check)
2797 (add-after 'install 'check
2798 (lambda* (#:key outputs inputs #:allow-other-keys)
2799 ;; Make installed package available for running the tests
2800 (add-installed-pythonpath inputs outputs)
2801 (with-directory-excursion "/tmp"
2802 (zero? (system* "python" "-c"
2803 "import numpy; numpy.test(verbose=2)"))))))))
2804 (home-page "http://www.numpy.org/")
2805 (synopsis "Fundamental package for scientific computing with Python")
2806 (description "NumPy is the fundamental package for scientific computing
2807 with Python. It contains among other things: a powerful N-dimensional array
2808 object, sophisticated (broadcasting) functions, tools for integrating C/C++
2809 and Fortran code, useful linear algebra, Fourier transform, and random number
2810 capabilities.")
2811 (license license:bsd-3)))
2812
2813 (define-public python2-numpy
2814 (package-with-python2 python-numpy))
2815
2816 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
2817 ;; interest only for legacy code going back to NumPy's predecessor
2818 ;; Numeric.
2819 (define-public python2-numpy-1.8
2820 (package (inherit python2-numpy)
2821 (version "1.8.2")
2822 (source
2823 (origin
2824 (method url-fetch)
2825 (uri (string-append
2826 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
2827 (file-name (string-append "python2-numpy-" version ".tar.gz"))
2828 (sha256
2829 (base32
2830 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
2831 (arguments
2832 (substitute-keyword-arguments (package-arguments python2-numpy)
2833 ((#:phases phases)
2834 `(modify-phases ,phases
2835 (replace 'configure-blas-lapack
2836 (lambda* (#:key inputs #:allow-other-keys)
2837 (call-with-output-file "site.cfg"
2838 (lambda (port)
2839 (format port
2840 "[openblas]
2841 libraries = openblas,lapack
2842 library_dirs = ~a/lib:~a/lib
2843 include_dirs = ~a/include:~a/include
2844 "
2845 (assoc-ref inputs "openblas")
2846 (assoc-ref inputs "lapack")
2847 (assoc-ref inputs "openblas")
2848 (assoc-ref inputs "lapack"))))
2849 #t))))))
2850 (description "NumPy is the fundamental package for scientific computing
2851 with Python. It contains among other things: a powerful N-dimensional array
2852 object, sophisticated (broadcasting) functions, tools for integrating C/C++
2853 and Fortran code, useful linear algebra, Fourier transform, and random number
2854 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
2855 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
2856 Numeric.")
2857 (license license:bsd-3)))
2858
2859 (define-public python-munch
2860 (package
2861 (name "python-munch")
2862 (version "2.0.4")
2863 (source
2864 (origin
2865 (method url-fetch)
2866 (uri (pypi-uri "munch" version))
2867 (sha256
2868 (base32
2869 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
2870 (build-system python-build-system)
2871 (home-page "https://github.com/Infinidat/munch")
2872 (synopsis "Dot-accessible dictionary")
2873 (description "Munch is a dot-accessible dictionary similar to JavaScript
2874 objects.")
2875 (license license:expat)))
2876
2877 (define-public python2-munch
2878 (package-with-python2 python-munch))
2879
2880 (define-public python-colormath
2881 (package
2882 (name "python-colormath")
2883 (version "3.0.0")
2884 (source
2885 (origin
2886 (method url-fetch)
2887 (uri (pypi-uri "colormath" version))
2888 (sha256
2889 (base32
2890 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
2891 (build-system python-build-system)
2892 (propagated-inputs
2893 `(("python-networkx" ,python-networkx)
2894 ("python-numpy" ,python-numpy)))
2895 (home-page "https://github.com/gtaylor/python-colormath")
2896 (synopsis "Color math and conversion library")
2897 (description
2898 "This is a Python library for color math and conversions.")
2899 (license license:bsd-3)))
2900
2901 (define-public python2-colormath
2902 (package-with-python2 python-colormath))
2903
2904 (define-public python-spectra
2905 (package
2906 (name "python-spectra")
2907 (version "0.0.11")
2908 (source
2909 (origin
2910 (method url-fetch)
2911 (uri (pypi-uri "spectra" version))
2912 (sha256
2913 (base32
2914 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
2915 (build-system python-build-system)
2916 (arguments
2917 `(#:phases
2918 (modify-phases %standard-phases
2919 (replace 'check
2920 (lambda _
2921 (zero? (system* "nosetests" "-v")))))))
2922 (propagated-inputs
2923 `(("python-colormath" ,python-colormath)))
2924 (native-inputs
2925 `(("python-nose" ,python-nose)))
2926 (home-page "https://github.com/jsvine/spectra")
2927 (synopsis "Color scales and color conversion")
2928 (description
2929 "This package provides a Python library intended to make color math,
2930 color scales, and color space conversion easy. It has support for:
2931
2932 @enumerate
2933 @item Color scales
2934 @item Color ranges
2935 @item Color blending
2936 @item Brightening/darkening colors
2937 @item Saturating/desaturating colors
2938 @item Conversion to/from multiple color spaces.
2939 @end enumerate\n")
2940 (license license:expat)))
2941
2942 (define-public python2-spectra
2943 (package-with-python2 python-spectra))
2944
2945 (define-public python2-fastlmm
2946 (package
2947 (name "python2-fastlmm")
2948 (version "0.2.21")
2949 (source
2950 (origin
2951 (method url-fetch)
2952 (uri (pypi-uri "fastlmm" version ".zip"))
2953 (sha256
2954 (base32
2955 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
2956 (build-system python-build-system)
2957 (arguments
2958 `(#:python ,python-2)) ; only Python 2.7 is supported
2959 (propagated-inputs
2960 `(("python2-numpy" ,python2-numpy)
2961 ("python2-scipy" ,python2-scipy)
2962 ("python2-matplotlib" ,python2-matplotlib)
2963 ("python2-pandas" ,python2-pandas)
2964 ("python2-scikit-learn" ,python2-scikit-learn)
2965 ("python2-pysnptools" ,python2-pysnptools)))
2966 (native-inputs
2967 `(("unzip" ,unzip)
2968 ("python2-cython" ,python2-cython)
2969 ("python2-mock" ,python2-mock)
2970 ("python2-nose" ,python2-nose)))
2971 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
2972 (synopsis "Perform genome-wide association studies on large data sets")
2973 (description
2974 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
2975 Models, is a program for performing both single-SNP and SNP-set genome-wide
2976 association studies (GWAS) on extremely large data sets.")
2977 (license license:asl2.0)))
2978
2979 (define-public python-numpy-documentation
2980 (package
2981 (name "python-numpy-documentation")
2982 (version (package-version python-numpy))
2983 (source (package-source python-numpy))
2984 (build-system python-build-system)
2985 (native-inputs
2986 `(("python-matplotlib" ,python-matplotlib)
2987 ("python-numpy" ,python-numpy)
2988 ("pkg-config" ,pkg-config)
2989 ("python-sphinx" ,python-sphinx)
2990 ("python-numpydoc" ,python-numpydoc)
2991 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
2992 texlive-fonts-ec
2993 texlive-generic-ifxetex
2994 texlive-generic-pdftex
2995 texlive-latex-amsfonts
2996 texlive-latex-capt-of
2997 texlive-latex-cmap
2998 texlive-latex-environ
2999 texlive-latex-eqparbox
3000 texlive-latex-etoolbox
3001 texlive-latex-expdlist
3002 texlive-latex-fancyhdr
3003 texlive-latex-fancyvrb
3004 texlive-latex-fncychap
3005 texlive-latex-float
3006 texlive-latex-framed
3007 texlive-latex-geometry
3008 texlive-latex-graphics
3009 texlive-latex-hyperref
3010 texlive-latex-mdwtools
3011 texlive-latex-multirow
3012 texlive-latex-oberdiek
3013 texlive-latex-parskip
3014 texlive-latex-preview
3015 texlive-latex-tabulary
3016 texlive-latex-threeparttable
3017 texlive-latex-titlesec
3018 texlive-latex-trimspaces
3019 texlive-latex-ucs
3020 texlive-latex-upquote
3021 texlive-latex-url
3022 texlive-latex-varwidth
3023 texlive-latex-wrapfig)))
3024 ("texinfo" ,texinfo)
3025 ("perl" ,perl)
3026 ("scipy-sphinx-theme"
3027 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3028 (method git-fetch)
3029 (uri (git-reference
3030 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3031 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3032 (sha256
3033 (base32
3034 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3035 ,@(package-native-inputs python-numpy)))
3036 (arguments
3037 `(#:tests? #f ; we're only generating the documentation
3038 #:phases
3039 (modify-phases %standard-phases
3040 (delete 'build)
3041 (replace 'install
3042 (lambda* (#:key inputs outputs #:allow-other-keys)
3043 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3044 (doc (string-append
3045 data "/doc/" ,name "-"
3046 ,(package-version python-numpy)))
3047 (info-reader (string-append data "/info"))
3048 (html (string-append doc "/html"))
3049 (scipy-sphinx-theme "scipy-sphinx-theme")
3050 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3051 (pyver ,(string-append "PYVER=")))
3052
3053 ;; FIXME: this is needed to for texlive-union to generate
3054 ;; fonts, which are not found.
3055 (setenv "HOME" "/tmp")
3056
3057 (with-directory-excursion "doc"
3058 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3059 (mkdir-p html)
3060 (system* "make" "html" pyver)
3061 (system* "make" "latex" "PAPER=a4" pyver)
3062 (system* "make" "-C" "build/latex"
3063 "all-pdf" "PAPER=a4" pyver)
3064 ;; FIXME: Generation of the info file fails.
3065 ;; (system* "make" "info" pyver)
3066 ;; (mkdir-p info)
3067 ;; (copy-file "build/texinfo/numpy.info"
3068 ;; (string-append info "/numpy.info"))
3069 (for-each (lambda (file)
3070 (copy-file (string-append "build/latex" file)
3071 (string-append doc file)))
3072 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3073 (with-directory-excursion "build/html"
3074 (for-each (lambda (file)
3075 (let* ((dir (dirname file))
3076 (tgt-dir (string-append html "/" dir)))
3077 (unless (equal? "." dir)
3078 (mkdir-p tgt-dir))
3079 (install-file file html)))
3080 (find-files "." ".*")))))
3081 #t)))))
3082 (home-page (package-home-page python-numpy))
3083 (synopsis "Documentation for the python-numpy package")
3084 (description (package-description python-numpy))
3085 (license (package-license python-numpy))))
3086
3087 (define-public python2-numpy-documentation
3088 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3089 (package
3090 (inherit numpy-documentation)
3091 (native-inputs `(("python2-functools32" ,python2-functools32)
3092 ,@(package-native-inputs numpy-documentation))))))
3093
3094 (define-public python-pygit2
3095 (package
3096 (name "python-pygit2")
3097 (version "0.26.0")
3098 (source
3099 (origin
3100 (method url-fetch)
3101 (uri (pypi-uri "pygit2" version))
3102 (sha256
3103 (base32
3104 "1cbc488ra3kg7r3qky17ms0szi3cda2d96qfkv1l9djsy9hnvw57"))
3105 (patches
3106 (search-patches "python-pygit2-disable-network-tests.patch"))))
3107 (build-system python-build-system)
3108 (propagated-inputs
3109 `(("python-six" ,python-six)
3110 ("python-cffi" ,python-cffi)
3111 ("libgit2" ,libgit2)
3112 ("python-tox" ,python-tox)))
3113 (home-page "https://github.com/libgit2/pygit2")
3114 (synopsis "Python bindings for libgit2")
3115 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3116 library, libgit2 implements Git plumbing.")
3117 ;; GPL2.0 only, with linking exception.
3118 (license license:gpl2)))
3119
3120 (define-public python2-pygit2
3121 (package-with-python2 python-pygit2))
3122
3123 (define-public python-pyparsing
3124 (package
3125 (name "python-pyparsing")
3126 (version "2.2.0")
3127 (source
3128 (origin
3129 (method url-fetch)
3130 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3131 "/pyparsing-" version
3132 "/pyparsing-" version ".tar.gz"))
3133 (sha256
3134 (base32
3135 "016b9gh606aa44sq92jslm89bg874ia0yyiyb643fa6dgbsbqch8"))))
3136 (build-system python-build-system)
3137 (outputs '("out" "doc"))
3138 (arguments
3139 `(#:tests? #f ; no test target
3140 #:phases
3141 (modify-phases %standard-phases
3142 (add-after 'install 'install-doc
3143 (lambda* (#:key outputs #:allow-other-keys)
3144 (let* ((doc (string-append (assoc-ref outputs "doc")
3145 "/share/doc/" ,name "-" ,version))
3146 (html-doc (string-append doc "/html"))
3147 (examples (string-append doc "/examples")))
3148 (mkdir-p html-doc)
3149 (mkdir-p examples)
3150 (for-each
3151 (lambda (dir tgt)
3152 (map (lambda (file)
3153 (install-file file tgt))
3154 (find-files dir ".*")))
3155 (list "docs" "htmldoc" "examples")
3156 (list doc html-doc examples))
3157 #t))))))
3158 (home-page "http://pyparsing.wikispaces.com")
3159 (synopsis "Python parsing class library")
3160 (description
3161 "The pyparsing module is an alternative approach to creating and
3162 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3163 of regular expressions. The pyparsing module provides a library of classes
3164 that client code uses to construct the grammar directly in Python code.")
3165 (license license:expat)))
3166
3167 (define-public python2-pyparsing
3168 (package-with-python2 python-pyparsing))
3169
3170 (define-public python-numpydoc
3171 (package
3172 (name "python-numpydoc")
3173 (version "0.5")
3174 (source
3175 (origin
3176 (method url-fetch)
3177 (uri (string-append
3178 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3179 version ".tar.gz"))
3180 (sha256
3181 (base32
3182 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3183 (modules '((guix build utils)))
3184 (snippet
3185 '(begin
3186 ;; Drop a test requiring matplotlib, which we cannot add as an
3187 ;; input since it would create a circular dependency: Extend the
3188 ;; test for Python 3, where it is already dropped, to Python 2.
3189 (substitute* "numpydoc/tests/test_plot_directive.py"
3190 (("3") "2"))))))
3191 (build-system python-build-system)
3192 (propagated-inputs
3193 `(("python-sphinx" ,python-sphinx)))
3194 (native-inputs
3195 `(("python-nose" ,python-nose)))
3196 (home-page "https://pypi.python.org/pypi/numpydoc")
3197 (synopsis
3198 "Numpy's Sphinx extensions")
3199 (description
3200 "Sphinx extension to support docstrings in Numpy format.")
3201 (license license:bsd-2)))
3202
3203 (define-public python2-numpydoc
3204 (package-with-python2 python-numpydoc))
3205
3206 (define-public python-numexpr
3207 (package
3208 (name "python-numexpr")
3209 (version "2.6.4")
3210 (source
3211 (origin
3212 (method url-fetch)
3213 (uri (pypi-uri "numexpr" version))
3214 (sha256
3215 (base32
3216 "1kpnbb5d5n927113zccfibn16z7gidjipyac6kbbhzs0lnizkgph"))))
3217 (build-system python-build-system)
3218 (arguments `(#:tests? #f)) ; no tests included
3219 (propagated-inputs
3220 `(("python-numpy" ,python-numpy)))
3221 (home-page "https://github.com/pydata/numexpr")
3222 (synopsis "Fast numerical expression evaluator for NumPy")
3223 (description
3224 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3225 expressions that operate on arrays are accelerated and use less memory than
3226 doing the same calculation in Python. In addition, its multi-threaded
3227 capabilities can make use of all your cores, which may accelerate
3228 computations, most specially if they are not memory-bounded (e.g. those using
3229 transcendental functions).")
3230 (license license:expat)))
3231
3232 (define-public python2-numexpr
3233 (package-with-python2 python-numexpr))
3234
3235 (define-public python-cycler
3236 (package
3237 (name "python-cycler")
3238 (version "0.10.0")
3239 (source (origin
3240 (method url-fetch)
3241 (uri (pypi-uri "cycler" version))
3242 (sha256
3243 (base32
3244 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3245 (build-system python-build-system)
3246 (arguments
3247 ;; XXX: The current version requires 'coveralls' which we don't have.
3248 ;; Enable this for the next release which uses 'python-pytest'.
3249 '(#:tests? #f))
3250 (propagated-inputs
3251 `(("python-six" ,python-six)))
3252 (home-page "http://matplotlib.org/cycler/")
3253 (synopsis "Composable keyword argument iterator")
3254 (description
3255 "When using @code{matplotlib} and plotting more than one line, it is
3256 common to want to be able to want to be able to cycle over one or more artist
3257 styles; but the plotting logic can quickly become involved.
3258 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3259 @code{Cycler} class was developed.")
3260 (license license:bsd-3)))
3261
3262 (define-public python2-cycler
3263 (package-with-python2 python-cycler))
3264
3265 (define-public python-colorspacious
3266 (package
3267 (name "python-colorspacious")
3268 (version "1.1.0")
3269 (source
3270 (origin
3271 (method url-fetch)
3272 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3273 version ".tar.gz"))
3274 (file-name (string-append name "-" version))
3275 (sha256
3276 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3277 (build-system python-build-system)
3278 (propagated-inputs
3279 `(("python-numpy" ,python-numpy)))
3280 (native-inputs
3281 `(("python-nose" ,python-nose)))
3282 (arguments
3283 `(#:phases
3284 (modify-phases %standard-phases
3285 (replace 'check
3286 (lambda _
3287 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
3288 (home-page "https://github.com/njsmith/colorspacious")
3289 (synopsis "Python library for colorspace conversions")
3290 (description "@code{colorspacious} is a Python library that lets you
3291 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3292 (license license:expat)))
3293
3294 (define-public python2-colorspacious
3295 (package-with-python2 python-colorspacious))
3296
3297 (define-public python-matplotlib
3298 (package
3299 (name "python-matplotlib")
3300 (version "2.0.2")
3301 (source
3302 (origin
3303 (method url-fetch)
3304 (uri (pypi-uri "matplotlib" version))
3305 (sha256
3306 (base32
3307 "1w8z2a1l7s72p1byfz7g03wqhygqxi8w82619dqb3a1lm97w9yqg"))))
3308 (build-system python-build-system)
3309 (propagated-inputs ; the following packages are all needed at run time
3310 `(("python-cycler" ,python-cycler)
3311 ("python-pyparsing" ,python-pyparsing)
3312 ("python-pygobject" ,python-pygobject)
3313 ("gobject-introspection" ,gobject-introspection)
3314 ("python-tkinter" ,python "tk")
3315 ("python-dateutil" ,python-dateutil)
3316 ("python-numpy" ,python-numpy)
3317 ("python-pillow" ,python-pillow)
3318 ("python-pytz" ,python-pytz)
3319 ("python-six" ,python-six)
3320 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3321 ;; from 'gtk+') provides the required 'typelib' files used by
3322 ;; 'gobject-introspection'. The location of these files is set with the
3323 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3324 ;; is done automatically by a 'native-search-path' procedure. However,
3325 ;; at run-time the user must set this variable as follows:
3326 ;;
3327 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3328 ("gtk+" ,gtk+)
3329 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3330 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3331 ;; object. For this reason we need to import both libraries.
3332 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3333 ("python-pycairo" ,python-pycairo)
3334 ("python-pyqt" ,python-pyqt)
3335 ("python-cairocffi" ,python-cairocffi)))
3336 (inputs
3337 `(("libpng" ,libpng)
3338 ("imagemagick" ,imagemagick)
3339 ("freetype" ,freetype)
3340 ("cairo" ,cairo)
3341 ("glib" ,glib)
3342 ;; FIXME: Add backends when available.
3343 ;("python-wxpython" ,python-wxpython)
3344 ("tcl" ,tcl)
3345 ("tk" ,tk)))
3346 (native-inputs
3347 `(("pkg-config" ,pkg-config)
3348 ("python-nose" ,python-nose)
3349 ("python-mock" ,python-mock)))
3350 (arguments
3351 `(#:phases
3352 (modify-phases %standard-phases
3353 (add-before 'build 'configure-environment
3354 (lambda* (#:key outputs inputs #:allow-other-keys)
3355 (let ((cairo (assoc-ref inputs "cairo"))
3356 (gtk+ (assoc-ref inputs "gtk+")))
3357 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3358 ;; has not effect.
3359 (setenv "LD_LIBRARY_PATH"
3360 (string-append cairo "/lib:" gtk+ "/lib"))
3361 (setenv "HOME" (getcwd))
3362 (call-with-output-file "setup.cfg"
3363 (lambda (port)
3364 (format port "[directories]~%
3365 basedirlist = ~a,~a~%
3366 [rc_options]~%
3367 backend = TkAgg~%"
3368 (assoc-ref inputs "tcl")
3369 (assoc-ref inputs "tk")))))
3370 #t)))))
3371 (home-page "http://matplotlib.org")
3372 (synopsis "2D plotting library for Python")
3373 (description
3374 "Matplotlib is a Python 2D plotting library which produces publication
3375 quality figures in a variety of hardcopy formats and interactive environments
3376 across platforms. Matplotlib can be used in Python scripts, the python and
3377 ipython shell, web application servers, and six graphical user interface
3378 toolkits.")
3379 (license license:psfl)
3380 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3381
3382 (define-public python2-matplotlib
3383 (let ((matplotlib (package-with-python2
3384 (strip-python2-variant python-matplotlib))))
3385 (package (inherit matplotlib)
3386 ;; Make sure to use special packages for Python 2 instead
3387 ;; of those automatically rewritten by package-with-python2.
3388 (propagated-inputs
3389 `(("python2-pycairo" ,python2-pycairo)
3390 ("python2-functools32" ,python2-functools32)
3391 ("python2-pygobject-2" ,python2-pygobject-2)
3392 ("python2-subprocess32" ,python2-subprocess32)
3393 ("python2-tkinter" ,python-2 "tk")
3394 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3395 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3396
3397 (define-public python-matplotlib-documentation
3398 (package
3399 (name "python-matplotlib-documentation")
3400 (version (package-version python-matplotlib))
3401 (source (package-source python-matplotlib))
3402 (build-system python-build-system)
3403 (native-inputs
3404 `(("python-matplotlib" ,python-matplotlib)
3405 ("python-colorspacious" ,python-colorspacious)
3406 ("python-sphinx" ,python-sphinx)
3407 ("python-numpydoc" ,python-numpydoc)
3408 ("python-ipython" ,python-ipython)
3409 ("python-mock" ,python-mock)
3410 ("graphviz" ,graphviz)
3411 ("texlive" ,texlive)
3412 ("texinfo" ,texinfo)
3413 ,@(package-native-inputs python-matplotlib)))
3414 (arguments
3415 `(#:tests? #f ; we're only generating documentation
3416 #:phases
3417 (modify-phases %standard-phases
3418 (replace 'build
3419 (lambda _
3420 (chdir "doc")
3421 ;; Produce pdf in 'A4' format.
3422 (substitute* "conf.py"
3423 (("latex_paper_size = 'letter'") "")
3424 ;; latex_paper_size is deprecated -> set paper size using
3425 ;; latex_elements
3426 (("latex_elements\\['pointsize'\\] = '11pt'" match)
3427 ;; insert at a point where latex_elements{} is defined:
3428 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
3429 (zero? (system* "python" "make.py" "html" "latex" "texinfo"))))
3430 (replace 'install
3431 (lambda* (#:key inputs outputs #:allow-other-keys)
3432 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3433 (doc (string-append data "/doc/python-matplotlib-" ,version))
3434 (info (string-append data "/info"))
3435 (html (string-append doc "/html")))
3436 (mkdir-p html)
3437 (mkdir-p info)
3438 (copy-recursively "build/html" html)
3439 (symlink (string-append html "/_images")
3440 (string-append info "/matplotlib-figures"))
3441 (with-directory-excursion "build/texinfo"
3442 (substitute* "matplotlib.texi"
3443 (("@image\\{([^,]*)" all file)
3444 (string-append "@image{matplotlib-figures/" file)))
3445 (symlink (string-append html "/_images")
3446 "./matplotlib-figures")
3447 (system* "makeinfo" "--no-split"
3448 "-o" "matplotlib.info" "matplotlib.texi"))
3449 (copy-file "build/texinfo/matplotlib.info"
3450 (string-append info "/matplotlib.info"))
3451 (copy-file "build/latex/Matplotlib.pdf"
3452 (string-append doc "/Matplotlib.pdf")))
3453 #t)))))
3454 (home-page (package-home-page python-matplotlib))
3455 (synopsis "Documentation for the python-matplotlib package")
3456 (description (package-description python-matplotlib))
3457 (license (package-license python-matplotlib))))
3458
3459 (define-public python2-matplotlib-documentation
3460 (package-with-python2 python-matplotlib-documentation))
3461
3462 (define-public python2-pysnptools
3463 (package
3464 (name "python2-pysnptools")
3465 (version "0.3.9")
3466 (source
3467 (origin
3468 (method url-fetch)
3469 (uri (pypi-uri "pysnptools" version ".zip"))
3470 (sha256
3471 (base32
3472 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
3473 (build-system python-build-system)
3474 (arguments
3475 `(#:python ,python-2)) ; only Python 2.7 is supported
3476 (propagated-inputs
3477 `(("python2-numpy" ,python2-numpy)
3478 ("python2-scipy" ,python2-scipy)
3479 ("python2-pandas" ,python2-pandas)))
3480 (native-inputs
3481 `(("python2-cython" ,python2-cython)))
3482 (native-inputs
3483 `(("unzip" ,unzip)))
3484 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3485 (synopsis "Library for reading and manipulating genetic data")
3486 (description
3487 "PySnpTools is a library for reading and manipulating genetic data. It
3488 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3489 those files. It can also efficiently manipulate ranges of integers using set
3490 operators such as union, intersection, and difference.")
3491 (license license:asl2.0)))
3492
3493 (define-public python-rpy2
3494 (package
3495 (name "python-rpy2")
3496 (version "2.9.0")
3497 (source
3498 (origin
3499 (method url-fetch)
3500 (uri (pypi-uri "rpy2" version))
3501 (sha256
3502 (base32
3503 "0bqihjrdqwj5r1h86shvfb1p5hfr4a6klv1v54bzfr9r144w3rni"))))
3504 (build-system python-build-system)
3505 (arguments
3506 '(#:modules ((ice-9 ftw)
3507 (srfi srfi-1)
3508 (srfi srfi-26)
3509 (guix build utils)
3510 (guix build python-build-system))
3511 #:phases
3512 (modify-phases %standard-phases
3513 ;; Without this phase the test loader cannot find the directories, in
3514 ;; which it is supposed to look for test files.
3515 (add-after 'unpack 'fix-tests
3516 (lambda* (#:key outputs #:allow-other-keys)
3517 (substitute* "rpy/tests.py"
3518 (("loader.discover\\(")
3519 "loader.discover(rpy_root + '/' +"))
3520 #t))
3521 (replace 'check
3522 (lambda* (#:key outputs inputs #:allow-other-keys)
3523 (let ((cwd (getcwd)))
3524 (setenv "PYTHONPATH"
3525 (string-append cwd "/build/"
3526 (find (cut string-prefix? "lib" <>)
3527 (scandir (string-append cwd "/build")))
3528 ":"
3529 (getenv "PYTHONPATH"))))
3530 ;; FIXME: Even when all tests pass, the check phase will fail.
3531 (system* "python" "-m" "rpy2.tests" "-v"))))))
3532 (propagated-inputs
3533 `(("python-six" ,python-six)
3534 ("python-jinja2" ,python-jinja2)
3535 ("python-pytz" ,python-pytz)))
3536 (inputs
3537 `(("readline" ,readline)
3538 ("icu4c" ,icu4c)
3539 ("pcre" ,pcre)
3540 ("r-minimal" ,r-minimal)
3541 ("r-survival" ,r-survival)
3542 ("r-ggplot2" ,r-ggplot2)
3543 ("r-rsqlite" ,r-rsqlite)
3544 ("r-dplyr" ,r-dplyr)
3545 ("r-dbplyr" ,r-dbplyr)
3546 ("python-numpy" ,python-numpy)))
3547 (native-inputs
3548 `(("zlib" ,zlib)))
3549 (home-page "http://rpy.sourceforge.net/")
3550 (synopsis "Python interface to the R language")
3551 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3552 low-level interface to R from Python, a proposed high-level interface,
3553 including wrappers to graphical libraries, as well as R-like structures and
3554 functions.")
3555 ;; Any of these licenses can be picked for the R interface. The whole
3556 ;; project is released under GPLv2+ according to the license declaration
3557 ;; in "setup.py".
3558 (license (list license:mpl2.0 license:gpl2+ license:lgpl2.1+))))
3559
3560 (define-public python-scipy
3561 (package
3562 (name "python-scipy")
3563 (version "1.0.0")
3564 (source
3565 (origin
3566 (method url-fetch)
3567 (uri (pypi-uri "scipy" version))
3568 (sha256
3569 (base32
3570 "043djb3vyk6qripmyw30jhl0g8qza0fmar6wck10iv79l08izsl7"))))
3571 (build-system python-build-system)
3572 (propagated-inputs
3573 `(("python-numpy" ,python-numpy)
3574 ("python-matplotlib" ,python-matplotlib)
3575 ("python-pyparsing" ,python-pyparsing)))
3576 (inputs
3577 `(("lapack" ,lapack)
3578 ("openblas" ,openblas)))
3579 (native-inputs
3580 `(("python-cython" ,python-cython)
3581 ("python-pytest" ,python-pytest)
3582 ("python-sphinx" ,python-sphinx)
3583 ("python-numpydoc" ,python-numpydoc)
3584 ("gfortran" ,gfortran)
3585 ("perl" ,perl)
3586 ("which" ,which)))
3587 (outputs '("out" "doc"))
3588 (arguments
3589 `(#:phases
3590 (modify-phases %standard-phases
3591 (add-before 'build 'configure-openblas
3592 (lambda* (#:key inputs #:allow-other-keys)
3593 (call-with-output-file "site.cfg"
3594 (lambda (port)
3595 (format port
3596 "[blas]
3597 libraries = openblas
3598 library_dirs = ~a/lib
3599 include_dirs = ~a/include
3600
3601 # backslash-n to make emacs happy
3602 \n[atlas]
3603 library_dirs = ~a/lib
3604 atlas_libs = openblas
3605 "
3606 (assoc-ref inputs "openblas")
3607 (assoc-ref inputs "openblas")
3608 (assoc-ref inputs "openblas"))))
3609 #t))
3610 (add-after 'install 'install-doc
3611 (lambda* (#:key inputs outputs #:allow-other-keys)
3612 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3613 (doc (string-append data "/doc/" ,name "-" ,version))
3614 (html (string-append doc "/html"))
3615 (pyver ,(string-append "PYVER=" (version-major+minor
3616 (package-version python))))
3617 ;; By default it tries to run sphinx-build through the Python
3618 ;; interpreter which won't work with our shell wrapper.
3619 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
3620 ;; Make installed package available for building the
3621 ;; documentation
3622 (add-installed-pythonpath inputs outputs)
3623 (with-directory-excursion "doc"
3624 ;; Fix generation of images for mathematical expressions.
3625 (substitute* (find-files "source" "conf\\.py")
3626 (("pngmath_use_preview = True")
3627 "pngmath_use_preview = False"))
3628 (mkdir-p html)
3629 (invoke "make" "html" pyver sphinxbuild)
3630 (with-directory-excursion "build/html"
3631 (for-each (lambda (file)
3632 (let* ((dir (dirname file))
3633 (tgt-dir (string-append html "/" dir)))
3634 (install-file file html)))
3635 (find-files "." ".*")))))
3636 #t))
3637 ;; Tests can only be run after the library has been installed and not
3638 ;; within the source directory.
3639 (delete 'check)
3640 (add-after 'install 'check
3641 (lambda* (#:key inputs outputs #:allow-other-keys)
3642 (add-installed-pythonpath inputs outputs)
3643 (with-directory-excursion "/tmp"
3644 (invoke "python" "-c"
3645 "import scipy; scipy.test('full', verbose=2)")))))))
3646 (home-page "https://www.scipy.org/")
3647 (synopsis "The Scipy library provides efficient numerical routines")
3648 (description "The SciPy library is one of the core packages that make up
3649 the SciPy stack. It provides many user-friendly and efficient numerical
3650 routines such as routines for numerical integration and optimization.")
3651 (properties `((python2-variant . ,(delay python2-scipy))))
3652 (license license:bsd-3)))
3653
3654 (define-public python2-scipy
3655 (package-with-python2
3656 (strip-python2-variant python-scipy)))
3657
3658 (define-public python-socksipy-branch
3659 (package
3660 (name "python-socksipy-branch")
3661 (version "1.01")
3662 (source
3663 (origin
3664 (method url-fetch)
3665 (uri (pypi-uri "SocksiPy-branch" version))
3666 (sha256
3667 (base32
3668 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3669 (build-system python-build-system)
3670 (arguments
3671 `(#:tests? #f)) ; There are no tests
3672 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3673 (synopsis "Python SOCKS module")
3674 (description
3675 "SocksiPy - A Python SOCKS client module. It provides a
3676 socket-like interface that supports connections to any TCP
3677 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3678 The original version was developed by Dan Haim, this is a
3679 branch created by Mario Vilas to address some open issues,
3680 as the original project seems to have been abandoned circa 2007.")
3681 (license license:bsd-3)))
3682
3683 (define-public python2-socksipy-branch
3684 (package-with-python2 python-socksipy-branch))
3685
3686 (define-public python-pycodestyle
3687 (package
3688 (name "python-pycodestyle")
3689 (version "2.3.1")
3690 (source
3691 (origin
3692 (method url-fetch)
3693 (uri (pypi-uri "pycodestyle" version))
3694 (sha256
3695 (base32
3696 "0rk78b66p57ala26mdldl9lafr48blv5s659sah9q50qnfjmc8k8"))))
3697 (build-system python-build-system)
3698 (home-page "https://pycodestyle.readthedocs.io/")
3699 (synopsis "Python style guide checker")
3700 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3701 Python code against some of the style conventions in
3702 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3703 (license license:expat)))
3704
3705 (define-public python2-pycodestyle
3706 (package-with-python2 python-pycodestyle))
3707
3708 (define-public python-orderedmultidict
3709 (package
3710 (name "python-orderedmultidict")
3711 (version "0.7.11")
3712 (source
3713 (origin
3714 (method url-fetch)
3715 (uri (pypi-uri "orderedmultidict" version))
3716 (sha256
3717 (base32
3718 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
3719 (build-system python-build-system)
3720 (arguments
3721 `(#:phases
3722 (modify-phases %standard-phases
3723 (add-after 'unpack 'fix-tests
3724 (lambda _
3725 ;; The package uses nosetest for running the tests.
3726 ;; Adding this initfile allows to run the test suite
3727 ;; without requiring nosetest.
3728 (zero? (system* "touch" "tests/__init__.py")))))))
3729 (propagated-inputs
3730 `(("python-six" ,python-six)))
3731 (native-inputs
3732 `(("python-pycodestyle" ,python-pycodestyle)))
3733 (home-page "https://github.com/gruns/orderedmultidict")
3734 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3735 (description "This package contains a library for ordered multivalue
3736 dictionaries. A multivalue dictionary is a dictionary that can store
3737 multiple values for the same key. An ordered multivalue dictionary is a
3738 multivalue dictionary that retains the order of insertions and deletions.")
3739 (license license:unlicense)))
3740
3741 (define-public python2-orderedmultidict
3742 (package-with-python2 python-orderedmultidict))
3743
3744 (define-public python-autopep8
3745 (package
3746 (name "python-autopep8")
3747 (version "1.3.2")
3748 (source
3749 (origin
3750 (method url-fetch)
3751 (uri (pypi-uri "autopep8" version))
3752 (sha256
3753 (base32
3754 "1p9pa1ffg4iy96l918808jggg9a69iaka5awmj8xid36yc5mk0ky"))))
3755 (build-system python-build-system)
3756 (propagated-inputs
3757 `(("python-pycodestyle" ,python-pycodestyle)))
3758 (home-page "https://github.com/hhatto/autopep8")
3759 (synopsis "Format Python code according to the PEP 8 style guide")
3760 (description
3761 "@code{autopep8} automatically formats Python code to conform to
3762 the PEP 8 style guide. It uses the pycodestyle utility to determine
3763 what parts of the code needs to be formatted. @code{autopep8} is
3764 capable of fixing most of the formatting issues that can be reported
3765 by pycodestyle.")
3766 (license (license:non-copyleft
3767 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
3768
3769 (define-public python2-autopep8
3770 (package-with-python2 python-autopep8))
3771
3772 (define-public python-distutils-extra
3773 (package
3774 (name "python-distutils-extra")
3775 (version "2.38")
3776 (source
3777 (origin
3778 (method url-fetch)
3779 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3780 version "/+download/python-distutils-extra-"
3781 version ".tar.gz"))
3782 (sha256
3783 (base32
3784 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3785 (build-system python-build-system)
3786 (home-page "https://launchpad.net/python-distutils-extra/")
3787 (synopsis "Enhancements to Python's distutils")
3788 (description
3789 "The python-distutils-extra module enables you to easily integrate
3790 gettext support, themed icons, and scrollkeeper-based documentation into
3791 Python's distutils.")
3792 (license license:gpl2)))
3793
3794 (define-public python2-distutils-extra
3795 (package-with-python2 python-distutils-extra))
3796
3797 (define-public python2-elib.intl
3798 (package
3799 (name "python2-elib.intl")
3800 (version "0.0.3")
3801 (source
3802 (origin
3803 ;; This project doesn't tag releases or publish tarballs, so we take
3804 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3805 (method git-fetch)
3806 (uri (git-reference
3807 (url "https://github.com/dieterv/elib.intl.git")
3808 (commit "d09997cfef")))
3809 (file-name (string-append name "-" version "-checkout"))
3810 (sha256
3811 (base32
3812 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3813 (build-system python-build-system)
3814 (arguments
3815 ;; incompatible with Python 3 (exception syntax)
3816 `(#:python ,python-2
3817 #:tests? #f))
3818 (home-page "https://github.com/dieterv/elib.intl")
3819 (synopsis "Enhanced internationalization for Python")
3820 (description
3821 "The elib.intl module provides enhanced internationalization (I18N)
3822 services for your Python modules and applications.")
3823 (license license:lgpl3+)))
3824
3825 (define-public python-olefile
3826 (package
3827 (name "python-olefile")
3828 (version "0.44")
3829 (source
3830 (origin
3831 (method url-fetch)
3832 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
3833 version ".tar.gz"))
3834 (file-name (string-append name "-" version ".tar.gz"))
3835 (sha256
3836 (base32
3837 "1wmxbrhyqjry2000zx0zdhqdqxhgi06nz7sbzjlh222q2zjv1gpj"))))
3838 (build-system python-build-system)
3839 (home-page
3840 "https://www.decalage.info/python/olefileio")
3841 (synopsis "Read and write Microsoft OLE2 files.")
3842 (description
3843 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
3844 Storage or Compound Document, Microsoft Office). It is an improved version of
3845 the OleFileIO module from PIL, the Python Image Library.")
3846 (license license:bsd-3)))
3847
3848 (define-public python2-olefile
3849 (package-with-python2 python-olefile))
3850
3851 (define-public python-pillow
3852 (package
3853 (name "python-pillow")
3854 (version "4.3.0")
3855 (source
3856 (origin
3857 (method url-fetch)
3858 (uri (pypi-uri "Pillow" version))
3859 (sha256
3860 (base32
3861 "09xmn7rl6840sli2iz1k3fgxfgmri2nqz6vkinmb9mgg8ifp2z59"))
3862 (patch-flags '("-p1" "--binary"))
3863 (patches (search-patches "python-pillow-fix-failing-tests.patch"))))
3864 (build-system python-build-system)
3865 (native-inputs
3866 `(("python-nose" ,python-nose)))
3867 (inputs
3868 `(("freetype" ,freetype)
3869 ("lcms" ,lcms)
3870 ("zlib" ,zlib)
3871 ("libjpeg" ,libjpeg)
3872 ("openjpeg" ,openjpeg)
3873 ("libtiff" ,libtiff)
3874 ("libwebp" ,libwebp)))
3875 (propagated-inputs
3876 `(("python-olefile" ,python-olefile)))
3877 (arguments
3878 `(#:phases (modify-phases %standard-phases
3879 (add-after
3880 'install 'check-installed
3881 (lambda* (#:key outputs inputs #:allow-other-keys)
3882 (begin
3883 (setenv "HOME" (getcwd))
3884 ;; Make installed package available for running the
3885 ;; tests
3886 (add-installed-pythonpath inputs outputs)
3887 (and (zero? (system* "python" "selftest.py"
3888 "--installed"))
3889 (zero? (system* "python" "test-installed.py"))))))
3890 (delete 'check))))
3891 (home-page "https://pypi.python.org/pypi/Pillow")
3892 (synopsis "Fork of the Python Imaging Library")
3893 (description
3894 "The Python Imaging Library adds image processing capabilities to your
3895 Python interpreter. This library provides extensive file format support, an
3896 efficient internal representation, and fairly powerful image processing
3897 capabilities. The core image library is designed for fast access to data
3898 stored in a few basic pixel formats. It should provide a solid foundation for
3899 a general image processing tool.")
3900 (license (license:x11-style
3901 "http://www.pythonware.com/products/pil/license.htm"
3902 "The PIL Software License"))))
3903
3904 (define-public python2-pillow
3905 (package-with-python2 python-pillow))
3906
3907 (define-public python-pycparser
3908 (package
3909 (name "python-pycparser")
3910 (version "2.17")
3911 (source
3912 (origin
3913 (method url-fetch)
3914 (uri (pypi-uri "pycparser" version))
3915 (sha256
3916 (base32
3917 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
3918 (outputs '("out" "doc"))
3919 (build-system python-build-system)
3920 (native-inputs
3921 `(("pkg-config" ,pkg-config)))
3922 (arguments
3923 `(#:phases
3924 (modify-phases %standard-phases
3925 (replace 'check
3926 (lambda _
3927 (with-directory-excursion "tests"
3928 (zero? (system* "python" "all_tests.py")))))
3929 (add-after 'install 'install-doc
3930 (lambda* (#:key outputs #:allow-other-keys)
3931 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3932 (doc (string-append data "/doc/" ,name "-" ,version))
3933 (examples (string-append doc "/examples")))
3934 (mkdir-p examples)
3935 (for-each (lambda (file)
3936 (copy-file (string-append "." file)
3937 (string-append doc file)))
3938 '("/README.rst" "/CHANGES" "/LICENSE"))
3939 (copy-recursively "examples" examples)))))))
3940 (home-page "https://github.com/eliben/pycparser")
3941 (synopsis "C parser in Python")
3942 (description
3943 "Pycparser is a complete parser of the C language, written in pure Python
3944 using the PLY parsing library. It parses C code into an AST and can serve as
3945 a front-end for C compilers or analysis tools.")
3946 (license license:bsd-3)))
3947
3948 (define-public python2-pycparser
3949 (package-with-python2 python-pycparser))
3950
3951 (define-public python-xcffib
3952 (package
3953 (name "python-xcffib")
3954 (version "0.5.1")
3955 (source
3956 (origin
3957 (method url-fetch)
3958 (uri (pypi-uri "xcffib" version))
3959 (sha256
3960 (base32
3961 "09gbnmr5vn58mm8xi3fmd7fz6743cks6c46dphnxzwax6zsxmy60"))))
3962 (build-system python-build-system)
3963 (inputs
3964 `(("libxcb" ,libxcb)))
3965 (propagated-inputs
3966 `(("python-cffi" ,python-cffi) ; used at run time
3967 ("python-six" ,python-six)))
3968 (arguments
3969 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
3970 #:tests? #f
3971 #:phases
3972 (modify-phases %standard-phases
3973 (add-after 'unpack 'fix-libxcb-path
3974 (lambda* (#:key inputs #:allow-other-keys)
3975 (let ((libxcb (assoc-ref inputs "libxcb")))
3976 (substitute* '("xcffib/__init__.py")
3977 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
3978 #t)))
3979 (add-after 'install 'install-doc
3980 (lambda* (#:key outputs #:allow-other-keys)
3981 (let ((doc (string-append (assoc-ref outputs "out") "/share"
3982 "/doc/" ,name "-" ,version)))
3983 (mkdir-p doc)
3984 (copy-file "README.md"
3985 (string-append doc "/README.md"))
3986 #t))))))
3987 (home-page "https://github.com/tych0/xcffib")
3988 (synopsis "XCB Python bindings")
3989 (description
3990 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
3991 support for Python 3 and PyPy. It is based on cffi.")
3992 (license license:expat)))
3993
3994 (define-public python2-xcffib
3995 (package-with-python2 python-xcffib))
3996
3997 (define-public python-cairocffi
3998 (package
3999 (name "python-cairocffi")
4000 (version "0.8.0")
4001 (source
4002 (origin
4003 (method url-fetch)
4004 ;; The archive on pypi is missing the 'utils' directory!
4005 (uri (string-append "https://github.com/Kozea/cairocffi/archive/v"
4006 version ".tar.gz"))
4007 (file-name (string-append name "-" version ".tar.gz"))
4008 (sha256
4009 (base32
4010 "1rk2dvy3fxrga6bvvxc2fi5lbaynm5h4a0w0aaxyn3bc77rszjg9"))))
4011 (build-system python-build-system)
4012 (outputs '("out" "doc"))
4013 (inputs
4014 `(("gdk-pixbuf" ,gdk-pixbuf)
4015 ("cairo" ,cairo)))
4016 (native-inputs
4017 `(("pkg-config" ,pkg-config)
4018 ("python-sphinx" ,python-sphinx)
4019 ("python-docutils" ,python-docutils)))
4020 (propagated-inputs
4021 `(("python-xcffib" ,python-xcffib))) ; used at run time
4022 (arguments
4023 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
4024 #:tests? #f
4025 #:phases
4026 (modify-phases %standard-phases
4027 (add-after 'install 'install-doc
4028 (lambda* (#:key inputs outputs #:allow-other-keys)
4029 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4030 (doc (string-append data "/doc/" ,name "-" ,version))
4031 (html (string-append doc "/html")))
4032 (setenv "LD_LIBRARY_PATH"
4033 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4034 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4035 (setenv "LANG" "en_US.UTF-8")
4036 (mkdir-p html)
4037 (for-each (lambda (file)
4038 (copy-file (string-append "." file)
4039 (string-append doc file)))
4040 '("/README.rst" "/CHANGES" "/LICENSE"))
4041 (system* "python" "setup.py" "build_sphinx")
4042 (copy-recursively "docs/_build/html" html)
4043 #t))))))
4044 (home-page "https://github.com/Kozea/cairocffi")
4045 (synopsis "Python bindings and object-oriented API for Cairo")
4046 (description
4047 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4048 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4049 graphics library with support for multiple backends including image buffers,
4050 PNG, PostScript, PDF, and SVG file output.")
4051 (license license:bsd-3)))
4052
4053 (define-public python2-cairocffi
4054 (package-with-python2 python-cairocffi))
4055
4056 (define-public python-decorator
4057 (package
4058 (name "python-decorator")
4059 (version "4.2.1")
4060 (source
4061 (origin
4062 (method url-fetch)
4063 (uri (pypi-uri "decorator" version))
4064 (sha256
4065 (base32 "03iaf116rm3w8b4agb8hzf6z9331mrvi4khfxq35zkx17sgxsikx"))))
4066 (build-system python-build-system)
4067 (arguments '(#:tests? #f)) ; no test target
4068 (home-page "https://pypi.python.org/pypi/decorator/")
4069 (synopsis "Python module to simplify usage of decorators")
4070 (description
4071 "The aim of the decorator module is to simplify the usage of decorators
4072 for the average programmer, and to popularize decorators usage giving examples
4073 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4074 etc. The core of this module is a decorator factory.")
4075 (license license:expat)))
4076
4077 (define-public python2-decorator
4078 (package-with-python2 python-decorator))
4079
4080 (define-public python-drmaa
4081 (package
4082 (name "python-drmaa")
4083 (version "0.7.7")
4084 (source
4085 (origin
4086 (method url-fetch)
4087 (uri (pypi-uri "drmaa" version))
4088 (sha256
4089 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4090 (build-system python-build-system)
4091 ;; The test suite requires libdrmaa which is provided by the cluster
4092 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4093 ;; should be set to the path of the libdrmaa library.
4094 (arguments '(#:tests? #f))
4095 (native-inputs
4096 `(("python-nose" ,python-nose)))
4097 (home-page "https://pypi.python.org/pypi/drmaa")
4098 (synopsis "Python bindings for the DRMAA library")
4099 (description
4100 "A Python package for Distributed Resource Management (DRM) job
4101 submission and control. This package is an implementation of the DRMAA 1.0
4102 Python language binding specification.")
4103 (license license:bsd-3)))
4104
4105 (define-public python2-drmaa
4106 (package-with-python2 python-drmaa))
4107
4108 (define-public python-grako
4109 (package
4110 (name "python-grako")
4111 (version "3.99.9")
4112 (source
4113 (origin
4114 (method url-fetch)
4115 (uri
4116 (pypi-uri "grako" version ".zip"))
4117 (sha256
4118 (base32
4119 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4120 (build-system python-build-system)
4121 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4122 (native-inputs
4123 `(("unzip" ,unzip)
4124 ("python-pytest" ,python-pytest)
4125 ("python-pytest-runner" ,python-pytest-runner)))
4126 (home-page "https://bitbucket.org/neogeny/grako")
4127 (synopsis "EBNF parser generator")
4128 (description
4129 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4130 memoizing PEG/Packrat parser in Python.")
4131 (license license:bsd-3)))
4132
4133 (define-public python2-grako
4134 (package-with-python2 python-grako))
4135
4136 (define-public python-gridmap
4137 (package
4138 (name "python-gridmap")
4139 (version "0.13.0")
4140 (source
4141 (origin
4142 (method url-fetch)
4143 (uri (string-append
4144 "https://github.com/pygridtools/gridmap/archive/v"
4145 version ".tar.gz"))
4146 (file-name (string-append name "-" version ".tar.gz"))
4147 (sha256
4148 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4149 (build-system python-build-system)
4150 (arguments
4151 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4152 (propagated-inputs
4153 `(("python-psutil" ,python-psutil)
4154 ("python-drmaa" ,python-drmaa)
4155 ("python-pyzmq" ,python-pyzmq)))
4156 (home-page "https://github.com/pygridtools/gridmap")
4157 (synopsis "Create jobs on a cluster directly from Python")
4158 (description
4159 "Gridmap is a Python package to allow you to easily create jobs on the
4160 cluster directly from Python. You can directly map Python functions onto the
4161 cluster without needing to write any wrapper code yourself.")
4162 (license license:gpl3+)))
4163
4164 (define-public python2-gridmap
4165 (package-with-python2 python-gridmap))
4166
4167 (define-public python-honcho
4168 (package
4169 (name "python-honcho")
4170 (version "1.0.1")
4171 (source
4172 (origin
4173 (method url-fetch)
4174 (uri (string-append
4175 "https://github.com/nickstenning/honcho/archive/v"
4176 version ".tar.gz"))
4177 (file-name (string-append name "-" version ".tar.gz"))
4178 (sha256
4179 (base32 "0zizn61n5z5hq421hkypk9pw8s6fpxw30f4hsg7k4ivwzy3gjw9j"))))
4180 (build-system python-build-system)
4181 (native-inputs
4182 `(("python-pytest" ,python-pytest)
4183 ("python-mock" ,python-mock)
4184 ("python-tox" ,python-tox)
4185 ("which" ,which))) ;for tests
4186 (propagated-inputs
4187 `(("python-jinja2" ,python-jinja2)))
4188 (arguments
4189 `(#:phases
4190 (modify-phases %standard-phases
4191 (delete 'check)
4192 (add-after 'install 'check
4193 (lambda* (#:key outputs inputs #:allow-other-keys)
4194 ;; fix honcho path in testsuite
4195 (substitute* "tests/conftest.py"
4196 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4197 "/bin/honcho" "'")))
4198 ;; It's easier to run tests after install.
4199 ;; Make installed package available for running the tests
4200 (add-installed-pythonpath inputs outputs)
4201 (zero? (system* "py.test" "-v")))))))
4202 (home-page "https://github.com/nickstenning/honcho")
4203 (synopsis "Manage Procfile-based applications")
4204 (description
4205 "A Procfile is a file which describes how to run an application
4206 consisting of serveral processes. honcho starts all listed processes.
4207 The output of all running processes is collected by honcho and
4208 displayed.")
4209 (license license:expat)))
4210
4211 (define-public python2-honcho
4212 (package-with-python2 python-honcho))
4213
4214 (define-public python-pexpect
4215 (package
4216 (name "python-pexpect")
4217 (version "4.2.1")
4218 (source
4219 (origin
4220 (method url-fetch)
4221 (uri (pypi-uri "pexpect" version))
4222 (sha256
4223 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
4224 (build-system python-build-system)
4225 (arguments
4226 `(#:phases
4227 (modify-phases %standard-phases
4228 (add-before 'check 'prepare-tests
4229 (lambda _
4230 (substitute* (find-files "tests")
4231 (("/bin/ls") (which "ls"))
4232 (("/bin/echo") (which "echo"))
4233 (("/bin/which") (which "which"))
4234 ;; Many tests try to use the /bin directory which
4235 ;; is not present in the build environment.
4236 ;; Use one that's non-empty and unlikely to change.
4237 (("/bin'") "/dev'"))
4238 ;; XXX: Socket connection test gets "Connection reset by peer".
4239 ;; Why does it not work? Delete for now.
4240 (delete-file "tests/test_socket.py")
4241 #t))
4242 (replace 'check (lambda _ (zero? (system* "nosetests" "-v")))))))
4243 (native-inputs
4244 `(("python-nose" ,python-nose)
4245 ("python-pytest" ,python-pytest)
4246 ("man-db" ,man-db)
4247 ("which" ,which)
4248 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4249 (propagated-inputs
4250 `(("python-ptyprocess" ,python-ptyprocess)))
4251 (home-page "http://pexpect.readthedocs.org/")
4252 (synopsis "Controlling interactive console applications")
4253 (description
4254 "Pexpect is a pure Python module for spawning child applications;
4255 controlling them; and responding to expected patterns in their output.
4256 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4257 child application and control it as if a human were typing commands.")
4258 (license license:isc)))
4259
4260 (define-public python2-pexpect
4261 (package-with-python2 python-pexpect))
4262
4263 (define-public python-setuptools-scm
4264 (package
4265 (name "python-setuptools-scm")
4266 (version "1.15.6")
4267 (source (origin
4268 (method url-fetch)
4269 (uri (pypi-uri "setuptools_scm" version))
4270 (sha256
4271 (base32
4272 "0pzvfmx8s20yrgkgwfbxaspz2x1g38qv61jpm0ns91lrb22ldas9"))))
4273 (build-system python-build-system)
4274 (home-page "https://github.com/pypa/setuptools_scm/")
4275 (synopsis "Manage Python package versions in SCM metadata")
4276 (description
4277 "Setuptools_scm handles managing your Python package versions in
4278 @dfn{software configuration management} (SCM) metadata instead of declaring
4279 them as the version argument or in a SCM managed file.")
4280 (license license:expat)))
4281
4282 (define-public python2-setuptools-scm
4283 (package-with-python2 python-setuptools-scm))
4284
4285 (define-public python-pathpy
4286 (package
4287 (name "python-pathpy")
4288 (version "11.0")
4289 (source
4290 (origin
4291 (method url-fetch)
4292 (uri (pypi-uri "path.py" version))
4293 (sha256
4294 (base32 "12s84maimiz61980q065rjgi8ang6xw2wwm64m0lmfks51dlw4qn"))))
4295 ;; (outputs '("out" "doc"))
4296 (build-system python-build-system)
4297 (propagated-inputs
4298 `(("python-appdirs" ,python-appdirs)))
4299 (native-inputs
4300 `(("python-setuptools-scm" ,python-setuptools-scm)
4301 ("python-sphinx" ,python-sphinx)
4302 ("python-rst.linker" ,python-rst.linker)
4303 ("python-pytest" ,python-pytest)
4304 ("python-pytest-runner" ,python-pytest-runner)))
4305 (arguments
4306 ;; FIXME: Documentation and tests require "jaraco.packaging".
4307 `(#:tests? #f))
4308 ;; #:phases
4309 ;; (modify-phases %standard-phases
4310 ;; (add-after 'build 'build-doc
4311 ;; (lambda _
4312 ;; (setenv "LANG" "en_US.UTF-8")
4313 ;; (zero? (system* "python" "setup.py" "build_sphinx"))))
4314 ;; (add-after 'install 'install-doc
4315 ;; (lambda* (#:key outputs #:allow-other-keys)
4316 ;; (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4317 ;; (doc (string-append data "/doc/" ,name "-" ,version))
4318 ;; (html (string-append doc "/html")))
4319 ;; (mkdir-p html)
4320 ;; (for-each (lambda (file)
4321 ;; (copy-file file (string-append doc "/" file)))
4322 ;; '("README.rst" "CHANGES.rst"))
4323 ;; (copy-recursively "build/sphinx/html" html)))))))
4324 (home-page "https://github.com/jaraco/path.py")
4325 (synopsis "Python module wrapper for built-in os.path")
4326 (description
4327 "@code{path.py} implements path objects as first-class entities, allowing
4328 common operations on files to be invoked on those path objects directly.")
4329 (license license:expat)))
4330
4331 (define-public python2-pathpy
4332 (package-with-python2 python-pathpy))
4333
4334 (define-public python-simplegeneric
4335 (package
4336 (name "python-simplegeneric")
4337 (version "0.8.1")
4338 (source
4339 (origin
4340 (method url-fetch)
4341 (uri (string-append "https://pypi.python.org/packages/source/s/"
4342 "simplegeneric/simplegeneric-" version ".zip"))
4343 (sha256
4344 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4345 (build-system python-build-system)
4346 (native-inputs
4347 `(("unzip" ,unzip)))
4348 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4349 (synopsis "Python module for simple generic functions")
4350 (description
4351 "The simplegeneric module lets you define simple single-dispatch generic
4352 functions, akin to Python’s built-in generic functions like @code{len()},
4353 @code{iter()} and so on. However, instead of using specially-named methods,
4354 these generic functions use simple lookup tables, akin to those used by
4355 e.g. @code{pickle.dump()} and other generic functions found in the Python
4356 standard library.")
4357 (license license:zpl2.1)))
4358
4359 (define-public python2-simplegeneric
4360 (package-with-python2 python-simplegeneric))
4361
4362 (define-public python-ipython-genutils
4363 ;; TODO: This package is retired, check if can be removed, see description.
4364 (package
4365 (name "python-ipython-genutils")
4366 (version "0.1.0")
4367 (source
4368 (origin
4369 (method url-fetch)
4370 (uri (string-append "https://pypi.python.org/packages/source/i/"
4371 "ipython_genutils/ipython_genutils-"
4372 version ".tar.gz"))
4373 (sha256
4374 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4375 (build-system python-build-system)
4376 (arguments `(#:tests? #f)) ; no tests
4377 (home-page "https://ipython.org")
4378 (synopsis "Vestigial utilities from IPython")
4379 (description
4380 "This package provides retired utilities from IPython. No packages
4381 outside IPython/Jupyter should depend on it.
4382
4383 This package shouldn't exist. It contains some common utilities shared by
4384 Jupyter and IPython projects during The Big Split. As soon as possible, those
4385 packages will remove their dependency on this, and this package will go
4386 away.")
4387 (license license:bsd-3)))
4388
4389 (define-public python2-ipython-genutils
4390 (package-with-python2 python-ipython-genutils))
4391
4392 (define-public python-traitlets
4393 (package
4394 (name "python-traitlets")
4395 (version "4.2.0")
4396 (source
4397 (origin
4398 (method url-fetch)
4399 (uri (pypi-uri "traitlets" version))
4400 (sha256
4401 (base32
4402 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
4403 (build-system python-build-system)
4404 (arguments
4405 `(#:phases
4406 (modify-phases %standard-phases
4407 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4408 (propagated-inputs
4409 `(("python-ipython-genutils" ,python-ipython-genutils)
4410 ("python-decorator" ,python-decorator)))
4411 (native-inputs
4412 `(("python-mock" ,python-mock)
4413 ("python-nose" ,python-nose)))
4414 (home-page "https://ipython.org")
4415 (synopsis "Configuration system for Python applications")
4416 (description
4417 "Traitlets is a framework that lets Python classes have attributes with
4418 type checking, dynamically calculated default values, and ‘on change’
4419 callbacks. The package also includes a mechanism to use traitlets for
4420 configuration, loading values from files or from command line arguments. This
4421 is a distinct layer on top of traitlets, so you can use traitlets in your code
4422 without using the configuration machinery.")
4423 (license license:bsd-3)))
4424
4425 (define-public python2-traitlets
4426 (package-with-python2 python-traitlets))
4427
4428 (define-public python-jupyter-core
4429 (package
4430 (name "python-jupyter-core")
4431 (version "4.4.0")
4432 (source
4433 (origin
4434 (method url-fetch)
4435 (uri (string-append (pypi-uri "jupyter_core" version)))
4436 (sha256
4437 (base32
4438 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
4439 (build-system python-build-system)
4440 ;; FIXME: not sure how to run the tests
4441 (arguments `(#:tests? #f))
4442 (propagated-inputs
4443 `(("python-traitlets" ,python-traitlets)))
4444 (home-page "http://jupyter.org/")
4445 (synopsis "Jupyter base package")
4446 (description
4447 "Jupyter core is the base package on which Jupyter projects rely.")
4448 (license license:bsd-3)))
4449
4450 (define-public python2-jupyter-core
4451 (package-with-python2 python-jupyter-core))
4452
4453 (define-public python-jupyter-client
4454 (package
4455 (name "python-jupyter-client")
4456 (version "4.4.0")
4457 (source
4458 (origin
4459 (method url-fetch)
4460 (uri (pypi-uri "jupyter_client" version))
4461 (sha256
4462 (base32
4463 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4464 (build-system python-build-system)
4465 ;; Tests fail because of missing native python kernel which I assume is
4466 ;; provided by the ipython package, which we cannot use because it would
4467 ;; cause a dependency cycle.
4468 (arguments `(#:tests? #f))
4469 (propagated-inputs
4470 `(("python-pyzmq" ,python-pyzmq)
4471 ("python-traitlets" ,python-traitlets)
4472 ("python-jupyter-core" ,python-jupyter-core)))
4473 (home-page "http://jupyter.org/")
4474 (synopsis "Jupyter protocol implementation and client libraries")
4475 (description
4476 "The @code{jupyter_client} package contains the reference implementation
4477 of the Jupyter protocol. It also provides client and kernel management APIs
4478 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4479 installing @code{kernelspec}s for use with Jupyter frontends.")
4480 (license license:bsd-3)))
4481
4482 (define-public python2-jupyter-client
4483 (package-with-python2 python-jupyter-client))
4484
4485 (define-public python-ipykernel
4486 (package
4487 (name "python-ipykernel")
4488 (version "4.5.2")
4489 (source
4490 (origin
4491 (method url-fetch)
4492 (uri (pypi-uri "ipykernel" version))
4493 (sha256
4494 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
4495 (build-system python-build-system)
4496 ;; The tests load a submodule of IPython. However, IPython itself depends
4497 ;; on ipykernel.
4498 (arguments `(#:tests? #f))
4499 (propagated-inputs
4500 ;; imported at runtime during connect
4501 `(("python-jupyter-client" ,python-jupyter-client)))
4502 (home-page "https://ipython.org")
4503 (synopsis "IPython Kernel for Jupyter")
4504 (description
4505 "This package provides the IPython kernel for Jupyter.")
4506 (license license:bsd-3)))
4507
4508 (define-public python2-ipykernel
4509 (package-with-python2 python-ipykernel))
4510
4511 (define-public python-ipython
4512 (package
4513 (name "python-ipython")
4514 (version "5.5.0")
4515 (source
4516 (origin
4517 (method url-fetch)
4518 (uri (pypi-uri "ipython" version ".tar.gz"))
4519 (sha256
4520 (base32 "03qmzpfy00if10i9k8fjkam1s4xg22j73f933x5d228z9n4rwik6"))))
4521 (build-system python-build-system)
4522 (outputs '("out" "doc"))
4523 (propagated-inputs
4524 `(("python-pyzmq" ,python-pyzmq)
4525 ("python-prompt-toolkit" ,python-prompt-toolkit)
4526 ("python-terminado" ,python-terminado)
4527 ("python-matplotlib" ,python-matplotlib)
4528 ("python-numpy" ,python-numpy)
4529 ("python-numpydoc" ,python-numpydoc)
4530 ("python-jinja2" ,python-jinja2)
4531 ("python-jupyter-console"
4532 ;; The python-ipython and python-jupyter-console require each
4533 ;; other. To get the functionality in both packages working, strip
4534 ;; down the python-jupyter-console package when using it as an input
4535 ;; to python-ipython.
4536 ,python-jupyter-console-minimal)
4537 ("python-mistune" ,python-mistune)
4538 ("python-pexpect" ,python-pexpect)
4539 ("python-pickleshare" ,python-pickleshare)
4540 ("python-simplegeneric" ,python-simplegeneric)
4541 ("python-jsonschema" ,python-jsonschema)
4542 ("python-traitlets" ,python-traitlets)
4543 ("python-ipykernel" ,python-ipykernel)
4544 ("python-nbformat" ,python-nbformat)
4545 ("python-pygments" ,python-pygments)))
4546 (inputs
4547 `(("readline" ,readline)
4548 ("which" ,which)))
4549 (native-inputs
4550 `(("graphviz" ,graphviz)
4551 ("pkg-config" ,pkg-config)
4552 ("python-requests" ,python-requests) ;; for tests
4553 ("python-testpath" ,python-testpath)
4554 ("python-nose" ,python-nose)
4555 ("python-sphinx" ,python-sphinx)
4556 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
4557 ;; FIXME: It's possible that a smaller union would work just as well.
4558 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
4559 texlive-fonts-ec
4560 texlive-generic-ifxetex
4561 texlive-generic-pdftex
4562 texlive-latex-amsfonts
4563 texlive-latex-capt-of
4564 texlive-latex-cmap
4565 texlive-latex-environ
4566 texlive-latex-eqparbox
4567 texlive-latex-etoolbox
4568 texlive-latex-expdlist
4569 texlive-latex-fancyhdr
4570 texlive-latex-fancyvrb
4571 texlive-latex-fncychap
4572 texlive-latex-float
4573 texlive-latex-framed
4574 texlive-latex-geometry
4575 texlive-latex-graphics
4576 texlive-latex-hyperref
4577 texlive-latex-mdwtools
4578 texlive-latex-multirow
4579 texlive-latex-oberdiek
4580 texlive-latex-parskip
4581 texlive-latex-preview
4582 texlive-latex-tabulary
4583 texlive-latex-threeparttable
4584 texlive-latex-titlesec
4585 texlive-latex-trimspaces
4586 texlive-latex-ucs
4587 texlive-latex-upquote
4588 texlive-latex-url
4589 texlive-latex-varwidth
4590 texlive-latex-wrapfig)))
4591 ("texinfo" ,texinfo)))
4592 (arguments
4593 `(#:phases
4594 (modify-phases %standard-phases
4595 (add-after
4596 'install 'install-doc
4597 (lambda* (#:key inputs outputs #:allow-other-keys)
4598 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4599 (doc (string-append data "/doc/" ,name "-" ,version))
4600 (html (string-append doc "/html"))
4601 (man1 (string-append data "/man/man1"))
4602 (info (string-append data "/info"))
4603 (examples (string-append doc "/examples"))
4604 (python-arg (string-append "PYTHON=" (which "python"))))
4605 (setenv "LANG" "en_US.utf8")
4606 ;; Make installed package available for running the tests
4607 (add-installed-pythonpath inputs outputs)
4608 (with-directory-excursion "docs"
4609 ;; FIXME: pdf fails to build
4610 ;;(system* "make" "pdf" "PAPER=a4")
4611 (system* "make" python-arg "html")
4612 (system* "make" python-arg "info"))
4613 (copy-recursively "docs/man" man1)
4614 (copy-recursively "examples" examples)
4615 (copy-recursively "docs/build/html" html)
4616 ;; (copy-file "docs/build/latex/ipython.pdf"
4617 ;; (string-append doc "/ipython.pdf"))
4618 (mkdir-p info)
4619 (copy-file "docs/build/texinfo/ipython.info"
4620 (string-append info "/ipython.info"))
4621 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4622 ;; Tests can only be run after the library has been installed and not
4623 ;; within the source directory.
4624 (delete 'check)
4625 (add-after
4626 'install 'check
4627 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4628 (if tests?
4629 (with-directory-excursion "/tmp"
4630 ;; Make installed package available for running the tests
4631 (add-installed-pythonpath inputs outputs)
4632 (setenv "HOME" "/tmp/") ;; required by a test
4633 (zero? (system* (string-append (assoc-ref outputs "out")
4634 "/bin/iptest"))))
4635 #t)))
4636 (add-before
4637 'install 'fix-tests
4638 (lambda* (#:key inputs #:allow-other-keys)
4639 (substitute* "./IPython/utils/_process_posix.py"
4640 (("/usr/bin/env', 'which") (which "which")))
4641 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4642 (("#!/usr/bin/env python")
4643 (string-append "#!" (which "python"))))
4644 ;; Disable 1 failing test
4645 (substitute* "./IPython/core/tests/test_magic.py"
4646 (("def test_dirops\\(\\):" all)
4647 (string-append "@dec.skipif(True)\n" all))))))))
4648 (home-page "https://ipython.org")
4649 (synopsis "IPython is a tool for interactive computing in Python")
4650 (description
4651 "IPython provides a rich architecture for interactive computing with:
4652 Powerful interactive shells, a browser-based notebook, support for interactive
4653 data visualization, embeddable interpreters and tools for parallel
4654 computing.")
4655 (license license:bsd-3)
4656 (properties `((python2-variant . ,(delay python2-ipython))))))
4657
4658 (define-public python2-ipython
4659 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4660 (package
4661 (inherit ipython)
4662 ;; FIXME: add pyreadline once available.
4663 (propagated-inputs
4664 `(("python2-backports-shutil-get-terminal-size"
4665 ,python2-backports-shutil-get-terminal-size)
4666 ("python2-pathlib2" ,python2-pathlib2)
4667 ,@(package-propagated-inputs ipython)))
4668 (native-inputs
4669 `(("python2-mock" ,python2-mock)
4670 ,@(package-native-inputs ipython))))))
4671
4672 (define-public python-urwid
4673 (package
4674 (name "python-urwid")
4675 (version "1.3.1")
4676 (source
4677 (origin
4678 (method url-fetch)
4679 (uri (pypi-uri "urwid" version))
4680 (sha256
4681 (base32
4682 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
4683 (build-system python-build-system)
4684 (arguments
4685 `(#:phases
4686 (modify-phases %standard-phases
4687 ;; Disable failing test. Bug filed upstream:
4688 ;; https://github.com/wardi/urwid/issues/164
4689 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
4690 (add-after 'unpack 'disable-failing-test
4691 (lambda _
4692 (substitute* "urwid/tests/test_event_loops.py"
4693 (("test_remove_watch_file")
4694 "disable_remove_watch_file")))))))
4695 (home-page "http://urwid.org")
4696 (synopsis "Console user interface library for Python")
4697 (description
4698 "Urwid is a curses-based UI/widget library for Python. It includes many
4699 features useful for text console applications.")
4700 (license license:lgpl2.1+)))
4701
4702 (define-public python2-urwid
4703 (let ((python2-urwid (package-with-python2 python-urwid)))
4704 (package
4705 (inherit python2-urwid)
4706 (arguments
4707 (append
4708 `(;; Explicitly using Python 2 is necessary due the argument list being
4709 ;; built from only the 'delete-test_vterm.py' phase and python-urwid's
4710 ;; package arguments, which by default assumes the use of Python 3.
4711 #:python ,python-2
4712 #:phases
4713 (modify-phases %standard-phases
4714 ;; Disable the vterm tests because of non-deterministic failures
4715 ;; with Python 2. See https://github.com/urwid/urwid/issues/230.
4716 (add-after 'unpack 'delete-test_vterm.py
4717 (delete-file "urwid/tests/test_vterm.py"))))
4718 (package-arguments python-urwid))))))
4719
4720 (define-public python-urwidtrees
4721 (package
4722 (name "python-urwidtrees")
4723 (version "1.0.2")
4724 (source
4725 (origin
4726 (method url-fetch)
4727 ;; package author intends on distributing via github rather than pypi:
4728 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4729 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4730 version ".tar.gz"))
4731 (file-name (string-append name "-" version ".tar.gz"))
4732 (sha256
4733 (base32
4734 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
4735 (build-system python-build-system)
4736 (arguments
4737 '(#:tests? #f)) ; no tests
4738 (propagated-inputs `(("python-urwid" ,python-urwid)))
4739 (home-page "https://github.com/pazz/urwidtrees")
4740 (synopsis "Tree widgets for urwid")
4741 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4742 toolkit. Use it to build trees of widgets.")
4743 (license license:gpl3+)))
4744
4745 (define-public python2-urwidtrees
4746 (package-with-python2 python-urwidtrees))
4747
4748 (define-public python-dbus
4749 (package
4750 (name "python-dbus")
4751 (version "1.2.0")
4752 (source
4753 (origin
4754 (method url-fetch)
4755 (uri (string-append
4756 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
4757 version ".tar.gz"))
4758 (sha256
4759 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
4760 (build-system gnu-build-system)
4761 (arguments
4762 '(#:phases
4763 (modify-phases %standard-phases
4764 (add-before
4765 'check 'pre-check
4766 (lambda _
4767 ;; XXX: For the missing '/etc/machine-id'.
4768 (substitute* "test/run-test.sh"
4769 (("DBUS_FATAL_WARNINGS=1")
4770 "DBUS_FATAL_WARNINGS=0"))
4771 #t)))))
4772 (native-inputs
4773 `(("pkg-config" ,pkg-config)))
4774 (inputs
4775 `(("python" ,python)
4776 ("dbus-glib" ,dbus-glib)))
4777 (synopsis "Python bindings for D-bus")
4778 (description "python-dbus provides bindings for libdbus, the reference
4779 implementation of D-Bus.")
4780 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
4781 (license license:expat)))
4782
4783 (define-public python2-dbus
4784 (package (inherit python-dbus)
4785 (name "python2-dbus")
4786 (inputs `(("python" ,python-2)
4787 ,@(alist-delete "python"
4788 (package-inputs python-dbus)
4789 equal?)))
4790 ;; FIXME: on Python 2, the test_utf8 fails with:
4791 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4792 (arguments `(#:tests? #f))))
4793
4794 (define-public python-lxml
4795 (package
4796 (name "python-lxml")
4797 (version "3.8.0")
4798 (source
4799 (origin
4800 (method url-fetch)
4801 (uri (pypi-uri "lxml" version))
4802 (sha256
4803 (base32
4804 "15nvf6n285n282682qyw3wihsncb0x5amdhyi4b83bfa2nz74vvk"))))
4805 (build-system python-build-system)
4806 (inputs
4807 `(("libxml2" ,libxml2)
4808 ("libxslt" ,libxslt)))
4809 (home-page "http://lxml.de/")
4810 (synopsis
4811 "Python XML processing library")
4812 (description
4813 "The lxml XML toolkit is a Pythonic binding for the C libraries
4814 libxml2 and libxslt.")
4815 (license license:bsd-3))) ; and a few more, see LICENSES.txt
4816
4817 (define-public python2-lxml
4818 (package-with-python2 python-lxml))
4819
4820 ;; beautifulsoup4 has a totally different namespace than 3.x,
4821 ;; and pypi seems to put it under its own name, so I guess we should too
4822 (define-public python-beautifulsoup4
4823 (package
4824 (name "python-beautifulsoup4")
4825 (version "4.5.3")
4826 (source
4827 (origin
4828 (method url-fetch)
4829 (uri (pypi-uri "beautifulsoup4" version))
4830 (sha256
4831 (base32
4832 "0glaw1vyxnbp03fni7h5496n6iib0n5iim4gax1n0ngscs9s075j"))))
4833 (build-system python-build-system)
4834 (arguments
4835 `(#:phases
4836 (modify-phases %standard-phases
4837 ;; The Python 2 source is the definitive source of beautifulsoup4. We
4838 ;; must use this conversion script when building with Python 3. The
4839 ;; conversion script also runs the tests.
4840 ;; For more information, see the file 'convert-py3k' in the source
4841 ;; distribution.
4842 (replace 'check
4843 (lambda _ (zero? (system* "./convert-py3k")))))))
4844 (home-page
4845 "https://www.crummy.com/software/BeautifulSoup/bs4/")
4846 (synopsis
4847 "Python screen-scraping library")
4848 (description
4849 "Beautiful Soup is a Python library designed for rapidly setting up
4850 screen-scraping projects. It offers Pythonic idioms for navigating,
4851 searching, and modifying a parse tree, providing a toolkit for
4852 dissecting a document and extracting what you need. It automatically
4853 converts incoming documents to Unicode and outgoing documents to UTF-8.")
4854 (license license:expat)
4855 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
4856
4857 (define-public python2-beautifulsoup4
4858 (package
4859 (inherit (package-with-python2
4860 (strip-python2-variant python-beautifulsoup4)))
4861 (arguments `(#:python ,python-2))))
4862
4863 (define-public python-netifaces
4864 (package
4865 (name "python-netifaces")
4866 (version "0.10.6")
4867 (source
4868 (origin
4869 (method url-fetch)
4870 (uri (pypi-uri "netifaces" version))
4871 (sha256
4872 (base32
4873 "1q7bi5k2r955rlcpspx4salvkkpk28jky67fjbpz2dkdycisak8c"))))
4874 (build-system python-build-system)
4875 (home-page "https://github.com/al45tair/netifaces")
4876 (synopsis
4877 "Python module for portable network interface information")
4878 (description
4879 "Netifaces is a Python module providing information on network
4880 interfaces in an easy and portable manner.")
4881 (license license:expat)))
4882
4883 (define-public python2-netifaces
4884 (package-with-python2 python-netifaces))
4885
4886 (define-public python-networkx
4887 (package
4888 (name "python-networkx")
4889 (version "2.1")
4890 (source
4891 (origin
4892 (method url-fetch)
4893 (uri (pypi-uri "networkx" version ".zip"))
4894 (sha256
4895 (base32 "1ccb8mfz4m821k9y0cigkbq42q2sbb4dj5fbjshp0awp32j2q9v4"))))
4896 (build-system python-build-system)
4897 ;; python-decorator is needed at runtime
4898 (propagated-inputs
4899 `(("python-decorator" ,python-decorator)))
4900 (native-inputs
4901 `(("python-nose" ,python-nose)
4902 ("unzip" ,unzip)))
4903 (home-page "http://networkx.github.io/")
4904 (synopsis "Python module for creating and manipulating graphs and networks")
4905 (description
4906 "NetworkX is a Python package for the creation, manipulation, and study
4907 of the structure, dynamics, and functions of complex networks.")
4908 (license license:bsd-3)))
4909
4910 (define-public python2-networkx
4911 (package-with-python2 python-networkx))
4912
4913 ;; Define new package, because the current version of python-colormath does
4914 ;; not build against 2.0.
4915 (define-public python-networkx2
4916 (package (inherit python-networkx)
4917 (name "python-networkx2")
4918 (version "2.0")
4919 (source
4920 (origin
4921 (method url-fetch)
4922 (uri (pypi-uri "networkx" version ".zip"))
4923 (sha256
4924 (base32
4925 "1ajl2jp8qry9nyjzzkqpy0vmsr14d23z1qk7y0vr5iwjbpvzhpyd"))
4926 (patches
4927 (search-patches "python-networkx2-reproducible-build.patch"))))))
4928
4929 (define-public python2-networkx2
4930 (package-with-python2 python-networkx2))
4931
4932 (define-public snakemake
4933 (package
4934 (name "snakemake")
4935 (version "4.4.0")
4936 (source
4937 (origin
4938 (method url-fetch)
4939 (uri (pypi-uri "snakemake" version))
4940 (sha256
4941 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
4942 (build-system python-build-system)
4943 (arguments
4944 ;; TODO: Package missing test dependencies.
4945 '(#:tests? #f
4946 #:phases
4947 (modify-phases %standard-phases
4948 ;; For cluster execution Snakemake will call Python. Since there is
4949 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
4950 ;; this by calling the snakemake wrapper instead.
4951 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
4952 (lambda* (#:key outputs #:allow-other-keys)
4953 (substitute* "snakemake/executors.py"
4954 (("\\{sys.executable\\} -m snakemake")
4955 (string-append (assoc-ref outputs "out")
4956 "/bin/snakemake")))
4957 #t)))))
4958 (propagated-inputs
4959 `(("python-wrapt" ,python-wrapt)
4960 ("python-requests" ,python-requests)
4961 ("python-appdirs" ,python-appdirs)
4962 ("python-configargparse" ,python-configargparse)
4963 ("python-pyyaml" ,python-pyyaml)
4964 ("python-ratelimiter" ,python-ratelimiter)))
4965 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
4966 (synopsis "Python-based execution environment for make-like workflows")
4967 (description
4968 "Snakemake aims to reduce the complexity of creating workflows by
4969 providing a clean and modern domain specific specification language (DSL) in
4970 Python style, together with a fast and comfortable execution environment.")
4971 (license license:expat)))
4972
4973 (define-public python-pyqrcode
4974 (package
4975 (name "python-pyqrcode")
4976 (version "1.2.1")
4977 (source
4978 (origin
4979 (method url-fetch)
4980 (uri (pypi-uri "PyQRCode" version))
4981 (sha256
4982 (base32
4983 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
4984 (build-system python-build-system)
4985 (home-page
4986 "https://github.com/mnooner256/pyqrcode")
4987 (synopsis "QR code generator")
4988 (description
4989 "Pyqrcode is a QR code generator written purely in Python with
4990 SVG, EPS, PNG and terminal output.")
4991 (license license:bsd-3)))
4992
4993 (define-public python-seaborn
4994 (package
4995 (name "python-seaborn")
4996 (version "0.7.1")
4997 (source
4998 (origin
4999 (method url-fetch)
5000 (uri (pypi-uri "seaborn" version))
5001 (sha256
5002 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
5003 (build-system python-build-system)
5004 (arguments
5005 '(#:tests? #f)) ; Tests requires a running X11 server.
5006 (propagated-inputs
5007 `(("python-pandas" ,python-pandas)
5008 ("python-matplotlib" ,python-matplotlib)
5009 ("python-scipy" ,python-scipy)))
5010 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5011 (synopsis "Statistical data visualization")
5012 (description
5013 "Seaborn is a library for making attractive and informative statistical
5014 graphics in Python. It is built on top of matplotlib and tightly integrated
5015 with the PyData stack, including support for numpy and pandas data structures
5016 and statistical routines from scipy and statsmodels.")
5017 (license license:bsd-3)
5018 (properties `((python2-variant . ,(delay python2-seaborn))))))
5019
5020 (define-public python2-seaborn
5021 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5022 (package
5023 (inherit base)
5024 (propagated-inputs `(("python2-pytz" ,python2-pytz)
5025 ,@(package-propagated-inputs base))))))
5026
5027 (define-public python-mpmath
5028 (package
5029 (name "python-mpmath")
5030 (version "0.19")
5031 (source (origin
5032 (method url-fetch)
5033 (uri (string-append "http://mpmath.org/files/mpmath-"
5034 version ".tar.gz"))
5035 (sha256
5036 (base32
5037 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5038 (build-system python-build-system)
5039 (arguments
5040 '(#:phases
5041 (modify-phases %standard-phases
5042 (replace 'check
5043 (lambda _
5044 (zero?
5045 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
5046 (home-page "http://mpmath.org")
5047 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5048 (description
5049 "@code{mpmath} can be used as an arbitrary-precision substitute for
5050 Python's float/complex types and math/cmath modules, but also does much
5051 more advanced mathematics.")
5052 (license license:bsd-3)))
5053
5054 (define-public python2-mpmath
5055 (package-with-python2 python-mpmath))
5056
5057 (define-public python-sympy
5058 (package
5059 (name "python-sympy")
5060 (version "1.1.1")
5061 (source
5062 (origin
5063 (method url-fetch)
5064 (uri (string-append
5065 "https://github.com/sympy/sympy/releases/download/sympy-"
5066 version "/sympy-" version ".tar.gz"))
5067 (sha256
5068 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
5069 (build-system python-build-system)
5070 (arguments
5071 `(#:phases
5072 (modify-phases %standard-phases
5073 ;; Run the core tests after installation. By default it would run
5074 ;; *all* tests, which take a very long time to complete and are known
5075 ;; to be flaky.
5076 (delete 'check)
5077 (add-after 'install 'check
5078 (lambda* (#:key outputs #:allow-other-keys)
5079 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
5080 #t)))))
5081 (propagated-inputs
5082 `(("python-mpmath" ,python-mpmath)))
5083 (home-page "http://www.sympy.org/")
5084 (synopsis "Python library for symbolic mathematics")
5085 (description
5086 "SymPy is a Python library for symbolic mathematics. It aims to become a
5087 full-featured computer algebra system (CAS) while keeping the code as simple
5088 as possible in order to be comprehensible and easily extensible.")
5089 (license license:bsd-3)))
5090
5091 (define-public python2-sympy
5092 (package
5093 (inherit (package-with-python2 python-sympy))
5094 (arguments
5095 `(#:phases
5096 (modify-phases %standard-phases
5097 ;; Run the core tests after installation. By default it would run
5098 ;; *all* tests, which take a very long time to complete and are known
5099 ;; to be flaky.
5100 (delete 'check)
5101 (add-after 'install 'check
5102 (lambda* (#:key outputs #:allow-other-keys)
5103 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
5104 #t)))))))
5105
5106 (define-public python-q
5107 (package
5108 (name "python-q")
5109 (version "2.6")
5110 (source
5111 (origin
5112 (method url-fetch)
5113 (uri (pypi-uri "q" version))
5114 (sha256
5115 (base32
5116 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5117 (build-system python-build-system)
5118 (home-page "https://github.com/zestyping/q")
5119 (synopsis "Quick-and-dirty debugging output for tired programmers")
5120 (description
5121 "q is a Python module for \"print\" style of debugging Python code. It
5122 provides convenient short API for print out of values, tracebacks, and
5123 falling into the Python interpreter.")
5124 (license license:asl2.0)))
5125
5126 (define-public python2-q
5127 (package-with-python2 python-q))
5128
5129 (define-public python2-xlib
5130 (package
5131 (name "python2-xlib")
5132 (version "0.14")
5133 (source (origin
5134 (method url-fetch)
5135 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5136 "/" version "/"
5137 "python-xlib-" version ".tar.gz"))
5138 (sha256
5139 (base32
5140 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5141 (build-system python-build-system)
5142 (arguments
5143 `(#:python ,python-2 ;Python 2 only
5144 #:tests? #f)) ;no tests
5145 (home-page "http://python-xlib.sourceforge.net/")
5146 (synopsis "Python X11 client library")
5147 (description
5148 "The Python X Library is intended to be a fully functional X client
5149 library for Python programs. It is useful to implement low-level X clients.
5150 It is written entirely in Python.")
5151 (license license:gpl2+)))
5152
5153 (define-public python-singledispatch
5154 (package
5155 (name "python-singledispatch")
5156 (version "3.4.0.3")
5157 (source
5158 (origin
5159 (method url-fetch)
5160 (uri (pypi-uri "singledispatch" version))
5161 (sha256
5162 (base32
5163 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5164 (build-system python-build-system)
5165 (native-inputs
5166 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5167 (home-page
5168 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5169 (synopsis "Backport of singledispatch feature from Python 3.4")
5170 (description
5171 "This library brings functools.singledispatch from Python 3.4 to Python
5172 2.6-3.3.")
5173 (license license:expat)))
5174
5175 (define-public python2-singledispatch
5176 (package-with-python2 python-singledispatch))
5177
5178 ;; the python- version can be removed with python-3.5
5179 (define-public python-backports-abc
5180 (package
5181 (name "python-backports-abc")
5182 (version "0.5")
5183 (source
5184 (origin
5185 (method url-fetch)
5186 (uri (pypi-uri "backports_abc" version))
5187 (sha256
5188 (base32
5189 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5190 (build-system python-build-system)
5191 (home-page "https://github.com/cython/backports_abc")
5192 (synopsis "Backport of additions to the 'collections.abc' module")
5193 (description
5194 "Python-backports-abc provides a backport of additions to the
5195 'collections.abc' module in Python-3.5.")
5196 (license license:psfl)))
5197
5198 (define-public python2-backports-abc
5199 (package-with-python2 python-backports-abc))
5200
5201 (define-public python-backports-csv
5202 (package
5203 (name "python-backports-csv")
5204 (version "1.0.5")
5205 (source
5206 (origin
5207 (method url-fetch)
5208 (uri (pypi-uri "backports.csv" version))
5209 (sha256
5210 (base32
5211 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
5212 (build-system python-build-system)
5213 (home-page "https://github.com/ryanhiebert/backports.csv")
5214 (synopsis "Backport of Python 3's csv module for Python 2")
5215 (description
5216 "Provides a backport of Python 3's @code{csv} module for parsing
5217 comma separated values. The API of the @code{csv} module in Python 2
5218 is drastically different from the @code{csv} module in Python 3.
5219 This is due, for the most part, to the difference between str in
5220 Python 2 and Python 3.")
5221 (license license:psfl)))
5222
5223 (define-public python2-backports-csv
5224 (package-with-python2 python-backports-csv))
5225
5226 (define-public python2-backports-shutil-get-terminal-size
5227 (package
5228 (name "python2-backports-shutil-get-terminal-size")
5229 (version "1.0.0")
5230 (source
5231 (origin
5232 (method url-fetch)
5233 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
5234 (sha256
5235 (base32
5236 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
5237 (build-system python-build-system)
5238 (arguments
5239 `(#:python ,python-2
5240 #:phases
5241 (modify-phases %standard-phases
5242 (replace 'check
5243 (lambda _
5244 (zero? (system* "py.test" "-v")))))))
5245 (native-inputs
5246 `(("python2-pytest" ,python2-pytest)))
5247 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
5248 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
5249 (description
5250 "This package provides a backport of the @code{get_terminal_size
5251 function} from Python 3.3's @code{shutil}.
5252 Unlike the original version it is written in pure Python rather than C,
5253 so it might be a tiny bit slower.")
5254 (license license:expat)))
5255
5256 (define-public python-waf
5257 (package
5258 (name "python-waf")
5259 (version "1.9.8")
5260 (source (origin
5261 (method url-fetch)
5262 (uri (string-append "https://waf.io/"
5263 "waf-" version ".tar.bz2"))
5264 (sha256
5265 (base32
5266 "0wl4cnmp06lfxqjxaan58bqxn27smhydz0sg5prrfbl3bsw4gv6q"))))
5267 (build-system python-build-system)
5268 (arguments
5269 '(#:phases
5270 (modify-phases %standard-phases
5271 (replace 'build
5272 (lambda _
5273 (zero? (system* "python" "waf-light" "configure" "build"))))
5274 (replace 'check
5275 (lambda _
5276 (zero? (system* "python" "waf" "--version"))))
5277 (replace 'install
5278 (lambda _
5279 (copy-file "waf" %output))))))
5280 (home-page "https://waf.io/")
5281 (synopsis "Python-based build system")
5282 (description
5283 "Waf is a Python-based framework for configuring, compiling and installing
5284 applications.")
5285 (license license:bsd-3)))
5286
5287 (define-public python2-waf
5288 (package-with-python2 python-waf))
5289
5290 (define-public python-pyzmq
5291 (package
5292 (name "python-pyzmq")
5293 (version "15.1.0")
5294 (source
5295 (origin
5296 (method url-fetch)
5297 (uri (pypi-uri "pyzmq" version))
5298 (sha256
5299 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
5300 (build-system python-build-system)
5301 (arguments
5302 `(#:configure-flags
5303 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5304 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5305 ;; --inplace' for 'python setup.py test' to work.
5306 #:tests? #f))
5307 (inputs
5308 `(("zeromq" ,zeromq)))
5309 (native-inputs
5310 `(("pkg-config" ,pkg-config)
5311 ("python-nose" ,python-nose)))
5312 (home-page "https://github.com/zeromq/pyzmq")
5313 (synopsis "Python bindings for 0MQ")
5314 (description
5315 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5316 (license license:bsd-4)))
5317
5318 (define-public python2-pyzmq
5319 (package-with-python2 python-pyzmq))
5320
5321 (define-public python-pep8
5322 (package
5323 (name "python-pep8")
5324 (version "1.7.0")
5325 (source
5326 (origin
5327 (method url-fetch)
5328 (uri (pypi-uri "pep8" version))
5329 (sha256
5330 (base32
5331 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5332 (build-system python-build-system)
5333 (home-page "http://pep8.readthedocs.org/")
5334 (synopsis "Python style guide checker")
5335 (description
5336 "This tools checks Python code against some of the style conventions in
5337 PEP 8.")
5338 (license license:expat)))
5339
5340 (define-public python2-pep8
5341 (package-with-python2 python-pep8))
5342
5343 (define-public python-pyflakes
5344 (package
5345 (name "python-pyflakes")
5346 (version "1.5.0")
5347 (source
5348 (origin
5349 (method url-fetch)
5350 (uri (pypi-uri "pyflakes" version))
5351 (sha256
5352 (base32
5353 "1x1pcca4a24k4pw8x1c77sgi58cg1wl2k38mp8a25k608pzls3da"))))
5354 (build-system python-build-system)
5355 (home-page
5356 "https://github.com/pyflakes/pyflakes")
5357 (synopsis "Passive checker of Python programs")
5358 (description
5359 "Pyflakes statically checks Python source code for common errors.")
5360 (license license:expat)))
5361
5362 (define-public python2-pyflakes
5363 (package-with-python2 python-pyflakes))
5364
5365 (define-public python-mccabe
5366 (package
5367 (name "python-mccabe")
5368 (version "0.6.1")
5369 (source
5370 (origin
5371 (method url-fetch)
5372 (uri (pypi-uri "mccabe" version))
5373 (sha256
5374 (base32
5375 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
5376 (build-system python-build-system)
5377 (native-inputs
5378 `(("python-pytest" ,python-pytest-bootstrap)
5379 ("python-pytest-runner" ,python-pytest-runner)))
5380 (home-page "https://github.com/flintwork/mccabe")
5381 (synopsis "McCabe checker, plugin for flake8")
5382 (description
5383 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5384 complexity of Python source code.")
5385 (license license:expat)))
5386
5387 (define-public python2-mccabe
5388 (package-with-python2 python-mccabe))
5389
5390 (define-public python-mccabe-0.2.1
5391 (package (inherit python-mccabe)
5392 (version "0.2.1")
5393 (source
5394 (origin
5395 (method url-fetch)
5396 (uri (pypi-uri "mccabe" version))
5397 (sha256
5398 (base32
5399 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5400
5401 (define-public python2-mccabe-0.2.1
5402 (package-with-python2 python-mccabe-0.2.1))
5403
5404 ;; Flake8 2.4.1 requires an older version of pep8.
5405 ;; This should be removed ASAP.
5406 (define-public python-pep8-1.5.7
5407 (package (inherit python-pep8)
5408 (version "1.5.7")
5409 (source
5410 (origin
5411 (method url-fetch)
5412 (uri (string-append
5413 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5414 version
5415 ".tar.gz"))
5416 (sha256
5417 (base32
5418 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
5419 (arguments
5420 ;; XXX Tests not compatible with Python 3.5.
5421 '(#:tests? #f))))
5422
5423 (define-public python2-pep8-1.5.7
5424 (package-with-python2 python-pep8-1.5.7))
5425
5426 ;; Flake8 2.4.1 requires an older version of pyflakes.
5427 ;; This should be removed ASAP.
5428 (define-public python-pyflakes-0.8.1
5429 (package (inherit python-pyflakes)
5430 (version "0.8.1")
5431 (source
5432 (origin
5433 (method url-fetch)
5434 (uri (string-append
5435 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5436 version
5437 ".tar.gz"))
5438 (sha256
5439 (base32
5440 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
5441 (arguments
5442 ;; XXX Tests not compatible with Python 3.5.
5443 '(#:tests? #f))))
5444
5445 (define-public python2-pyflakes-0.8.1
5446 (package-with-python2 python-pyflakes-0.8.1))
5447
5448 (define-public python-flake8
5449 (package
5450 (name "python-flake8")
5451 (version "3.4.1")
5452 (source
5453 (origin
5454 (method url-fetch)
5455 (uri (pypi-uri "flake8" version))
5456 (sha256
5457 (base32
5458 "1n0i38592vy3q0x2a9bf8z6rhhn04i30wsn5i5zzcj7qkxvl8062"))))
5459 (build-system python-build-system)
5460 (arguments
5461 `(#:phases
5462 (modify-phases %standard-phases
5463 (delete 'check)
5464 (add-after 'install 'check
5465 (lambda* (#:key inputs outputs #:allow-other-keys)
5466 (add-installed-pythonpath inputs outputs)
5467 (zero? (system* "pytest" "-v")))))))
5468 (propagated-inputs
5469 `(("python-pycodestyle" ,python-pycodestyle)
5470 ("python-pyflakes" ,python-pyflakes)
5471 ;; flake8 depends on a newer setuptools than provided by python.
5472 ("python-setuptools" ,python-setuptools)
5473 ("python-mccabe" ,python-mccabe)))
5474 (native-inputs
5475 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
5476 ("python-pytest" ,python-pytest-bootstrap)
5477 ("python-pytest-runner" ,python-pytest-runner)))
5478 (home-page "https://gitlab.com/pycqa/flake8")
5479 (synopsis
5480 "The modular source code checker: pep8, pyflakes and co")
5481 (description
5482 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5483 (properties `((python2-variant . ,(delay python2-flake8))))
5484 (license license:expat)))
5485
5486 (define-public python2-flake8
5487 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
5488 (package (inherit base)
5489 (propagated-inputs
5490 `(("python2-configparser" ,python2-configparser)
5491 ("python2-enum34" ,python2-enum34)
5492 ,@(package-propagated-inputs base))))))
5493
5494 ;; python-hacking requires flake8 <2.6.0.
5495 (define-public python-flake8-2.5
5496 (package
5497 (inherit python-flake8)
5498 (version "2.5.5")
5499 (source (origin
5500 (method url-fetch)
5501 (uri (pypi-uri "flake8" version))
5502 (sha256
5503 (base32
5504 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
5505 (propagated-inputs
5506 `(("python-pep8" ,python-pep8)
5507 ,@(package-propagated-inputs python-flake8)))
5508 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
5509
5510 (define-public python2-flake8-2.5
5511 (package
5512 (inherit python2-flake8)
5513 (version (package-version python-flake8-2.5))
5514 (source (origin
5515 (inherit (package-source python-flake8-2.5))))
5516 (propagated-inputs
5517 `(("python2-pep8" ,python2-pep8)
5518 ,@(package-propagated-inputs python2-flake8)))))
5519
5520 (define-public python-flake8-polyfill
5521 (package
5522 (name "python-flake8-polyfill")
5523 (version "1.0.2")
5524 (source
5525 (origin
5526 (method url-fetch)
5527 (uri (pypi-uri "flake8-polyfill" version))
5528 (sha256
5529 (base32
5530 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
5531 (build-system python-build-system)
5532 (arguments
5533 '(#:phases
5534 (modify-phases %standard-phases
5535 (replace 'check
5536 (lambda _
5537 (setenv "PYTHONPATH"
5538 (string-append (getcwd) "/build/lib:"
5539 (getenv "PYTHONPATH")))
5540 (zero? (system* "py.test" "-v")))))))
5541 (native-inputs
5542 `(("python-flake8" ,python-flake8)
5543 ("python-mock" ,python-mock)
5544 ("python-pep8" ,python-pep8)
5545 ("python-pycodestyle" ,python-pycodestyle)
5546 ("python-pytest" ,python-pytest)))
5547 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
5548 (synopsis "Polyfill package for Flake8 plugins")
5549 (description
5550 "This package that provides some compatibility helpers for Flake8
5551 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
5552 (license license:expat)))
5553
5554 (define-public python2-flake8-polyfill
5555 (package-with-python2 python-flake8-polyfill))
5556
5557 (define-public python-mistune
5558 (package
5559 (name "python-mistune")
5560 (version "0.8.3")
5561 (source
5562 (origin
5563 (method url-fetch)
5564 (uri (pypi-uri "mistune" version))
5565 (sha256
5566 (base32
5567 "06b662p6kf46wh2jsabaqhaq4bz1srh2zxkrnx4yg96azlxw645w"))))
5568 (build-system python-build-system)
5569 (native-inputs
5570 `(("python-nose" ,python-nose)
5571 ("python-cython" ,python-cython)))
5572 (home-page "https://github.com/lepture/mistune")
5573 (synopsis "Markdown parser in pure Python")
5574 (description "This package provides a fast markdown parser in pure
5575 Python.")
5576 (license license:bsd-3)))
5577
5578 (define-public python2-mistune
5579 (package-with-python2 python-mistune))
5580
5581 (define-public python-markdown
5582 (package
5583 (name "python-markdown")
5584 (version "2.6.11")
5585 (source
5586 (origin
5587 (method url-fetch)
5588 (uri (pypi-uri "Markdown" version))
5589 (sha256
5590 (base32
5591 "108g80ryzykh8bj0i7jfp71510wrcixdi771lf2asyghgyf8cmm8"))))
5592 (build-system python-build-system)
5593 (arguments
5594 `(#:phases
5595 (modify-phases %standard-phases
5596 (replace 'check
5597 (lambda _
5598 (zero? (system* "python" "run-tests.py")))))))
5599 (native-inputs
5600 `(("python-nose" ,python-nose)
5601 ("python-pyyaml" ,python-pyyaml)))
5602 (home-page "https://pythonhosted.org/Markdown/")
5603 (synopsis "Python implementation of Markdown")
5604 (description
5605 "This package provides a Python implementation of John Gruber's
5606 Markdown. The library features international input, various Markdown
5607 extensions, and several HTML output formats. A command line wrapper
5608 markdown_py is also provided to convert Markdown files to HTML.")
5609 (license license:bsd-3)))
5610
5611 (define-public python2-markdown
5612 (package-with-python2 python-markdown))
5613
5614 (define-public python-ptyprocess
5615 (package
5616 (name "python-ptyprocess")
5617 (version "0.5.2")
5618 (source
5619 (origin
5620 (method url-fetch)
5621 (uri (string-append
5622 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5623 version ".tar.gz"))
5624 (sha256
5625 (base32
5626 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
5627 (build-system python-build-system)
5628 (native-inputs
5629 `(("python-nose" ,python-nose)))
5630 (arguments
5631 `(#:phases
5632 (modify-phases %standard-phases
5633 (replace 'check
5634 (lambda _
5635 (zero? (system* "nosetests")))))))
5636 (home-page "https://github.com/pexpect/ptyprocess")
5637 (synopsis "Run a subprocess in a pseudo terminal")
5638 (description
5639 "This package provides a Python library used to launch a subprocess in a
5640 pseudo terminal (pty), and interact with both the process and its pty.")
5641 (license license:isc)))
5642
5643 (define-public python2-ptyprocess
5644 (package-with-python2 python-ptyprocess))
5645
5646 (define-public python-cram
5647 (package
5648 (name "python-cram")
5649 (version "0.7")
5650 (home-page "https://bitheap.org/cram/")
5651 (source (origin
5652 (method url-fetch)
5653 (uri (list (string-append home-page "cram-"
5654 version ".tar.gz")
5655 (pypi-uri "cram" version)))
5656 (sha256
5657 (base32
5658 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
5659 (arguments
5660 '(#:phases
5661 (modify-phases %standard-phases
5662 (add-after 'unpack 'patch-source
5663 (lambda _
5664 (substitute* (find-files "cram" ".*\\.py$")
5665 ;; Replace default shell path.
5666 (("/bin/sh") (which "sh")))
5667 (substitute* (find-files "tests" ".*\\.t$")
5668 (("md5") "md5sum")
5669 (("/bin/bash") (which "bash"))
5670 (("/bin/sh") (which "sh")))
5671 (substitute* "cram/_test.py"
5672 ;; This hack works around a bug triggered by substituting
5673 ;; the /bin/sh paths. "tests/usage.t" compares the output of
5674 ;; "cram -h", which breaks the output at 80 characters. This
5675 ;; causes the line showing the default shell to break into two
5676 ;; lines, but the test expects a single line...
5677 (("env\\['COLUMNS'\\] = '80'")
5678 "env['COLUMNS'] = '160'"))
5679 #t))
5680 (delete 'check)
5681 (add-after 'install 'check
5682 ;; The test phase uses the built library and executable.
5683 ;; It's easier to run it after install since the build
5684 ;; directory contains version-specific PATH.
5685 (lambda* (#:key inputs outputs #:allow-other-keys)
5686 (add-installed-pythonpath inputs outputs)
5687 (setenv "PATH" (string-append (getenv "PATH") ":"
5688 (assoc-ref outputs "out") "/bin"))
5689 (zero? (system* "make" "test")))))))
5690 (build-system python-build-system)
5691 (native-inputs
5692 `(("python-coverage" ,python-coverage)
5693 ("which" ,which)))
5694 (synopsis "Simple testing framework for command line applications")
5695 (description
5696 "Cram is a functional testing framework for command line applications.
5697 Cram tests look like snippets of interactive shell sessions. Cram runs each
5698 command and compares the command output in the test with the command’s actual
5699 output.")
5700 (license license:gpl2+)))
5701
5702 (define-public python2-cram
5703 (package-with-python2 python-cram))
5704
5705 (define-public python-straight-plugin
5706 (package
5707 (name "python-straight-plugin")
5708 (version "1.4.1")
5709 (source
5710 (origin
5711 (method url-fetch)
5712 (uri (pypi-uri "straight.plugin" version))
5713 (sha256
5714 (base32
5715 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
5716 (build-system python-build-system)
5717 (home-page "https://github.com/ironfroggy/straight.plugin")
5718 (synopsis "Simple namespaced plugin facility")
5719 (description "Straight Plugin provides a type of plugin you can create from
5720 almost any existing Python modules, and an easy way for outside developers to
5721 add functionality and customization to your projects with their own plugins.")
5722 (license license:expat)))
5723
5724 (define-public python2-straight-plugin
5725 (package-with-python2 python-straight-plugin))
5726
5727 (define-public python-fonttools
5728 (package
5729 (name "python-fonttools")
5730 (version "3.15.1")
5731 (source (origin
5732 (method url-fetch)
5733 (uri (pypi-uri "fonttools" version ".zip"))
5734 (sha256
5735 (base32
5736 "1hhj97izwliy0vybmza72d90l5d4mcn50y8akq7kyccfl82vdx4d"))))
5737 (build-system python-build-system)
5738 (arguments
5739 '(#:test-target "check"
5740 #:phases
5741 (modify-phases %standard-phases
5742 (add-after 'unpack 'patch-setuppy
5743 ;; Remove the undocumented "extra_path" argument, which adds an
5744 ;; intervening directories between site-packages and the package
5745 ;; directory.
5746 (lambda _
5747 (substitute* "setup.py"
5748 (("^[ \t]*extra_path *= *'FontTools',") ""))
5749 #t)))))
5750 (native-inputs
5751 `(("unzip" ,unzip)))
5752 (home-page "https://github.com/behdad/fonttools")
5753 (synopsis "Tools to manipulate font files")
5754 (description
5755 "FontTools/TTX is a library to manipulate font files from Python. It
5756 supports reading and writing of TrueType/OpenType fonts, reading and writing
5757 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5758 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5759 from an XML-based format.")
5760 (license (license:non-copyleft
5761 "file://LICENSE.txt"
5762 "See LICENSE.txt in the distribution."))))
5763
5764 (define-public python2-fonttools
5765 (package-with-python2 python-fonttools))
5766
5767 (define-public python-ly
5768 (package
5769 (name "python-ly")
5770 (version "0.9.5")
5771 (source
5772 (origin
5773 (method url-fetch)
5774 (uri (string-append "https://pypi.python.org/packages/57/4f/"
5775 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
5776 "/python-ly-" version ".tar.gz"))
5777 (sha256
5778 (base32
5779 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
5780 (build-system python-build-system)
5781 (arguments
5782 ;; FIXME: Some tests need network access.
5783 '(#:tests? #f))
5784 (synopsis "Tool and library for manipulating LilyPond files")
5785 (description "This package provides a Python library to parse, manipulate
5786 or create documents in LilyPond format. A command line program ly is also
5787 provided that can be used to do various manipulations with LilyPond files.")
5788 (home-page "https://pypi.python.org/pypi/python-ly")
5789 (license license:gpl2+)))
5790
5791 (define-public python-appdirs
5792 (package
5793 (name "python-appdirs")
5794 (version "1.4.3")
5795 (source
5796 (origin
5797 (method url-fetch)
5798 (uri (pypi-uri "appdirs" version))
5799 (sha256
5800 (base32
5801 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
5802 (build-system python-build-system)
5803 (home-page "https://github.com/ActiveState/appdirs")
5804 (synopsis
5805 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5806 (description
5807 "This module provides a portable way of finding out where user data
5808 should be stored on various operating systems.")
5809 (license license:expat)))
5810
5811 (define-public python2-appdirs
5812 (package-with-python2 python-appdirs))
5813
5814 (define-public python-llfuse
5815 (package
5816 (name "python-llfuse")
5817 (version "1.3.2")
5818 (source (origin
5819 (method url-fetch)
5820 (uri (pypi-uri "llfuse" version ".tar.bz2"))
5821 (sha256
5822 (base32
5823 "0qxvnbz41bpvpc1vbi8qkhmpr9gj1qrrp5jdj085iqibd8l2l9cn"))))
5824 (build-system python-build-system)
5825 (inputs
5826 `(("fuse" ,fuse)
5827 ("attr" ,attr)))
5828 (native-inputs
5829 `(("pkg-config" ,pkg-config)))
5830 (synopsis "Python bindings for FUSE")
5831 (description
5832 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5833 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
5834 (license license:lgpl2.0+)
5835 (properties `((python2-variant . ,(delay python2-llfuse))))))
5836
5837 (define-public python2-llfuse
5838 (package (inherit (package-with-python2
5839 (strip-python2-variant python-llfuse)))
5840 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
5841
5842 ;; For attic-0.16
5843 (define-public python-llfuse-0.41
5844 (package (inherit python-llfuse)
5845 (version "0.41.1")
5846 (source (origin
5847 (method url-fetch)
5848 (uri (string-append
5849 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5850 "llfuse-" version ".tar.bz2"))
5851 (sha256
5852 (base32
5853 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
5854 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
5855 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
5856 (license (list license:expat license:lgpl2.0+))))
5857
5858 (define-public python-msgpack
5859 (package
5860 (name "python-msgpack")
5861 (version "0.5.6")
5862 (source (origin
5863 (method url-fetch)
5864 (uri (pypi-uri "msgpack" version))
5865 (sha256
5866 (base32
5867 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
5868 (build-system python-build-system)
5869 (arguments
5870 `(#:modules ((guix build utils)
5871 (guix build python-build-system)
5872 (ice-9 ftw)
5873 (srfi srfi-1)
5874 (srfi srfi-26))
5875 #:phases
5876 (modify-phases %standard-phases
5877 (replace 'check
5878 (lambda _
5879 (let ((cwd (getcwd)))
5880 (setenv "PYTHONPATH"
5881 (string-append cwd "/build/"
5882 (find (cut string-prefix? "lib" <>)
5883 (scandir (string-append cwd "/build")))
5884 ":"
5885 (getenv "PYTHONPATH")))
5886 (invoke "pytest" "-v" "test")))))))
5887 (native-inputs
5888 `(("python-pytest" ,python-pytest)))
5889 (synopsis "MessagePack (de)serializer")
5890 (description "MessagePack is a fast, compact binary serialization format,
5891 suitable for similar data to JSON. This package provides CPython bindings for
5892 reading and writing MessagePack data.")
5893 (home-page "https://pypi.python.org/pypi/msgpack/")
5894 (license license:asl2.0)))
5895
5896 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
5897 ;; release 0.5. Some packages like borg still call it by the old name for now.
5898 ;; <https://bugs.gnu.org/30662>
5899 (define-public python-msgpack-transitional
5900 (package
5901 (inherit python-msgpack)
5902 (name "python-msgpack-transitional")
5903 (arguments
5904 (substitute-keyword-arguments (package-arguments python-msgpack)
5905 ((#:phases phases)
5906 `(modify-phases ,phases
5907 (add-after 'unpack 'configure-transitional
5908 (lambda _
5909 ;; Keep using the old name.
5910 (substitute* "setup.py"
5911 (("TRANSITIONAL = False")
5912 "TRANSITIONAL = 1"))
5913 #t))))))))
5914
5915 (define-public python2-msgpack
5916 (package-with-python2 python-msgpack))
5917
5918 (define-public python-netaddr
5919 (package
5920 (name "python-netaddr")
5921 (version "0.7.19")
5922 (source
5923 (origin
5924 (method url-fetch)
5925 (uri (pypi-uri "netaddr" version))
5926 (sha256
5927 (base32
5928 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
5929 (build-system python-build-system)
5930 (arguments `(#:tests? #f)) ;; No tests.
5931 (home-page "https://github.com/drkjam/netaddr/")
5932 (synopsis "Pythonic manipulation of network addresses")
5933 (description
5934 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
5935 and MAC network addresses.")
5936 (license license:bsd-3)))
5937
5938 (define-public python2-netaddr
5939 (package-with-python2 python-netaddr))
5940
5941 (define-public python-wrapt
5942 (package
5943 (name "python-wrapt")
5944 (version "1.10.11")
5945 (source
5946 (origin
5947 (method url-fetch)
5948 (uri (pypi-uri "wrapt" version))
5949 (sha256
5950 (base32
5951 "1ip3dwib39xhp79kblskgvz3fjzcwxgx3fs3ahdixhpjg7a61mfl"))))
5952 (build-system python-build-system)
5953 (arguments
5954 ;; Tests are not included in the tarball, they are only available in the
5955 ;; git repository.
5956 `(#:tests? #f))
5957 (home-page "https://github.com/GrahamDumpleton/wrapt")
5958 (synopsis "Module for decorators, wrappers and monkey patching")
5959 (description
5960 "The aim of the wrapt module is to provide a transparent object proxy for
5961 Python, which can be used as the basis for the construction of function
5962 wrappers and decorator functions.")
5963 (license license:bsd-2)))
5964
5965 (define-public python2-wrapt
5966 (package-with-python2 python-wrapt))
5967
5968 (define-public python-xlrd
5969 (package
5970 (name "python-xlrd")
5971 (version "1.0.0")
5972 (source (origin
5973 (method url-fetch)
5974 (uri (pypi-uri "xlrd" version))
5975 (sha256
5976 (base32
5977 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
5978 (build-system python-build-system)
5979 (arguments
5980 `(#:phases
5981 (modify-phases %standard-phases
5982 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
5983 ;; run tests instead for now.
5984 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
5985 (native-inputs `(("python-nose" ,python-nose)))
5986 (home-page "http://www.python-excel.org/")
5987 (synopsis "Library for extracting data from Excel files")
5988 (description "This packages provides a library to extract data from
5989 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
5990 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
5991 Unicode-aware. It is not intended as an end-user tool.")
5992 (license license:bsd-3)))
5993
5994 (define-public python2-xlrd
5995 (package-with-python2 python-xlrd))
5996
5997 (define-public python-prettytable
5998 (package
5999 (name "python-prettytable")
6000 (version "0.7.2")
6001 (source
6002 (origin
6003 (method url-fetch)
6004 (uri (string-append
6005 "https://pypi.python.org/packages/source/P/PrettyTable/"
6006 "prettytable-" version ".tar.bz2"))
6007 (sha256
6008 (base32
6009 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6010 (build-system python-build-system)
6011 (home-page "http://code.google.com/p/prettytable/")
6012 (synopsis "Display tabular data in an ASCII table format")
6013 (description
6014 "A library designed to represent tabular data in visually appealing ASCII
6015 tables. PrettyTable allows for selection of which columns are to be printed,
6016 independent alignment of columns (left or right justified or centred) and
6017 printing of sub-tables by specifying a row range.")
6018 (license license:bsd-3)))
6019
6020 (define-public python2-prettytable
6021 (package-with-python2 python-prettytable))
6022
6023 (define-public python-tables
6024 (package
6025 (name "python-tables")
6026 (version "3.2.2")
6027 (source
6028 (origin
6029 (method url-fetch)
6030 (uri (pypi-uri "tables" version))
6031 (sha256
6032 (base32
6033 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
6034 (modules '((guix build utils)))
6035 (snippet
6036 '(begin
6037 ;; Remove pre-compiled .pyc files from source.
6038 (for-each delete-file-recursively
6039 (find-files "." "__pycache__" #:directories? #t))
6040 (for-each delete-file (find-files "." "\\.pyc$"))
6041 #t))))
6042 (build-system python-build-system)
6043 (arguments
6044 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6045 ;; or "check", so we must override the build and check phases.
6046 #:phases
6047 (modify-phases %standard-phases
6048 (add-after 'unpack 'use-gcc
6049 (lambda _
6050 (substitute* "setup.py"
6051 (("compiler = new_compiler\\(\\)" line)
6052 (string-append line
6053 "\ncompiler.set_executables(compiler='gcc',"
6054 "compiler_so='gcc',"
6055 "linker_exe='gcc',"
6056 "linker_so='gcc -shared')")))
6057 #t))
6058 (replace 'build
6059 (lambda* (#:key inputs #:allow-other-keys)
6060 (zero? (system* "python" "setup.py" "build"
6061 (string-append "--hdf5="
6062 (assoc-ref inputs "hdf5"))))))
6063 (replace 'check
6064 (lambda* (#:key inputs #:allow-other-keys)
6065 (zero? (system* "python" "setup.py" "check"
6066 (string-append "--hdf5="
6067 (assoc-ref inputs "hdf5")))))))))
6068 (propagated-inputs
6069 `(("python-numexpr" ,python-numexpr)
6070 ("python-numpy" ,python-numpy)))
6071 (native-inputs
6072 `(("python-cython" ,python-cython)
6073 ("pkg-config" ,pkg-config)))
6074 (inputs
6075 `(("hdf5" ,hdf5)
6076 ("bzip2" ,bzip2)
6077 ("zlib" ,zlib)))
6078 (home-page "http://www.pytables.org/")
6079 (synopsis "Hierarchical datasets for Python")
6080 (description "PyTables is a package for managing hierarchical datasets and
6081 designed to efficiently cope with extremely large amounts of data.")
6082 (license license:bsd-3)))
6083
6084 (define-public python2-tables
6085 (package-with-python2 python-tables))
6086
6087 (define-public python-pyasn1
6088 (package
6089 (name "python-pyasn1")
6090 (version "0.2.3")
6091 (source
6092 (origin
6093 (method url-fetch)
6094 (uri (pypi-uri "pyasn1" version))
6095 (sha256
6096 (base32
6097 "1b86yx23c1x74clai05a5ma8c8nfmhlx3j1mxq0ff657i2ylx33k"))))
6098 (build-system python-build-system)
6099 (home-page "http://pyasn1.sourceforge.net/")
6100 (synopsis "ASN.1 types and codecs")
6101 (description
6102 "This is an implementation of ASN.1 types and codecs in Python. It is
6103 suitable for a wide range of protocols based on the ASN.1 specification.")
6104 (license license:bsd-2)))
6105
6106 (define-public python2-pyasn1
6107 (package-with-python2 python-pyasn1))
6108
6109 (define-public python-pyasn1-modules
6110 (package
6111 (name "python-pyasn1-modules")
6112 (version "0.0.8")
6113 (source
6114 (origin
6115 (method url-fetch)
6116 (uri (pypi-uri "pyasn1-modules" version))
6117 (sha256
6118 (base32
6119 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6120 (build-system python-build-system)
6121 (propagated-inputs
6122 `(("python-pyasn1" ,python-pyasn1)))
6123 (home-page "https://sourceforge.net/projects/pyasn1/")
6124 (synopsis "ASN.1 codec implementations")
6125 (description
6126 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6127 implementations of ASN.1-based codecs and protocols.")
6128 (license license:bsd-3)))
6129
6130 (define-public python2-pyasn1-modules
6131 (package-with-python2 python-pyasn1-modules))
6132
6133 (define-public python-ipaddress
6134 (package
6135 (name "python-ipaddress")
6136 (version "1.0.19")
6137 (source (origin
6138 (method url-fetch)
6139 (uri (pypi-uri "ipaddress" version))
6140 (sha256
6141 (base32
6142 "10agaa1cys1bk1ycpl2w8lky9vjx8h1xh1z29mg0niqx0638c390"))))
6143 (build-system python-build-system)
6144 (home-page "https://github.com/phihag/ipaddress")
6145 (synopsis "IP address manipulation library")
6146 (description
6147 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6148 in Python. This library is used to create, poke at, and manipulate IPv4 and
6149 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6150 module to older versions of Python.")
6151 (license license:psfl)))
6152
6153 (define-public python2-ipaddress
6154 (package-with-python2 python-ipaddress))
6155
6156 (define-public python2-ipaddr
6157 (package
6158 (name "python2-ipaddr")
6159 (version "2.1.11")
6160 (source
6161 (origin
6162 (method url-fetch)
6163 (uri (pypi-uri "ipaddr" version))
6164 (sha256
6165 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6166 (build-system python-build-system)
6167 (arguments
6168 `(#:python ,python-2 ;version 2 only
6169 #:phases
6170 (modify-phases %standard-phases
6171 (replace 'check
6172 (lambda* _
6173 (zero? (system* "python" "ipaddr_test.py")))))))
6174 (home-page "https://github.com/google/ipaddr-py")
6175 (synopsis "IP address manipulation library")
6176 (description
6177 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6178 IPv6 addresses and networks.
6179
6180 For new implementations you may prefer to use the standard module
6181 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
6182 versions of Python.")
6183 (license license:asl2.0)))
6184
6185 (define-public python-idna
6186 (package
6187 (name "python-idna")
6188 (version "2.6")
6189 (source
6190 (origin
6191 (method url-fetch)
6192 (uri (pypi-uri "idna" version))
6193 (sha256
6194 (base32
6195 "13qaab6d0s15gknz8v3zbcfmbj6v86hn9pjxgkdf62ch13imssic"))))
6196 (build-system python-build-system)
6197 (home-page "https://github.com/kjd/idna")
6198 (synopsis "Internationalized domain names in applications")
6199 (description
6200 "This is a library to support the Internationalised Domain Names in
6201 Applications (IDNA) protocol as specified in RFC 5891. This version of the
6202 protocol is often referred to as “IDNA2008” and can produce different results
6203 from the earlier standard from 2003. The library is also intended to act as a
6204 suitable drop-in replacement for the “encodings.idna” module that comes with
6205 the Python standard library but currently only supports the older 2003
6206 specification.")
6207 (license license:bsd-4)))
6208
6209 (define-public python2-idna
6210 (package-with-python2 python-idna))
6211
6212 (define-public python-pretend
6213 (package
6214 (name "python-pretend")
6215 (version "1.0.8")
6216 (source
6217 (origin
6218 (method url-fetch)
6219 (uri (string-append "https://pypi.python.org/packages/source/p/"
6220 "pretend/pretend-" version ".tar.gz"))
6221 (sha256
6222 (base32
6223 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
6224 (build-system python-build-system)
6225 (home-page "https://github.com/alex/pretend")
6226 (synopsis "Library for stubbing in Python")
6227 (description
6228 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6229 technique for writing tests. You may hear the term mixed up with mocks,
6230 fakes, or doubles. Basically, a stub is an object that returns pre-canned
6231 responses, rather than doing any computation.")
6232 (license license:bsd-3)))
6233
6234 (define-public python2-pretend
6235 (package-with-python2 python-pretend))
6236
6237 (define-public python-pip
6238 (package
6239 (name "python-pip")
6240 (version "9.0.1")
6241 (source
6242 (origin
6243 (method url-fetch)
6244 (uri (pypi-uri "pip" version))
6245 (sha256
6246 (base32
6247 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
6248 (build-system python-build-system)
6249 (arguments
6250 '(#:tests? #f)) ; there are no tests in the pypi archive.
6251 (home-page "https://pip.pypa.io/")
6252 (synopsis "Package manager for Python software")
6253 (description
6254 "Pip is a package manager for Python software, that finds packages on the
6255 Python Package Index (PyPI).")
6256 (license license:expat)))
6257
6258 (define-public python2-pip
6259 (package-with-python2 python-pip))
6260
6261 (define-public python-tlsh
6262 (package
6263 (name "python-tlsh")
6264 (version "3.4.4")
6265 (home-page "https://github.com/trendmicro/tlsh")
6266 (source (origin
6267 (method url-fetch)
6268 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6269 version ".tar.gz"))
6270 (sha256
6271 (base32
6272 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6273 (file-name (string-append name "-" version ".tar.gz"))))
6274 (build-system cmake-build-system)
6275 (arguments
6276 '(#:out-of-source? #f
6277 #:phases (modify-phases %standard-phases
6278 (replace
6279 'install
6280 (lambda* (#:key outputs #:allow-other-keys)
6281 ;; Build and install the Python bindings. The underlying
6282 ;; C++ library is apparently not meant to be installed.
6283 (let ((out (assoc-ref outputs "out")))
6284 (with-directory-excursion "py_ext"
6285 (and (system* "python" "setup.py" "build")
6286 (system* "python" "setup.py" "install"
6287 (string-append "--prefix=" out))))))))))
6288 (inputs `(("python" ,python-wrapper))) ;for the bindings
6289 (synopsis "Fuzzy matching library for Python")
6290 (description
6291 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6292 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6293 value which can be used for similarity comparisons. Similar objects have
6294 similar hash values, which allows for the detection of similar objects by
6295 comparing their hash values. The byte stream should have a sufficient amount
6296 of complexity; for example, a byte stream of identical bytes will not generate
6297 a hash value.")
6298 (license license:asl2.0)))
6299
6300 (define-public python2-tlsh
6301 (package
6302 (inherit python-tlsh)
6303 (name "python2-tlsh")
6304 (inputs `(("python" ,python-2)))))
6305
6306 (define-public python-termcolor
6307 (package
6308 (name "python-termcolor")
6309 (version "1.1.0")
6310 (source
6311 (origin
6312 (method url-fetch)
6313 (uri (pypi-uri "termcolor" version))
6314 (sha256
6315 (base32
6316 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6317 (build-system python-build-system)
6318 (arguments
6319 ;; There are no tests.
6320 `(#:tests? #f))
6321 (home-page "https://pypi.python.org/pypi/termcolor")
6322 (synopsis "ANSII Color formatting for terminal output")
6323 (description
6324 "This package provides ANSII Color formatting for output in terminals.")
6325 (license license:expat)))
6326
6327 (define-public python2-termcolor
6328 (package-with-python2 python-termcolor))
6329
6330 (define-public python-libarchive-c
6331 (package
6332 (name "python-libarchive-c")
6333 (version "2.2")
6334 (source (origin
6335 (method url-fetch)
6336 (uri (pypi-uri "libarchive-c" version))
6337 (sha256
6338 (base32
6339 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
6340 (build-system python-build-system)
6341 (arguments
6342 '(#:phases (modify-phases %standard-phases
6343 (add-before
6344 'build 'reference-libarchive
6345 (lambda* (#:key inputs #:allow-other-keys)
6346 ;; Retain the absolute file name of libarchive.so.
6347 (let ((libarchive (assoc-ref inputs "libarchive")))
6348 (substitute* "libarchive/ffi.py"
6349 (("find_library\\('archive'\\)")
6350 (string-append "'" libarchive
6351 "/lib/libarchive.so'")))))))))
6352 (inputs
6353 `(("libarchive" ,libarchive)))
6354 (home-page "https://github.com/Changaco/python-libarchive-c")
6355 (synopsis "Python interface to libarchive")
6356 (description
6357 "This package provides Python bindings to libarchive, a C library to
6358 access possibly compressed archives in many different formats. It uses
6359 Python's @code{ctypes} foreign function interface (FFI).")
6360 (license license:lgpl2.0+)))
6361
6362 (define-public python2-libarchive-c
6363 (package-with-python2 python-libarchive-c))
6364
6365 (define-public python-file
6366 (package
6367 (inherit file)
6368 (name "python-file")
6369 (build-system python-build-system)
6370 (arguments
6371 '(#:tests? #f ;no tests
6372 #:configure-flags '("--single-version-externally-managed" "--root=/")
6373 #:phases (modify-phases %standard-phases
6374 (add-before 'build 'change-directory
6375 (lambda _
6376 (chdir "python")
6377 #t))
6378 (add-before 'build 'set-library-file-name
6379 (lambda* (#:key inputs #:allow-other-keys)
6380 (let ((file (assoc-ref inputs "file")))
6381 (substitute* "magic.py"
6382 (("find_library\\('magic'\\)")
6383 (string-append "'" file "/lib/libmagic.so'")))
6384 #t))))))
6385 (inputs `(("file" ,file)))
6386 (self-native-input? #f)
6387 (synopsis "Python bindings to the libmagic file type guesser. Note that
6388 this module and the python-magic module both provide a \"magic.py\" file;
6389 these two modules, which are different and were developed separately, both
6390 serve the same purpose: provide Python bindings for libmagic.")))
6391
6392 (define-public python2-file
6393 (package-with-python2 python-file))
6394
6395 (define-public python-debian
6396 (package
6397 (name "python-debian")
6398 (version "0.1.28")
6399 (source
6400 (origin
6401 (method url-fetch)
6402 (uri (pypi-uri name version))
6403 (sha256
6404 (base32
6405 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
6406 (build-system python-build-system)
6407 (propagated-inputs
6408 `(("python-six" ,python-six)))
6409 (home-page "http://packages.debian.org/sid/python-debian")
6410 (synopsis "Debian package related modules")
6411 (description
6412 ;; XXX: Use @enumerate instead of @itemize to work around
6413 ;; <http://bugs.gnu.org/21772>.
6414 "This package provides Python modules that abstract many formats of
6415 Debian-related files, such as:
6416
6417 @enumerate
6418 @item Debtags information;
6419 @item @file{debian/changelog} files;
6420 @item packages files, pdiffs;
6421 @item control files of single or multiple RFC822-style paragraphs---e.g.
6422 @file{debian/control}, @file{.changes}, @file{.dsc};
6423 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6424 contained files and meta-information.
6425 @end enumerate\n")
6426
6427 ;; Modules are either GPLv2+ or GPLv3+.
6428 (license license:gpl3+)))
6429
6430 (define-public python2-debian
6431 (package-with-python2 python-debian))
6432
6433 (define-public python-nbformat
6434 (package
6435 (name "python-nbformat")
6436 (version "4.4.0")
6437 (source
6438 (origin
6439 (method url-fetch)
6440 (uri (pypi-uri "nbformat" version))
6441 (sha256
6442 (base32
6443 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
6444 (build-system python-build-system)
6445 (arguments `(#:tests? #f)) ; no test target
6446 (propagated-inputs
6447 `(("python-ipython-genutils" ,python-ipython-genutils)
6448 ("python-jsonschema" ,python-jsonschema)
6449 ("python-jupyter-core" ,python-jupyter-core)
6450 ("python-traitlets" ,python-traitlets)))
6451 (home-page "http://jupyter.org")
6452 (synopsis "Jupyter Notebook format")
6453 (description "This package provides the reference implementation of the
6454 Jupyter Notebook format and Python APIs for working with notebooks.")
6455 (license license:bsd-3)))
6456
6457 (define-public python2-nbformat
6458 (package-with-python2 python-nbformat))
6459
6460 (define-public python-bleach
6461 (package
6462 (name "python-bleach")
6463 (version "1.4.3")
6464 (source
6465 (origin
6466 (method url-fetch)
6467 (uri (pypi-uri "bleach" version))
6468 (sha256
6469 (base32
6470 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6471 (build-system python-build-system)
6472 (propagated-inputs
6473 `(("python-html5lib" ,python-html5lib-0.9)
6474 ("python-six" ,python-six)))
6475 (native-inputs
6476 `(("python-nose" ,python-nose)))
6477 (home-page "https://github.com/jsocol/bleach")
6478 (synopsis "Whitelist-based HTML-sanitizing tool")
6479 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6480 (license license:asl2.0)))
6481
6482 (define-public python2-bleach
6483 (package-with-python2 python-bleach))
6484
6485 (define-public python-entrypoints
6486 (package
6487 (name "python-entrypoints")
6488 (version "0.2.3")
6489 (source
6490 (origin
6491 (method url-fetch)
6492 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
6493 version ".tar.gz"))
6494 (file-name (string-append name "-" version ".tar.gz"))
6495 (sha256
6496 (base32
6497 "1pdvgfr5bxyvnfvxbsd3zi0dh3il71pc4k6rinx6zpps91b84a56"))))
6498 (build-system python-build-system)
6499 ;; The package does not come with a setup.py file, so we have to generate
6500 ;; one ourselves.
6501 (arguments
6502 `(#:tests? #f
6503 #:phases
6504 (modify-phases %standard-phases
6505 (add-after 'unpack 'create-setup.py
6506 (lambda _
6507 (call-with-output-file "setup.py"
6508 (lambda (port)
6509 (format port "\
6510 from setuptools import setup
6511 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6512 " ,version))))))))
6513 (home-page "https://github.com/takluyver/entrypoints")
6514 (synopsis "Discover and load entry points from installed Python packages")
6515 (description "Entry points are a way for Python packages to advertise
6516 objects with some common interface. The most common examples are
6517 @code{console_scripts} entry points, which define shell commands by
6518 identifying a Python function to run. The @code{entrypoints} module contains
6519 functions to find and load entry points.")
6520 (license license:expat)))
6521
6522 (define-public python2-entrypoints
6523 (package-with-python2 python-entrypoints))
6524
6525 (define-public python-nbconvert
6526 (package
6527 (name "python-nbconvert")
6528 (version "5.0.0b1")
6529 (source
6530 (origin
6531 (method url-fetch)
6532 (uri (pypi-uri "nbconvert" version))
6533 (sha256
6534 (base32
6535 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6536 (build-system python-build-system)
6537 (arguments
6538 `(;; The "bdist_egg" target is disabled by default, causing the installation
6539 ;; to fail.
6540 #:configure-flags (list "bdist_egg")
6541 ;; FIXME: 5 failures, 40 errors.
6542 #:tests? #f))
6543 ;; #:phases
6544 ;; (modify-phases %standard-phases
6545 ;; (replace 'check
6546 ;; (lambda _
6547 ;; (zero? (system* "py.test" "-v")))))
6548 (native-inputs
6549 `(("python-pytest" ,python-pytest)))
6550 (propagated-inputs
6551 `(("python-bleach" ,python-bleach)
6552 ("python-entrypoints" ,python-entrypoints)
6553 ("python-jinja2" ,python-jinja2)
6554 ("python-jupyter-core" ,python-jupyter-core)
6555 ("python-mistune" ,python-mistune)
6556 ("python-nbformat" ,python-nbformat)
6557 ("python-pygments" ,python-pygments)
6558 ("python-traitlets" ,python-traitlets)))
6559 (home-page "http://jupyter.org")
6560 (synopsis "Converting Jupyter Notebooks")
6561 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6562 notebooks to various other formats via Jinja templates. It allows you to
6563 convert an @code{.ipynb} notebook file into various static formats including:
6564
6565 @enumerate
6566 @item HTML
6567 @item LaTeX
6568 @item PDF
6569 @item Reveal JS
6570 @item Markdown (md)
6571 @item ReStructured Text (rst)
6572 @item executable script
6573 @end enumerate\n")
6574 (license license:bsd-3)))
6575
6576 (define-public python2-nbconvert
6577 (package-with-python2 python-nbconvert))
6578
6579 (define-public python-notebook
6580 (package
6581 (name "python-notebook")
6582 (version "4.2.3")
6583 (source (origin
6584 (method url-fetch)
6585 (uri (pypi-uri "notebook" version))
6586 (sha256
6587 (base32
6588 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
6589 (build-system python-build-system)
6590 (arguments
6591 `(#:phases
6592 (modify-phases %standard-phases
6593 (replace 'check
6594 (lambda _
6595 ;; HOME must be set for tests
6596 (setenv "HOME" "/tmp")
6597 (zero? (system* "nosetests")))))))
6598 (propagated-inputs
6599 `(("python-jupyter-core" ,python-jupyter-core)
6600 ("python-nbformat" ,python-nbformat)
6601 ("python-nbconvert" ,python-nbconvert)
6602 ("python-ipython" ,python-ipython)))
6603 (native-inputs
6604 `(("python-nose" ,python-nose)
6605 ("python-sphinx" ,python-sphinx)
6606 ("python-requests" ,python-requests)))
6607 (home-page "http://jupyter.org/")
6608 (synopsis "Web-based notebook environment for interactive computing")
6609 (description
6610 "The Jupyter HTML notebook is a web-based notebook environment for
6611 interactive computing.")
6612 (properties `((python2-variant . ,(delay python2-notebook))))
6613 (license license:bsd-3)))
6614
6615 (define-public python2-notebook
6616 (let ((base (package-with-python2
6617 (strip-python2-variant python-notebook))))
6618 (package (inherit base)
6619 (native-inputs
6620 `(("python2-mock" ,python2-mock)
6621 ,@(package-native-inputs base)))
6622 (arguments
6623 (substitute-keyword-arguments (package-arguments base)
6624 ((#:phases phases)
6625 `(modify-phases ,phases
6626 (add-before 'check 'disable-test-case
6627 ;; The test requires network access to localhost. Curiously it
6628 ;; fails with Python 2 only. Simply make the test-case return
6629 ;; immediately.
6630 (lambda _
6631 (substitute*
6632 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
6633 (("formats = self.nbconvert_api") "return #")))))))))))
6634
6635 (define-public python-widgetsnbextension
6636 (package
6637 (name "python-widgetsnbextension")
6638 (version "1.2.6")
6639 (source
6640 (origin
6641 (method url-fetch)
6642 (uri (pypi-uri "widgetsnbextension" version))
6643 (sha256
6644 (base32
6645 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
6646 (build-system python-build-system)
6647 (propagated-inputs
6648 `(("python-notebook" ,python-notebook)))
6649 (native-inputs
6650 `(("python-certifi" ,python-certifi)
6651 ("python-nose" ,python-nose)))
6652 (home-page "https://ipython.org")
6653 (synopsis "IPython HTML widgets for Jupyter")
6654 (description "This package provides interactive HTML widgets for Jupyter
6655 notebooks.")
6656 (license license:bsd-3)))
6657
6658 (define-public python2-widgetsnbextension
6659 (package-with-python2 python-widgetsnbextension))
6660
6661 (define-public python-ipywidgets
6662 (package
6663 (name "python-ipywidgets")
6664 (version "5.2.2")
6665 (source
6666 (origin
6667 (method url-fetch)
6668 (uri (pypi-uri "ipywidgets" version))
6669 (sha256
6670 (base32
6671 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
6672 (build-system python-build-system)
6673 ;; FIXME: it's not clear how to run the tests.
6674 (arguments `(#:tests? #f))
6675 (propagated-inputs
6676 `(("python-ipykernel" ,python-ipykernel)
6677 ("python-ipython" ,python-ipython)
6678 ("python-traitlets" ,python-traitlets)
6679 ("python-widgetsnbextension" ,python-widgetsnbextension)))
6680 (home-page "https://ipython.org")
6681 (synopsis "IPython HTML widgets for Jupyter")
6682 (description "Ipywidgets are interactive HTML widgets for Jupyter
6683 notebooks and the IPython kernel. Notebooks come alive when interactive
6684 widgets are used. Users gain control of their data and can visualize changes
6685 in the data.")
6686 (license license:bsd-3)))
6687
6688 (define-public python2-ipywidgets
6689 (package-with-python2 python-ipywidgets))
6690
6691 (define-public python-jupyter-console
6692 (package
6693 (name "python-jupyter-console")
6694 (version "5.2.0")
6695 (source
6696 (origin
6697 (method url-fetch)
6698 (uri (pypi-uri "jupyter_console" version))
6699 (sha256
6700 (base32
6701 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
6702 (build-system python-build-system)
6703 ;; FIXME: it's not clear how to run the tests.
6704 (arguments `(#:tests? #f))
6705 (propagated-inputs
6706 `(("python-ipykernel" ,python-ipykernel)
6707 ("python-ipython" ,python-ipython)
6708 ("python-jupyter-client" ,python-jupyter-client)
6709 ("python-prompt-toolkit" ,python-prompt-toolkit)
6710 ("python-pygments" ,python-pygments)))
6711 (home-page "https://jupyter.org")
6712 (synopsis "Jupyter terminal console")
6713 (description "This package provides a terminal-based console frontend for
6714 Jupyter kernels. It also allows for console-based interaction with non-Python
6715 Jupyter kernels such as IJulia and IRKernel.")
6716 (license license:bsd-3)))
6717
6718 (define-public python2-jupyter-console
6719 (package-with-python2 python-jupyter-console))
6720
6721 ;; The python-ipython and python-jupyter-console require each other. To get
6722 ;; the functionality in both packages working, strip down the
6723 ;; python-jupyter-console package when using it as an input to python-ipython.
6724 (define python-jupyter-console-minimal
6725 (package
6726 (inherit python-jupyter-console)
6727 (name "python-jupyter-console-minimal")
6728 (arguments
6729 (substitute-keyword-arguments
6730 (package-arguments python-jupyter-console)
6731 ((#:phases phases)
6732 `(modify-phases ,phases
6733 (add-after 'install 'delete-bin
6734 (lambda* (#:key outputs #:allow-other-keys)
6735 ;; Delete the bin files, to avoid conflicts in profiles
6736 ;; where python-ipython and python-jupyter-console are
6737 ;; both present.
6738 (delete-file-recursively
6739 (string-append
6740 (assoc-ref outputs "out") "/bin"))))))))
6741 ;; Remove the python-ipython propagated input, to avoid the cycle
6742 (propagated-inputs
6743 (alist-delete
6744 "python-ipython"
6745 (package-propagated-inputs python-jupyter-console)))))
6746
6747 (define-public jupyter
6748 (package
6749 (name "jupyter")
6750 (version "1.0.0")
6751 (source
6752 (origin
6753 (method url-fetch)
6754 (uri (pypi-uri "jupyter" version))
6755 (sha256
6756 (base32
6757 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
6758 (build-system python-build-system)
6759 ;; FIXME: it's not clear how to run the tests.
6760 (arguments `(#:tests? #f))
6761 (propagated-inputs
6762 `(("python-ipykernel" ,python-ipykernel)
6763 ("python-ipywidgets" ,python-ipywidgets)
6764 ("python-jupyter-console" ,python-jupyter-console)
6765 ("python-nbconvert" ,python-nbconvert)
6766 ("python-notebook" ,python-notebook)))
6767 (home-page "http://jupyter.org")
6768 (synopsis "Web application for interactive documents")
6769 (description
6770 "The Jupyter Notebook is a web application that allows you to create and
6771 share documents that contain live code, equations, visualizations and
6772 explanatory text. Uses include: data cleaning and transformation, numerical
6773 simulation, statistical modeling, machine learning and much more.")
6774 (license license:bsd-3)))
6775
6776 (define-public python-chardet
6777 (package
6778 (name "python-chardet")
6779 (version "3.0.4")
6780 (source
6781 (origin
6782 (method url-fetch)
6783 (uri (pypi-uri "chardet" version))
6784 (sha256
6785 (base32
6786 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
6787 (native-inputs
6788 `(("python-hypothesis" ,python-hypothesis)
6789 ("python-pytest" ,python-pytest)
6790 ("python-pytest-runner" ,python-pytest-runner)))
6791 (build-system python-build-system)
6792 (home-page "https://github.com/chardet/chardet")
6793 (synopsis "Universal encoding detector for Python 2 and 3")
6794 (description
6795 "This package provides @code{chardet}, a Python module that can
6796 automatically detect a wide range of file encodings.")
6797 (license license:lgpl2.1+)))
6798
6799 (define-public python2-chardet
6800 (package-with-python2 python-chardet))
6801
6802 (define-public python-docopt
6803 (package
6804 (name "python-docopt")
6805 (version "0.6.2")
6806 (source
6807 (origin
6808 (method url-fetch)
6809 ;; The release on PyPI does not include tests.
6810 (uri (string-append
6811 "https://github.com/docopt/docopt/archive/"
6812 version ".tar.gz"))
6813 (file-name (string-append name "-" version ".tar.gz"))
6814 (sha256
6815 (base32
6816 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
6817 (build-system python-build-system)
6818 (native-inputs
6819 `(("python-pytest" ,python-pytest)))
6820 (arguments
6821 `(#:phases
6822 (modify-phases %standard-phases
6823 (replace 'check
6824 (lambda _ (zero? (system* "py.test")))))))
6825 (home-page "http://docopt.org")
6826 (synopsis "Command-line interface description language for Python")
6827 (description "This library allows the user to define a command-line
6828 interface from a program's help message rather than specifying it
6829 programatically with command-line parsers like @code{getopt} and
6830 @code{argparse}.")
6831 (license license:expat)))
6832
6833 (define-public python2-docopt
6834 (package-with-python2 python-docopt))
6835
6836 (define-public python-pythondialog
6837 (package
6838 (name "python-pythondialog")
6839 (version "3.4.0")
6840 (source
6841 (origin
6842 (method url-fetch)
6843 (uri (pypi-uri "pythondialog" version))
6844 (sha256
6845 (base32
6846 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
6847 (build-system python-build-system)
6848 (arguments
6849 `(#:phases
6850 (modify-phases %standard-phases
6851 (add-after 'unpack 'patch-path
6852 (lambda* (#:key inputs #:allow-other-keys)
6853 (let* ((dialog (assoc-ref inputs "dialog")))
6854 ;; Since this library really wants to grovel the search path, we
6855 ;; must hardcode dialog's store path into it.
6856 (substitute* "dialog.py"
6857 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
6858 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
6859 #t))))
6860 #:tests? #f)) ; no test suite
6861 (propagated-inputs
6862 `(("dialog" ,dialog)))
6863 (home-page "http://pythondialog.sourceforge.net/")
6864 (synopsis "Python interface to the UNIX dialog utility")
6865 (description "A Python wrapper for the dialog utility. Its purpose is to
6866 provide an easy to use, pythonic and comprehensive Python interface to dialog.
6867 This allows one to make simple text-mode user interfaces on Unix-like systems")
6868 (license license:lgpl2.1)
6869 (properties `((python2-variant . ,(delay python2-pythondialog))))))
6870
6871 (define-public python2-pythondialog
6872 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
6873 (package
6874 (inherit base)
6875 (version (package-version python-pythondialog))
6876 (source (origin
6877 (method url-fetch)
6878 (uri (pypi-uri "python2-pythondialog" version))
6879 (sha256
6880 (base32
6881 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
6882
6883 (define-public python-configobj
6884 (package
6885 (name "python-configobj")
6886 (version "5.0.6")
6887 (source (origin
6888 (method url-fetch)
6889 (uri (string-append
6890 "https://pypi.python.org/packages/source/c/configobj/"
6891 "configobj-" version ".tar.gz"))
6892 (sha256
6893 (base32
6894 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
6895 ;; Patch setup.py so it looks for python-setuptools, which is
6896 ;; required to parse the keyword 'install_requires' in setup.py.
6897 (patches (search-patches "python-configobj-setuptools.patch"))))
6898 (build-system python-build-system)
6899 (propagated-inputs
6900 `(("python-six" ,python-six)))
6901 (synopsis "Config file reading, writing and validation")
6902 (description "ConfigObj is a simple but powerful config file reader and
6903 writer: an ini file round tripper. Its main feature is that it is very easy to
6904 use, with a straightforward programmer’s interface and a simple syntax for
6905 config files.")
6906 (home-page "https://github.com/DiffSK/configobj")
6907 (license license:bsd-3)))
6908
6909 (define-public python2-configobj
6910 (package-with-python2 python-configobj))
6911
6912 (define-public python-configargparse
6913 (package
6914 (name "python-configargparse")
6915 (version "0.12.0")
6916 (source (origin
6917 (method url-fetch)
6918 (uri (string-append
6919 "https://pypi.io/packages/source/C/ConfigArgParse/"
6920 "ConfigArgParse-" version ".tar.gz"))
6921 (sha256
6922 (base32
6923 "0fgkiqh6r3rbkdq3k8c48m85g52k96686rw3a6jg4lcncrkpvk98"))))
6924 (build-system python-build-system)
6925 (native-inputs
6926 `(("python-pyyaml" ,python-pyyaml)))
6927 (arguments
6928 `(#:phases
6929 (modify-phases %standard-phases
6930 (replace 'check
6931 (lambda _
6932 ;; Bypass setuptools-shim because one test relies on "setup.py"
6933 ;; being the first argument passed to the python call.
6934 ;;
6935 ;; NOTE: Many tests do not run because they rely on Python's
6936 ;; built-in test.test_argparse, but we remove the unit tests from
6937 ;; our Python installation.
6938 (zero? (system* "python" "setup.py" "test")))))))
6939 (synopsis "Replacement for argparse")
6940 (description "A drop-in replacement for argparse that allows options to also
6941 be set via config files and/or environment variables.")
6942 (home-page "https://github.com/bw2/ConfigArgParse")
6943 (license license:expat)))
6944
6945 (define-public python2-configargparse
6946 (package-with-python2 python-configargparse))
6947
6948 (define-public python-contextlib2
6949 (package
6950 (name "python-contextlib2")
6951 (version "0.4.0")
6952 (source
6953 (origin
6954 (method url-fetch)
6955 (uri (pypi-uri "contextlib2" version))
6956 (sha256
6957 (base32
6958 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
6959 (build-system python-build-system)
6960 (arguments
6961 `(#:phases
6962 (modify-phases %standard-phases
6963 (replace 'check
6964 (lambda _ (zero?
6965 (system*
6966 "python" "test_contextlib2.py" "-v")))))))
6967 (home-page "http://contextlib2.readthedocs.org/")
6968 (synopsis "Tools for decorators and context managers")
6969 (description "This module is primarily a backport of the Python
6970 3.2 contextlib to earlier Python versions. Like contextlib, it
6971 provides utilities for common tasks involving decorators and context
6972 managers. It also contains additional features that are not part of
6973 the standard library.")
6974 (license license:psfl)))
6975
6976 (define-public python2-contextlib2
6977 (package-with-python2 python-contextlib2))
6978
6979 (define-public python-texttable
6980 (package
6981 (name "python-texttable")
6982 (version "0.8.7")
6983 (source
6984 (origin
6985 (method url-fetch)
6986 (uri (pypi-uri "texttable" version))
6987 (sha256
6988 (base32
6989 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
6990 (build-system python-build-system)
6991 (arguments '(#:tests? #f)) ; no tests
6992 (home-page "https://github.com/foutaise/texttable/")
6993 (synopsis "Python module for creating simple ASCII tables")
6994 (description "Texttable is a Python module for creating simple ASCII
6995 tables.")
6996 (license license:lgpl2.1+)))
6997
6998 (define-public python2-texttable
6999 (package-with-python2 python-texttable))
7000
7001 (define-public python-atomicwrites
7002 (package
7003 (name "python-atomicwrites")
7004 (version "1.1.5")
7005 (source (origin
7006 (method url-fetch)
7007 (uri (pypi-uri "atomicwrites" version))
7008 (sha256
7009 (base32
7010 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
7011 (build-system python-build-system)
7012 (synopsis "Atomic file writes in Python")
7013 (description "Library for atomic file writes using platform dependent tools
7014 for atomic file system operations.")
7015 (home-page "https://github.com/untitaker/python-atomicwrites")
7016 (license license:expat)))
7017
7018 (define-public python2-atomicwrites
7019 (package-with-python2 python-atomicwrites))
7020
7021 (define-public python-click-threading
7022 (package
7023 (name "python-click-threading")
7024 (version "0.4.4")
7025 (source (origin
7026 (method url-fetch)
7027 (uri (pypi-uri "click-threading" version))
7028 (sha256
7029 (base32
7030 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
7031 (build-system python-build-system)
7032 (propagated-inputs
7033 `(("python-click" ,python-click)))
7034 (synopsis "Utilities for multithreading in Click")
7035 (description "This package provides utilities for multithreading in Click
7036 applications.")
7037 (home-page "https://github.com/click-contrib/click-threading")
7038 (license license:expat)))
7039
7040 (define-public python-click-log
7041 (package
7042 (name "python-click-log")
7043 (version "0.2.1")
7044 (source (origin
7045 (method url-fetch)
7046 (uri (pypi-uri "click-log" version))
7047 (sha256
7048 (base32
7049 "1r1x85023cslb2pwldd089jjk573mk3w78cnashs77wrx7yz8fj9"))))
7050 (build-system python-build-system)
7051 (propagated-inputs
7052 `(("python-click" ,python-click)))
7053 (synopsis "Logging for click applications")
7054 (description "This package provides a Python library for logging Click
7055 applications.")
7056 (home-page "https://github.com/click-contrib/click-log")
7057 (license license:expat)))
7058
7059 (define-public python-apipkg
7060 (package
7061 (name "python-apipkg")
7062 (version "1.4")
7063 (source (origin
7064 (method url-fetch)
7065 (uri (pypi-uri "apipkg" version))
7066 (sha256
7067 (base32
7068 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7069 (build-system python-build-system)
7070 (native-inputs
7071 `(("python-pytest" ,python-pytest)))
7072 (synopsis "Namespace control and lazy-import mechanism")
7073 (description "With apipkg you can control the exported namespace of a Python
7074 package and greatly reduce the number of imports for your users. It is a small
7075 pure Python module that works on virtually all Python versions.")
7076 (home-page "https://bitbucket.org/hpk42/apipkg")
7077 (license license:expat)))
7078
7079 (define-public python2-apipkg
7080 (package-with-python2 python-apipkg))
7081
7082 (define-public python-execnet
7083 (package
7084 (name "python-execnet")
7085 (version "1.4.1")
7086 (source (origin
7087 (method url-fetch)
7088 (uri (pypi-uri "execnet" version))
7089 (sha256
7090 (base32
7091 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7092 (build-system python-build-system)
7093 (arguments
7094 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7095 ;; The two test failures are caused by the lack of an `ssh` executable.
7096 ;; The test suite can be run with pytest after the 'install' phase.
7097 #:tests? #f))
7098 (native-inputs
7099 `(("python-pytest" ,python-pytest)
7100 ("python-setuptools-scm" ,python-setuptools-scm)))
7101 (propagated-inputs
7102 `(("python-apipkg" ,python-apipkg)))
7103 (synopsis "Rapid multi-Python deployment")
7104 (description "Execnet provides a share-nothing model with
7105 channel-send/receive communication for distributing execution across many
7106 Python interpreters across version, platform and network barriers. It has a
7107 minimal and fast API targeting the following uses:
7108 @enumerate
7109 @item distribute tasks to (many) local or remote CPUs
7110 @item write and deploy hybrid multi-process applications
7111 @item write scripts to administer multiple environments
7112 @end enumerate")
7113 (home-page "http://codespeak.net/execnet/")
7114 (license license:expat)))
7115
7116 (define-public python2-execnet
7117 (package-with-python2 python-execnet))
7118
7119 (define-public python-icalendar
7120 (package
7121 (name "python-icalendar")
7122 (version "4.0.1")
7123 (source (origin
7124 (method url-fetch)
7125 (uri (pypi-uri "icalendar" version))
7126 (sha256
7127 (base32
7128 "139y79y6ijl39m5bj771r43vpah9s4ly7d1k76la6hrx7l144ak8"))))
7129 (build-system python-build-system)
7130 (propagated-inputs
7131 `(("python-dateutil" ,python-dateutil)
7132 ("python-pytz" ,python-pytz)))
7133 (synopsis "Python library for parsing iCalendar files")
7134 (description "The icalendar package is a parser/generator of iCalendar
7135 files for use with Python.")
7136 (home-page "https://github.com/collective/icalendar")
7137 (license license:bsd-2)))
7138
7139 (define-public python-sphinxcontrib-newsfeed
7140 (package
7141 (name "python-sphinxcontrib-newsfeed")
7142 (version "0.1.4")
7143 (source (origin
7144 (method url-fetch)
7145 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7146 (sha256
7147 (base32
7148 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7149 (arguments '(#:tests? #f)) ; No tests.
7150 (build-system python-build-system)
7151 (propagated-inputs
7152 `(("python-sphinx" ,python-sphinx)))
7153 (synopsis "News Feed extension for Sphinx")
7154 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7155 Blog, News or Announcements section to a Sphinx website.")
7156 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7157 (license license:bsd-2)))
7158
7159 (define-public python-args
7160 (package
7161 (name "python-args")
7162 (version "0.1.0")
7163 (source (origin
7164 (method url-fetch)
7165 (uri (pypi-uri "args" version))
7166 (sha256
7167 (base32
7168 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7169 (build-system python-build-system)
7170 (home-page "https://github.com/kennethreitz/args")
7171 (synopsis "Command-line argument parser")
7172 (description
7173 "This library provides a Python module to parse command-line arguments.")
7174 (license license:bsd-3)))
7175
7176 (define-public python2-args
7177 (package-with-python2 python-args))
7178
7179 (define-public python-clint
7180 (package
7181 (name "python-clint")
7182 (version "0.5.1")
7183 (source (origin
7184 (method url-fetch)
7185 (uri (pypi-uri "clint" version))
7186 (sha256
7187 (base32
7188 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7189 (build-system python-build-system)
7190 (arguments
7191 '(#:phases
7192 (modify-phases %standard-phases
7193 (replace 'check
7194 (lambda _
7195 (zero? (system* "py.test" "-v")))))))
7196 (native-inputs
7197 `(("python-pytest" ,python-pytest)))
7198 (propagated-inputs
7199 `(("python-args" ,python-args)))
7200 (home-page "https://github.com/kennethreitz/clint")
7201 (synopsis "Command-line interface tools")
7202 (description
7203 "Clint is a Python module filled with a set of tools for developing
7204 command-line applications, including tools for colored and indented
7205 output, progress bar display, and pipes.")
7206 (license license:isc)))
7207
7208 (define-public python2-clint
7209 (package-with-python2 python-clint))
7210
7211 (define-public python-astor
7212 (package
7213 (name "python-astor")
7214 (version "0.5")
7215 (source (origin
7216 (method url-fetch)
7217 (uri (pypi-uri "astor" version))
7218 (sha256
7219 (base32
7220 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7221 (build-system python-build-system)
7222 (home-page "https://github.com/berkerpeksag/astor")
7223 (synopsis "Read and write Python ASTs")
7224 (description
7225 "Astor is designed to allow easy manipulation of Python source via the
7226 Abstract Syntax Tree.")
7227 (license license:bsd-3)))
7228
7229 (define-public python2-astor
7230 (package-with-python2 python-astor))
7231
7232 (define-public python-rply
7233 (package
7234 (name "python-rply")
7235 (version "0.7.5")
7236 (source (origin
7237 (method url-fetch)
7238 (uri (pypi-uri "rply" version))
7239 (sha256
7240 (base32
7241 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
7242 (build-system python-build-system)
7243 (propagated-inputs
7244 `(("python-appdirs" ,python-appdirs)))
7245 (home-page "https://github.com/alex/rply")
7246 (synopsis "Parser generator for Python")
7247 (description
7248 "This package provides a pure Python based parser generator, that also
7249 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7250 with a new public API, and RPython support.")
7251 (license license:bsd-3)))
7252
7253 (define-public python2-rply
7254 (package-with-python2 python-rply))
7255
7256 (define-public python-hy
7257 (package
7258 (name "python-hy")
7259 (version "0.13.0")
7260 (source (origin
7261 (method url-fetch)
7262 (uri (pypi-uri "hy" version))
7263 (sha256
7264 (base32
7265 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
7266 (build-system python-build-system)
7267 (arguments
7268 '(#:phases
7269 (modify-phases %standard-phases
7270 (replace 'check
7271 (lambda _
7272 ;; Tests require write access to HOME.
7273 (setenv "HOME" "/tmp")
7274 (zero? (system* "nosetests")))))))
7275 (native-inputs
7276 `(("python-coverage" ,python-coverage)
7277 ("python-nose" ,python-nose)))
7278 (propagated-inputs
7279 `(("python-astor" ,python-astor)
7280 ("python-clint" ,python-clint)
7281 ("python-rply" ,python-rply)))
7282 (home-page "http://hylang.org/")
7283 (synopsis "Lisp frontend to Python")
7284 (description
7285 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7286 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7287 Python at your fingertips, in Lisp form.")
7288 (license license:expat)))
7289
7290 (define-public python2-hy
7291 (package-with-python2 python-hy))
7292
7293 (define-public python2-functools32
7294 (package
7295 (name "python2-functools32")
7296 (version "3.2.3-2")
7297 (source
7298 (origin
7299 (method url-fetch)
7300 (uri (pypi-uri "functools32" version))
7301 (sha256
7302 (base32
7303 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7304 (build-system python-build-system)
7305 (arguments
7306 `(#:python ,python-2
7307 #:tests? #f)) ; no test target
7308 (home-page "https://github.com/MiCHiLU/python-functools32")
7309 (synopsis
7310 "Backport of the functools module from Python 3.2.3")
7311 (description
7312 "This package is a backport of the @code{functools} module from Python
7313 3.2.3 for use with older versions of Python and PyPy.")
7314 (license license:expat)))
7315
7316 (define-public python2-subprocess32
7317 (package
7318 (name "python2-subprocess32")
7319 (version "3.2.7")
7320 (source (origin
7321 (method url-fetch)
7322 (uri (pypi-uri "subprocess32" version))
7323 (sha256
7324 (base32
7325 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
7326 (patches
7327 (search-patches "python2-subprocess32-disable-input-test.patch"))))
7328 (build-system python-build-system)
7329 (arguments
7330 `(#:python ,python-2
7331 ;; The test suite fails with Python > 2.7.13:
7332 ;; import test.support
7333 ;; ImportError: No module named support
7334 #:tests? #f
7335 #:phases
7336 (modify-phases %standard-phases
7337 (add-after 'unpack 'patch-/bin/sh
7338 (lambda _
7339 (substitute* '("subprocess32.py"
7340 "test_subprocess32.py")
7341 (("/bin/sh") (which "sh")))
7342 #t)))))
7343 (home-page "https://github.com/google/python-subprocess32")
7344 (synopsis "Backport of the subprocess module from Python 3.2")
7345 (description
7346 "This is a backport of the @code{subprocess} standard library module
7347 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
7348 new features. On POSIX systems it is guaranteed to be reliable when used
7349 in threaded applications. It includes timeout support from Python 3.3 but
7350 otherwise matches 3.2’s API.")
7351 (license license:psfl)))
7352
7353 (define-public python2-futures
7354 (package
7355 (name "python2-futures")
7356 (version "3.0.5")
7357 (source
7358 (origin
7359 (method url-fetch)
7360 (uri (pypi-uri "futures" version))
7361 (sha256
7362 (base32
7363 "1pw1z4329xvlabdpwqa6b7v2fxf7hl64m4cgr22ckbym8m8m4hh5"))))
7364 (build-system python-build-system)
7365 (arguments `(#:python ,python-2))
7366 (home-page "https://github.com/agronholm/pythonfutures")
7367 (synopsis
7368 "Backport of the concurrent.futures package from Python 3.2")
7369 (description
7370 "The concurrent.futures module provides a high-level interface for
7371 asynchronously executing callables. This package backports the
7372 concurrent.futures package from Python 3.2")
7373 (license license:bsd-3)))
7374
7375 (define-public python-promise
7376 (package
7377 (name "python-promise")
7378 (version "0.4.2")
7379 (source
7380 (origin
7381 (method url-fetch)
7382 (uri (pypi-uri "promise" version))
7383 (sha256
7384 (base32
7385 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7386 (build-system python-build-system)
7387 ;; Tests wants python-futures, which is a python2 only program, and
7388 ;; can't be found by python-promise at test time.
7389 (arguments `(#:tests? #f))
7390 (home-page "https://github.com/syrusakbary/promise")
7391 (synopsis "Promises/A+ implementation for Python")
7392 (description
7393 "Promises/A+ implementation for Python")
7394 (properties `((python2-variant . ,(delay python2-promise))))
7395 (license license:expat)))
7396
7397 (define-public python2-promise
7398 (let ((promise (package-with-python2
7399 (strip-python2-variant python-promise))))
7400 (package (inherit promise)
7401 (arguments (substitute-keyword-arguments (package-arguments promise)
7402 ((#:tests? _) #t)))
7403 (native-inputs
7404 `(("python2-futures" ,python2-futures)
7405 ("python2-pytest" ,python2-pytest)
7406 ,@(package-native-inputs promise))))))
7407
7408 (define-public python-colorama
7409 (package
7410 (name "python-colorama")
7411 (version "0.3.9")
7412 (source
7413 (origin
7414 (method url-fetch)
7415 (uri (pypi-uri "colorama" version))
7416 (sha256
7417 (base32
7418 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
7419 (build-system python-build-system)
7420 (synopsis "Colored terminal text rendering for Python")
7421 (description "Colorama is a Python library for rendering colored terminal
7422 text.")
7423 (home-page "https://pypi.python.org/pypi/colorama")
7424 (license license:bsd-3)))
7425
7426 (define-public python2-colorama
7427 (package-with-python2 python-colorama))
7428
7429 (define-public python-rsa
7430 (package
7431 (name "python-rsa")
7432 (version "3.4.2")
7433 (source
7434 (origin
7435 (method url-fetch)
7436 (uri (pypi-uri "rsa" version))
7437 (sha256
7438 (base32
7439 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
7440 (build-system python-build-system)
7441 (propagated-inputs
7442 `(("python-pyasn1" ,python-pyasn1)))
7443 (synopsis "Pure-Python RSA implementation")
7444 (description "Python-RSA is a pure-Python RSA implementation. It supports
7445 encryption and decryption, signing and verifying signatures, and key
7446 generation according to PKCS#1 version 1.5. It can be used as a Python
7447 library as well as on the command line.")
7448 (home-page "https://stuvel.eu/rsa")
7449 (license license:asl2.0)))
7450
7451 (define-public python2-rsa
7452 (package-with-python2 python-rsa))
7453
7454 (define-public python-pluggy
7455 (package
7456 (name "python-pluggy")
7457 (version "0.3.1")
7458 (source
7459 (origin
7460 (method url-fetch)
7461 (uri (pypi-uri "pluggy" version))
7462 (sha256
7463 (base32
7464 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
7465 (build-system python-build-system)
7466 (synopsis "Plugin and hook calling mechanism for Python")
7467 (description "Pluggy is an extraction of the plugin manager as used by
7468 Pytest but stripped of Pytest specific details.")
7469 (home-page "https://pypi.python.org/pypi/pluggy")
7470 (license license:expat)))
7471
7472 (define-public python2-pluggy
7473 (package-with-python2 python-pluggy))
7474
7475 (define-public python-tox
7476 (package
7477 (name "python-tox")
7478 (version "2.8.1")
7479 (source
7480 (origin
7481 (method url-fetch)
7482 (uri (pypi-uri "tox" version))
7483 (sha256
7484 (base32
7485 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
7486 (build-system python-build-system)
7487 (arguments
7488 ;; FIXME: Tests require pytest-timeout, which itself requires
7489 ;; pytest>=2.8.0 for installation.
7490 '(#:tests? #f))
7491 (propagated-inputs
7492 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
7493 ("python-py" ,python-py)
7494 ("python-virtualenv" ,python-virtualenv)))
7495 (native-inputs
7496 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
7497 ("python-pytest" ,python-pytest) ; >= 2.3.5
7498 ("python-setuptools-scm" ,python-setuptools-scm)))
7499 (home-page "http://tox.testrun.org/")
7500 (synopsis "Virtualenv-based automation of test activities")
7501 (description "Tox is a generic virtualenv management and test command line
7502 tool. It can be used to check that a package installs correctly with
7503 different Python versions and interpreters, or run tests in each type of
7504 supported environment, or act as a frontend to continuous integration
7505 servers.")
7506 (license license:expat)))
7507
7508 (define-public python2-tox
7509 (package-with-python2 python-tox))
7510
7511 (define-public python-jmespath
7512 (package
7513 (name "python-jmespath")
7514 (version "0.9.3")
7515 (source
7516 (origin
7517 (method url-fetch)
7518 (uri (pypi-uri "jmespath" version))
7519 (sha256
7520 (base32
7521 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
7522 (build-system python-build-system)
7523 (native-inputs
7524 `(("python-nose" ,python-nose)))
7525 (synopsis "JSON Matching Expressions")
7526 (description "JMESPath (pronounced “james path”) is a Python library that
7527 allows one to declaratively specify how to extract elements from a JSON
7528 document.")
7529 (home-page "https://github.com/jmespath/jmespath.py")
7530 (license license:expat)))
7531
7532 (define-public python2-jmespath
7533 (package-with-python2 python-jmespath))
7534
7535 (define-public python-botocore
7536 (package
7537 (name "python-botocore")
7538 (version "1.8.43")
7539 (source
7540 (origin
7541 (method url-fetch)
7542 (uri (pypi-uri "botocore" version))
7543 (sha256
7544 (base32
7545 "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg"))))
7546 (build-system python-build-system)
7547 (arguments
7548 ;; FIXME: Many tests are failing.
7549 '(#:tests? #f))
7550 (propagated-inputs
7551 `(("python-dateutil" ,python-dateutil)
7552 ("python-docutils" ,python-docutils)
7553 ("python-jmespath" ,python-jmespath)))
7554 (native-inputs
7555 `(("python-mock" ,python-mock)
7556 ("python-nose" ,python-nose)
7557 ("behave" ,behave)
7558 ("python-tox" ,python-tox)
7559 ("python-wheel" ,python-wheel)))
7560 (home-page "https://github.com/boto/botocore")
7561 (synopsis "Low-level interface to AWS")
7562 (description "Botocore is a Python library that provides a low-level
7563 interface to the Amazon Web Services (AWS) API.")
7564 (license license:asl2.0)))
7565
7566 (define-public python2-botocore
7567 (package-with-python2 python-botocore))
7568
7569 (define-public python-xdo
7570 (package
7571 (name "python-xdo")
7572 (version "0.3")
7573 (source (origin
7574 (method url-fetch)
7575 (uri (string-append
7576 "http://http.debian.net/debian/pool/main/p/python-xdo/"
7577 "python-xdo_" version ".orig.tar.gz"))
7578 (sha256
7579 (base32
7580 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
7581 (build-system python-build-system)
7582 (arguments
7583 '(#:phases
7584 (modify-phases %standard-phases
7585 (add-before 'install 'patch-libxdo-path
7586 ;; Hardcode the path of dynamically loaded libxdo library.
7587 (lambda* (#:key inputs #:allow-other-keys)
7588 (let ((libxdo (string-append
7589 (assoc-ref inputs "xdotool")
7590 "/lib/libxdo.so")))
7591 (substitute* "xdo/_xdo.py"
7592 (("find_library\\(\"xdo\"\\)")
7593 (simple-format #f "\"~a\"" libxdo)))
7594 #t))))
7595 #:tests? #f)) ; no tests provided
7596 (propagated-inputs
7597 `(("python-six" ,python-six)))
7598 (inputs
7599 `(("xdotool" ,xdotool)
7600 ("libX11" ,libx11)))
7601 (home-page "https://tracker.debian.org/pkg/python-xdo")
7602 (synopsis "Python library for simulating X11 keyboard/mouse input")
7603 (description "Provides bindings to libxdo for manipulating X11 via simulated
7604 input. (Note that this is mostly a legacy library; you may wish to look at
7605 python-xdo for newer bindings.)")
7606 (license license:bsd-3)))
7607
7608 (define-public python2-xdo
7609 (package-with-python2 python-xdo))
7610
7611 (define-public python-mako
7612 (package
7613 (name "python-mako")
7614 (version "1.0.6")
7615 (source
7616 (origin
7617 (method url-fetch)
7618 (uri (pypi-uri "Mako" version))
7619 (sha256
7620 (base32
7621 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
7622 (build-system python-build-system)
7623 (propagated-inputs
7624 `(("python-markupsafe" ,python-markupsafe)))
7625 (native-inputs
7626 `(("python-mock" ,python-mock)
7627 ("python-nose" ,python-nose)
7628 ("python-pytest" ,python-pytest)))
7629 (home-page "http://www.makotemplates.org/")
7630 (synopsis "Templating language for Python")
7631 (description "Mako is a templating language for Python that compiles
7632 templates into Python modules.")
7633 (license license:expat)))
7634
7635 (define-public python2-mako
7636 (package-with-python2 python-mako))
7637
7638 (define-public python-waitress
7639 (package
7640 (name "python-waitress")
7641 (version "1.1.0")
7642 (source
7643 (origin
7644 (method url-fetch)
7645 (uri (pypi-uri "waitress" version))
7646 (patches (search-patches "python-waitress-fix-tests.patch"))
7647 (sha256
7648 (base32
7649 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
7650 (build-system python-build-system)
7651 (home-page "https://github.com/Pylons/waitress")
7652 (synopsis "Waitress WSGI server")
7653 (description "Waitress is meant to be a production-quality pure-Python WSGI
7654 server with very acceptable performance.")
7655 (license license:zpl2.1)))
7656
7657 (define-public python2-waitress
7658 (package-with-python2 python-waitress))
7659
7660 (define-public python-pyquery
7661 (package
7662 (name "python-pyquery")
7663 (version "1.2.17")
7664 (source
7665 (origin
7666 (method url-fetch)
7667 (uri (pypi-uri "pyquery" version))
7668 (sha256
7669 (base32
7670 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
7671 (build-system python-build-system)
7672 (native-inputs
7673 `(("python-webob" ,python-webob)
7674 ("python-webtest" ,python-webtest)))
7675 (propagated-inputs
7676 `(("python-lxml" ,python-lxml)
7677 ("python-cssselect" ,python-cssselect)))
7678 (home-page "https://github.com/gawel/pyquery")
7679 (synopsis "Make jQuery-like queries on xml documents")
7680 (description "pyquery allows you to make jQuery queries on xml documents.
7681 The API is as much as possible the similar to jQuery. pyquery uses lxml for
7682 fast xml and html manipulation.")
7683 (license license:bsd-3)))
7684
7685 (define-public python2-pyquery
7686 (package-with-python2 python-pyquery))
7687
7688 (define-public python-anyjson
7689 (package
7690 (name "python-anyjson")
7691 (version "0.3.3")
7692 (source
7693 (origin
7694 (method url-fetch)
7695 (uri (pypi-uri "anyjson" version))
7696 (sha256
7697 (base32
7698 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
7699 (build-system python-build-system)
7700 (arguments
7701 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
7702 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
7703 ;; whatever) so this transformation needs to be done before the tests
7704 ;; can be run. Maybe we could add a build step to transform beforehand
7705 ;; but it could be annoying/difficult.
7706 ;; We can enable tests for the Python 2 version, though, and do below.
7707 #:tests? #f))
7708 (home-page "https://bitbucket.org/runeh/anyjson/")
7709 (synopsis
7710 "Wraps best available JSON implementation in a common interface")
7711 (description
7712 "Anyjson loads whichever is the fastest JSON module installed
7713 and provides a uniform API regardless of which JSON implementation is used.")
7714 (license license:bsd-3)
7715 (properties `((python2-variant . ,(delay python2-anyjson))))))
7716
7717 (define-public python2-anyjson
7718 (let ((anyjson (package-with-python2
7719 (strip-python2-variant python-anyjson))))
7720 (package
7721 (inherit anyjson)
7722 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
7723 #:tests? #t
7724 ,@(package-arguments anyjson)))
7725 (native-inputs `(("python2-nose" ,python2-nose))))))
7726
7727 (define-public python-amqp
7728 (package
7729 (name "python-amqp")
7730 (version "1.4.9")
7731 (source
7732 (origin
7733 (method url-fetch)
7734 (uri (pypi-uri "amqp" version))
7735 (sha256
7736 (base32
7737 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
7738 (build-system python-build-system)
7739 (native-inputs
7740 `(("python-nose" ,python-nose)
7741 ("python-mock" ,python-mock)))
7742 (home-page "https://github.com/celery/py-amqp")
7743 (synopsis
7744 "Low-level AMQP client for Python (fork of amqplib)")
7745 (description
7746 "This is a fork of amqplib which was originally written by Barry Pederson.
7747 It is maintained by the Celery project, and used by kombu as a pure python
7748 alternative when librabbitmq is not available.")
7749 (license license:lgpl2.1+)
7750 (properties `((python2-variant . ,(delay python2-amqp))))))
7751
7752 (define-public python2-amqp
7753 (let ((amqp (package-with-python2
7754 (strip-python2-variant python-amqp))))
7755 (package
7756 (inherit amqp)
7757 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
7758 ;; unmaintained. Weirdly, does not do this on the python 3
7759 ;; version?
7760 #:tests? #f
7761 ,@(package-arguments amqp))))))
7762
7763 (define-public python-txamqp
7764 (package
7765 (name "python-txamqp")
7766 (version "0.8.0")
7767 (source
7768 (origin
7769 (method url-fetch)
7770 (uri (pypi-uri "txAMQP" version))
7771 (sha256
7772 (base32
7773 "1r43a66dd547mz40ikymm8y3d480cidy560fj81qc0jk4lncgmmr"))))
7774 (build-system python-build-system)
7775 (propagated-inputs
7776 `(("python-six" ,python-six)
7777 ("python-twisted" ,python-twisted)))
7778 (home-page "https://github.com/txamqp/txamqp")
7779 (synopsis "Communicate with AMQP peers and brokers using Twisted")
7780 (description
7781 "This package provides a Python library for communicating with AMQP peers
7782 and brokers using the asynchronous networking framework Twisted. It contains
7783 all the necessary code to connect, send and receive messages to/from an
7784 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
7785 also includes support for using Thrift RPC over AMQP in Twisted
7786 applications.")
7787 (license license:asl2.0)))
7788
7789 (define-public python2-txamqp
7790 (package-with-python2 python-txamqp))
7791
7792 (define-public python-kombu
7793 (package
7794 (name "python-kombu")
7795 (version "3.0.37")
7796 (source
7797 (origin
7798 (method url-fetch)
7799 (uri (pypi-uri "kombu" version))
7800 (sha256
7801 (base32
7802 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
7803 (build-system python-build-system)
7804 (native-inputs
7805 `(("python-mock" ,python-mock)
7806 ("python-nose" ,python-nose)))
7807 (propagated-inputs
7808 `(("python-anyjson" ,python-anyjson)
7809 ("python-amqp" ,python-amqp)
7810 ("python-redis" ,python-redis)))
7811 (home-page "http://kombu.readthedocs.org")
7812 (synopsis "Message passing library for Python")
7813 (description "The aim of Kombu is to make messaging in Python as easy as
7814 possible by providing an idiomatic high-level interface for the AMQ protocol,
7815 and also provide proven and tested solutions to common messaging problems.
7816 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
7817 message orientation, queuing, routing, reliability and security, for which the
7818 RabbitMQ messaging server is the most popular implementation.")
7819 (license license:bsd-3)
7820 (properties `((python2-variant . ,(delay python2-kombu))))))
7821
7822 (define-public python2-kombu
7823 (let ((kombu (package-with-python2
7824 (strip-python2-variant python-kombu))))
7825 (package
7826 (inherit kombu)
7827 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
7828 ;; It works fine on the python3 variant.
7829 #:tests? #f
7830 ,@(package-arguments kombu)))
7831 (native-inputs `(("python2-unittest2" ,python2-unittest2)
7832 ,@(package-native-inputs kombu))))))
7833
7834 (define-public python-billiard
7835 (package
7836 (name "python-billiard")
7837 (version "3.3.0.23")
7838 (source
7839 (origin
7840 (method url-fetch)
7841 (uri (pypi-uri "billiard" version))
7842 (sha256
7843 (base32
7844 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
7845 (build-system python-build-system)
7846 (native-inputs
7847 `(("python-nose" ,python-nose)))
7848 (home-page "https://github.com/celery/billiard")
7849 (synopsis
7850 "Python multiprocessing fork with improvements and bugfixes")
7851 (description
7852 "Billiard is a fork of the Python 2.7 multiprocessing package. The
7853 multiprocessing package itself is a renamed and updated version of R Oudkerk's
7854 pyprocessing package. This standalone variant is intended to be compatible with
7855 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
7856 (license license:bsd-3)
7857 (properties `((python2-variant . ,(delay python2-billiard))))))
7858
7859 (define-public python2-billiard
7860 (let ((billiard (package-with-python2
7861 (strip-python2-variant python-billiard))))
7862 (package
7863 (inherit billiard)
7864 (native-inputs `(("python2-unittest2" ,python2-unittest2)
7865 ("python2-mock" ,python2-mock)
7866 ,@(package-native-inputs billiard))))))
7867
7868 (define-public python-celery
7869 (package
7870 (name "python-celery")
7871 (version "3.1.24")
7872 (source
7873 (origin
7874 (method url-fetch)
7875 (uri (pypi-uri "celery" version))
7876 (sha256
7877 (base32
7878 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
7879 (build-system python-build-system)
7880 (arguments
7881 `(#:phases
7882 (modify-phases %standard-phases
7883 ;; These tests break with Python 3.5:
7884 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
7885 (replace 'check
7886 (lambda _
7887 (zero?
7888 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
7889 (native-inputs
7890 `(("python-nose" ,python-nose)))
7891 (propagated-inputs
7892 `(("python-pytz" ,python-pytz)
7893 ("python-billiard" ,python-billiard)
7894 ("python-kombu" ,python-kombu)))
7895 (home-page "http://celeryproject.org")
7896 (synopsis "Distributed Task Queue")
7897 (description "Celery is an asynchronous task queue/job queue based on
7898 distributed message passing. It is focused on real-time operation, but
7899 supports scheduling as well. The execution units, called tasks, are executed
7900 concurrently on a single or more worker servers using multiprocessing,
7901 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
7902 synchronously (wait until ready).")
7903 (license license:bsd-3)
7904 (properties `((python2-variant . ,(delay python2-celery))))))
7905
7906 (define-public python2-celery
7907 (let ((celery (package-with-python2
7908 (strip-python2-variant python-celery))))
7909 (package
7910 (inherit celery)
7911 (native-inputs `(("python2-unittest2" ,python2-unittest2)
7912 ("python2-mock" ,python2-mock)
7913 ,@(package-native-inputs celery))))))
7914
7915 (define-public python-translitcodec
7916 (package
7917 (name "python-translitcodec")
7918 (version "0.4.0")
7919 (source
7920 (origin
7921 (method url-fetch)
7922 (uri (pypi-uri "translitcodec" version))
7923 (sha256
7924 (base32
7925 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
7926 (build-system python-build-system)
7927 (arguments
7928 `(#:tests? #f)) ; no tests provided
7929 (home-page
7930 "https://github.com/claudep/translitcodec")
7931 (synopsis
7932 "Unicode to 8-bit charset transliteration codec")
7933 (description
7934 "This package contains codecs for transliterating ISO 10646 texts into
7935 best-effort representations using smaller coded character sets (ASCII,
7936 ISO 8859, etc.).")
7937 (license license:expat)))
7938
7939 (define-public python2-translitcodec
7940 (package-with-python2 python-translitcodec))
7941
7942 (define-public python-editor
7943 (package
7944 (name "python-editor")
7945 (version "0.5")
7946 (source
7947 (origin
7948 (method url-fetch)
7949 (uri (pypi-uri "python-editor" version))
7950 (sha256
7951 (base32
7952 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
7953 (build-system python-build-system)
7954 (home-page
7955 "https://github.com/fmoo/python-editor")
7956 (synopsis
7957 "Programmatically open an editor, capture the result")
7958 (description
7959 "python-editor is a library that provides the editor module for
7960 programmatically interfacing with your system's $EDITOR.")
7961 (license license:asl2.0)))
7962
7963 (define-public python2-editor
7964 (package-with-python2 python-editor))
7965
7966 (define-public python-sphinxcontrib-programoutput
7967 (package
7968 (name "python-sphinxcontrib-programoutput")
7969 (version "0.10")
7970 (source (origin
7971 (method url-fetch)
7972 (uri (pypi-uri "sphinxcontrib-programoutput" version))
7973 (sha256
7974 (base32
7975 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
7976 (build-system python-build-system)
7977 (arguments
7978 ;; FIXME: Many tests are failing and the upstream is gone.
7979 '(#:tests? #f))
7980 (propagated-inputs
7981 `(("python-sphinx" ,python-sphinx)))
7982 (synopsis "Sphinx extension to include program output")
7983 (description "A Sphinx extension to literally insert the output of arbitrary
7984 commands into documents, helping you to keep your command examples up to date.")
7985 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
7986 (license license:bsd-2)))
7987
7988 (define-public python2-sphinxcontrib-programoutput
7989 (package-with-python2 python-sphinxcontrib-programoutput))
7990
7991 (define-public python-sphinx-repoze-autointerface
7992 (package
7993 (name "python-sphinx-repoze-autointerface")
7994 (version "0.8")
7995 (source (origin
7996 (method url-fetch)
7997 (uri (pypi-uri "repoze.sphinx.autointerface" version))
7998 (sha256
7999 (base32
8000 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8001 (build-system python-build-system)
8002 (arguments '(#:tests? #f)) ; No tests.
8003 (propagated-inputs
8004 `(("python-sphinx" ,python-sphinx)
8005 ("python-zope-interface" ,python-zope-interface)))
8006 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8007 (description "This package defines an extension for the Sphinx documentation
8008 system. The extension allows generation of API documentation by
8009 introspection of @code{zope.interface} instances in code.")
8010 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8011 (license license:repoze)))
8012
8013 (define-public python2-sphinx-repoze-autointerface
8014 (package-with-python2 python-sphinx-repoze-autointerface))
8015
8016 (define-public python-vobject
8017 (package
8018 (name "python-vobject")
8019 (version "0.9.5")
8020 (source (origin
8021 (method url-fetch)
8022 (uri (pypi-uri "vobject" version))
8023 (sha256
8024 (base32
8025 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
8026 (build-system python-build-system)
8027 (arguments
8028 '(;; The test suite relies on some non-portable Windows interfaces.
8029 #:tests? #f))
8030 (propagated-inputs
8031 `(("python-dateutil" ,python-dateutil)
8032 ("python-pyicu" ,python-pyicu)))
8033 (synopsis "Parse and generate vCard and vCalendar files")
8034 (description "Vobject is intended to be a full featured Python package for
8035 parsing and generating vCard and vCalendar files. Currently, iCalendar files
8036 are supported and well tested. vCard 3.0 files are supported, and all data
8037 should be imported, but only a few components are understood in a sophisticated
8038 way.")
8039 (home-page "http://eventable.github.io/vobject/")
8040 (license license:asl2.0)))
8041
8042 (define-public python2-vobject
8043 (package-with-python2 python-vobject))
8044
8045 (define-public python-munkres
8046 (package
8047 (name "python-munkres")
8048 (version "1.0.8")
8049 (source (origin
8050 (method url-fetch)
8051 (uri (pypi-uri "munkres" version))
8052 (sha256
8053 (base32
8054 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
8055 (build-system python-build-system)
8056 (arguments
8057 '(#:tests? #f)) ; no test suite
8058 (home-page "http://software.clapper.org/munkres/")
8059 (synopsis "Implementation of the Munkres algorithm")
8060 (description "The Munkres module provides an implementation of the Munkres
8061 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8062 useful for solving the Assignment Problem.")
8063 (license license:bsd-3)))
8064
8065 (define-public python2-munkres
8066 (package-with-python2 python-munkres))
8067
8068 (define-public python-whoosh
8069 (package
8070 (name "python-whoosh")
8071 (version "2.7.4")
8072 (source
8073 (origin
8074 (method url-fetch)
8075 (uri (pypi-uri "Whoosh" version))
8076 (sha256
8077 (base32
8078 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8079 (build-system python-build-system)
8080 (native-inputs
8081 `(("python-pytest" ,python-pytest)))
8082 (home-page "https://bitbucket.org/mchaput/whoosh")
8083 (synopsis "Full text indexing, search, and spell checking library")
8084 (description
8085 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8086 checking library.")
8087 (license license:bsd-2)))
8088
8089 (define-public python2-whoosh
8090 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8091 (package (inherit whoosh)
8092 (propagated-inputs
8093 `(("python2-backport-ssl-match-hostname"
8094 ,python2-backport-ssl-match-hostname)
8095 ,@(package-propagated-inputs whoosh))))))
8096
8097 (define-public python-pathlib
8098 (package
8099 (name "python-pathlib")
8100 (version "1.0.1")
8101 (source (origin
8102 (method url-fetch)
8103 (uri (pypi-uri "pathlib" version))
8104 (sha256
8105 (base32
8106 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8107 (build-system python-build-system)
8108 ;; The tests depend on the internal "test" module, which does not provide
8109 ;; a stable interface.
8110 (arguments `(#:tests? #f))
8111 (home-page "https://pathlib.readthedocs.org/")
8112 (synopsis "Object-oriented file system paths")
8113 (description "Pathlib offers a set of classes to handle file system paths.
8114 It offers the following advantages over using string objects:
8115
8116 @enumerate
8117 @item No more cumbersome use of os and os.path functions. Everything can
8118 be done easily through operators, attribute accesses, and method calls.
8119 @item Embodies the semantics of different path types. For example,
8120 comparing Windows paths ignores casing.
8121 @item Well-defined semantics, eliminating any inconsistencies or
8122 ambiguities (forward vs. backward slashes, etc.).
8123 @end enumerate
8124
8125 Note: In Python 3.4, pathlib is now part of the standard library. For other
8126 Python versions please consider python-pathlib2 instead, which tracks the
8127 standard library module. This module (python-pathlib) isn't maintained
8128 anymore.")
8129 (license license:expat)))
8130
8131 (define-public python2-pathlib
8132 (package-with-python2 python-pathlib))
8133
8134 (define-public python2-pathlib2
8135 (package
8136 (name "python2-pathlib2")
8137 (version "2.3.0")
8138 (source (origin
8139 (method url-fetch)
8140 (uri (pypi-uri "pathlib2" version))
8141 (sha256
8142 (base32
8143 "1cx5gs2v9j2vnzmcrbq5l8fq2mwrr1h6pyf1sjdji2w1bavm09fk"))))
8144 (build-system python-build-system)
8145 ;; We only need the the Python 2 variant, since for Python 3 our minimum
8146 ;; version is 3.4 which already includes this package as part of the
8147 ;; standard library.
8148 (arguments
8149 `(#:python ,python-2))
8150 (propagated-inputs
8151 `(("python2-scandir" ,python2-scandir)
8152 ("python2-six" ,python2-six)))
8153 (home-page "https://pypi.python.org/pypi/pathlib2/")
8154 (synopsis "Object-oriented file system paths - backport of standard
8155 pathlib module")
8156 (description "The goal of pathlib2 is to provide a backport of standard
8157 pathlib module which tracks the standard library module, so all the newest
8158 features of the standard pathlib can be used also on older Python versions.
8159
8160 Pathlib offers a set of classes to handle file system paths. It offers the
8161 following advantages over using string objects:
8162
8163 @enumerate
8164 @item No more cumbersome use of os and os.path functions. Everything can
8165 be done easily through operators, attribute accesses, and method calls.
8166 @item Embodies the semantics of different path types. For example,
8167 comparing Windows paths ignores casing.
8168 @item Well-defined semantics, eliminating any inconsistencies or
8169 ambiguities (forward vs. backward slashes, etc.).
8170 @end enumerate")
8171 (license license:expat)))
8172
8173 (define-public python-jellyfish
8174 (package
8175 (name "python-jellyfish")
8176 (version "0.5.6")
8177 (source (origin
8178 (method url-fetch)
8179 (uri (pypi-uri "jellyfish" version))
8180 (sha256
8181 (base32
8182 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
8183 (build-system python-build-system)
8184 (native-inputs
8185 `(("python-pytest" ,python-pytest)))
8186 (home-page "https://github.com/jamesturk/jellyfish")
8187 (synopsis "Approximate and phonetic matching of strings")
8188 (description "Jellyfish uses a variety of string comparison and phonetic
8189 encoding algorithms to do fuzzy string matching.")
8190 (license license:bsd-2)
8191 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8192
8193 (define-public python2-jellyfish
8194 (let ((jellyfish (package-with-python2
8195 (strip-python2-variant python-jellyfish))))
8196 (package (inherit jellyfish)
8197 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
8198 ,@(package-native-inputs jellyfish))))))
8199
8200 (define-public python2-unicodecsv
8201 (package
8202 (name "python2-unicodecsv")
8203 (version "0.14.1")
8204 (source (origin
8205 (method url-fetch)
8206 ;; The test suite is not included in the PyPi release.
8207 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8208 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8209 "archive/" version ".tar.gz"))
8210 (file-name (string-append name "-" version ".tar.gz"))
8211 (sha256
8212 (base32
8213 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8214 (build-system python-build-system)
8215 (arguments
8216 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8217 #:python ,python-2))
8218 (native-inputs
8219 `(("python2-unittest2" ,python2-unittest2)))
8220 (home-page "https://github.com/jdunck/python-unicodecsv")
8221 (synopsis "Unicode CSV module for Python 2")
8222 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8223 module, adding support for Unicode strings.")
8224 (license license:bsd-2)))
8225
8226 (define-public python-rarfile
8227 (package
8228 (name "python-rarfile")
8229 (version "2.8")
8230 (source (origin
8231 (method url-fetch)
8232 (uri (pypi-uri "rarfile" version))
8233 (sha256
8234 (base32
8235 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
8236 (build-system python-build-system)
8237 (arguments
8238 '(#:phases
8239 (modify-phases %standard-phases
8240 (replace 'check
8241 ;; Many tests fail, but the installation proceeds.
8242 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
8243 (native-inputs
8244 `(("which" ,which))) ; required for tests
8245 (propagated-inputs
8246 `(("libarchive" ,libarchive)))
8247 (home-page "https://github.com/markokr/rarfile")
8248 (synopsis "RAR archive reader for Python")
8249 (description "This is Python module for RAR archive reading. The interface
8250 is made as zipfile like as possible.")
8251 (license license:isc)))
8252
8253 (define-public python2-rarfile
8254 (package-with-python2 python-rarfile))
8255
8256 (define-public python-magic
8257 (package
8258 (name "python-magic")
8259 (version "0.4.15")
8260 (source
8261 (origin
8262 (method url-fetch)
8263 (uri (pypi-uri "python-magic" version))
8264 (sha256
8265 (base32
8266 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
8267 (file-name (string-append name "-" version "-checkout"))))
8268 (build-system python-build-system)
8269 (arguments
8270 ;; The tests are unreliable, so don't run them. The tests fail
8271 ;; under Python3 because they were written for Python2 and
8272 ;; contain import statements that do not work in Python3. One of
8273 ;; the tests fails under Python2 because its assertions are
8274 ;; overly stringent; it relies on comparing output strings which
8275 ;; are brittle and can change depending on the version of
8276 ;; libmagic being used and the system on which the test is
8277 ;; running. In my case, under GuixSD 0.10.0, only one test
8278 ;; failed, and it seems to have failed only because the version
8279 ;; of libmagic that is packaged in Guix outputs a slightly
8280 ;; different (but not wrong) string than the one that the test
8281 ;; expected.
8282 '(#:tests? #f
8283 #:phases (modify-phases %standard-phases
8284 ;; Replace a specific method call with a hard-coded
8285 ;; path to the necessary libmagic.so file in the
8286 ;; store. If we don't do this, then the method call
8287 ;; will fail to find the libmagic.so file, which in
8288 ;; turn will cause any application using
8289 ;; python-magic to fail.
8290 (add-before 'build 'hard-code-path-to-libmagic
8291 (lambda* (#:key inputs #:allow-other-keys)
8292 (let ((file (assoc-ref inputs "file")))
8293 (substitute* "magic.py"
8294 (("ctypes.util.find_library\\('magic'\\)")
8295 (string-append "'" file "/lib/libmagic.so'")))
8296 #t)))
8297 (add-before 'install 'disable-egg-compression
8298 (lambda _
8299 (let ((port (open-file "setup.cfg" "a")))
8300 (display "\n[easy_install]\nzip_ok = 0\n"
8301 port)
8302 (close-port port)
8303 #t))))))
8304 (inputs
8305 ;; python-magic needs to be able to find libmagic.so.
8306 `(("file" ,file)))
8307 (home-page
8308 "https://github.com/ahupp/python-magic")
8309 (synopsis
8310 "File type identification using libmagic")
8311 (description
8312 "This module uses ctypes to access the libmagic file type
8313 identification library. It makes use of the local magic database and
8314 supports both textual and MIME-type output. Note that this module and
8315 the python-file module both provide a \"magic.py\" file; these two
8316 modules, which are different and were developed separately, both serve
8317 the same purpose: to provide Python bindings for libmagic.")
8318 (license license:expat)))
8319
8320 (define-public python2-magic
8321 (package-with-python2 python-magic))
8322
8323 (define-public python2-s3cmd
8324 (package
8325 (name "python2-s3cmd")
8326 (version "1.6.1")
8327 (source
8328 (origin
8329 (method url-fetch)
8330 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
8331 "s3cmd-" version ".tar.gz"))
8332 (sha256
8333 (base32
8334 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8335 (build-system python-build-system)
8336 (arguments
8337 ;; s3cmd is written for python2 only and contains no tests.
8338 `(#:python ,python-2
8339 #:tests? #f))
8340 (propagated-inputs
8341 `(("python2-dateutil" ,python2-dateutil)
8342 ;; The python-file package also provides a magic.py module.
8343 ;; This is an unfortunate state of affairs; however, s3cmd
8344 ;; fails to install if it cannot find specifically the
8345 ;; python-magic package. Thus we include it, instead of using
8346 ;; python-file. Ironically, s3cmd sometimes works better
8347 ;; without libmagic bindings at all:
8348 ;; https://github.com/s3tools/s3cmd/issues/198
8349 ("python2-magic" ,python2-magic)))
8350 (home-page "http://s3tools.org/s3cmd")
8351 (synopsis "Command line tool for S3-compatible storage services")
8352 (description
8353 "S3cmd is a command line tool for uploading, retrieving and managing data
8354 in storage services that are compatible with the Amazon Simple Storage
8355 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
8356 GnuPG encryption, and more. It also supports management of Amazon's
8357 CloudFront content delivery network.")
8358 (license license:gpl2+)))
8359
8360 (define-public python-pkgconfig
8361 (package
8362 (name "python-pkgconfig")
8363 (version "1.1.0")
8364 (source
8365 (origin
8366 (method url-fetch)
8367 (uri (pypi-uri "pkgconfig" version))
8368 (sha256
8369 (base32
8370 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
8371 (build-system python-build-system)
8372 (native-inputs
8373 `(("python-nose" ,python-nose)))
8374 (inputs
8375 `(("pkg-config" ,pkg-config)))
8376 (arguments
8377 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
8378 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
8379 #:tests? #f
8380 ;; Hard-code the path to pkg-config.
8381 #:phases
8382 (modify-phases %standard-phases
8383 (add-before
8384 'build 'patch
8385 (lambda _
8386 (substitute* "pkgconfig/pkgconfig.py"
8387 (("cmd = 'pkg-config")
8388 (string-append "cmd = '" (which "pkg-config"))))
8389 #t)))))
8390 (home-page "https://github.com/matze/pkgconfig")
8391 (synopsis "Python interface for pkg-config")
8392 (description "This module provides a Python interface to pkg-config. It
8393 can be used to find all pkg-config packages, check if a package exists,
8394 check if a package meets certain version requirements, query CFLAGS and
8395 LDFLAGS and parse the output to build extensions with setup.py.")
8396 (license license:expat)))
8397
8398 (define-public python2-pkgconfig
8399 (package-with-python2 python-pkgconfig))
8400
8401 (define-public python-bz2file
8402 (package
8403 (name "python-bz2file")
8404 (version "0.98")
8405 (source
8406 (origin
8407 (method url-fetch)
8408 (uri (pypi-uri "bz2file" version))
8409 (sha256
8410 (base32
8411 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
8412 (build-system python-build-system)
8413 (arguments
8414 `(#:tests? #f)) ; Tests use deprecated python modules.
8415 (home-page "https://github.com/nvawda/bz2file")
8416 (synopsis "Read and write bzip2-compressed files")
8417 (description
8418 "Bz2file is a Python library for reading and writing bzip2-compressed
8419 files. It contains a drop-in replacement for the I/O interface in the
8420 standard library's @code{bz2} module, including features from the latest
8421 development version of CPython that are not available in older releases.")
8422 (license license:asl2.0)
8423 (properties `((python2-variant . ,(delay python2-bz2file))))))
8424
8425 (define-public python2-bz2file
8426 (let ((base (package-with-python2
8427 (strip-python2-variant python-bz2file))))
8428 (package
8429 (inherit base)
8430 (arguments
8431 `(#:python ,python-2
8432 #:phases
8433 (modify-phases %standard-phases
8434 ;; 'python setup.py test' does not work as of 0.98.
8435 ;; There is only the one test file, so we run it directly.
8436 (replace 'check
8437 (lambda _ (zero? (system* "python"
8438 "test_bz2file.py"))))))))))
8439
8440 (define-public python-future
8441 (package
8442 (name "python-future")
8443 (version "0.16.0")
8444 (source
8445 (origin
8446 (method url-fetch)
8447 (uri (pypi-uri "future" version))
8448 (sha256
8449 (base32
8450 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
8451 (build-system python-build-system)
8452 ;; Many tests connect to the network or are otherwise flawed.
8453 ;; https://github.com/PythonCharmers/python-future/issues/210
8454 (arguments
8455 `(#:tests? #f))
8456 (home-page "http://python-future.org")
8457 (synopsis "Single-source support for Python 3 and 2")
8458 (description
8459 "@code{python-future} is the missing compatibility layer between Python 2 and
8460 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
8461 to support both Python 2 and Python 3 with minimal overhead.")
8462 (license license:expat)))
8463
8464 (define-public python2-future
8465 (package-with-python2 python-future))
8466
8467 (define-public python-cysignals
8468 (package
8469 (name "python-cysignals")
8470 (version "1.1.0")
8471 (source
8472 (origin
8473 (method url-fetch)
8474 (uri (pypi-uri "cysignals" version ".tar.bz2"))
8475 (sha256
8476 (base32
8477 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
8478 (build-system python-build-system)
8479 (native-inputs
8480 `(("python-cython" ,python-cython)
8481 ("python-sphinx" ,python-sphinx)))
8482 (inputs
8483 `(("pari-gp" ,pari-gp)))
8484 (arguments
8485 `(#:modules ((guix build python-build-system)
8486 ((guix build gnu-build-system) #:prefix gnu:)
8487 (guix build utils))
8488 ;; FIXME: Tests are executed after installation and currently fail
8489 ;; when not installing into standard locations; the author is working
8490 ;; on a fix.
8491 #:tests? #f
8492 #:phases
8493 (modify-phases %standard-phases
8494 (add-before
8495 'build 'configure
8496 (assoc-ref gnu:%standard-phases 'configure)))))
8497 (home-page
8498 "https://github.com/sagemath/cysignals")
8499 (synopsis
8500 "Handling of interrupts and signals for Cython")
8501 (description
8502 "The cysignals package provides mechanisms to handle interrupts (and
8503 other signals and errors) in Cython code, using two related approaches,
8504 for mixed Cython/Python code or external C libraries and pure Cython code,
8505 respectively.")
8506 (license license:lgpl3+)))
8507
8508 (define-public python2-cysignals
8509 (package-with-python2 python-cysignals))
8510
8511 (define-public python2-shedskin
8512 (package
8513 (name "python2-shedskin")
8514 (version "0.9.4")
8515 (source
8516 (origin
8517 (method url-fetch)
8518 (uri (string-append "https://github.com/shedskin/shedskin/"
8519 "releases/download/v" version
8520 "/shedskin-" version ".tgz"))
8521 (sha256
8522 (base32
8523 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
8524 (build-system python-build-system)
8525 (arguments
8526 `(#:python ,python-2
8527 #:phases (modify-phases %standard-phases
8528 (add-after 'unpack 'fix-resulting-include-libs
8529 (lambda* (#:key inputs #:allow-other-keys)
8530 (let ((libgc (assoc-ref inputs "libgc"))
8531 (pcre (assoc-ref inputs "pcre")))
8532 (substitute* "shedskin/makefile.py"
8533 (("variable == 'CCFLAGS':[ ]*")
8534 (string-append "variable == 'CCFLAGS':\n"
8535 " line += ' -I " pcre "/include"
8536 " -I " libgc "/include'"))
8537 (("variable == 'LFLAGS':[ ]*")
8538 (string-append "variable == 'LFLAGS':\n"
8539 " line += ' -L" pcre "/lib"
8540 " -L " libgc "/lib'")))
8541 #t))))))
8542 (inputs `(("pcre" ,pcre)
8543 ("libgc" ,libgc)))
8544 (home-page "https://shedskin.github.io/")
8545 (synopsis "Experimental Python-2 to C++ Compiler")
8546 (description (string-append "This is an experimental compiler for a subset of
8547 Python. It generates C++ code and a Makefile."))
8548 (license (list license:gpl3 license:bsd-3 license:expat))))
8549
8550 (define-public python2-rope
8551 (package
8552 (name "python2-rope")
8553 (version "0.10.3")
8554 (source
8555 (origin
8556 (method url-fetch)
8557 (uri (pypi-uri "rope" version))
8558 (sha256
8559 (base32
8560 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
8561 (arguments
8562 ;; Rope is currently python-2 only.
8563 ;; https://github.com/python-rope/rope/issues/57
8564 `(#:python ,python-2))
8565 (build-system python-build-system)
8566 (native-inputs
8567 `(("python2-unittest2" ,python2-unittest2)))
8568 (home-page "https://github.com/python-rope/rope")
8569 (synopsis "Refactoring library for Python")
8570 (description "Rope is a refactoring library for Python. It facilitates
8571 the renaming, moving and extracting of attributes, functions, modules, fields
8572 and parameters in Python 2 source code. These refactorings can also be applied
8573 to occurrences in strings and comments.")
8574 (license license:gpl2)))
8575
8576 (define-public python-py3status
8577 (package
8578 (name "python-py3status")
8579 (version "3.1")
8580 (source
8581 (origin
8582 (method url-fetch)
8583 (uri (pypi-uri "py3status" version))
8584 (sha256
8585 (base32
8586 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
8587 (build-system python-build-system)
8588 (inputs
8589 `(("file" ,file)))
8590 (arguments
8591 '(#:phases
8592 (modify-phases %standard-phases
8593 ;; 'file' is used for detection of configuration file encoding
8594 ;; let's make link the dependency to particular input
8595 (add-before 'build 'patch-file-path
8596 (lambda* (#:key inputs #:allow-other-keys)
8597 (let ((file-path (assoc-ref inputs "file")))
8598 (substitute* "py3status/parse_config.py"
8599 (("check_output\\(\\['file'")
8600 (string-append "check_output(['" file-path "/bin/file'")))
8601 #t))))
8602 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
8603 (home-page "https://github.com/ultrabug/py3status")
8604 (synopsis "Extensible i3status wrapper written in Python")
8605 (description "py3status is an i3status wrapper which extends i3status
8606 functionality in a modular way, allowing you to extend your panel with your
8607 own code, responding to click events and updating clock every second.")
8608 (license license:bsd-3)))
8609
8610 (define-public python-tblib
8611 (package
8612 (name "python-tblib")
8613 (version "1.3.2")
8614 (source (origin
8615 (method url-fetch)
8616 (uri (pypi-uri "tblib" version))
8617 (sha256 (base32
8618 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
8619 (build-system python-build-system)
8620 (arguments
8621 `(#:phases
8622 (modify-phases %standard-phases
8623 (replace 'check
8624 (lambda _
8625 ;; Upstream runs tests after installation and the package itself
8626 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
8627 ;; found.
8628 (setenv "PYTHONPATH"
8629 (string-append (getcwd) "/build/lib:"
8630 (getenv "PYTHONPATH")))
8631 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
8632 (native-inputs
8633 `(("python-pytest" ,python-pytest)
8634 ("python-six" ,python-six)))
8635 (home-page "https://github.com/ionelmc/python-tblib")
8636 (synopsis "Traceback serialization library")
8637 (description
8638 "Traceback serialization allows you to:
8639
8640 @enumerate
8641 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
8642 different processes. This allows better error handling when running code over
8643 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
8644
8645 @item Parse traceback strings and raise with the parsed tracebacks.
8646 @end enumerate\n")
8647 (license license:bsd-3)))
8648
8649 (define-public python2-tblib
8650 (package-with-python2 python-tblib))
8651
8652 (define-public python-greenlet
8653 (package
8654 (name "python-greenlet")
8655 (version "0.4.11")
8656 (source (origin
8657 (method url-fetch)
8658 (uri (pypi-uri "greenlet" version))
8659 (sha256
8660 (base32
8661 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
8662 (build-system python-build-system)
8663 (home-page "https://greenlet.readthedocs.io/")
8664 (synopsis "Lightweight in-process concurrent programming")
8665 (description
8666 "Greenlet package is a spin-off of Stackless, a version of CPython
8667 that supports micro-threads called \"tasklets\". Tasklets run
8668 pseudo-concurrently (typically in a single or a few OS-level threads) and
8669 are synchronized with data exchanges on \"channels\".")
8670 (license (list license:psfl license:expat))))
8671
8672 (define-public python2-greenlet
8673 (package-with-python2 python-greenlet))
8674
8675 (define-public python-gevent
8676 (package
8677 (name "python-gevent")
8678 (version "1.2.2")
8679 (source (origin
8680 (method url-fetch)
8681 (uri (pypi-uri "gevent" version))
8682 (sha256
8683 (base32
8684 "0bbbjvi423y9k9xagrcsimnayaqymg6f2dj76m9z3mjpkjpci4a7"))
8685 (modules '((guix build utils)))
8686 (snippet
8687 '(begin
8688 ;; unbunding libev and c-ares
8689 (delete-file-recursively "deps")
8690 #t))))
8691 (build-system python-build-system)
8692 (arguments
8693 `(#:modules ((ice-9 ftw)
8694 (srfi srfi-26)
8695 (guix build utils)
8696 (guix build python-build-system))
8697 #:phases (modify-phases %standard-phases
8698 (add-after 'unpack 'unpack-libev
8699 (lambda* (#:key inputs #:allow-other-keys)
8700 (mkdir-p "deps/libev")
8701 ;; FIXME: gevent requires building libev, even though
8702 ;; it only links against the proper one.
8703 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
8704 "--strip-components=1" "-C" "deps/libev")))
8705 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
8706 (lambda _
8707 (substitute* "src/gevent/subprocess.py"
8708 (("/bin/sh") (which "sh")))
8709 (for-each (lambda (file)
8710 (substitute* file
8711 (("/bin/sh") (which "sh"))
8712 (("/bin/true") (which "true"))))
8713 (find-files "src/greentest" "\\.py$"))
8714 #t))
8715 (add-before 'build 'do-not-use-bundled-sources
8716 (lambda _
8717 (setenv "CONFIG_SHELL" (which "bash"))
8718 (setenv "LIBEV_EMBED" "false")
8719 (setenv "CARES_EMBED" "false")
8720 (setenv "EMBED" "false")
8721 #t))
8722 (replace 'check
8723 (lambda _
8724 ;; Make sure the build directory is on PYTHONPATH.
8725 (setenv "PYTHONPATH"
8726 (string-append
8727 (getenv "PYTHONPATH") ":"
8728 (getcwd) "/build/"
8729 (car (scandir "build" (cut string-prefix? "lib." <>)))))
8730 (with-directory-excursion "src/greentest"
8731 ;; XXX: Many tests require network access. Instead we only
8732 ;; run known-good tests. Unfortunately we cannot use
8733 ;; recursion here since this directory also contains
8734 ;; Python-version-specific subfolders.
8735 (apply invoke "python" "testrunner.py" "--config"
8736 "known_failures.py"
8737 (scandir "." (cut regexp-exec
8738 (make-regexp "test_+(subprocess|core)")
8739 <>)))))))))
8740 (propagated-inputs
8741 `(("python-greenlet" ,python-greenlet)))
8742 (native-inputs
8743 `(("libev-source" ,(package-source libev))
8744 ("python-six" ,python-six)))
8745 (inputs
8746 `(("c-ares" ,c-ares)
8747 ("libev" ,libev)))
8748 (home-page "http://www.gevent.org/")
8749 (synopsis "Coroutine-based network library")
8750 (description
8751 "gevent is a coroutine-based Python networking library that uses greenlet
8752 to provide a high-level synchronous API on top of the libev event loop.")
8753 (license license:expat)))
8754
8755 (define-public python2-gevent
8756 (package-with-python2 python-gevent))
8757
8758 (define-public python-fastimport
8759 (package
8760 (name "python-fastimport")
8761 (version "0.9.6")
8762 (source
8763 (origin
8764 (method url-fetch)
8765 (uri (pypi-uri "fastimport" version))
8766 (sha256
8767 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
8768 (build-system python-build-system)
8769 (home-page "https://github.com/jelmer/python-fastimport")
8770 (synopsis "VCS fastimport parser and generator in Python")
8771 (description "This package provides a parser for and generator of the Git
8772 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
8773 format.")
8774 (license license:gpl2+)))
8775
8776 (define-public python2-fastimport
8777 (package-with-python2 python-fastimport))
8778
8779 (define-public python-twisted
8780 (package
8781 (name "python-twisted")
8782 (version "17.1.0")
8783 (source (origin
8784 (method url-fetch)
8785 (uri (pypi-uri "Twisted" version ".tar.bz2"))
8786 (sha256
8787 (base32
8788 "1p245mg15hkxp7hy5cyq2fgvlgjkb4cg0gwkwd148nzy1bbi3wnv"))))
8789 (build-system python-build-system)
8790 (arguments
8791 '(#:tests? #f)) ; FIXME: Some tests are failing.
8792 ;; #:phases
8793 ;; (modify-phases %standard-phases
8794 ;; (replace 'check
8795 ;; (lambda _
8796 ;; (zero? (system* "./bin/trial" "twisted")))))
8797 (propagated-inputs
8798 `(("python-zope-interface" ,python-zope-interface)
8799 ("python-incremental" ,python-incremental)
8800 ("python-constantly" ,python-constantly)
8801 ("python-automat" ,python-automat)))
8802 (home-page "https://twistedmatrix.com/")
8803 (synopsis "Asynchronous networking framework written in Python")
8804 (description
8805 "Twisted is an extensible framework for Python programming, with special
8806 focus on event-based network programming and multiprotocol integration.")
8807 (license license:expat)))
8808
8809 (define-public python2-twisted
8810 (package-with-python2 python-twisted))
8811
8812 (define-public python-pika
8813 (package
8814 (name "python-pika")
8815 (version "0.10.0")
8816 (source
8817 (origin
8818 (method url-fetch)
8819 (uri (pypi-uri "pika" version))
8820 (sha256
8821 (base32
8822 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
8823 (build-system python-build-system)
8824 (native-inputs
8825 `(("python-pyev" ,python-pyev)
8826 ("python-tornado" ,python-tornado)
8827 ("python-twisted" ,python-twisted)))
8828 (home-page "https://pika.readthedocs.org")
8829 (synopsis "Pure Python AMQP Client Library")
8830 (description
8831 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
8832 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
8833 network support library.")
8834 (license license:bsd-3)))
8835
8836 (define-public python2-pika
8837 (package-with-python2 python-pika))
8838
8839 (define-public python-ply
8840 (package
8841 (name "python-ply")
8842 (version "3.10")
8843 (source
8844 (origin
8845 (method url-fetch)
8846 (uri (pypi-uri "ply" version))
8847 (sha256
8848 (base32
8849 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
8850 (build-system python-build-system)
8851 (home-page "http://www.dabeaz.com/ply/")
8852 (synopsis "Python Lex & Yacc")
8853 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
8854 It uses LR parsing and does extensive error checking.")
8855 (license license:bsd-3)))
8856
8857 (define-public python2-ply
8858 (package-with-python2 python-ply))
8859
8860 (define-public python-tabulate
8861 (package
8862 (name "python-tabulate")
8863 (version "0.7.7")
8864 (source (origin
8865 (method url-fetch)
8866 (uri (pypi-uri "tabulate" version))
8867 (sha256
8868 (base32
8869 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
8870 (build-system python-build-system)
8871 (arguments
8872 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
8873 ;; and the latest release is not tagged in the upstream repository.
8874 '(#:tests? #f))
8875 (home-page "https://bitbucket.org/astanin/python-tabulate")
8876 (synopsis "Pretty-print tabular data")
8877 (description
8878 "Tabulate is a library and command-line utility to pretty-print tabular
8879 data in Python.")
8880 (license license:expat)))
8881
8882 (define-public python2-tabulate
8883 (package-with-python2 python-tabulate))
8884
8885 (define-public python-kazoo
8886 (package
8887 (name "python-kazoo")
8888 (version "2.4.0")
8889 (source
8890 (origin
8891 (method url-fetch)
8892 (uri (pypi-uri "kazoo" version))
8893 (sha256
8894 (base32
8895 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
8896 (build-system python-build-system)
8897 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
8898 (propagated-inputs
8899 `(("python-six" ,python-six)))
8900 (home-page "https://kazoo.readthedocs.org")
8901 (synopsis "High-level Zookeeper client library")
8902 (description
8903 "Kazoo is a Python client library for the Apache Zookeeper distributed
8904 application service. It is designed to be easy to use and to avoid common
8905 programming errors.")
8906 (license license:asl2.0)))
8907
8908 (define-public python2-kazoo
8909 (package-with-python2 python-kazoo))
8910
8911 (define-public python-pykafka
8912 (package
8913 (name "python-pykafka")
8914 (version "2.4.0")
8915 (source (origin
8916 (method url-fetch)
8917 (uri (string-append
8918 "https://pypi.python.org/packages/8b/3e/"
8919 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
8920 "pykafka-" version ".tar.gz"))
8921 (sha256
8922 (base32
8923 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
8924 (build-system python-build-system)
8925 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
8926 (propagated-inputs
8927 `(("python-gevent" ,python-gevent)
8928 ("python-kazoo" ,python-kazoo)
8929 ("python-tabulate" ,python-tabulate)))
8930 (inputs
8931 `(("librdkafka" ,librdkafka)))
8932 (home-page "https://pykafka.readthedocs.io/")
8933 (synopsis "Apache Kafka client for Python")
8934 (description
8935 "PyKafka is a client for the Apache Kafka distributed messaging system.
8936 It includes Python implementations of Kafka producers and consumers, which
8937 are optionally backed by a C extension built on librdkafka.")
8938 (license license:asl2.0)))
8939
8940 (define-public python2-pykafka
8941 (package-with-python2 python-pykafka))
8942
8943 (define-public python-wcwidth
8944 (package
8945 (name "python-wcwidth")
8946 (version "0.1.7")
8947 (source
8948 (origin
8949 (method url-fetch)
8950 (uri (pypi-uri "wcwidth" version))
8951 (sha256
8952 (base32
8953 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
8954 (build-system python-build-system)
8955 (home-page "https://github.com/jquast/wcwidth")
8956 (synopsis "Measure number of terminal column cells of wide-character codes")
8957 (description "Wcwidth measures the number of terminal column cells of
8958 wide-character codes. It is useful for those implementing a terminal emulator,
8959 or programs that carefully produce output to be interpreted by one. It is a
8960 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
8961 specified in POSIX.1-2001 and POSIX.1-2008.")
8962 (license license:expat)))
8963
8964 (define-public python2-wcwidth
8965 (package-with-python2 python-wcwidth))
8966
8967 (define-public python2-jsonrpclib
8968 (package
8969 (name "python2-jsonrpclib")
8970 (version "0.1.7")
8971 (source (origin
8972 (method url-fetch)
8973 (uri (string-append
8974 "https://pypi.python.org/packages/source/j/jsonrpclib/"
8975 "jsonrpclib-" version ".tar.gz"))
8976 (sha256
8977 (base32
8978 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
8979 (build-system python-build-system)
8980 (arguments
8981 `(#:tests? #f
8982 #:python ,python-2))
8983 (home-page "https://github.com/joshmarshall/jsonrpclib/")
8984 (synopsis "Implementation of JSON-RPC specification for Python")
8985 (description
8986 "This library is an implementation of the JSON-RPC specification.
8987 It supports both the original 1.0 specification, as well as the
8988 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
8989 etc.")
8990 (license license:asl2.0)))
8991
8992 (define-public python-chai
8993 (package
8994 (name "python-chai")
8995 (version "1.1.2")
8996 (source (origin
8997 (method url-fetch)
8998 (uri (pypi-uri "chai" version))
8999 (sha256
9000 (base32
9001 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
9002 (build-system python-build-system)
9003 (home-page "https://github.com/agoragames/chai")
9004 (synopsis "Mocking framework for Python")
9005 (description
9006 "Chai provides an api for mocking, stubbing and spying your python
9007 objects, patterned after the Mocha library for Ruby.")
9008 (license license:bsd-3)))
9009
9010 (define-public python2-chai
9011 (package-with-python2 python-chai))
9012
9013 (define-public python-inflection
9014 (package
9015 (name "python-inflection")
9016 (version "0.3.1")
9017 (source
9018 (origin (method url-fetch)
9019 (uri (pypi-uri "inflection" version))
9020 (sha256
9021 (base32
9022 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9023 (build-system python-build-system)
9024 (native-inputs
9025 `(("python-pytest" ,python-pytest)))
9026 (home-page "https://github.com/jpvanhal/inflection")
9027 (synopsis "Python string transformation library")
9028 (description
9029 "Inflection is a string transformation library. It singularizes
9030 and pluralizes English words, and transforms strings from CamelCase to
9031 underscored string.")
9032 (license license:expat)))
9033
9034 (define-public python2-inflection
9035 (package-with-python2 python-inflection))
9036
9037 (define-public python-pylev
9038 (package
9039 (name "python-pylev")
9040 (version "1.3.0")
9041 (source (origin
9042 (method url-fetch)
9043 (uri (pypi-uri "pylev" version))
9044 (sha256
9045 (base32
9046 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9047 (build-system python-build-system)
9048 (home-page "https://github.com/toastdriven/pylev")
9049 (synopsis "Levenshtein distance implementation in Python")
9050 (description "Pure Python Levenshtein implementation, based off the
9051 Wikipedia code samples at
9052 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9053 (license license:bsd-3)))
9054
9055 (define-public python2-pylev
9056 (package-with-python2 python-pylev))
9057
9058 (define-public python-cleo
9059 (package
9060 (name "python-cleo")
9061 (version "0.6.1")
9062 (source (origin
9063 (method url-fetch)
9064 (uri (pypi-uri "cleo" version))
9065 (sha256
9066 (base32
9067 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
9068 (build-system python-build-system)
9069 (native-inputs
9070 `(;; For testing
9071 ("python-mock" ,python-mock)
9072 ("python-pytest-mock" ,python-pytest-mock)
9073 ("python-pytest" ,python-pytest)))
9074 (propagated-inputs
9075 `(("python-backpack" ,python-backpack)
9076 ("python-pastel" ,python-pastel)
9077 ("python-pylev" ,python-pylev)))
9078 (home-page "https://github.com/sdispater/cleo")
9079 (synopsis "Command-line arguments library for Python")
9080 (description
9081 "Cleo allows you to create command-line commands with signature in
9082 docstring and colored output.")
9083 (license license:expat)))
9084
9085 (define-public python2-cleo
9086 (package-with-python2 python-cleo))
9087
9088 (define-public python-lazy-object-proxy
9089 (package
9090 (name "python-lazy-object-proxy")
9091 (version "1.2.2")
9092 (source (origin
9093 (method url-fetch)
9094 (uri (pypi-uri "lazy-object-proxy" version))
9095 (sha256
9096 (base32
9097 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
9098 (build-system python-build-system)
9099 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9100 (synopsis "Lazy object proxy for python")
9101 (description
9102 "Lazy object proxy is an object that wraps a callable but defers the call
9103 until the object is actually required, and caches the result of said call.")
9104 (license license:bsd-2)))
9105
9106 (define-public python2-lazy-object-proxy
9107 (package-with-python2 python-lazy-object-proxy))
9108
9109 (define-public python-dnspython
9110 (package
9111 (name "python-dnspython")
9112 (version "1.15.0")
9113 (source (origin
9114 (method url-fetch)
9115 (uri (string-append "http://www.dnspython.org/kits/"
9116 version "/dnspython-" version ".tar.gz"))
9117 (sha256
9118 (base32
9119 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
9120 (build-system python-build-system)
9121 (arguments '(#:tests? #f)) ; XXX: requires internet access
9122 (home-page "http://www.dnspython.org")
9123 (synopsis "DNS toolkit for Python")
9124 (description
9125 "dnspython is a DNS toolkit for Python. It supports almost all record
9126 types. It can be used for queries, zone transfers, and dynamic updates.
9127 It supports TSIG authenticated messages and EDNS0.")
9128 (license license:expat)))
9129
9130 (define-public python2-dnspython
9131 (package-with-python2 python-dnspython))
9132
9133 (define-public python-email-validator
9134 (package
9135 (name "python-email-validator")
9136 (version "1.0.2")
9137 (source
9138 (origin (method url-fetch)
9139 (uri (pypi-uri "email_validator" version))
9140 (sha256
9141 (base32
9142 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
9143 (build-system python-build-system)
9144 (arguments
9145 '(#:phases
9146 (modify-phases %standard-phases
9147 (add-before 'build 'use-dnspython
9148 (lambda _
9149 (substitute* "setup.py"
9150 (("dnspython3") "dnspython"))
9151 #t)))))
9152 (propagated-inputs
9153 `(("python-dnspython" ,python-dnspython)
9154 ("python-idna" ,python-idna)))
9155 (home-page "https://github.com/JoshData/python-email-validator")
9156 (synopsis "Email address validation library for Python")
9157 (description
9158 "This library validates email address syntax and deliverability.")
9159 (license license:cc0)))
9160
9161 (define-public python2-email-validator
9162 (package-with-python2 python-email-validator))
9163
9164 (define-public python-ukpostcodeparser
9165 (package
9166 (name "python-ukpostcodeparser")
9167 (version "1.0.3")
9168 (source (origin
9169 (method url-fetch)
9170 (uri (pypi-uri "UkPostcodeParser" version))
9171 (sha256
9172 (base32
9173 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9174 (build-system python-build-system)
9175 (home-page "https://github.com/hamstah/ukpostcodeparser")
9176 (synopsis "UK Postcode parser for Python")
9177 (description
9178 "This library provides the @code{parse_uk_postcode} function for
9179 parsing UK postcodes.")
9180 (license license:expat)))
9181
9182 (define-public python2-ukpostcodeparser
9183 (package-with-python2 python-ukpostcodeparser))
9184
9185 (define-public python-faker
9186 (package
9187 (name "python-faker")
9188 (version "0.7.9")
9189 (source (origin
9190 (method url-fetch)
9191 (uri (pypi-uri "Faker" version))
9192 (sha256
9193 (base32
9194 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
9195 (patches
9196 (search-patches "python-faker-fix-build-32bit.patch"))
9197 (modules '((guix build utils)))
9198 (snippet
9199 '(begin
9200 (for-each delete-file (find-files "." "\\.pyc$"))
9201 #t))))
9202 (build-system python-build-system)
9203 (arguments
9204 '(#:phases
9205 (modify-phases %standard-phases
9206 (replace 'check
9207 (lambda _
9208 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
9209 (native-inputs
9210 `(;; For testing
9211 ("python-email-validator" ,python-email-validator)
9212 ("python-mock" ,python-mock)
9213 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
9214 (propagated-inputs
9215 `(("python-dateutil" ,python-dateutil)
9216 ("python-six" ,python-six)))
9217 (home-page "https://github.com/joke2k/faker")
9218 (synopsis "Python package that generates fake data")
9219 (description
9220 "Faker is a Python package that generates fake data such as names,
9221 addresses, and phone numbers.")
9222 (license license:expat)
9223 (properties `((python2-variant . ,(delay python2-faker))))))
9224
9225 (define-public python2-faker
9226 (let ((base (package-with-python2 (strip-python2-variant
9227 python-faker))))
9228 (package
9229 (inherit base)
9230 (propagated-inputs
9231 `(("python2-ipaddress" ,python2-ipaddress)
9232 ,@(package-propagated-inputs base))))))
9233
9234 (define-public python-pyaml
9235 (package
9236 (name "python-pyaml")
9237 (version "17.7.2")
9238 (source (origin
9239 (method url-fetch)
9240 (uri (pypi-uri "pyaml" version))
9241 (sha256
9242 (base32
9243 "132grrw0ajq4nrappi3ldbkb952k7yn9b6c7csi2rmvzm1g6ppp2"))))
9244 (build-system python-build-system)
9245 (native-inputs
9246 `(("python-unidecode" ,python-unidecode)))
9247 (propagated-inputs
9248 `(("python-pyyaml" ,python-pyyaml)))
9249 (home-page "https://github.com/mk-fg/pretty-yaml")
9250 (synopsis "YAML pretty-print library for Python")
9251 (description
9252 "pyaml is a PyYAML based python module to produce pretty and readable
9253 YAML-serialized data.")
9254 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
9255
9256 (define-public python2-pyaml
9257 (package-with-python2 python-pyaml))
9258
9259 (define-public python-backpack
9260 (package
9261 (name "python-backpack")
9262 (version "0.1")
9263 (source
9264 (origin
9265 (method url-fetch)
9266 (uri (pypi-uri "backpack" version))
9267 (sha256
9268 (base32
9269 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
9270 (build-system python-build-system)
9271 (native-inputs
9272 `(("python-pytest" ,python-pytest)
9273 ("python-nose" ,python-nose)))
9274 (propagated-inputs
9275 `(("python-simplejson" ,python-simplejson)))
9276 (home-page "https://github.com/sdispater/backpack")
9277 (synopsis "Utilities for working with Python collections")
9278 (description "Backpack provides some useful utilities for working with
9279 collections of data.")
9280 (license license:expat)))
9281
9282 (define-public python2-backpack
9283 (package-with-python2 python-backpack))
9284
9285 (define-public python-prompt-toolkit
9286 (package
9287 (name "python-prompt-toolkit")
9288 (version "1.0.15")
9289 (source
9290 (origin
9291 (method url-fetch)
9292 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9293 (sha256
9294 (base32
9295 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))
9296 (build-system python-build-system)
9297 (arguments
9298 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
9299 (propagated-inputs
9300 `(("python-wcwidth" ,python-wcwidth)
9301 ("python-six" ,python-six)
9302 ("python-pygments" ,python-pygments)))
9303 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
9304 (synopsis "Library for building command line interfaces in Python")
9305 (description
9306 "Prompt-Toolkit is a library for building interactive command line
9307 interfaces in Python. It's like GNU Readline but it also features syntax
9308 highlighting while typing, out-of-the-box multi-line input editing, advanced
9309 code completion, incremental search, support for Chinese double-width
9310 characters, mouse support, and auto suggestions.")
9311 (license license:bsd-3)))
9312
9313 (define-public python2-prompt-toolkit
9314 (package-with-python2 python-prompt-toolkit))
9315
9316 (define-public python-jedi
9317 (package
9318 (name "python-jedi")
9319 (version "0.9.0")
9320 (source
9321 (origin
9322 (method url-fetch)
9323 (uri (pypi-uri "jedi" version))
9324 (sha256
9325 (base32
9326 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
9327 (build-system python-build-system)
9328 (arguments
9329 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
9330 '(#:tests? #f))
9331 (native-inputs
9332 `(("python-pytest" ,python-pytest)))
9333 (home-page "https://github.com/davidhalter/jedi")
9334 (synopsis
9335 "Autocompletion for Python that can be used for text editors")
9336 (description
9337 "Jedi is an autocompletion tool for Python that can be used for text editors.")
9338 (license license:expat)))
9339
9340 (define-public python2-jedi
9341 (package-with-python2 python-jedi))
9342
9343 (define-public ptpython
9344 (package
9345 (name "ptpython")
9346 (version "0.34")
9347 (source (origin
9348 (method url-fetch)
9349 (uri (pypi-uri "ptpython" version))
9350 (sha256
9351 (base32
9352 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
9353 (build-system python-build-system)
9354 (arguments
9355 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
9356 (propagated-inputs
9357 `(("python-docopt" ,python-docopt)
9358 ("python-jedi" ,python-jedi)
9359 ("python-prompt-toolkit" ,python-prompt-toolkit)
9360 ("python-pygments" ,python-pygments)))
9361 (home-page "https://github.com/jonathanslenders/ptpython")
9362 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
9363 (description
9364 "ptpython is a Python read-eval-print loop with IDE-like features.
9365 It supports syntax highlighting, multiline editing, autocompletion, mouse,
9366 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
9367 etc.")
9368 (license license:bsd-3)
9369 (properties `((python2-variant . ,(delay ptpython-2))))))
9370
9371 (define-public ptpython-2
9372 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
9373 (package
9374 (inherit base)
9375 (name "ptpython2"))))
9376
9377 (define-public python-stem
9378 (package
9379 (name "python-stem")
9380 (version "1.6.0")
9381 (source
9382 (origin
9383 (method url-fetch)
9384 (uri (pypi-uri "stem" version))
9385 (sha256
9386 (base32
9387 "1va9p3ij7lxg6ixfsvaql06dn11l3fgpxmss1dhlvafm7sqizznp"))))
9388 (build-system python-build-system)
9389 (arguments
9390 `(#:phases
9391 (modify-phases %standard-phases
9392 (add-before 'check 'fix-test-environment
9393 (lambda _
9394 ;; Fixes: FileNotFoundError: [Errno 2] No such file or directory:
9395 ;; '/tmp/guix-build-python-stem-1.6.0.drv-0/stem-1.6.0/.gitignore'.
9396 (with-output-to-file ".gitignore"
9397 (lambda _ (format #t "%")))
9398 #t))
9399 (replace 'check
9400 (lambda _
9401 (invoke "./run_tests.py" "--unit")
9402 #t)))))
9403 (native-inputs
9404 `(("python-mock" ,python-mock)
9405 ("python-pep8" ,python-pep8)
9406 ("python-pyflakes" ,python-pyflakes)))
9407 (home-page "https://stem.torproject.org/")
9408 (synopsis
9409 "Python controller library that allows applications to interact with Tor")
9410 (description
9411 "Stem is a Python controller library for Tor. With it you can use Tor's
9412 control protocol to script against the Tor process and read descriptor data
9413 relays publish about themselves.")
9414 (license license:lgpl3)))
9415
9416 (define-public python2-stem
9417 (package-with-python2 python-stem))
9418
9419 (define-public python-pyserial
9420 (package
9421 (name "python-pyserial")
9422 (version "3.1.1")
9423 (source
9424 (origin
9425 (method url-fetch)
9426 (uri (pypi-uri "pyserial" version))
9427 (sha256
9428 (base32
9429 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
9430 (build-system python-build-system)
9431 (arguments
9432 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
9433 ;; #:phases
9434 ;; (modify-phases %standard-phases
9435 ;; (replace 'check
9436 ;; (lambda _
9437 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
9438 (home-page
9439 "https://github.com/pyserial/pyserial")
9440 (synopsis "Python Serial Port Bindings")
9441 (description "@code{pyserial} provide serial port bindings for Python. It
9442 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
9443 and/or Xon/Xoff. The port is accessed in RAW mode.")
9444 (license license:bsd-3)))
9445
9446 (define-public python2-pyserial
9447 (package-with-python2 python-pyserial))
9448
9449 (define-public python-kivy
9450 (package
9451 (name "python-kivy")
9452 (version "1.10.0")
9453 (source
9454 (origin
9455 (method url-fetch)
9456 (uri (pypi-uri "Kivy" version))
9457 (file-name (string-append name "-" version ".tar.gz"))
9458 (sha256
9459 (base32
9460 "1394zh6kvf7k5d8vlzxcsfcailr3q59xwg9b1n7qaf25bvyq1h98"))))
9461 (build-system python-build-system)
9462 (arguments
9463 `(#:tests? #f ; Tests require many optional packages
9464 #:phases
9465 (modify-phases %standard-phases
9466 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
9467 (lambda* (#:key inputs #:allow-other-keys)
9468 (setenv "KIVY_SDL2_PATH"
9469 (string-append (assoc-ref inputs "sdl-union")
9470 "/include/SDL2"))
9471 #t)))))
9472 (native-inputs
9473 `(("git" ,git)
9474 ("pkg-config" ,pkg-config)
9475 ("python-cython" ,python-cython)))
9476 (inputs
9477 `(("gstreamer" ,gstreamer)
9478 ("mesa" ,mesa)
9479 ("sdl-union"
9480 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
9481 (home-page "http://kivy.org")
9482 (synopsis
9483 "Multitouch application framework")
9484 (description
9485 "A software library for rapid development of
9486 hardware-accelerated multitouch applications.")
9487 (license license:expat)))
9488
9489 (define-public python2-kivy
9490 (package-with-python2 python-kivy))
9491
9492 (define-public python-kivy-next
9493 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
9494 (revision "1"))
9495 (package (inherit python-kivy)
9496 (name "python-kivy-next")
9497 (version (string-append "1.9.1-" revision "."
9498 (string-take commit 7)))
9499 (source
9500 (origin
9501 (method git-fetch)
9502 (uri (git-reference
9503 (url "https://github.com/kivy/kivy")
9504 (commit commit)))
9505 (file-name (string-append name "-" version "-checkout"))
9506 (sha256
9507 (base32
9508 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
9509
9510 (define-public python2-kivy-next
9511 (package-with-python2 python-kivy-next))
9512
9513 (define-public python-binaryornot
9514 (package
9515 (name "python-binaryornot")
9516 (version "0.4.0")
9517 (source (origin
9518 (method url-fetch)
9519 (uri (pypi-uri "binaryornot" version))
9520 (sha256
9521 (base32
9522 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
9523 (build-system python-build-system)
9524 (propagated-inputs
9525 `(("python-chardet" ,python-chardet)
9526 ("python-hypothesis" ,python-hypothesis)))
9527 (home-page "https://github.com/audreyr/binaryornot")
9528 (synopsis "Package to check if a file is binary or text")
9529 (description "Ultra-lightweight pure Python package to check if a file is
9530 binary or text.")
9531 (license license:bsd-3)
9532 (properties `((python2-variant . ,(delay python2-binaryornot))))))
9533
9534 (define-public python2-binaryornot
9535 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
9536 (package (inherit base)
9537 (propagated-inputs
9538 `(("python2-enum34" ,python2-enum34)
9539 ,@(package-propagated-inputs base))))))
9540
9541 (define-public python-nltk
9542 (package
9543 (name "python-nltk")
9544 (version "3.2.1")
9545 (source (origin
9546 (method url-fetch)
9547 (uri (pypi-uri "nltk" version))
9548 (sha256
9549 (base32
9550 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
9551 (build-system python-build-system)
9552 (arguments
9553 '(;; The tests require some extra resources to be downloaded.
9554 ;; TODO Try packaging these resources.
9555 #:tests? #f))
9556 (home-page "http://nltk.org/")
9557 (synopsis "Natural Language Toolkit")
9558 (description "It provides interfaces to over 50 corpora and lexical
9559 resources such as WordNet, along with a suite of text processing libraries
9560 for classification, tokenization, stemming, tagging, parsing, and semantic
9561 reasoning, wrappers for natural language processing libraries.")
9562 (license license:asl2.0)))
9563
9564 (define-public python2-nltk
9565 (package-with-python2 python-nltk))
9566
9567 (define-public python-pymongo
9568 (package
9569 (name "python-pymongo")
9570 (version "3.3.0")
9571 (source (origin
9572 (method url-fetch)
9573 (uri (pypi-uri "pymongo" version))
9574 (sha256
9575 (base32
9576 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
9577 (build-system python-build-system)
9578 (propagated-inputs
9579 `(("python-certifi" ,python-certifi)))
9580 (home-page "https://github.com/mongodb/mongo-python-driver")
9581 (synopsis "Python driver for MongoDB")
9582 (description "Python driver for MongoDB.")
9583 (license license:asl2.0)))
9584
9585 (define-public python2-pymongo
9586 (package-with-python2 python-pymongo))
9587
9588 (define-public python-sh
9589 (package
9590 (name "python-sh")
9591 (version "1.11")
9592 (source (origin
9593 (method url-fetch)
9594 (uri (pypi-uri "sh" version))
9595 (sha256
9596 (base32
9597 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
9598 (build-system python-build-system)
9599 (arguments
9600 `(#:tests? #f)) ; no tests
9601 (home-page "https://github.com/amoffat/sh")
9602 (synopsis "Python subprocess interface")
9603 (description "Abstracts process invocation by providing a function
9604 interface for programs.")
9605 (license license:expat)))
9606
9607 (define-public python2-sh
9608 (package-with-python2 python-sh))
9609
9610 (define-public python-consul
9611 (package
9612 (name "python-consul")
9613 (version "0.6.1")
9614 (source
9615 (origin
9616 (method url-fetch)
9617 (uri (pypi-uri "python-consul" version))
9618 (sha256
9619 (base32
9620 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
9621 (build-system python-build-system)
9622 (arguments
9623 '(#:tests? #f)) ; The tests are not distributed
9624 (propagated-inputs
9625 `(("python-requests" ,python-requests)
9626 ("python-six" ,python-six)))
9627 (home-page "https://github.com/cablehead/python-consul")
9628 (synopsis "Python client for Consul")
9629 (description
9630 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
9631 discovery, monitoring and configuration.")
9632 (license license:expat)))
9633
9634 (define-public python2-consul
9635 (package-with-python2 python-consul))
9636
9637 (define-public python-schematics
9638 (package
9639 (name "python-schematics")
9640 (version "1.1.1")
9641 (source
9642 (origin
9643 (method url-fetch)
9644 (uri (string-append
9645 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
9646 (file-name (string-append name "-" version ".tar.gz"))
9647 (sha256
9648 (base32
9649 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
9650 (build-system python-build-system)
9651 (propagated-inputs
9652 `(("python-six" ,python-six)))
9653 (arguments
9654 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
9655 ; version requirements (eg python-coveralls)
9656 (home-page "https://github.com/schematics/schematics")
9657 (synopsis "Python Data Structures for Humans")
9658 (description "Python Data Structures for Humans.")
9659 (license license:bsd-3)))
9660
9661 (define-public python2-schematics
9662 (package-with-python2 python-schematics))
9663
9664 (define-public python-odfpy
9665 (package
9666 (name "python-odfpy")
9667 (version "1.3.3")
9668 (source (origin
9669 (method url-fetch)
9670 (uri (pypi-uri "odfpy" version))
9671 (sha256
9672 (base32
9673 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
9674 (arguments
9675 `(#:modules ((srfi srfi-1)
9676 (guix build python-build-system)
9677 (guix build utils))
9678 #:phases
9679 (modify-phases %standard-phases
9680 (replace 'check
9681 ;; The test runner invokes python2 and python3 for test*.py.
9682 ;; To avoid having both in inputs, we replicate it here.
9683 (lambda _
9684 (every (lambda (test-file)
9685 (zero? (system* "python" test-file)))
9686 (find-files "tests" "^test.*\\.py$")))))))
9687 (build-system python-build-system)
9688 (home-page "https://github.com/eea/odfpy")
9689 (synopsis "Python API and tools to manipulate OpenDocument files")
9690 (description "Collection of libraries and utility programs written in
9691 Python to manipulate OpenDocument 1.2 files.")
9692 (license
9693 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
9694 ;; number of files with other licenses.
9695 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
9696
9697 (define-public python2-odfpy
9698 (package-with-python2 python-odfpy))
9699
9700 (define-public python-natsort
9701 (package
9702 (name "python-natsort")
9703 (version "5.0.2")
9704 (source (origin
9705 (method url-fetch)
9706 (uri (pypi-uri "natsort" version))
9707 (sha256
9708 (base32
9709 "0bh6j0l8iapjnsgg3bs6q075cnzjl6zw1vlgqyv3qrygm2cxypkn"))))
9710 (build-system python-build-system)
9711 (arguments
9712 `(#:phases
9713 (modify-phases %standard-phases
9714 (add-before 'check 'set-cachedir
9715 ;; Tests require write access to $HOME by default
9716 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
9717 (native-inputs
9718 `(("python-hypothesis" ,python-hypothesis)
9719 ("python-pytest-cache" ,python-pytest-cache)
9720 ("python-pytest-cov" ,python-pytest-cov)
9721 ("python-pytest-flakes" ,python-pytest-flakes)
9722 ("python-pytest-pep8" ,python-pytest-pep8)))
9723 (propagated-inputs ; TODO: Add python-fastnumbers.
9724 `(("python-pyicu" ,python-pyicu)))
9725 (home-page "https://github.com/SethMMorton/natsort")
9726 (synopsis "Natural sorting for python and shell")
9727 (description
9728 "Natsort lets you apply natural sorting on lists instead of
9729 lexicographical. If you use the built-in @code{sorted} method in python
9730 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
9731 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
9732 function @code{natsorted} that identifies numbers and sorts them separately
9733 from strings. It can also sort version numbers, real numbers, mixed types
9734 and more, and comes with a shell command @command{natsort} that exposes this
9735 functionality in the command line.")
9736 (license license:expat)
9737 (properties `((python2-variant . ,(delay python2-natsort))))))
9738
9739 (define-public python2-natsort
9740 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
9741 (package (inherit base)
9742 (native-inputs
9743 `(("python2-pathlib" ,python2-pathlib)
9744 ("python2-mock" ,python2-mock)
9745 ("python2-enum34" ,python2-enum34)
9746 ,@(package-native-inputs base))))))
9747
9748 (define-public python-glances
9749 (package
9750 (name "python-glances")
9751 (version "2.7.1")
9752 (source
9753 (origin
9754 (method url-fetch)
9755 (uri (pypi-uri "Glances" version))
9756 (sha256
9757 (base32
9758 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
9759 (build-system python-build-system)
9760 (propagated-inputs
9761 `(("python-psutil" ,python-psutil)))
9762 (home-page
9763 "https://github.com/nicolargo/glances")
9764 (synopsis
9765 "A cross-platform curses-based monitoring tool")
9766 (description
9767 "Glances is a curses-based monitoring tool for a wide variety of platforms.
9768 Glances uses the PsUtil library to get information from your system. It monitors
9769 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
9770 (license license:lgpl3+)))
9771
9772 (define-public python2-glances
9773 (package-with-python2 python-glances))
9774
9775 (define-public python-graphql-core
9776 (package
9777 (name "python-graphql-core")
9778 (version "0.5.3")
9779 (source
9780 (origin
9781 (method url-fetch)
9782 (uri (pypi-uri "graphql-core" version))
9783 (sha256
9784 (base32
9785 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
9786 (build-system python-build-system)
9787 (arguments
9788 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
9789 #:phases
9790 (modify-phases %standard-phases
9791 (add-after 'unpack 'patch-hardcoded-version
9792 (lambda _ (substitute*
9793 "setup.py"
9794 (("'gevent==1.1rc1'") "'gevent'"))
9795 #t)))))
9796 (native-inputs
9797 `(("python-gevent" ,python-gevent)
9798 ("python-mock" ,python-mock)
9799 ("python-pytest-mock" ,python-pytest-mock)))
9800 (propagated-inputs
9801 `(("python-promise" ,python-promise)
9802 ("python-six" ,python-six)))
9803 (home-page "https://github.com/graphql-python/graphql-core")
9804 (synopsis "GraphQL implementation for Python")
9805 (description
9806 "GraphQL implementation for Python. GraphQL is a data query language and
9807 runtime designed and used to request and deliver data to mobile and web apps.
9808 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
9809 to Python.")
9810 (license license:expat)))
9811
9812 (define-public python2-graphql-core
9813 (package-with-python2 python-graphql-core))
9814
9815 (define-public python-graphql-relay
9816 (package
9817 (name "python-graphql-relay")
9818 (version "0.4.5")
9819 (source
9820 (origin
9821 (method url-fetch)
9822 (uri (pypi-uri "graphql-relay" version))
9823 (sha256
9824 (base32
9825 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
9826 (build-system python-build-system)
9827 (arguments
9828 '(#:tests? #f)) ; The tests are not distributed
9829 (propagated-inputs
9830 `(("python-graphql-core" ,python-graphql-core)
9831 ("python-promise" ,python-promise)
9832 ("python-six" ,python-six)))
9833 (home-page "https://github.com/graphql-python/graphql-relay-py")
9834 (synopsis "Relay implementation for Python")
9835 (description
9836 "This is a library to allow the easy creation of Relay-compliant servers
9837 using the GraphQL Python reference implementation of a GraphQL server. It
9838 should be noted that the code is a exact port of the original
9839 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
9840 from Facebook.")
9841 (license license:expat)))
9842
9843 (define-public python2-graphql-relay
9844 (package-with-python2 python-graphql-relay))
9845
9846 (define-public python-graphene
9847 (package
9848 (name "python-graphene")
9849 (version "0.10.2")
9850 (source
9851 (origin
9852 (method url-fetch)
9853 (uri (pypi-uri "graphene" version))
9854 (sha256
9855 (base32
9856 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
9857 (build-system python-build-system)
9858 (propagated-inputs
9859 `(("python-graphql-core" ,python-graphql-core)
9860 ("python-graphql-relay" ,python-graphql-relay)
9861 ("python-iso8601" ,python-iso8601)
9862 ("python-promise" ,python-promise)
9863 ("python-six" ,python-six)))
9864 (arguments
9865 `(#:tests? #f)) ; no tests/ in the PyPI tarball
9866 (home-page "http://graphene-python.org/")
9867 (synopsis "GraphQL Framework for Python")
9868 (description
9869 "Graphene is a Python library for building GraphQL schemas/types.
9870 A GraphQL schema describes your data model, and provides a GraphQL server
9871 with an associated set of resolve methods that know how to fetch data.")
9872 (properties `((python2-variant . ,(delay python2-graphene))))
9873 (license license:expat)))
9874
9875 (define-public python2-graphene
9876 (let ((base (package-with-python2
9877 (strip-python2-variant python-graphene))))
9878 (package (inherit base)
9879 (native-inputs
9880 `(("python2-sqlalchemy" ,python2-sqlalchemy)
9881 ,@(package-native-inputs base))))))
9882
9883 (define-public python-nautilus
9884 (package
9885 (name "python-nautilus")
9886 (version "0.4.9")
9887 (source
9888 (origin
9889 (method url-fetch)
9890 (uri (pypi-uri "nautilus" version))
9891 (sha256
9892 (base32
9893 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
9894 (build-system python-build-system)
9895 (arguments `(#:tests? #f)) ; fails to import test modules
9896 (propagated-inputs
9897 `(("python-bcrypt" ,python-bcrypt)
9898 ("python-click" ,python-click)
9899 ("python-consul" ,python-consul)
9900 ("python-graphene" ,python-graphene)
9901 ("python-jinja2" ,python-jinja2)
9902 ("python-peewee" ,python-peewee)
9903 ("python-pika" ,python-pika)
9904 ("python-tornado" ,python-tornado)
9905 ("python-wtforms" ,python-wtforms)))
9906 (native-inputs
9907 `(("python-nose2" ,python-nose2)))
9908 (home-page "https://github.com/AlecAivazis/nautilus")
9909 (synopsis "Library for creating microservice applications")
9910 (description
9911 "Nautilus is a framework for flux based microservices that looks to
9912 provide extendible implementations of common aspects of a cloud so that you can
9913 focus on building massively scalable web applications.")
9914 (license license:expat)))
9915
9916 (define-public python-snowballstemmer
9917 (package
9918 (name "python-snowballstemmer")
9919 (version "1.2.1")
9920 (source (origin
9921 (method url-fetch)
9922 (uri (pypi-uri "snowballstemmer" version))
9923 (sha256
9924 (base32
9925 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
9926 (build-system python-build-system)
9927 (arguments
9928 `(;; No tests exist
9929 #:tests? #f))
9930 (home-page "https://github.com/shibukawa/snowball_py")
9931 (synopsis "Snowball stemming library collection for Python")
9932 (description "This package provides 16 word stemmer algorithms generated
9933 from Snowball algorithms. It includes the 15 original ones plus the Poerter
9934 English stemmer.")
9935 (license license:bsd-3)))
9936
9937 (define-public python2-snowballstemmer
9938 (package-with-python2 python-snowballstemmer))
9939
9940 (define-public python-sphinx-cloud-sptheme
9941 (package
9942 (name "python-sphinx-cloud-sptheme")
9943 (version "1.8.0")
9944 (source (origin
9945 (method url-fetch)
9946 (uri (pypi-uri "cloud_sptheme" version))
9947 (sha256
9948 (base32
9949 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
9950 (build-system python-build-system)
9951 ;; FIXME: The 'pypi' release archive does not contain tests.
9952 (arguments '(#:tests? #f))
9953 (native-inputs
9954 `(("python-sphinx" ,python-sphinx)))
9955 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
9956 (synopsis "'Cloud' theme for Sphinx documenter")
9957 (description "This package contains the \"Cloud\" theme for Sphinx and some
9958 related extensions.")
9959 (license license:bsd-3)))
9960
9961 (define-public python2-sphinx-cloud-sptheme
9962 (package-with-python2 python-sphinx-cloud-sptheme))
9963
9964 (define-public python-sphinx-alabaster-theme
9965 (package
9966 (name "python-sphinx-alabaster-theme")
9967 (version "0.7.9")
9968 (source (origin
9969 (method url-fetch)
9970 (uri (pypi-uri "alabaster" version))
9971 (sha256
9972 (base32
9973 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
9974 (build-system python-build-system)
9975 (propagated-inputs
9976 `(("python-pygments" ,python-pygments)))
9977 (home-page "https://alabaster.readthedocs.io/")
9978 (synopsis "Configurable sidebar-enabled Sphinx theme")
9979 (description "Alabaster is a visually (c)lean, responsive, configurable
9980 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
9981 (license license:bsd-3)))
9982
9983 (define-public python2-sphinx-alabaster-theme
9984 (package-with-python2 python-sphinx-alabaster-theme))
9985
9986 (define-public python-setproctitle
9987 (package
9988 (name "python-setproctitle")
9989 (version "1.1.10")
9990 (source
9991 (origin
9992 (method url-fetch)
9993 (uri (pypi-uri "setproctitle" version))
9994 (sha256
9995 (base32
9996 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
9997 (build-system python-build-system)
9998 (arguments
9999 '(#:phases
10000 (modify-phases %standard-phases
10001 (add-before 'check 'patch-Makefile
10002 ;; Stricly this is only required for the python2 variant.
10003 ;; But adding a phase in an inherited package seems to be
10004 ;; cumbersum. So we patch even for python3.
10005 (lambda _
10006 (let ((nose (assoc-ref %build-inputs "python2-nose")))
10007 (when nose
10008 (substitute* "Makefile"
10009 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
10010 (string-append nose "/bin/nosetests "))))
10011 #t)))
10012 (replace 'check
10013 (lambda _
10014 (setenv "PYTHON" (or (which "python3") (which "python")))
10015 (setenv "PYCONFIG" (or (which "python3-config")
10016 (which "python-config")))
10017 (setenv "CC" "gcc")
10018 ;; No need to extend PYTHONPATH to find the built package, since
10019 ;; the Makefile will build anyway
10020 (zero? (system* "make" "check")))))))
10021 (native-inputs
10022 `(("procps" ,procps))) ; required for tests
10023 (home-page
10024 "https://github.com/dvarrazzo/py-setproctitle")
10025 (synopsis
10026 "Setproctitle implementation for Python to customize the process title")
10027 (description "The library allows a process to change its title (as displayed
10028 by system tools such as ps and top).
10029
10030 Changing the title is mostly useful in multi-process systems, for
10031 example when a master process is forked: changing the children's title
10032 allows to identify the task each process is busy with. The technique
10033 is used by PostgreSQL and the OpenSSH Server for example.")
10034 (license license:bsd-3)
10035 (properties `((python2-variant . ,(delay python2-setproctitle))))))
10036
10037 (define-public python2-setproctitle
10038 (let ((base (package-with-python2
10039 (strip-python2-variant python-setproctitle))))
10040 (package
10041 (inherit base)
10042 (native-inputs `(("python2-nose" ,python2-nose)
10043 ,@(package-native-inputs base))))))
10044
10045 (define-public python-validictory
10046 (package
10047 (name "python-validictory")
10048 (version "1.0.1")
10049 (source
10050 (origin
10051 (method url-fetch)
10052 (uri (pypi-uri "validictory" version))
10053 (sha256
10054 (base32
10055 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
10056 (build-system python-build-system)
10057 (arguments
10058 '(#:phases
10059 (modify-phases %standard-phases
10060 (add-after 'unpack 'bootstrap
10061 ;; Move the tests out of the package directory to avoid
10062 ;; packaging them.
10063 (lambda* _
10064 (rename-file "validictory/tests" "tests")
10065 (delete-file "tests/__init__.py")))
10066 (replace 'check
10067 (lambda _
10068 ;; Extend PYTHONPATH so the built package will be found.
10069 (setenv "PYTHONPATH"
10070 (string-append (getcwd) "/build/lib:"
10071 (getenv "PYTHONPATH")))
10072 (zero? (system* "py.test" "-vv" )))))))
10073 (native-inputs
10074 `(("python-pytest" ,python-pytest)))
10075 (home-page
10076 "https://github.com/jamesturk/validictory")
10077 (synopsis "General purpose Python data validator")
10078 (description "It allows validation of arbitrary Python data structures.
10079
10080 The schema format is based on the JSON Schema
10081 proposal (http://json-schema.org), so combined with json the library is also
10082 useful as a validator for JSON data.")
10083 (license license:expat)))
10084
10085 (define-public python2-validictory
10086 (package-with-python2 python-validictory))
10087
10088 (define-public python-pyev
10089 (package
10090 (name "python-pyev")
10091 (version "0.9.0")
10092 (source
10093 (origin
10094 (method url-fetch)
10095 (uri (pypi-uri "pyev" version))
10096 (sha256
10097 (base32
10098 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
10099 (build-system python-build-system)
10100 (arguments
10101 `(#:tests? #f ; no test suite
10102 #:phases
10103 (modify-phases %standard-phases
10104 (add-after 'unpack 'patch
10105 (lambda* (#:key inputs #:allow-other-keys)
10106 (let ((libev (string-append (assoc-ref inputs "libev")
10107 "/lib/libev.so.4")))
10108 (substitute* "setup.py"
10109 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
10110 (string-append "libev_dll_name = \"" libev "\"")))))))))
10111 (inputs
10112 `(("libev" ,libev)))
10113 (home-page "http://pythonhosted.org/pyev/")
10114 (synopsis "Python libev interface")
10115 (description "Pyev provides a Python interface to libev.")
10116 (license license:gpl3)))
10117
10118 (define-public python2-pyev
10119 (package-with-python2 python-pyev))
10120
10121 (define-public python-imagesize
10122 (package
10123 (name "python-imagesize")
10124 (version "0.7.1")
10125 (source
10126 (origin
10127 (method url-fetch)
10128 (uri (pypi-uri "imagesize" version))
10129 (sha256
10130 (base32
10131 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
10132 (build-system python-build-system)
10133 (arguments
10134 '(;; Test files are not distributed on PyPi:
10135 ;; https://github.com/shibukawa/imagesize_py/issues/7
10136 #:tests? #f))
10137 (home-page "https://github.com/shibukawa/imagesize_py")
10138 (synopsis "Gets image size of files in variaous formats in Python")
10139 (description
10140 "This package allows determination of image size from
10141 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
10142 (license license:expat)))
10143
10144 (define-public python2-imagesize
10145 (package-with-python2 python-imagesize))
10146
10147 (define-public python-termstyle
10148 (package
10149 (name "python-termstyle")
10150 (version "0.1.11")
10151 (source
10152 (origin
10153 (method url-fetch)
10154 (uri (pypi-uri "termstyle" version))
10155 (sha256
10156 (base32
10157 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
10158 (build-system python-build-system)
10159 (arguments
10160 '(#:phases
10161 (modify-phases %standard-phases
10162 (replace 'check
10163 (lambda _
10164 (zero? (system* "python" "test3.py")))))))
10165 (home-page "https://github.com/gfxmonk/termstyle")
10166 (synopsis "Console text coloring for Python")
10167 (description "This package provides console text coloring for Python.")
10168 (license license:bsd-3)))
10169
10170 (define-public python-argcomplete
10171 (package
10172 (name "python-argcomplete")
10173 (version "1.7.0")
10174 (source
10175 (origin
10176 (method url-fetch)
10177 (uri (pypi-uri "argcomplete" version))
10178 (sha256
10179 (base32
10180 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
10181 (build-system python-build-system)
10182 (native-inputs
10183 `(("python-pexpect" ,python-pexpect)
10184 ("tcsh" ,tcsh)
10185 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
10186 (home-page "https://github.com/kislyuk/argcomplete")
10187 (synopsis "Shell tab completion for Python argparse")
10188 (description "argcomplete provides extensible command line tab completion
10189 of arguments and options for Python scripts using @code{argparse}. It's
10190 particularly useful for programs with many options or sub-parsers that can
10191 dynamically suggest completions; for example, when browsing resources over the
10192 network.")
10193 (license license:asl2.0)))
10194
10195 (define-public python2-argcomplete
10196 (package-with-python2 python-argcomplete))
10197
10198 (define-public python-xopen
10199 (package
10200 (name "python-xopen")
10201 (version "0.3.2")
10202 (source
10203 (origin
10204 (method url-fetch)
10205 (uri (pypi-uri "xopen" version))
10206 (sha256
10207 (base32
10208 "0bzjmn3rl1cd3d2q39cjwnkhaspk2b0hfj3rl64pclm44ihg5fb6"))
10209 (file-name (string-append name "-" version ".tar.gz"))))
10210 (build-system python-build-system)
10211 (home-page "https://github.com/marcelm/xopen/")
10212 (synopsis "Open compressed files transparently")
10213 (description "This module provides an @code{xopen} function that works like
10214 Python's built-in @code{open} function, but can also deal with compressed files.
10215 Supported compression formats are gzip, bzip2 and, xz, and are automatically
10216 recognized by their file extensions. The focus is on being as efficient as
10217 possible on all supported Python versions.")
10218 (license license:expat)))
10219
10220 (define-public python2-xopen
10221 (package-with-python2 python-xopen))
10222
10223 (define-public python2-cheetah
10224 (package
10225 (name "python2-cheetah")
10226 (version "2.4.4")
10227 (source
10228 (origin
10229 (method url-fetch)
10230 (uri (pypi-uri "Cheetah" version))
10231 (sha256
10232 (base32
10233 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
10234 (build-system python-build-system)
10235 (arguments
10236 `(#:python ,python-2))
10237 (propagated-inputs
10238 `(("python2-markdown" ,python2-markdown)))
10239 (home-page "https://pythonhosted.org/Cheetah/")
10240 (synopsis "Template engine")
10241 (description "Cheetah is a text-based template engine and Python code
10242 generator.
10243
10244 Cheetah can be used as a standalone templating utility or referenced as
10245 a library from other Python applications. It has many potential uses,
10246 but web developers looking for a viable alternative to ASP, JSP, PHP and
10247 PSP are expected to be its principle user group.
10248
10249 Features:
10250 @enumerate
10251 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
10252 text-based format.
10253 @item Cleanly separates content, graphic design, and program code.
10254 @item Blends the power and flexibility of Python with a simple template language
10255 that non-programmers can understand.
10256 @item Gives template writers full access to any Python data structure, module,
10257 function, object, or method in their templates.
10258 @item Makes code reuse easy by providing an object-orientated interface to
10259 templates that is accessible from Python code or other Cheetah templates.
10260 One template can subclass another and selectively reimplement sections of it.
10261 @item Provides a simple, yet powerful, caching mechanism that can dramatically
10262 improve the performance of a dynamic website.
10263 @item Compiles templates into optimized, yet readable, Python code.
10264 @end enumerate")
10265 (license (license:x11-style "file://LICENSE"))))
10266
10267 (define-public python-dulwich
10268 (package
10269 (name "python-dulwich")
10270 (version "0.18.6")
10271 (source
10272 (origin
10273 (method url-fetch)
10274 (uri (list (string-append "https://www.dulwich.io/releases/"
10275 "dulwich-" version ".tar.gz")
10276 (pypi-uri "dulwich" version)))
10277 (sha256
10278 (base32
10279 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
10280 (build-system python-build-system)
10281 (arguments
10282 `(#:phases
10283 (modify-phases %standard-phases
10284 (add-before 'check 'fix-tests
10285 (lambda* (#:key inputs #:allow-other-keys)
10286 ;; The tests use Popen with a custom environment which doesn't
10287 ;; include PATH.
10288 (substitute* "dulwich/tests/compat/utils.py"
10289 (("'git'") (string-append "'"
10290 (which "git")
10291 "'")))
10292 (substitute* '("dulwich/tests/test_repository.py"
10293 "dulwich/tests/test_hooks.py")
10294 (("#!/bin/sh") (string-append "#!" (which "sh"))))
10295 (setenv "TEST_RUNNER" "unittest")
10296 (setenv "PYTHONHASHSEED" "random")
10297 #t)))))
10298 (propagated-inputs
10299 `(("python-fastimport" ,python-fastimport)))
10300 (native-inputs
10301 `(("python-mock" ,python-mock)
10302 ("python-geventhttpclient" ,python-geventhttpclient)
10303 ("git" ,git)))
10304 (home-page "https://www.dulwich.io/")
10305 (synopsis "Git implementation in Python")
10306 (description "Dulwich is an implementation of the Git file formats and
10307 protocols written in pure Python.")
10308 ;; Can be used with either license.
10309 (license (list license:asl2.0 license:gpl2+))))
10310
10311 (define-public python2-dulwich
10312 (package-with-python2 python-dulwich))
10313
10314 (define-public python-pbkdf2
10315 (package
10316 (name "python-pbkdf2")
10317 (version "1.3")
10318 (source
10319 (origin
10320 (method url-fetch)
10321 (uri (pypi-uri "pbkdf2" version))
10322 (sha256
10323 (base32
10324 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
10325 (build-system python-build-system)
10326 (arguments
10327 '(#:phases
10328 (modify-phases %standard-phases
10329 (replace 'check
10330 (lambda _
10331 (setenv "PYTHONPATH"
10332 (string-append (getcwd) "/build/lib:"
10333 (getenv "PYTHONPATH")))
10334 (zero? (system* "python" "test/test_pbkdf2.py")))))))
10335 (propagated-inputs
10336 `(("python-pycrypto" ,python-pycrypto))) ; optional
10337 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
10338 (synopsis "Password-based key derivation")
10339 (description "This module implements the password-based key derivation
10340 function, PBKDF2, specified in RSA PKCS#5 v2.0.
10341
10342 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
10343 is part of the RSA Public Key Cryptography Standards series. The provided
10344 implementation takes a password or a passphrase and a salt value (and
10345 optionally a iteration count, a digest module, and a MAC module) and provides
10346 a file-like object from which an arbitrarly-sized key can be read.")
10347 (license license:expat)))
10348
10349 (define-public python2-pbkdf2
10350 (package-with-python2 python-pbkdf2))
10351
10352 (define-public python-qrcode
10353 (package
10354 (name "python-qrcode")
10355 (version "5.3")
10356 (source
10357 (origin
10358 (method url-fetch)
10359 (uri (pypi-uri "qrcode" version))
10360 (sha256
10361 (base32
10362 "0kljfrfq0c2rmxf8am57333ia41kd0snbm2rnqbdy816hgpcq5a1"))))
10363 (build-system python-build-system)
10364 (arguments
10365 ;; FIXME: Tests require packaging 'pymaging'.
10366 '(#:tests? #f))
10367 (propagated-inputs
10368 `(("python-lxml" ,python-lxml) ; for SVG output
10369 ("python-pillow" ,python-pillow) ; for PNG output
10370 ("python-six" ,python-six)))
10371 (home-page "https://github.com/lincolnloop/python-qrcode")
10372 (synopsis "QR Code image generator")
10373 (description "This package provides a pure Python QR Code generator
10374 module. It uses the Python Imaging Library (PIL) to allow for the generation
10375 of QR Codes.
10376
10377 In addition this package provides a command line tool to generate QR codes and
10378 either write these QR codes to a file or do the output as ascii art at the
10379 console.")
10380 (license license:bsd-3)))
10381
10382 (define-public python2-qrcode
10383 (package-with-python2 python-qrcode))
10384
10385 (define-public python-rst2ansi
10386 (package
10387 (name "python-rst2ansi")
10388 (version "0.1.5")
10389 (source
10390 (origin
10391 (method url-fetch)
10392 (uri (pypi-uri "rst2ansi" version))
10393 (sha256
10394 (base32
10395 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
10396 (build-system python-build-system)
10397 (propagated-inputs
10398 `(("python-docutils" ,python-docutils)))
10399 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
10400 (synopsis "Convert RST to ANSI-decorated console output")
10401 (description
10402 "Python module dedicated to rendering RST (reStructuredText) documents
10403 to ansi-escaped strings suitable for display in a terminal.")
10404 (license license:expat)))
10405
10406 (define-public python-ansi2html
10407 (package
10408 (name "python-ansi2html")
10409 (version "1.2.0")
10410 (source
10411 (origin
10412 (method url-fetch)
10413 (uri (pypi-uri "ansi2html" version))
10414 (sha256
10415 (base32
10416 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
10417 (build-system python-build-system)
10418 (native-inputs
10419 `(("python-mock" ,python-mock)
10420 ("python-nose" ,python-nose)))
10421 (propagated-inputs
10422 `(("python-six" ,python-six)))
10423 (home-page "https://github.com/ralphbean/ansi2html")
10424 (synopsis "Convert ANSI-decorated console output to HTML")
10425 (description
10426 "@command{ansi2html} is a Python library and command line utility for
10427 convering text with ANSI color codes to HTML or LaTeX.")
10428 (license license:gpl3+)))
10429
10430 (define-public python2-ansi2html
10431 (package-with-python2 python-ansi2html))
10432
10433 (define-public python-ddt
10434 (package
10435 (name "python-ddt")
10436 (version "1.1.2")
10437 (source
10438 (origin
10439 (method url-fetch)
10440 (uri (pypi-uri "ddt" version))
10441 (sha256
10442 (base32
10443 "1wqkmz0yhanly8sif5vb02p2iik7mwxwph8ywph2kbb8ws8szdpx"))))
10444 (build-system python-build-system)
10445 (native-inputs
10446 `(("python-mock" ,python-mock)
10447 ("python-nose" ,python-nose)))
10448 (propagated-inputs
10449 `(("python-six" ,python-six)
10450 ("python-pyyaml" ,python-pyyaml)))
10451 (home-page "https://github.com/txels/ddt")
10452 (synopsis "Data-Driven Tests")
10453 (description
10454 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
10455 running it with different test data, and make it appear as multiple test
10456 cases.")
10457 (license license:expat)))
10458
10459 (define-public python2-ddt
10460 (package-with-python2 python-ddt))
10461
10462 (define-public python-pycosat
10463 (package
10464 (name "python-pycosat")
10465 (version "0.6.1")
10466 (source
10467 (origin
10468 (method url-fetch)
10469 (uri (pypi-uri "pycosat" version))
10470 (sha256
10471 (base32
10472 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
10473 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
10474 (build-system python-build-system)
10475 (home-page "https://github.com/ContinuumIO/pycosat")
10476 (synopsis "Bindings to picosat (a SAT solver)")
10477 (description
10478 "This package provides efficient Python bindings to @code{picosat} on
10479 the C level. When importing pycosat, the @code{picosat} solver becomes part
10480 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
10481 Problem} (SAT) solver.")
10482 (license license:expat)))
10483
10484 (define-public python2-pycosat
10485 (package-with-python2 python-pycosat))
10486
10487 (define-public python2-ruamel.ordereddict
10488 (package
10489 (name "python2-ruamel.ordereddict")
10490 (version "0.4.9")
10491 (source
10492 (origin
10493 (method url-fetch)
10494 (uri (pypi-uri "ruamel.ordereddict" version))
10495 (sha256
10496 (base32
10497 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
10498 (build-system python-build-system)
10499 (arguments
10500 `(#:python ,python-2
10501 #:phases
10502 (modify-phases %standard-phases
10503 (delete 'check)
10504 (add-after 'install 'check
10505 (lambda* (#:key inputs outputs #:allow-other-keys)
10506 (add-installed-pythonpath inputs outputs)
10507 (zero? (system* "python" "test/testordereddict.py")))))))
10508 (home-page "https://bitbucket.org/ruamel/ordereddict")
10509 (synopsis "Version of dict that keeps keys in insertion order")
10510 (description
10511 "This is an implementation of an ordered dictionary with @dfn{Key
10512 Insertion Order} (KIO: updates of values do not affect the position of the
10513 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
10514 removed and put at the back). The standard library module @code{OrderedDict},
10515 implemented later, implements a subset of @code{ordereddict} functionality.
10516 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
10517 Order} (KSO, no sorting function can be specified, but a transform can be
10518 specified to apply on the key before comparison (e.g. @code{string.lower})).")
10519 (license license:expat)))
10520
10521 (define-public python-pypeg2
10522 (package
10523 (name "python-pypeg2")
10524 (version "2.15.2")
10525 (source
10526 (origin
10527 (method url-fetch)
10528 (uri (pypi-uri "pyPEG2" version))
10529 (sha256
10530 (base32
10531 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
10532 (build-system python-build-system)
10533 (propagated-inputs `(("python-lxml" ,python-lxml)))
10534 (arguments
10535 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
10536 '(#:tests? #f))
10537 (home-page "https://fdik.org/pyPEG/")
10538 (synopsis "Parsering Expression Grammars in Python")
10539 (description "PyPEG is an intrinsic parser interpreter framework for
10540 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
10541 parse many formal languages.")
10542 (license license:gpl2)))
10543
10544 (define-public python-incremental
10545 (package
10546 (name "python-incremental")
10547 (version "17.5.0")
10548 (source
10549 (origin
10550 (method url-fetch)
10551 (uri (pypi-uri "incremental" version))
10552 (sha256
10553 (base32
10554 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
10555 (build-system python-build-system)
10556 (home-page "https://github.com/hawkowl/incremental")
10557 (synopsis "Library for versioning Python projects")
10558 (description "Incremental is a small library that versions your Python
10559 projects.")
10560 (license license:expat)))
10561
10562 (define-public python2-incremental
10563 (package-with-python2 python-incremental))
10564
10565 (define-public python-automat
10566 (package
10567 (name "python-automat")
10568 (version "0.6.0")
10569 (source (origin
10570 (method url-fetch)
10571 (uri (pypi-uri "Automat" version))
10572 (sha256
10573 (base32
10574 "1a7nsrljysfmdqmpn2apfa1gg6rfah4y9sizvns8gb08rx7d07rw"))))
10575 (build-system python-build-system)
10576 ;; We disable the tests because they require python-twisted, while
10577 ;; python-twisted depends on python-automat. Twisted is optional, but the
10578 ;; tests fail if it is not available. Also see
10579 ;; <https://github.com/glyph/automat/issues/71>.
10580 (arguments '(#:tests? #f))
10581 (native-inputs
10582 `(("python-m2r" ,python-m2r)
10583 ("python-setuptools-scm" ,python-setuptools-scm)
10584 ("python-graphviz" ,python-graphviz)))
10585 (propagated-inputs
10586 `(("python-six" ,python-six)
10587 ("python-attrs" ,python-attrs)))
10588 (home-page "https://github.com/glyph/Automat")
10589 (synopsis "Self-service finite-state machines")
10590 (description "Automat is a library for concise, idiomatic Python
10591 expression of finite-state automata (particularly deterministic finite-state
10592 transducers).")
10593 (license license:expat)))
10594
10595 (define-public python2-automat
10596 (package-with-python2 python-automat))
10597
10598 (define-public python-m2r
10599 (package
10600 (name "python-m2r")
10601 (version "0.1.12")
10602 (source (origin
10603 (method url-fetch)
10604 (uri (pypi-uri "m2r" version))
10605 (sha256
10606 (base32
10607 "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd"))))
10608 (build-system python-build-system)
10609 (propagated-inputs
10610 `(("python-docutils" ,python-docutils)
10611 ("python-mistune" ,python-mistune)))
10612 (native-inputs
10613 `(("python-pygments" ,python-pygments)
10614 ("python-mock" ,python-mock)))
10615 (home-page "https://github.com/miyakogi/m2r")
10616 (synopsis "Markdown to reStructuredText converter")
10617 (description "M2R converts a markdown file including reST markups to valid
10618 reST format.")
10619 (license license:expat)))
10620
10621 (define-public python2-m2r
10622 (package-with-python2 python-m2r))
10623
10624 (define-public python-constantly
10625 (package
10626 (name "python-constantly")
10627 (version "15.1.0")
10628 (source (origin
10629 (method url-fetch)
10630 (uri (pypi-uri "constantly" version))
10631 (sha256
10632 (base32
10633 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
10634 (build-system python-build-system)
10635 (home-page "https://github.com/twisted/constantly")
10636 (synopsis "Symbolic constants in Python")
10637 (description "Constantly is a Python library that provides symbolic
10638 constant support. It includes collections and constants with text, numeric,
10639 and bit flag values.")
10640 (license license:expat)))
10641
10642 (define-public python2-constantly
10643 (package-with-python2 python-constantly))
10644
10645 (define-public python-attrs
10646 (package
10647 (name "python-attrs")
10648 (version "17.2.0")
10649 (source (origin
10650 (method url-fetch)
10651 (uri (pypi-uri "attrs" version))
10652 (sha256
10653 (base32
10654 "04gx08ikpk26wnq22f7l42gapcvk8iz1512r927k6sadz6cinkax"))))
10655 (build-system python-build-system)
10656 (native-inputs
10657 `(("python-pytest" ,python-pytest)
10658 ("python-hypothesis" ,python-hypothesis)
10659 ("python-zope-interface" ,python-zope-interface)
10660 ("python-six" ,python-six)))
10661 (home-page "https://github.com/python-attrs/attrs/")
10662 (synopsis "Attributes without boilerplate")
10663 (description "@code{attrs} is a Python package with class decorators that
10664 ease the chores of implementing the most common attribute-related object
10665 protocols.")
10666 (license license:expat)))
10667
10668 (define-public python2-attrs
10669 (package-with-python2 python-attrs))
10670
10671 (define-public python2-cliapp
10672 (package
10673 (name "python2-cliapp")
10674 (version "1.20170823")
10675 (source
10676 (origin
10677 (method url-fetch)
10678 (uri (string-append
10679 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
10680 version ".tar.gz"))
10681 (sha256
10682 (base32
10683 "1i9gik0xrj6jmi95s5w988jl1y265baz5xm5pbqdyvsh8h9ln6yq"))))
10684 (build-system python-build-system)
10685 (arguments
10686 `(#:python ,python-2
10687 #:phases
10688 (modify-phases %standard-phases
10689 ;; check phase needs to be run before the build phase. If not,
10690 ;; coverage-test-runner looks for tests for the built source files,
10691 ;; and fails.
10692 (delete 'check)
10693 (add-before 'build 'check
10694 (lambda _
10695 ;; Disable python3 tests
10696 (substitute* "check"
10697 (("python3") "# python3"))
10698 (zero? (system* "./check")))))))
10699 (native-inputs
10700 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
10701 ("python2-pep8" ,python2-pep8)))
10702 (propagated-inputs
10703 `(("python2-pyaml" ,python2-pyaml)))
10704 (home-page "https://liw.fi/cliapp/")
10705 (synopsis "Python framework for command line programs")
10706 (description "@code{python2-cliapp} is a python framework for
10707 command line programs. It contains the typical stuff such programs
10708 need to do, such as parsing the command line for options, and
10709 iterating over input files.")
10710 (license license:gpl2+)))
10711
10712 (define-public python2-ttystatus
10713 (package
10714 (name "python2-ttystatus")
10715 (version "0.35")
10716 (source
10717 (origin
10718 (method url-fetch)
10719 (uri (string-append
10720 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
10721 version ".tar.gz"))
10722 (sha256
10723 (base32
10724 "0vivqbw7ddhsq1zj3g9cvvv4f0phl0pis2smsnwcr2szz2fk3hl6"))))
10725 (build-system python-build-system)
10726 (native-inputs
10727 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
10728 ("python2-pep8" ,python2-pep8)))
10729 (arguments
10730 `(#:python ,python-2
10731 #:phases
10732 (modify-phases %standard-phases
10733 ;; check phase needs to be run before the build phase. If not,
10734 ;; coverage-test-runner looks for tests for the built source files,
10735 ;; and fails.
10736 (delete 'check)
10737 (add-before 'build 'check
10738 (lambda _
10739 (zero? (system* "make" "check")))))))
10740 (home-page "https://liw.fi/ttystatus/")
10741 (synopsis "Python library for showing progress reporting and
10742 status updates on terminals")
10743 (description "@code{python2-ttystatus} is a python library for
10744 showing progress reporting and status updates on terminals, for
10745 command line programs. Output is automatically adapted to the width
10746 of the terminal: truncated if it does not fit, and resized if the
10747 terminal size changes.")
10748 (license license:gpl3+)))
10749
10750 (define-public python2-tracing
10751 (package
10752 (name "python2-tracing")
10753 (version "0.10")
10754 (source
10755 (origin
10756 (method url-fetch)
10757 (uri (string-append
10758 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
10759 version ".tar.gz"))
10760 (sha256
10761 (base32
10762 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
10763 (build-system python-build-system)
10764 (arguments
10765 `(#:python ,python-2))
10766 (home-page "https://liw.fi/tracing/")
10767 (synopsis "Python debug logging helper")
10768 (description "@code{python2-tracing} is a python library for
10769 logging debug messages. It provides a way to turn debugging messages
10770 on and off, based on the filename they occur in. It is much faster
10771 than using @code{logging.Filter} to accomplish the same thing, which
10772 matters when code is run in production mode. The actual logging still
10773 happens using the @code{logging} library.")
10774 (license license:gpl3+)))
10775
10776 (define-public python2-larch
10777 (package
10778 (name "python2-larch")
10779 (version "1.20151025")
10780 (source
10781 (origin
10782 (method url-fetch)
10783 (uri (string-append
10784 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
10785 version ".tar.gz"))
10786 (patches (search-patches
10787 "python2-larch-coverage-4.0a6-compatibility.patch"))
10788 (sha256
10789 (base32
10790 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
10791 (build-system python-build-system)
10792 (arguments
10793 `(#:python ,python-2
10794 #:phases
10795 (modify-phases %standard-phases
10796 ;; check phase needs to be run before the build phase. If not,
10797 ;; coverage-test-runner looks for tests for the built source files,
10798 ;; and fails.
10799 (delete 'check)
10800 (add-before 'build 'check
10801 (lambda _
10802 (zero? (system* "make" "check")))))))
10803 (native-inputs
10804 `(("cmdtest" ,cmdtest)
10805 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
10806 (propagated-inputs
10807 `(("python2-tracing" ,python2-tracing)))
10808 (home-page "https://liw.fi/larch/")
10809 (synopsis "Python copy-on-write B-tree library")
10810 (description "@code{python2-larch} is an implementation of
10811 particular kind of B-tree, based on research by Ohad Rodeh. See
10812 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
10813 on the data structure.
10814
10815 The distinctive feature of this B-tree is that a node is never
10816 (conceptually) modified. Instead, all updates are done by
10817 copy-on-write. This makes it easy to clone a tree, and modify only the
10818 clone, while other processes access the original tree.")
10819 (license license:gpl3+)))
10820
10821 (define-public python-astroid
10822 (package
10823 (name "python-astroid")
10824 (version "1.5.3")
10825 (source
10826 (origin
10827 (method url-fetch)
10828 (uri (string-append
10829 "https://github.com/PyCQA/astroid/archive/astroid-"
10830 version ".tar.gz"))
10831 (sha256
10832 (base32
10833 "0isn5p7f9n48hmksgbrj7dkm9dyglnayzn5jngk37qywg8a74ngn"))))
10834 (build-system python-build-system)
10835 (propagated-inputs
10836 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
10837 ("python-six" ,python-six)
10838 ("python-wrapt" ,python-wrapt)))
10839 (arguments
10840 `(#:phases
10841 (modify-phases %standard-phases
10842 (replace 'check
10843 (lambda _
10844 (zero? (system* "python" "-m" "unittest" "discover"
10845 "-p" "unittest*.py")))))))
10846 (home-page "https://github.com/PyCQA/astroid")
10847 (synopsis "Common base representation of python source code for pylint and
10848 other projects")
10849 (description "@code{python-astroid} provides a common base representation
10850 of python source code for projects such as pychecker, pyreverse, pylint, etc.
10851
10852 It provides a compatible representation which comes from the _ast module. It
10853 rebuilds the tree generated by the builtin _ast module by recursively walking
10854 down the AST and building an extended ast. The new node classes have
10855 additional methods and attributes for different usages. They include some
10856 support for static inference and local name scopes. Furthermore, astroid
10857 builds partial trees by inspecting living objects.")
10858 (license license:lgpl2.1+)
10859 (properties `((python2-variant . ,(delay python2-astroid))))))
10860
10861 (define-public python2-astroid
10862 (let ((base (package-with-python2
10863 (strip-python2-variant python-astroid))))
10864 (package (inherit base)
10865 (propagated-inputs
10866 `(("python2-backports-functools-lru-cache"
10867 ,python2-backports-functools-lru-cache)
10868 ("python2-enum34" ,python2-enum34)
10869 ("python2-singledispatch" ,python2-singledispatch)
10870 ,@(package-propagated-inputs base))))))
10871
10872 (define-public python-isort
10873 (package
10874 (name "python-isort")
10875 (version "4.2.5")
10876 (source
10877 (origin
10878 (method url-fetch)
10879 (uri (string-append
10880 "https://github.com/timothycrosley/isort/archive/"
10881 version ".tar.gz"))
10882 (file-name (string-append name "-" version ".tar.gz"))
10883 (sha256
10884 (base32
10885 "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh"))))
10886 (build-system python-build-system)
10887 (native-inputs
10888 `(("python-mock" ,python-mock)
10889 ("python-pytest" ,python-pytest)))
10890 (home-page "https://github.com/timothycrosley/isort")
10891 (synopsis "Python utility/library to sort python imports")
10892 (description "@code{python-isort} is a python utility/library to sort
10893 imports alphabetically, and automatically separated into sections. It
10894 provides a command line utility, a python library and plugins for various
10895 editors.")
10896 (license license:expat)))
10897
10898 (define-public python2-isort
10899 (package-with-python2 python-isort))
10900
10901 (define-public python2-backports-functools-lru-cache
10902 (package
10903 (name "python2-backports-functools-lru-cache")
10904 (version "1.3")
10905 (source
10906 (origin
10907 (method url-fetch)
10908 ;; only the pypi tarballs contain the necessary metadata
10909 (uri (pypi-uri "backports.functools_lru_cache" version))
10910 (sha256
10911 (base32
10912 "158ysf2hb0q4p4695abfiym9x1ywg0dgh8a3apd7gqaaxjy22jj4"))))
10913 (build-system python-build-system)
10914 (native-inputs
10915 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
10916 (arguments
10917 `(#:python ,python-2))
10918 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
10919 (synopsis "Backport of functools.lru_cache from Python 3.3")
10920 (description "@code{python2-backports-functools-lru-cache} is a backport
10921 of @code{functools.lru_cache} from python 3.3.")
10922 (license license:expat)))
10923
10924 (define-public python-configparser
10925 (package
10926 (name "python-configparser")
10927 (version "3.5.0")
10928 (source
10929 (origin
10930 (method url-fetch)
10931 (uri (string-append
10932 "https://bitbucket.org/ambv/configparser/get/"
10933 version ".tar.bz2"))
10934 (file-name (string-append name "-" version ".tar.gz"))
10935 (sha256
10936 (base32
10937 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
10938 (build-system python-build-system)
10939 (home-page "http://docs.python.org/py3k/library/configparser.html")
10940 (synopsis "Backport of configparser from python 3.5")
10941 (description "@code{python-configparser} is a backport of
10942 @code{configparser} from Python 3.5 so that it can be used directly
10943 in other versions.")
10944 (license license:expat)))
10945
10946 (define-public python2-configparser
10947 (package-with-python2 python-configparser))
10948
10949 (define-public python-mando
10950 (package
10951 (name "python-mando")
10952 (version "0.6.4")
10953 (source (origin
10954 (method url-fetch)
10955 (uri (pypi-uri "mando" version))
10956 (sha256
10957 (base32
10958 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
10959 (build-system python-build-system)
10960 (propagated-inputs
10961 `(("python-rst2ansi" ,python-rst2ansi)
10962 ("python-six" ,python-six)))
10963 (native-inputs
10964 `(("python-pytest" ,python-pytest)))
10965 (home-page "https://mando.readthedocs.org/")
10966 (synopsis
10967 "Wrapper around argparse, allowing creation of complete CLI applications")
10968 (description
10969 "This package is a wrapper around argparse, allowing you to write complete CLI
10970 applications in seconds while maintaining all the flexibility.")
10971 (license license:expat)))
10972
10973 (define-public python2-mando
10974 (package-with-python2 python-mando))
10975
10976 (define-public python-fudge
10977 (package
10978 (name "python-fudge")
10979 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
10980 ;; package, which is currently the only use of this package.
10981 (version "0.9.6")
10982 (source
10983 (origin
10984 (method url-fetch)
10985 (uri (pypi-uri "fudge" version))
10986 (sha256
10987 (base32
10988 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
10989 (build-system python-build-system)
10990 (arguments
10991 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
10992 (home-page "https://github.com/fudge-py/fudge")
10993 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
10994 (description
10995 "Fudge is a Python module for using fake objects (mocks and stubs) to
10996 test real ones.
10997
10998 In readable Python code, you declare the methods available on your fake object
10999 and how they should be called. Then you inject that into your application and
11000 start testing. This declarative approach means you don’t have to record and
11001 playback actions and you don’t have to inspect your fakes after running code.
11002 If the fake object was used incorrectly then you’ll see an informative
11003 exception message with a traceback that points to the culprit.")
11004 (license license:expat)))
11005
11006 (define-public python2-fudge
11007 (package-with-python2 python-fudge))
11008
11009 (define-public python-mwclient
11010 (package
11011 (name "python-mwclient")
11012 (version "0.8.4")
11013 (source
11014 (origin
11015 (method url-fetch)
11016 ;; The PyPI version wouldn't contain tests.
11017 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
11018 "v" version ".tar.gz"))
11019 (file-name (string-append name "-" version ".tar.gz"))
11020 (sha256
11021 (base32
11022 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
11023 (build-system python-build-system)
11024 (propagated-inputs
11025 `(("python-requests" ,python-requests)
11026 ("python-requests-oauthlib"
11027 ,python-requests-oauthlib)
11028 ("python-six" ,python-six)))
11029 (native-inputs
11030 `(("python-mock" ,python-mock)
11031 ("python-pytest" ,python-pytest)
11032 ("python-pytest-pep8" ,python-pytest-pep8)
11033 ("python-pytest-cache" ,python-pytest-cache)
11034 ("python-pytest-cov" ,python-pytest-cov)
11035 ("python-responses" ,python-responses)))
11036 (home-page "https://github.com/btongminh/mwclient")
11037 (synopsis "MediaWiki API client")
11038 (description "This package provides a MediaWiki API client.")
11039 (license license:expat)))
11040
11041 (define-public python2-mwclient
11042 (package-with-python2 python-mwclient))
11043
11044 (define-public python-utils
11045 (package
11046 (name "python-utils")
11047 (version "2.1.0")
11048 (source (origin
11049 (method url-fetch)
11050 (uri (pypi-uri "python-utils" version))
11051 (sha256
11052 (base32
11053 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
11054 (build-system python-build-system)
11055 (native-inputs
11056 `(("pytest-runner" ,python-pytest-runner)
11057 ("pytest" ,python-pytest)
11058 ("six" ,python-six)))
11059 (home-page "https://github.com/WoLpH/python-utils")
11060 (synopsis "Convenient utilities not included with the standard Python install")
11061 (description
11062 "Python Utils is a collection of small Python functions and classes which
11063 make common patterns shorter and easier.")
11064 (license license:bsd-2)))
11065
11066 (define-public python2-utils
11067 (package-with-python2 python-utils))
11068
11069 (define-public python-sphinx-me
11070 (package
11071 (name "python-sphinx-me")
11072 (version "0.3")
11073 (source
11074 (origin
11075 (method url-fetch)
11076 (uri (pypi-uri "sphinx-me" version))
11077 (sha256
11078 (base32
11079 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
11080 (build-system python-build-system)
11081 (home-page "https://github.com/stephenmcd/sphinx-me")
11082 (synopsis "Create a Sphinx documentation shell")
11083 (description
11084 "Create a Sphinx documentation shell for your project and include the
11085 README file as the documentation index. It handles extracting the required
11086 meta data such as the project name, author and version from your project for
11087 use in your Sphinx docs.")
11088 (license license:bsd-2)))
11089
11090 (define-public python2-sphinx-me
11091 (package-with-python2 python-sphinx-me))
11092
11093 (define-public python-diff-match-patch
11094 (package
11095 (name "python-diff-match-patch")
11096 (version "20121119")
11097 (source
11098 (origin
11099 (method url-fetch)
11100 (uri (pypi-uri "diff-match-patch" version))
11101 (sha256
11102 (base32
11103 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
11104 (build-system python-build-system)
11105 (home-page "https://code.google.com/p/google-diff-match-patch")
11106 (synopsis "Synchronize plain text")
11107 (description "Diff Match and Patch libraries offer robust algorithms to
11108 perform the operations required for synchronizing plain text.")
11109 (license license:asl2.0)))
11110
11111 (define-public python2-diff-match-patch
11112 (package-with-python2 python-diff-match-patch))
11113
11114 (define-public python-dirsync
11115 (package
11116 (name "python-dirsync")
11117 (version "2.2.2")
11118 (source
11119 (origin
11120 (method url-fetch)
11121 (uri (pypi-uri "dirsync" version ".zip"))
11122 (sha256
11123 (base32
11124 "1hcdvmkwd5512zbxpin0k7bx5bkgzy3swjx7d0kj1y45af6r75v2"))))
11125 (build-system python-build-system)
11126 (native-inputs
11127 `(("unzip" ,unzip)))
11128 (propagated-inputs
11129 `(("six" ,python-six)))
11130 (home-page "https://bitbucket.org/tkhyn/dirsync")
11131 (synopsis "Advanced directory tree synchronisation tool")
11132 (description "Advanced directory tree synchronisation tool.")
11133 (license license:expat)))
11134
11135 (define-public python2-dirsync
11136 (package-with-python2 python-dirsync))
11137
11138 (define-public python-levenshtein
11139 (package
11140 (name "python-levenshtein")
11141 (version "0.12.0")
11142 (source
11143 (origin
11144 (method url-fetch)
11145 (uri (pypi-uri "python-Levenshtein" version))
11146 (sha256
11147 (base32
11148 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
11149 (build-system python-build-system)
11150 (home-page "https://github.com/ztane/python-Levenshtein")
11151 (synopsis "Fast computation of Levenshtein distance and string similarity")
11152 (description
11153 "The Levenshtein Python C extension module contains functions for fast computation of
11154 @enumerate
11155 @item Levenshtein (edit) distance, and edit operations
11156 @item string similarity
11157 @item approximate median strings, and generally string averaging
11158 @item string sequence and set similarity
11159 @end enumerate
11160 It supports both normal and Unicode strings.")
11161 (license license:gpl2+)))
11162
11163 (define-public python2-levenshtein
11164 (package-with-python2 python-levenshtein))
11165
11166 (define-public python-scandir
11167 (package
11168 (name "python-scandir")
11169 (version "1.7")
11170 (source
11171 (origin
11172 (method url-fetch)
11173 (uri (pypi-uri "scandir" version))
11174 (sha256
11175 (base32 "0gbnhjzg42rj87ljv9kb648rfxph69ly3c8r9841dxy4d7l5pmdj"))))
11176 (build-system python-build-system)
11177 (arguments
11178 `(#:phases (modify-phases %standard-phases
11179 (replace 'check
11180 (lambda _
11181 (invoke "python" "test/run_tests.py"))))))
11182 (home-page "https://github.com/benhoyt/scandir")
11183 (synopsis "Directory iteration function")
11184 (description
11185 "Directory iteration function like os.listdir(), except that instead of
11186 returning a list of bare filenames, it yields DirEntry objects that include
11187 file type and stat information along with the name. Using scandir() increases
11188 the speed of os.walk() by 2-20 times (depending on the platform and file
11189 system) by avoiding unnecessary calls to os.stat() in most cases.
11190
11191 This package is part of the Python standard library since version 3.5.")
11192 (license license:bsd-3)))
11193
11194 (define-public python2-scandir
11195 (package-with-python2 python-scandir))
11196
11197 (define-public python2-stemming
11198 (package
11199 (name "python2-stemming")
11200 (version "1.0.1")
11201 (source
11202 (origin
11203 (method url-fetch)
11204 (uri (pypi-uri "stemming" version))
11205 (sha256
11206 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
11207 (build-system python-build-system)
11208 (arguments
11209 `(#:python ,python-2))
11210 (home-page "https://bitbucket.org/mchaput/stemming/overview")
11211 (synopsis "Python implementations of various stemming algorithms")
11212 (description
11213 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
11214 stemming algorithms for English. These implementations are straightforward and
11215 efficient, unlike some Python versions of the same algorithms available on the
11216 Web. This package is an extraction of the stemming code included in the Whoosh
11217 search engine.")
11218 (license license:public-domain)))
11219
11220 (define-public python-factory-boy
11221 (package
11222 (name "python-factory-boy")
11223 (version "2.8.1")
11224 (source
11225 (origin
11226 (method url-fetch)
11227 (uri (pypi-uri "factory_boy" version))
11228 (sha256
11229 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
11230 (build-system python-build-system)
11231 (arguments
11232 ;; Tests are not included in the tarball.
11233 `(#:tests? #f))
11234 (propagated-inputs
11235 `(("faker" ,python-faker)))
11236 (home-page "https://github.com/benhoyt/scandir")
11237 (synopsis "Versatile test fixtures replacement")
11238 (description
11239 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
11240
11241 As a fixtures replacement tool, it aims to replace static, hard to maintain
11242 fixtures with easy-to-use factories for complex object.
11243
11244 Instead of building an exhaustive test setup with every possible combination
11245 of corner cases, factory_boy allows you to use objects customized for the
11246 current test, while only declaring the test-specific fields")
11247 (license license:expat)))
11248
11249 (define-public python2-factory-boy
11250 (package-with-python2 python-factory-boy))
11251
11252 (define-public python-translate-toolkit
11253 (package
11254 (name "python-translate-toolkit")
11255 (version "2.1.0")
11256 (source
11257 (origin
11258 (method url-fetch)
11259 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
11260 (sha256
11261 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
11262 (build-system python-build-system)
11263 (native-inputs
11264 `(("python-pytest" ,python-pytest)
11265 ("python-sphinx" ,python-sphinx)))
11266 (propagated-inputs
11267 `(("python-babel" ,python-babel)
11268 ("python-beautifulsoup4" ,python-beautifulsoup4)
11269 ("python-chardet" ,python-chardet)
11270 ("python-diff-match-patch" ,python-diff-match-patch)
11271 ("python-levenshtein" ,python-levenshtein)
11272 ("python-lxml" ,python-lxml)
11273 ("python-six" ,python-six)
11274 ("python-vobject" ,python-vobject)
11275 ("python-pyyaml" ,python-pyyaml)))
11276 (arguments
11277 ;; TODO: tests are not run, because they end with
11278 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
11279 ;; 'parse_funcs'
11280 ;; during test setup.
11281 `(#:tests? #f))
11282 (home-page "http://toolkit.translatehouse.org")
11283 (synopsis "Tools and API for translation and localization engineering")
11284 (description
11285 "Tools and API for translation and localization engineering. It contains
11286 several utilities, as well as an API for building localization tools.")
11287 (license license:gpl2+)))
11288
11289 (define-public python2-translate-toolkit
11290 (package-with-python2 python-translate-toolkit))
11291
11292 (define-public python-packaging
11293 (package
11294 (name "python-packaging")
11295 (version "16.8")
11296 (source
11297 (origin
11298 (method url-fetch)
11299 (uri (pypi-uri "packaging" version))
11300 (sha256
11301 (base32
11302 "17k1xbjshackwvbsnxqixbph8rbqhz4bf4g3al5xyzhavxgq6l2x"))))
11303 (build-system python-build-system)
11304 (native-inputs
11305 `(("python-pretend" ,python-pretend)
11306 ("python-pytest" ,python-pytest)))
11307 (propagated-inputs
11308 `(("python-pyparsing" ,python-pyparsing)
11309 ("python-six" ,python-six)))
11310 (home-page "https://github.com/pypa/packaging")
11311 (synopsis "Core utilities for Python packages")
11312 (description "Packaging is a Python module for dealing with Python packages.
11313 It offers an interface for working with package versions, names, and dependency
11314 information.")
11315 ;; From 'LICENSE': This software is made available under the terms of
11316 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
11317 ;; Contributions to this software is made under the terms of *both* these
11318 ;; licenses.
11319 (license (list license:asl2.0 license:bsd-2))))
11320
11321 (define-public python2-packaging
11322 (package-with-python2 python-packaging))
11323
11324 (define-public python-relatorio
11325 (package
11326 (name "python-relatorio")
11327 (version "0.8.0")
11328 (source
11329 (origin
11330 (method url-fetch)
11331 (uri (pypi-uri "relatorio" version))
11332 (sha256
11333 (base32
11334 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
11335 (build-system python-build-system)
11336 (propagated-inputs
11337 `(("python-lxml" ,python-lxml)
11338 ("python-genshi" ,python-genshi)))
11339 (native-inputs
11340 `(("python-magic" ,python-magic)))
11341 (home-page "https://relatorio.tryton.org/")
11342 (synopsis "Templating library able to output ODT and PDF files")
11343 (description "Relatorio is a templating library which provides a way to
11344 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
11345 for more filetypes can be easily added by creating plugins for them.")
11346 (license license:gpl3+)))
11347
11348 (define-public python2-relatorio
11349 (package-with-python2 python-relatorio))
11350
11351 (define-public python-radon
11352 (package
11353 (name "python-radon")
11354 (version "2.2.0")
11355 (source
11356 (origin
11357 (method url-fetch)
11358 (uri (pypi-uri "radon" version))
11359 (sha256
11360 (base32
11361 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
11362 (build-system python-build-system)
11363 (arguments
11364 `(#:phases (modify-phases %standard-phases
11365 (replace 'check
11366 (lambda _
11367 (invoke "python" "radon/tests/run.py"))))))
11368 (propagated-inputs
11369 `(("python-colorama" ,python-colorama)
11370 ("python-flake8-polyfill" ,python-flake8-polyfill)
11371 ("python-mando" ,python-mando)))
11372 (native-inputs
11373 `(("python-pytest" ,python-pytest)
11374 ("python-pytest-mock" ,python-pytest-mock)))
11375 (home-page "https://radon.readthedocs.org/")
11376 (synopsis "Code Metrics in Python")
11377 (description "Radon is a Python tool which computes various code metrics.
11378 Supported metrics are:
11379 @itemize @bullet
11380 @item raw metrics: SLOC, comment lines, blank lines, &c.
11381 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
11382 @item Halstead metrics (all of them)
11383 @item the Maintainability Index (a Visual Studio metric)
11384 @end itemize")
11385 (license license:expat)))
11386
11387 (define-public python2-radon
11388 (package-with-python2 python-radon))
11389
11390 (define-public python-sure
11391 (package
11392 (name "python-sure")
11393 (version "1.4.6")
11394 (source
11395 (origin
11396 (method url-fetch)
11397 (uri (pypi-uri "sure" version))
11398 (sha256
11399 (base32
11400 "1iyqsy2d6radi88g1qf0lziy5b39h5cpb3g5jiqyb4xi46ig3x1z"))))
11401 (build-system python-build-system)
11402 (propagated-inputs
11403 `(("python-mock" ,python-mock)
11404 ("python-six" ,python-six)))
11405 (native-inputs
11406 `(("python-nose" ,python-nose)))
11407 (home-page "https://github.com/gabrielfalcao/sure")
11408 (synopsis "Automated testing library in python for python")
11409 (description
11410 "Sure is a python library that leverages a DSL for writing assertions.
11411 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
11412 (license license:gpl3+)))
11413
11414 (define-public python2-sure
11415 (package-with-python2 python-sure))
11416
11417 (define-public python2-couleur
11418 ;; This package does not seem to support python3 at all, hence,
11419 ;; only the python2 variant definition is provided.
11420 (package
11421 (name "python2-couleur")
11422 (version "0.6.2")
11423 (source
11424 (origin
11425 (method url-fetch)
11426 (uri (pypi-uri "couleur" version))
11427 (sha256
11428 (base32
11429 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
11430 (build-system python-build-system)
11431 (arguments
11432 `(#:python ,python-2))
11433 (home-page "https://github.com/gabrielfalcao/couleur")
11434 (synopsis
11435 "ANSI terminal tool for python, colored shell and other handy fancy features")
11436 (description
11437 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
11438 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
11439 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
11440 ;; https://github.com/gabrielfalcao/couleur/issues/11
11441 (license license:lgpl3+)))
11442
11443 (define-public python-misaka
11444 (package
11445 (name "python-misaka")
11446 (version "2.1.0")
11447 (source
11448 (origin
11449 (method url-fetch)
11450 (uri (pypi-uri "misaka" version))
11451 (sha256
11452 (base32
11453 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
11454 (build-system python-build-system)
11455 (arguments
11456 `(;; Line 37 of setup.py calls self.run_command('develop')
11457 ;; in the 'check' phase. This command seems to be trying
11458 ;; to write to
11459 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
11460 ;; for which it does not have the permission to write.
11461 #:tests? #f))
11462 (propagated-inputs
11463 `(("python-cffi" ,python-cffi)))
11464 (home-page "https://github.com/FSX/misaka")
11465 (synopsis "Python binding for Hoedown")
11466 (description
11467 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
11468 library written in C. It features a fast HTML renderer and functionality to make custom
11469 renderers (e.g. man pages or LaTeX).")
11470 (license license:expat)))
11471
11472 (define-public python2-misaka
11473 (package-with-python2 python-misaka))
11474
11475 (define-public python2-steadymark
11476 ;; This is forced into being a python2 only variant
11477 ;; due to its dependence on couleur that has no support
11478 ;; for python3
11479 (package
11480 (name "python2-steadymark")
11481 (version "0.7.3")
11482 (source
11483 (origin
11484 (method url-fetch)
11485 (uri (pypi-uri "steadymark" version))
11486 (sha256
11487 (base32
11488 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
11489 (build-system python-build-system)
11490 (native-inputs
11491 `(("python-couleur" ,python2-couleur)
11492 ("python-sure" ,python2-sure)
11493 ("python-misaka" ,python2-misaka)))
11494 (arguments
11495 `(#:python ,python-2
11496 #:phases
11497 (modify-phases %standard-phases
11498 (add-before 'build 'patch-setup-py
11499 (lambda _
11500 ;; Update requirements from dependency==version
11501 ;; to dependency>=version
11502 (substitute* "setup.py"
11503 (("==") ">="))
11504 #t)))))
11505 (home-page "https://github.com/gabrielfalcao/steadymark")
11506 (synopsis "Markdown-based test runner for python")
11507 (description
11508 "@code{Steadymark} allows documentation to be written in github-flavoured
11509 markdown. The documentation may contain snippets of code surrounded by python
11510 code blocks and @code{Steadymark} will find these snippets and run them, making
11511 sure that there are no old malfunctional examples in the documentation examples.")
11512 (license license:expat)))
11513
11514 (define-public python-jsonpointer
11515 (package
11516 (name "python-jsonpointer")
11517 (version "1.10")
11518 (source
11519 (origin
11520 (method url-fetch)
11521 (uri (pypi-uri "jsonpointer" version))
11522 (sha256
11523 (base32
11524 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
11525 (build-system python-build-system)
11526 (home-page "https://github.com/stefankoegl/python-json-pointer")
11527 (synopsis "Identify specific nodes in a JSON document")
11528 (description "@code{jsonpointer} allows you to access specific nodes
11529 by path in a JSON document (see RFC 6901).")
11530 (license license:bsd-3)))
11531
11532 (define-public python2-jsonpointer
11533 (package-with-python2 python-jsonpointer))
11534
11535 (define-public python-jsonpatch
11536 (package
11537 (name "python-jsonpatch")
11538 (version "1.16")
11539 (source
11540 (origin
11541 (method url-fetch)
11542 ;; pypi version lacks tests.js
11543 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
11544 "archive/v" version ".tar.gz"))
11545 (file-name (string-append name "-" version ".tar.gz"))
11546 (sha256
11547 (base32
11548 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
11549 (build-system python-build-system)
11550 (native-inputs
11551 `(("python-jsonpointer" ,python-jsonpointer)))
11552 (home-page "https://github.com/stefankoegl/python-json-patch")
11553 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
11554 (description "@code{jsonpatch} is a library and program that allows
11555 applying JSON Patches according to RFC 6902.")
11556 (license license:bsd-3)))
11557
11558 (define-public python2-jsonpatch
11559 (package-with-python2 python-jsonpatch))
11560
11561 (define-public python-jsonpatch-0.4
11562 (package (inherit python-jsonpatch)
11563 (name "python-jsonpatch")
11564 (version "0.4")
11565 (source
11566 (origin
11567 (method url-fetch)
11568 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
11569 "archive/v" version ".tar.gz"))
11570 (file-name (string-append name "-" version ".tar.gz"))
11571 (sha256
11572 (base32
11573 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
11574
11575 (define-public python2-jsonpatch-0.4
11576 (package-with-python2 python-jsonpatch-0.4))
11577
11578 (define-public python-rfc3986
11579 (package
11580 (name "python-rfc3986")
11581 (version "1.1.0")
11582 (source (origin
11583 (method url-fetch)
11584 (uri (pypi-uri "rfc3986" version))
11585 (sha256
11586 (base32
11587 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
11588 (build-system python-build-system)
11589 (arguments
11590 `(#:modules ((guix build utils)
11591 (guix build python-build-system)
11592 (ice-9 ftw)
11593 (srfi srfi-1)
11594 (srfi srfi-26))
11595 #:phases
11596 (modify-phases %standard-phases
11597 (replace 'check
11598 (lambda _
11599 (let ((cwd (getcwd)))
11600 (setenv "PYTHONPATH"
11601 (string-append cwd "/build/"
11602 (find (cut string-prefix? "lib" <>)
11603 (scandir (string-append cwd "/build")))
11604 ":"
11605 (getenv "PYTHONPATH")))
11606 (invoke "pytest" "-v")))))))
11607 (native-inputs
11608 `(("python-pytest" ,python-pytest)))
11609 (home-page "https://rfc3986.readthedocs.io/")
11610 (synopsis "Parse and validate URI references")
11611 (description
11612 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
11613 validation and authority parsing. This module also supports RFC@tie{}6874
11614 which adds support for zone identifiers to IPv6 addresses.")
11615 (license license:asl2.0)))
11616
11617 (define-public python2-rfc3986
11618 (package-with-python2 python-rfc3986))
11619
11620 (define-public python-rfc3987
11621 (package
11622 (name "python-rfc3987")
11623 (version "1.3.7")
11624 (source
11625 (origin
11626 (method url-fetch)
11627 (uri (pypi-uri "rfc3987" version))
11628 (sha256
11629 (base32
11630 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
11631 (build-system python-build-system)
11632 (home-page "https://pypi.python.org/pypi/rfc3987")
11633 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
11634 (description "@code{rfc3987} provides routines for parsing and
11635 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
11636 (license license:gpl3+)))
11637
11638 (define-public python2-rfc3987
11639 (package-with-python2 python-rfc3987))
11640
11641 (define-public python-validate-email
11642 (package
11643 (name "python-validate-email")
11644 (version "1.3")
11645 (source
11646 (origin
11647 (method url-fetch)
11648 (uri (pypi-uri "validate_email" version))
11649 (sha256
11650 (base32
11651 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
11652 (build-system python-build-system)
11653 (home-page "https://github.com/syrusakbary/validate_email")
11654 (synopsis "Verifies if an email address is valid and really exists")
11655 (description "@code{validate_email} can be used to verify if an email
11656 address is valid and really exists.")
11657 (license license:lgpl3+)))
11658
11659 (define-public python2-validate-email
11660 (package-with-python2 python-validate-email))
11661
11662 (define-public python-flex
11663 (package
11664 (name "python-flex")
11665 (version "6.10.0")
11666 (source
11667 (origin
11668 (method url-fetch)
11669 (uri (pypi-uri "flex" version))
11670 (sha256
11671 (base32
11672 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
11673 (build-system python-build-system)
11674 (propagated-inputs
11675 `(("python-click" ,python-click)
11676 ("python-iso8601" ,python-iso8601)
11677 ("python-jsonpointer" ,python-jsonpointer)
11678 ("python-pyyaml" ,python-pyyaml)
11679 ("python-requests" ,python-requests)
11680 ("python-rfc3987" ,python-rfc3987)
11681 ("python-six" ,python-six)
11682 ("python-validate-email" ,python-validate-email)))
11683 (home-page "https://github.com/pipermerriam/flex")
11684 (synopsis "Validates Swagger schemata")
11685 (description "@code{flex} can be used to validate Swagger schemata.")
11686 (license license:bsd-3)))
11687
11688 (define-public python2-flex
11689 (package-with-python2 python-flex))
11690
11691 (define-public python-marshmallow
11692 (package
11693 (name "python-marshmallow")
11694 (version "3.0.0b3")
11695 (source
11696 (origin
11697 (method url-fetch)
11698 (uri (pypi-uri "marshmallow" version))
11699 (sha256
11700 (base32
11701 "07mcrij1yvk85lvgx44wwr9pc80xryghvlgayb057g1cazcypysd"))))
11702 (build-system python-build-system)
11703 (propagated-inputs
11704 `(("python-dateutil" ,python-dateutil)
11705 ("python-simplejson" ,python-simplejson)))
11706 (native-inputs
11707 `(("python-pytest" ,python-pytest)
11708 ("python-pytz" ,python-pytz)))
11709 (home-page "https://github.com/marshmallow-code/marshmallow")
11710 (synopsis "Convert complex datatypes to and from native
11711 Python datatypes.")
11712 (description "@code{marshmallow} provides a library for converting
11713 complex datatypes to and from native Python datatypes.")
11714 (license license:expat)))
11715
11716 (define-public python2-marshmallow
11717 (package-with-python2 python-marshmallow))
11718
11719 (define-public python-apispec
11720 (package
11721 (name "python-apispec")
11722 (version "0.25.3")
11723 (source
11724 (origin
11725 (method url-fetch)
11726 (uri (pypi-uri "apispec" version))
11727 (sha256
11728 (base32
11729 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
11730 (build-system python-build-system)
11731 (propagated-inputs
11732 `(("python-pyyaml" ,python-pyyaml)))
11733 (native-inputs
11734 `(("python-pytest" ,python-pytest)
11735 ("python-flask" ,python-flask)
11736 ("python-marshmallow" ,python-marshmallow)
11737 ("python-tornado" ,python-tornado)
11738 ("python-bottle" ,python-bottle)
11739 ("python-mock" ,python-mock)))
11740 (home-page "https://github.com/marshmallow-code/apispec")
11741 (synopsis "Swagger 2.0 API specification generator")
11742 (description "@code{python-apispec} is a pluggable API specification
11743 generator. Currently supports the OpenAPI specification (f.k.a.
11744 Swagger 2.0).")
11745 (license license:expat)))
11746
11747 (define-public python2-apispec
11748 (package-with-python2 python-apispec))
11749
11750 (define-public python-flasgger
11751 (package
11752 (name "python-flasgger")
11753 (version "0.6.3")
11754 (source
11755 (origin
11756 (method url-fetch)
11757 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
11758 version ".tar.gz"))
11759 (file-name (string-append name "-" version ".tar.gz"))
11760 (sha256
11761 (base32
11762 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
11763 (build-system python-build-system)
11764 (arguments
11765 `(#:phases
11766 (modify-phases %standard-phases
11767 (replace 'check
11768 (lambda* (#:key inputs outputs #:allow-other-keys)
11769 (substitute* "Makefile"
11770 (("flake8 flasgger --ignore=F403")
11771 "flake8 flasgger --ignore=E731,F403"))
11772 (setenv "PYTHONPATH" (string-append (getcwd)
11773 ":"
11774 (getenv "PYTHONPATH")))
11775 (zero? (system* "py.test")))))))
11776 (propagated-inputs
11777 `(("python-flask" ,python-flask)
11778 ("python-pyyaml" ,python-pyyaml)
11779 ("python-jsonschema" ,python-jsonschema)
11780 ("python-mistune" ,python-mistune)
11781 ("python-six" ,python-six)))
11782 (native-inputs
11783 `(("python-decorator" ,python-decorator)
11784 ("python-flake8" ,python-flake8)
11785 ("python-flask-restful" ,python-flask-restful)
11786 ("python-flex" ,python-flex)
11787 ("python-pytest" ,python-pytest)
11788 ("python-pytest-cov" ,python-pytest-cov)
11789 ("python-marshmallow" ,python-marshmallow)
11790 ("python-apispec" ,python-apispec)))
11791 (home-page "https://github.com/rochacbruno/flasgger/")
11792 (synopsis "Extract Swagger specs from your Flask project")
11793 (description "@code{python-flasgger} allows extracting Swagger specs
11794 from your Flask project. It is a fork of Flask-Swagger.")
11795 (license license:expat)))
11796
11797 (define-public python2-flasgger
11798 (package-with-python2 python-flasgger))
11799
11800 (define-public python-swagger-spec-validator
11801 (package
11802 (name "python-swagger-spec-validator")
11803 (version "2.1.0")
11804 (source
11805 (origin
11806 (method url-fetch)
11807 (uri (pypi-uri "swagger-spec-validator" version))
11808 (sha256
11809 (base32
11810 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
11811 (build-system python-build-system)
11812 (propagated-inputs
11813 `(("python-jsonschema" ,python-jsonschema)
11814 ("python-six" ,python-six)))
11815 (home-page
11816 "https://github.com/Yelp/swagger_spec_validator")
11817 (synopsis "Validation of Swagger specifications")
11818 (description "@code{swagger_spec_validator} provides a library for
11819 validating Swagger API specifications.")
11820 (license license:asl2.0)))
11821
11822 (define-public python2-swagger-spec-validator
11823 (package-with-python2 python-swagger-spec-validator))
11824
11825 (define-public python-apache-libcloud
11826 (package
11827 (name "python-apache-libcloud")
11828 (version "2.0.0")
11829 (source
11830 (origin
11831 (method url-fetch)
11832 (uri (pypi-uri "apache-libcloud" version))
11833 (sha256
11834 (base32
11835 "1a71z02ckcxld72k4qgmdnkjan52c4wczncs3p2mp5yafh7dsan7"))))
11836 (build-system python-build-system)
11837 (arguments
11838 `(#:phases
11839 (modify-phases %standard-phases
11840 (add-after 'unpack 'patch-ssh
11841 (lambda* (#:key inputs #:allow-other-keys)
11842 (substitute* "libcloud/compute/ssh.py"
11843 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
11844 "/bin/ssh" "'")))
11845 #t))
11846 (add-after 'unpack 'patch-tests
11847 (lambda _
11848 (substitute* "./libcloud/test/test_file_fixtures.py"
11849 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
11850 (("def _ascii") "def _raw_data(self, method, url, body, headers):
11851 return (httplib.OK,
11852 \"1234abcd\",
11853 {\"test\": \"value\"},
11854 httplib.responses[httplib.OK])
11855 def _ascii"))
11856 (substitute* "libcloud/test/compute/test_ssh_client.py"
11857 (("class ShellOutSSHClientTests")
11858 "@unittest.skip(\"Guix container doesn't have ssh service\")
11859 class ShellOutSSHClientTests")
11860 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
11861 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
11862 (("'.xF0', '.x90', '.x8D', '.x88'")
11863 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
11864 #t)))))
11865 (inputs
11866 `(("openssh" ,openssh)))
11867 (propagated-inputs
11868 `(("python-paramiko" ,python-paramiko)
11869 ("python-requests" ,python-requests)))
11870 (native-inputs
11871 `(("python-lockfile" ,python-lockfile)
11872 ("python-mock" ,python-mock)
11873 ("python-requests-mock" ,python-requests-mock)))
11874 (home-page "https://libcloud.apache.org/")
11875 (synopsis "Unified Cloud API")
11876 (description "@code{libcloud} is a Python library for interacting with
11877 many of the popular cloud service providers using a unified API.")
11878 (license license:asl2.0)))
11879
11880 (define-public python2-apache-libcloud
11881 (package-with-python2 python-apache-libcloud))
11882
11883 (define-public python-smmap2
11884 (package
11885 (name "python-smmap2")
11886 (version "2.0.3")
11887 (source
11888 (origin
11889 (method url-fetch)
11890 (uri (pypi-uri "smmap2" version))
11891 (sha256
11892 (base32
11893 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
11894 (build-system python-build-system)
11895 (native-inputs
11896 `(("python-nosexcover" ,python-nosexcover)))
11897 (home-page "https://github.com/Byron/smmap")
11898 (synopsis "Python sliding window memory map manager")
11899 (description "@code{smmap2} is a pure Python implementation of a sliding
11900 window memory map manager.")
11901 (license license:bsd-3)))
11902
11903 (define-public python2-smmap2
11904 (package-with-python2 python-smmap2))
11905
11906 (define-public python-regex
11907 (package
11908 (name "python-regex")
11909 (version "2017.06.07")
11910 (source (origin
11911 (method url-fetch)
11912 (uri (pypi-uri "regex" version))
11913 (sha256
11914 (base32
11915 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
11916 (build-system python-build-system)
11917 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
11918 (synopsis "Alternative regular expression module")
11919 (description "This regular expression implementation is backwards-
11920 compatible with the standard @code{re} module, but offers additional
11921 functionality like full case-folding for case-insensitive matches in Unicode.")
11922 (license license:psfl)))
11923
11924 (define-public python2-regex
11925 (package-with-python2 python-regex))
11926
11927 (define-public python2-pyopengl
11928 (package
11929 (name "python2-pyopengl")
11930 (version "3.1.0")
11931 (source
11932 (origin
11933 (method url-fetch)
11934 (uri (pypi-uri "PyOpenGL" version))
11935 (sha256
11936 (base32
11937 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
11938 (arguments
11939 `(#:python ,python-2))
11940 (build-system python-build-system)
11941 (home-page "http://pyopengl.sourceforge.net")
11942 (synopsis "Standard OpenGL bindings for Python")
11943 (description
11944 "PyOpenGL is the most common cross platform Python binding to OpenGL and
11945 related APIs. The binding is created using the standard @code{ctypes}
11946 library.")
11947 (license license:bsd-3)))
11948
11949 (define-public python2-pyopengl-accelerate
11950 (package
11951 (inherit python2-pyopengl)
11952 (name "python2-pyopengl-accelerate")
11953 (version "3.1.0")
11954 (source
11955 (origin
11956 (method url-fetch)
11957 (uri (pypi-uri "PyOpenGL-accelerate" version))
11958 (sha256
11959 (base32
11960 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
11961 (synopsis "Acceleration code for PyOpenGL")
11962 (description
11963 "This is the Cython-coded accelerator module for PyOpenGL.")))
11964
11965 (define-public python-rencode
11966 (package
11967 (name "python-rencode")
11968 (version "1.0.3")
11969 (source
11970 (origin
11971 (method url-fetch)
11972 (uri (pypi-uri "rencode" version))
11973 (sha256
11974 (base32
11975 "08if5yax1xn5yfp8p3765ccjmfcv9di7i4m5jckgnwvdsgznwkbj"))))
11976 (build-system python-build-system)
11977 (native-inputs `(("pkg-config" ,pkg-config)
11978 ("python-cython" ,python-cython)))
11979 (home-page "https://github.com/aresch/rencode")
11980 (synopsis "Serialization of heterogeneous data structures")
11981 (description
11982 "The @code{rencode} module is a data structure serialization library,
11983 similar to @code{bencode} from the BitTorrent project. For complex,
11984 heterogeneous data structures with many small elements, r-encoding stake up
11985 significantly less space than b-encodings. This version of rencode is a
11986 complete rewrite in Cython to attempt to increase the performance over the
11987 pure Python module.")
11988 (license license:bsd-3)))
11989
11990 (define-public python2-rencode
11991 (package-with-python2 python-rencode))
11992
11993 (define-public python-xenon
11994 (package
11995 (name "python-xenon")
11996 (version "0.5.1")
11997 (source
11998 (origin
11999 (method url-fetch)
12000 (uri (pypi-uri "xenon" version))
12001 (sha256
12002 (base32
12003 "14kby2y48vp3sgwxqlm5d5789yibqwb1qli5fwcmdqg3iayrbklc"))))
12004 (build-system python-build-system)
12005 (native-inputs
12006 `(("python-pyyaml" ,python-pyyaml)
12007 ("python-radon" ,python-radon)
12008 ("python-requests" ,python-requests)
12009 ("python-flake8" ,python-flake8)
12010 ("python-tox" ,python-tox)))
12011 (arguments
12012 `(#:phases
12013 (modify-phases %standard-phases
12014 (add-before 'build 'patch-test-requirements
12015 (lambda* (#:key inputs #:allow-other-keys)
12016 ;; Update requirements from dependency==version to
12017 ;; dependency>=version.
12018 (substitute* "requirements.txt"
12019 (("==") ">=")
12020 ((",<1.5.0") ""))
12021 ;; Remove httpretty dependency for tests.
12022 (substitute* "setup.py"
12023 (("httpretty") ""))
12024 #t)))))
12025 (home-page "https://xenon.readthedocs.org/")
12026 (synopsis "Monitor code metrics for Python on your CI server")
12027 (description
12028 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
12029 Ideally, @code{xenon} is run every time code is committed. Through command
12030 line options, various thresholds can be set for the complexity of code. It
12031 will fail (i.e. it will exit with a non-zero exit code) when any of these
12032 requirements is not met.")
12033 (license license:expat)))
12034
12035 (define-public python2-xenon
12036 (package-with-python2 python-xenon))
12037
12038 (define-public python-pysocks
12039 (package
12040 (name "python-pysocks")
12041 (version "1.6.7")
12042 (source
12043 (origin
12044 (method url-fetch)
12045 (uri (pypi-uri "PySocks" version))
12046 (sha256
12047 (base32
12048 "1krkiss578zqwcg4c8iqz1hwscwhsvy2djp3xyvps5gsgvr2j0yh"))))
12049 (build-system python-build-system)
12050 (arguments `(#:tests? #f))
12051 (home-page "https://github.com/Anorov/PySocks")
12052 (synopsis "SOCKS client module")
12053 (description "@code{pysocks} is an updated and semi-actively maintained
12054 version of @code{SocksiPy} with bug fixes and extra features.")
12055 (license license:bsd-3)))
12056
12057 (define-public python2-pysocks
12058 (package-with-python2 python-pysocks))
12059
12060 (define-public python-pydiff
12061 (package
12062 (name "python-pydiff")
12063 (version "0.2")
12064 (source
12065 (origin
12066 (method url-fetch)
12067 (uri (pypi-uri "pydiff" version))
12068 (sha256
12069 (base32
12070 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
12071 (build-system python-build-system)
12072 (home-page "https://github.com/myint/pydiff")
12073 (synopsis "Library to diff two Python files at the bytecode level")
12074 (description
12075 "@code{pydiff} makes it easy to look for actual code changes while
12076 ignoring formatting changes.")
12077 (license license:expat)))
12078
12079 (define-public python2-pydiff
12080 (package-with-python2 python-pydiff))
12081
12082 (define-public python-tqdm
12083 (package
12084 (name "python-tqdm")
12085 (version "4.19.6")
12086 (source
12087 (origin
12088 (method url-fetch)
12089 (uri (pypi-uri "tqdm" version))
12090 (sha256
12091 (base32
12092 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
12093 (build-system python-build-system)
12094 (native-inputs
12095 `(("python-flake8" ,python-flake8)
12096 ("python-nose" ,python-nose)
12097 ("python-coverage" ,python-coverage)))
12098 (home-page "https://github.com/tqdm/tqdm")
12099 (synopsis "Fast, extensible progress meter")
12100 (description
12101 "Make loops show a progress bar on the console by just wrapping any
12102 iterable with @code{|tqdm(iterable)|}. Offers many options to define
12103 design and layout.")
12104 (license (list license:mpl2.0 license:expat))))
12105
12106 (define-public python2-tqdm
12107 (package-with-python2 python-tqdm))
12108
12109 (define-public python-pkginfo
12110 (package
12111 (name "python-pkginfo")
12112 (version "1.4.2")
12113 (source
12114 (origin
12115 (method url-fetch)
12116 (uri (pypi-uri "pkginfo" version))
12117 (sha256
12118 (base32
12119 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
12120 (build-system python-build-system)
12121 (arguments
12122 ;; The tests are broken upstream.
12123 '(#:tests? #f))
12124 (home-page
12125 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
12126 (synopsis
12127 "Query metadatdata from sdists, bdists, and installed packages")
12128 (description
12129 "API to query the distutils metadata written in @file{PKG-INFO} inside a
12130 source distriubtion (an sdist) or a binary distribution (e.g., created by
12131 running bdist_egg). It can also query the EGG-INFO directory of an installed
12132 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
12133 created by running @code{python setup.py develop}).")
12134 (license license:expat)))
12135
12136 (define-public python2-pkginfo
12137 (package-with-python2 python-pkginfo))
12138
12139 (define-public python-twine
12140 (package
12141 (name "python-twine")
12142 (version "1.9.1")
12143 (source
12144 (origin
12145 (method url-fetch)
12146 (uri (pypi-uri "twine" version))
12147 (sha256
12148 (base32
12149 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
12150 (build-system python-build-system)
12151 (propagated-inputs
12152 `(("python-tqdm" ,python-tqdm)
12153 ("python-pkginfo" ,python-pkginfo)
12154 ("python-requests" ,python-requests)
12155 ("python-requests-toolbelt" ,python-requests-toolbelt)))
12156 (home-page "https://github.com/pypa/twine")
12157 (synopsis "Collection of utilities for interacting with PyPI")
12158 (description
12159 "@code{twine} currently supports registering projects and uploading
12160 distributions. It authenticates the user over HTTPS, allows them to pre-sign
12161 their files and supports any packaging format (including wheels).")
12162 (license license:asl2.0)))
12163
12164 (define-public python2-twine
12165 (package-with-python2 python-twine))
12166
12167 (define-public python-linecache2
12168 (package
12169 (name "python-linecache2")
12170 (version "1.0.0")
12171 (source
12172 (origin
12173 (method url-fetch)
12174 (uri (pypi-uri "linecache2" version))
12175 (sha256
12176 (base32
12177 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
12178 (build-system python-build-system)
12179 (arguments
12180 `(;; The tests depend on unittest2, and our version is a bit too old.
12181 #:tests? #f))
12182 (native-inputs
12183 `(("python-pbr" ,python-pbr-minimal)))
12184 (home-page
12185 "https://github.com/testing-cabal/linecache2")
12186 (synopsis "Backports of the linecache module")
12187 (description
12188 "The linecache module allows one to get any line from any file, while
12189 attempting to optimize internally, using a cache, the common case where many
12190 lines are read from a single file.")
12191 (license license:psfl)))
12192
12193 (define-public python2-linecache2
12194 (package-with-python2 python-linecache2))
12195
12196 (define-public python-traceback2
12197 (package
12198 (name "python-traceback2")
12199 (version "1.4.0")
12200 (source
12201 (origin
12202 (method url-fetch)
12203 (uri (pypi-uri "traceback2" version))
12204 (sha256
12205 (base32
12206 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
12207 (build-system python-build-system)
12208 (arguments
12209 `(;; python-traceback2 and python-unittest2 depend on one another.
12210 #:tests? #f))
12211 (native-inputs
12212 `(("python-pbr" ,python-pbr-minimal)))
12213 (propagated-inputs
12214 `(("python-linecache2" ,python-linecache2)))
12215 (home-page
12216 "https://github.com/testing-cabal/traceback2")
12217 (synopsis "Backports of the traceback module")
12218 (description
12219 "This module provides a standard interface to extract, format and print
12220 stack traces of Python programs. It exactly mimics the behavior of the Python
12221 interpreter when it prints a stack trace.")
12222 (license license:psfl)))
12223
12224 (define-public python2-traceback2
12225 (package-with-python2 python-traceback2))
12226
12227 (define-public python-ratelimiter
12228 (package
12229 (name "python-ratelimiter")
12230 (version "1.2.0")
12231 (source
12232 (origin
12233 (method url-fetch)
12234 (uri (pypi-uri "ratelimiter" version))
12235 (sha256
12236 (base32
12237 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
12238 (build-system python-build-system)
12239 (arguments
12240 '(#:tests? #f)) ; There are no tests in the pypi archive.
12241 (home-page "https://github.com/RazerM/ratelimiter")
12242 (synopsis "Simple rate limiting object")
12243 (description
12244 "The @code{ratelimiter} module ensures that an operation will not be
12245 executed more than a given number of times during a given period.")
12246 (license license:asl2.0)))
12247
12248 (define-public python2-ratelimiter
12249 (package-with-python2 python-ratelimiter))
12250
12251 (define-public python-dukpy
12252 (package
12253 (name "python-dukpy")
12254 (version "0.3")
12255 (source
12256 (origin
12257 (method url-fetch)
12258 (uri (string-append "https://github.com/kovidgoyal/dukpy/archive/v"
12259 version ".tar.gz"))
12260 (file-name (string-append name "-" version ".tar.gz"))
12261 (sha256
12262 (base32
12263 "0pj39rfwlzivqm5hkrsza7gssg6ggpxlq5ivc8f3h7x5pfgc6y6c"))))
12264 (build-system python-build-system)
12265 (home-page "https://github.com/kovidgoyal/dukpy")
12266 (synopsis "Run JavaScript in python")
12267 (description
12268 "dukpy is a JavaScript runtime environment for Python using the duktape
12269 embeddable JavaScript engine.")
12270 ;; Dukpy is licensed under MIT like the embedded duktape library,
12271 ;; with 'errors.c' as GPL3.
12272 (license (list license:expat license:gpl3))))
12273
12274 (define-public python2-dukpy
12275 (package-with-python2 python-dukpy))
12276
12277 (define-public python-jsonrpclib-pelix
12278 (package
12279 (name "python-jsonrpclib-pelix")
12280 (version "0.3.1")
12281 (source
12282 (origin
12283 (method url-fetch)
12284 (uri (pypi-uri "jsonrpclib-pelix" version))
12285 (sha256
12286 (base32
12287 "1qs95vxplxwspbrqy8bvc195s58iy43qkf75yrjfql2sim8b25sl"))))
12288 (build-system python-build-system)
12289 (home-page "https://github.com/tcalmant/jsonrpclib/")
12290 (synopsis "JSON-RPC 2.0 client library for Python")
12291 (description
12292 "This library implements the JSON-RPC v2.0
12293 specification (backwards-compatible) as a client library for Python. This
12294 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
12295 services.")
12296 (license license:asl2.0)))
12297
12298 (define-public python2-jsonrpclib-pelix
12299 (package-with-python2 python-jsonrpclib-pelix))
12300
12301 (define-public python-setuptools-scm-git-archive
12302 (package
12303 (name "python-setuptools-scm-git-archive")
12304 (version "1.0")
12305 (source
12306 (origin
12307 (method url-fetch)
12308 (uri (pypi-uri "setuptools_scm_git_archive" version))
12309 (sha256
12310 (base32
12311 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
12312 (build-system python-build-system)
12313 (native-inputs
12314 `(("python-pytest" ,python-pytest)))
12315 (propagated-inputs
12316 `(("python-setuptools-scm" ,python-setuptools-scm)))
12317 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
12318 (synopsis "Setuptools_scm plugin for git archives")
12319 (description
12320 "The setuptools_scm_git_archive package is a plugin to
12321 setuptools_scm, which supports obtaining versions from git archives that
12322 belong to tagged versions.")
12323 (license license:expat)))
12324
12325 (define-public python2-setuptools-scm-git-archive
12326 (package-with-python2 python-setuptools-scm-git-archive))
12327
12328 (define-public python-pyclipper
12329 (package
12330 (name "python-pyclipper")
12331 (version "1.0.6")
12332 (source
12333 (origin
12334 (method url-fetch)
12335 (uri (pypi-uri "pyclipper" version ".zip"))
12336 (sha256
12337 (base32
12338 "1zpmwv3bya3j984y5cf9x9d5108kf6mxldcba68wiq0frv5qrssw"))))
12339 (build-system python-build-system)
12340 (arguments
12341 `(#:tests? #f)); 8 Tests fail, 37 succeed
12342 (propagated-inputs
12343 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
12344 (native-inputs
12345 `(("unzip" ,unzip)))
12346 (home-page "https://github.com/greginvm/pyclipper")
12347 (synopsis "Wrapper for Angus Johnson's Clipper library")
12348 (description
12349 "Pyclipper is a Cython wrapper for the C++ translation of the
12350 Angus Johnson's polygon clipping Clipper library (ver. 6.2.1).")
12351 (license license:expat)))
12352
12353 (define-public python2-pyclipper
12354 (package-with-python2 python-pyclipper))
12355
12356 (define-public python2-booleanoperations
12357 (package
12358 (name "python2-booleanoperations")
12359 (version "0.7.1")
12360 (source
12361 (origin
12362 (method url-fetch)
12363 (uri (pypi-uri "booleanOperations" version ".zip"))
12364 (sha256
12365 (base32
12366 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
12367 (build-system python-build-system)
12368 (arguments
12369 `(#:python ,python-2))
12370 (native-inputs
12371 `(("unzip" ,unzip)
12372 ("python2-pytest" ,python2-pytest)
12373 ("python2-pytest-runner" ,python2-pytest-runner)))
12374 (propagated-inputs
12375 `(("python-fonttools" ,python2-fonttools)
12376 ("python-pyclipper" ,python2-pyclipper)
12377 ("python-ufolib" ,python2-ufolib)))
12378 (home-page "https://github.com/typemytype/booleanOperations")
12379 (synopsis "Boolean operations on paths")
12380 (description
12381 "BooleanOperations provides a Python library that enables
12382 boolean operations on paths.")
12383 (license license:expat)))
12384
12385 (define-public python-tempdir
12386 (package
12387 (name "python-tempdir")
12388 (version "0.7.1")
12389 (source
12390 (origin
12391 (method url-fetch)
12392 (uri (pypi-uri "tempdir" version))
12393 (sha256
12394 (base32
12395 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
12396 (build-system python-build-system)
12397 (home-page "https://pypi.org/project/tempdir/")
12398 (arguments
12399 ;; the package has no tests
12400 '(#:tests? #f))
12401 (synopsis "Python library for managing temporary directories")
12402 (description
12403 "This library manages temporary directories that are automatically
12404 deleted with all their contents when they are no longer needed. It is
12405 particularly convenient for use in tests.")
12406 (license license:expat)))
12407
12408 (define-public python2-tempdir
12409 (package-with-python2 python-tempdir))
12410
12411 (define-public python-activepapers
12412 (package
12413 (name "python-activepapers")
12414 (version "0.2.2")
12415 (source
12416 (origin
12417 (method url-fetch)
12418 (uri (pypi-uri "ActivePapers.Py" version))
12419 (sha256
12420 (base32
12421 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
12422 (build-system python-build-system)
12423 (arguments
12424 `(#:modules ((ice-9 ftw)
12425 (srfi srfi-1)
12426 (guix build utils)
12427 (guix build python-build-system))
12428
12429 #:phases
12430 (modify-phases %standard-phases
12431 (add-after 'unpack 'delete-python2-code
12432 (lambda _
12433 (for-each delete-file
12434 '("lib/activepapers/builtins2.py"
12435 "lib/activepapers/standardlib2.py"
12436 "lib/activepapers/utility2.py"))))
12437 (replace 'check
12438 (lambda _
12439 ;; Deactivate the test cases that download files
12440 (setenv "NO_NETWORK_ACCESS" "1")
12441 ;; For some strange reason, some tests fail if nosetests runs all
12442 ;; test modules in a single execution. They pass if each test
12443 ;; module is run individually.
12444 (for-each (lambda (filename)
12445 (invoke "nosetests"
12446 (string-append "tests/" filename)))
12447 (scandir "tests"
12448 (lambda (filename)
12449 (string-suffix? ".py" filename)))))))))
12450 (native-inputs
12451 `(("python-tempdir" ,python-tempdir)
12452 ("python-nose" ,python-nose)))
12453 (propagated-inputs
12454 `(("python-h5py" ,python-h5py)))
12455 (home-page "http://www.activepapers.org/")
12456 (synopsis "Executable papers for scientific computing")
12457 (description
12458 "ActivePapers is a tool for working with executable papers, which
12459 combine data, code, and documentation in single-file packages,
12460 suitable for publication as supplementary material or on repositories
12461 such as figshare or Zenodo.")
12462 (properties `((python2-variant . ,(delay python2-activepapers))))
12463 (license license:bsd-3)))
12464
12465 (define-public python2-activepapers
12466 (let ((base (package-with-python2
12467 (strip-python2-variant python-activepapers))))
12468 (package
12469 (inherit base)
12470 (arguments
12471 (substitute-keyword-arguments (package-arguments base)
12472 ((#:phases phases)
12473 `(modify-phases ,phases
12474 (delete 'delete-python2-code)
12475 (add-after 'unpack 'delete-python3-code
12476 (lambda _
12477 (for-each delete-file
12478 '("lib/activepapers/builtins3.py"
12479 "lib/activepapers/standardlib3.py"
12480 "lib/activepapers/utility3.py")))))))))))
12481
12482 (define-public python-semver
12483 (package
12484 (name "python-semver")
12485 (version "2.7.9")
12486 (source
12487 (origin
12488 (method url-fetch)
12489 (uri (pypi-uri "semver" version))
12490 (sha256
12491 (base32
12492 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
12493 (build-system python-build-system)
12494 (arguments
12495 `(#:phases
12496 (modify-phases %standard-phases
12497 (add-after 'unpack 'patch-test-requirements
12498 (lambda _
12499 (substitute* "setup.py"
12500 ;; Our Python is new enough.
12501 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
12502 #t)))))
12503 (native-inputs
12504 `(("python-tox" ,python-tox)
12505 ("python-virtualenv" ,python-virtualenv)))
12506 (home-page "https://github.com/k-bx/python-semver")
12507 (synopsis "Python helper for Semantic Versioning")
12508 (description "This package provides a Python library for
12509 @url{Semantic Versioning, http://semver.org/}.")
12510 (license license:bsd-3)))
12511
12512 (define-public python2-semver
12513 (package-with-python2 python-semver))
12514
12515 (define-public python2-pyro
12516 (package
12517 (name "python2-pyro")
12518 (version "3.16")
12519 (source
12520 (origin
12521 (method url-fetch)
12522 (uri (pypi-uri "Pyro" version))
12523 (file-name (string-append "Pyro-" version ".tar.gz"))
12524 (sha256
12525 (base32
12526 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
12527 (build-system python-build-system)
12528 (arguments
12529 ;; Pyro is not compatible with Python 3
12530 `(#:python ,python-2
12531 ;; Pyro has no test cases for automatic execution
12532 #:tests? #f))
12533 (home-page "http://pythonhosted.org/Pyro/")
12534 (synopsis "Distributed object manager for Python")
12535 (description "Pyro is a Distributed Object Technology system
12536 written in Python that is designed to be easy to use. It resembles
12537 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
12538 which is a system and language independent Distributed Object Technology
12539 and has much more to offer than Pyro or RMI. Pyro 3.x is no
12540 longer maintained. New projects should use Pyro4 instead, which
12541 is the new Pyro version that is actively developed.")
12542 (license license:expat)))
12543
12544 (define-public python2-scientific
12545 (package
12546 (name "python2-scientific")
12547 (version "2.9.4")
12548 (source
12549 (origin
12550 (method url-fetch)
12551 (uri (string-append "https://bitbucket.org/khinsen/"
12552 "scientificpython/downloads/ScientificPython-"
12553 version ".tar.gz"))
12554 (file-name (string-append "ScientificPython-" version ".tar.gz"))
12555 (sha256
12556 (base32
12557 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
12558 (build-system python-build-system)
12559 (inputs
12560 `(("netcdf" ,netcdf)))
12561 (propagated-inputs
12562 `(("python-numpy" ,python2-numpy-1.8)
12563 ("python-pyro" ,python2-pyro)))
12564 (arguments
12565 ;; ScientificPython is not compatible with Python 3
12566 `(#:python ,python-2
12567 #:tests? #f ; No test suite
12568 #:phases
12569 (modify-phases %standard-phases
12570 (replace 'build
12571 (lambda* (#:key inputs #:allow-other-keys)
12572 (zero? (system* "python" "setup.py" "build"
12573 (string-append "--netcdf_prefix="
12574 (assoc-ref inputs "netcdf")))))))))
12575 (home-page "https://bitbucket.org/khinsen/scientificpython")
12576 (synopsis "Python modules for scientific computing")
12577 (description "ScientificPython is a collection of Python modules that are
12578 useful for scientific computing. Most modules are rather general (Geometry,
12579 physical units, automatic derivatives, ...) whereas others are more
12580 domain-specific (e.g. netCDF and PDB support). The library is currently
12581 not actively maintained and works only with Python 2 and NumPy < 1.9.")
12582 (license license:cecill-c)))
12583
12584 (define-public python2-mmtk
12585 (package
12586 (name "python2-mmtk")
12587 (version "2.7.11")
12588 (source
12589 (origin
12590 (method url-fetch)
12591 (uri (string-append "https://bitbucket.org/khinsen/"
12592 "mmtk/downloads/MMTK-" version ".tar.gz"))
12593 (file-name (string-append "MMTK-" version ".tar.gz"))
12594 (sha256
12595 (base32
12596 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
12597 (build-system python-build-system)
12598 (native-inputs
12599 `(("netcdf" ,netcdf)))
12600 (propagated-inputs
12601 `(("python-scientific" ,python2-scientific)
12602 ("python-tkinter" ,python-2 "tk")))
12603 (arguments
12604 `(#:python ,python-2
12605 #:tests? #f
12606 #:phases
12607 (modify-phases %standard-phases
12608 (add-before 'build 'includes-from-scientific
12609 (lambda* (#:key inputs #:allow-other-keys)
12610 (mkdir-p "Include/Scientific")
12611 (copy-recursively
12612 (string-append
12613 (assoc-ref inputs "python-scientific")
12614 "/include/python2.7/Scientific")
12615 "Include/Scientific"))))))
12616 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
12617 (synopsis "Python library for molecular simulation")
12618 (description "MMTK is a library for molecular simulations with an emphasis
12619 on biomolecules. It provides widely used methods such as Molecular Dynamics
12620 and normal mode analysis, but also basic routines for implementing new methods
12621 for simulation and analysis. The library is currently not actively maintained
12622 and works only with Python 2 and NumPy < 1.9.")
12623 (license license:cecill-c)))
12624
12625 (define-public python-phonenumbers
12626 (package
12627 (name "python-phonenumbers")
12628 (version "8.9.1")
12629 (source
12630 (origin
12631 (method url-fetch)
12632 (uri (pypi-uri "phonenumbers" version))
12633 (sha256
12634 (base32
12635 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
12636 (build-system python-build-system)
12637 (home-page
12638 "https://github.com/daviddrysdale/python-phonenumbers")
12639 (synopsis
12640 "Python library for dealing with international phone numbers")
12641 (description
12642 "This package provides a Python port of Google's libphonenumber library.")
12643 (license license:asl2.0)))
12644
12645 (define-public python2-phonenumbers
12646 (package-with-python2 python-phonenumbers))
12647
12648 (define-public python-yapf
12649 (package
12650 (name "python-yapf")
12651 (version "0.20.1")
12652 (source
12653 (origin
12654 (method url-fetch)
12655 (uri (pypi-uri "yapf" version))
12656 (sha256
12657 (base32
12658 "0s7l6afzxvpx39kzd0lwshlaxw8m4fwh4iy0rlmav4vipr3g46dx"))))
12659 (build-system python-build-system)
12660 (home-page "https://github.com/google/yapf")
12661 (synopsis "Formatter for Python code")
12662 (description "YAPF is a formatter for Python code. It's based off of
12663 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
12664 takes the code and reformats it to the best formatting that conforms to the
12665 style guide, even if the original code didn't violate the style guide.")
12666 (license license:asl2.0)))
12667
12668 (define-public python2-yapf
12669 (package-with-python2 python-yapf))
12670
12671 (define-public python-gyp
12672 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
12673 (revision "0"))
12674 (package
12675 (name "python-gyp")
12676 ;; Google does not release versions,
12677 ;; based on second most recent commit date.
12678 (version (git-version "0.0.0" revision commit))
12679 (source
12680 (origin
12681 ;; Google does not release tarballs,
12682 ;; git checkout is needed.
12683 (method git-fetch)
12684 (uri (git-reference
12685 (url "https://chromium.googlesource.com/external/gyp")
12686 (commit commit)))
12687 (file-name (git-file-name name version))
12688 (sha256
12689 (base32
12690 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
12691 (build-system python-build-system)
12692 (home-page "https://gyp.gsrc.io/")
12693 (synopsis "GYP is a Meta-Build system")
12694 (description
12695 "GYP builds build systems for large, cross platform applications.
12696 It can be used to generate XCode projects, Visual Studio projects, Ninja build
12697 files, and Makefiles.")
12698 (license license:bsd-3))))
12699
12700 (define-public python2-gyp
12701 (package-with-python2 python-gyp))
12702
12703 (define-public python-whatever
12704 (package
12705 (name "python-whatever")
12706 (version "0.5")
12707 (source
12708 (origin
12709 (method url-fetch)
12710 (uri (string-append "https://github.com/Suor/whatever/archive/" version
12711 ".tar.gz"))
12712 (sha256
12713 (base32
12714 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
12715 (file-name (string-append name "-" version ".tar.gz"))))
12716 (build-system python-build-system)
12717 (arguments
12718 `(#:phases
12719 (modify-phases %standard-phases
12720 (replace 'check
12721 (lambda _
12722 (invoke "py.test"))))))
12723 (native-inputs
12724 `(("python-pytest" ,python-pytest)))
12725 (home-page "http://github.com/Suor/whatever")
12726 (synopsis "Make anonymous functions by partial application of operators")
12727 (description "@code{whatever} provides an easy way to make anonymous
12728 functions by partial application of operators.")
12729 (license license:bsd-3)))
12730
12731 (define-public python2-whatever
12732 (package-with-python2 python-whatever))
12733
12734 (define-public python-funcy
12735 (package
12736 (name "python-funcy")
12737 (version "1.10")
12738 (source
12739 (origin
12740 (method url-fetch)
12741 (uri (string-append "https://github.com/Suor/funcy/archive/" version
12742 ".tar.gz"))
12743 (sha256
12744 (base32
12745 "1fanxivsip29vgarw6dn39xym3q4pbxcpa11plpp548lvxajpahz"))
12746 (file-name (string-append name "-" version ".tar.gz"))))
12747 (build-system python-build-system)
12748 (arguments
12749 `(#:phases
12750 (modify-phases %standard-phases
12751 (replace 'check
12752 (lambda _
12753 (invoke "py.test"))))))
12754 (native-inputs
12755 `(("python-pytest" ,python-pytest)
12756 ("python-whatever" ,python-whatever)))
12757 (home-page "http://github.com/Suor/funcy")
12758 (synopsis "Functional tools")
12759 (description "@code{funcy} is a library that provides functional tools.
12760 Examples are:
12761 @enumerate
12762 @item merge - Merges collections of the same type
12763 @item walk - Type-preserving map
12764 @item select - Selects a part of a collection
12765 @item take - Takes the first n items of a collection
12766 @item first - Takes the first item of a collection
12767 @item remove - Predicated-removes items of a collection
12768 @item concat - Concatenates two collections
12769 @item flatten - Flattens a collection with subcollections
12770 @item distinct - Returns only distinct items
12771 @item split - Predicated-splits a collection
12772 @item split_at - Splits a collection at a given item
12773 @item group_by - Groups items by group
12774 @item pairwise - Pairs off adjacent items
12775 @item partial - Partially-applies a function
12776 @item curry - Curries a function
12777 @item compose - Composes functions
12778 @item complement - Complements a predicate
12779 @item all_fn - \"all\" with predicate
12780 @end enumerate")
12781 (license license:bsd-3)))
12782
12783 (define-public python2-funcy
12784 (package-with-python2 python-funcy))
12785
12786 (define-public python-isoweek
12787 (package
12788 (name "python-isoweek")
12789 (version "1.3.3")
12790 (source
12791 (origin
12792 (method url-fetch)
12793 (uri (pypi-uri "isoweek" version))
12794 (sha256
12795 (base32
12796 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
12797 (build-system python-build-system)
12798 (home-page "https://github.com/gisle/isoweek")
12799 (synopsis "Objects representing a week")
12800 (description "The @code{isoweek} module provide the class Week that
12801 implements the week definition of ISO 8601. This standard also defines
12802 a notation for identifying weeks; yyyyWww (where the W is a literal).
12803 Week instances stringify to this form.")
12804 (license license:bsd-3)))
12805
12806 (define-public python2-isoweek
12807 (package-with-python2 python-isoweek))
12808
12809 (define-public python-tokenize-rt
12810 (package
12811 (name "python-tokenize-rt")
12812 (version "2.0.1")
12813 (source
12814 (origin
12815 (method url-fetch)
12816 (uri (pypi-uri "tokenize-rt" version))
12817 (sha256
12818 (base32
12819 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
12820 (build-system python-build-system)
12821 (home-page "https://github.com/asottile/tokenize-rt")
12822 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
12823 (description
12824 "This Python library is a wrapper around @code{tokenize} from the Python
12825 standard library. It provides two additional tokens @code{ESCAPED_NL} and
12826 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
12827 and @code{tokens_to_src} to roundtrip.")
12828 (license license:expat)))
12829
12830 (define-public python-future-fstrings
12831 (package
12832 (name "python-future-fstrings")
12833 (version "0.4.1")
12834 (source
12835 (origin
12836 (method url-fetch)
12837 (uri (pypi-uri "future_fstrings" version))
12838 (sha256
12839 (base32
12840 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
12841 (build-system python-build-system)
12842 (propagated-inputs
12843 `(("python-tokenize-rt" ,python-tokenize-rt)))
12844 (home-page "https://github.com/asottile/future-fstrings")
12845 (synopsis "Backport of fstrings to Python < 3.6")
12846 (description
12847 "This package provides a UTF-8 compatible encoding
12848 @code{future_fstrings}, which performs source manipulation. It decodes the
12849 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
12850 @code{f} strings.")
12851 (license license:expat)))
12852
12853 (define-public python-typing
12854 (package
12855 (name "python-typing")
12856 (version "3.6.4")
12857 (source
12858 (origin
12859 (method url-fetch)
12860 (uri (pypi-uri "typing" version))
12861 (sha256
12862 (base32
12863 "1wmk9nkh30n37cbrqwkbggmj2390lhrlagjkd0ikm02l88saj06l"))))
12864 (build-system python-build-system)
12865 (home-page "https://docs.python.org/3/library/typing.html")
12866 (synopsis "Type hints for Python")
12867 (description "This is a backport of the standard library @code{typing}
12868 module to Python versions older than 3.5. Typing defines a standard notation
12869 for Python function and variable type annotations. The notation can be used
12870 for documenting code in a concise, standard format, and it has been designed
12871 to also be used by static and runtime type checkers, static analyzers, IDEs
12872 and other tools.")
12873 (license license:psfl)))
12874
12875 (define-public python2-typing
12876 (package-with-python2 python-typing))
12877
12878 (define-public bpython
12879 (package
12880 (name "bpython")
12881 (version "0.17.1")
12882 (source
12883 (origin
12884 (method url-fetch)
12885 (uri (pypi-uri "bpython" version))
12886 (sha256
12887 (base32
12888 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
12889 (build-system python-build-system)
12890 (arguments
12891 `(#:phases
12892 (modify-phases %standard-phases
12893 (add-after 'unpack 'remove-failing-test
12894 (lambda _
12895 ;; Remove failing test. FIXME: make it pass
12896 (delete-file "bpython/test/test_args.py")
12897 #t))
12898 (add-after 'wrap 'add-aliases
12899 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
12900 (lambda* (#:key outputs #:allow-other-keys)
12901 (let ((out (assoc-ref outputs "out")))
12902 (for-each
12903 (lambda (old new)
12904 (symlink old (string-append out "/bin/" new)))
12905 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
12906 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
12907 #t)))))
12908 (propagated-inputs
12909 `(("python-pygments" ,python-pygments)
12910 ("python-requests" ,python-requests)
12911 ("python-babel" ,python-babel) ; optional, for internationalization
12912 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
12913 ("python-greenlet" ,python-greenlet)
12914 ("python-urwid" ,python-urwid) ; for bpython-urwid only
12915 ("python-six" ,python-six)))
12916 (native-inputs
12917 `(("python-sphinx" ,python-sphinx)
12918 ("python-mock" ,python-mock)))
12919 (home-page "https://bpython-interpreter.org/")
12920 (synopsis "Fancy interface to the Python interpreter")
12921 (description "Bpython is a fancy interface to the Python
12922 interpreter. bpython's main features are
12923
12924 @enumerate
12925 @item in-line syntax highlighting,
12926 @item readline-like autocomplete with suggestions displayed as you type,
12927 @item expected parameter list for any Python function,
12928 @item \"rewind\" function to pop the last line of code from memory and
12929 re-evaluate,
12930 @item send the code you've entered off to a pastebin,
12931 @item save the code you've entered to a file, and
12932 @item auto-indentation.
12933 @end enumerate")
12934 (license license:expat)))
12935
12936 (define-public bpython2
12937 (let ((base (package-with-python2
12938 (strip-python2-variant bpython))))
12939 (package (inherit base)
12940 (name "bpython2")
12941 (arguments
12942 `(#:python ,python-2
12943 #:phases
12944 (modify-phases %standard-phases
12945 (add-after 'unpack 'remove-failing-test
12946 (lambda _
12947 ;; Remove failing test. FIXME: make it pass
12948 (delete-file "bpython/test/test_args.py")
12949 ;; Disable failing test-cases (renaming inhibits they are
12950 ;; discovered)
12951 (substitute* "bpython/test/test_curtsies_repl.py"
12952 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
12953 (string-append a "xxx_off_" b))
12954 (("^(\\s*def )(test_complex\\W)" _ a b)
12955 (string-append a "xxx_off_" b)))
12956 #t))
12957 (add-before 'build 'rename-scripts
12958 ;; rename the scripts to bypthon2, bpdb2, etc.
12959 (lambda _
12960 (substitute* "setup.py"
12961 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
12962 (string-append name "2" rest "\n"))
12963 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
12964 (string-append name "2" (or sub "") rest "\n")))
12965 #t))))))))
12966
12967 (define-public python-pyinotify
12968 (package
12969 (name "python-pyinotify")
12970 (version "0.9.6")
12971 (source (origin
12972 (method url-fetch)
12973 (uri (pypi-uri "pyinotify" version))
12974 (sha256
12975 (base32
12976 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
12977 (build-system python-build-system)
12978 (arguments `(#:tests? #f)) ;no tests
12979 (home-page "https://github.com/seb-m/pyinotify")
12980 (synopsis "Python library for monitoring inotify events")
12981 (description
12982 "@code{pyinotify} provides a Python interface for monitoring
12983 file system events on Linux.")
12984 (license license:expat)))
12985
12986 (define-public python2-pyinotify
12987 (package-with-python2 python-pyinotify))
12988
12989 ;; Ada parser uses this version.
12990 (define-public python2-quex-0.67.3
12991 (package
12992 (name "python2-quex")
12993 (version "0.67.3")
12994 (source
12995 (origin
12996 (method url-fetch)
12997 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
12998 (version-major+minor version)
12999 "/quex-" version ".zip"))
13000 (sha256
13001 (base32
13002 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
13003 (build-system python-build-system)
13004 (native-inputs
13005 `(("unzip" ,unzip)))
13006 (arguments
13007 `(#:python ,python-2
13008 #:tests? #f
13009 #:phases
13010 (modify-phases %standard-phases
13011 (delete 'configure)
13012 (delete 'build)
13013 (replace 'install
13014 (lambda* (#:key outputs #:allow-other-keys)
13015 (let* ((out (assoc-ref outputs "out"))
13016 (share/quex (string-append out "/share/quex"))
13017 (bin (string-append out "/bin")))
13018 (copy-recursively "." share/quex)
13019 (mkdir-p bin)
13020 (symlink (string-append share/quex "/quex-exe.py")
13021 (string-append bin "/quex"))
13022 #t))))))
13023 (native-search-paths
13024 (list (search-path-specification
13025 (variable "QUEX_PATH")
13026 (files '("share/quex")))))
13027 (home-page "http://quex.sourceforge.net/")
13028 (synopsis "Lexical analyzer generator in Python")
13029 (description "@code{quex} is a lexical analyzer generator in Python.")
13030 (license license:lgpl2.1+))) ; Non-military
13031
13032 (define-public python2-quex
13033 (package (inherit python2-quex-0.67.3)
13034 (name "python2-quex")
13035 (version "0.68.1")
13036 (source
13037 (origin
13038 (method url-fetch)
13039 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
13040 (sha256
13041 (base32
13042 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
13043 (file-name (string-append name "-" version ".tar.gz"))))))