gnu: OpenSSH: Update to 7.9p1.
[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, 2018 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, 2018 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, 2018 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 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
51 ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
52 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
53 ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
54 ;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
55 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
56 ;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
57 ;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com>
58 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59 ;;;
60 ;;; This file is part of GNU Guix.
61 ;;;
62 ;;; GNU Guix is free software; you can redistribute it and/or modify it
63 ;;; under the terms of the GNU General Public License as published by
64 ;;; the Free Software Foundation; either version 3 of the License, or (at
65 ;;; your option) any later version.
66 ;;;
67 ;;; GNU Guix is distributed in the hope that it will be useful, but
68 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
69 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
70 ;;; GNU General Public License for more details.
71 ;;;
72 ;;; You should have received a copy of the GNU General Public License
73 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
74
75 (define-module (gnu packages python)
76 #:use-module ((guix licenses) #:prefix license:)
77 #:use-module (gnu packages)
78 #:use-module (gnu packages algebra)
79 #:use-module (gnu packages adns)
80 #:use-module (gnu packages attr)
81 #:use-module (gnu packages backup)
82 #:use-module (gnu packages bash)
83 #:use-module (gnu packages check)
84 #:use-module (gnu packages compression)
85 #:use-module (gnu packages crypto)
86 #:use-module (gnu packages databases)
87 #:use-module (gnu packages file)
88 #:use-module (gnu packages fontutils)
89 #:use-module (gnu packages gcc)
90 #:use-module (gnu packages geo)
91 #:use-module (gnu packages ghostscript)
92 #:use-module (gnu packages gl)
93 #:use-module (gnu packages glib)
94 #:use-module (gnu packages graphviz)
95 #:use-module (gnu packages graphics)
96 #:use-module (gnu packages gstreamer)
97 #:use-module (gnu packages gtk)
98 #:use-module (gnu packages icu4c)
99 #:use-module (gnu packages image)
100 #:use-module (gnu packages imagemagick)
101 #:use-module (gnu packages libevent)
102 #:use-module (gnu packages libffi)
103 #:use-module (gnu packages linux)
104 #:use-module (gnu packages llvm)
105 #:use-module (gnu packages machine-learning)
106 #:use-module (gnu packages man)
107 #:use-module (gnu packages maths)
108 #:use-module (gnu packages multiprecision)
109 #:use-module (gnu packages networking)
110 #:use-module (gnu packages ncurses)
111 #:use-module (gnu packages openstack)
112 #:use-module (gnu packages pcre)
113 #:use-module (gnu packages perl)
114 #:use-module (gnu packages pkg-config)
115 #:use-module (gnu packages python-crypto)
116 #:use-module (gnu packages python-web)
117 #:use-module (gnu packages qt)
118 #:use-module (gnu packages readline)
119 #:use-module (gnu packages sdl)
120 #:use-module (gnu packages search)
121 #:use-module (gnu packages shells)
122 #:use-module (gnu packages ssh)
123 #:use-module (gnu packages statistics)
124 #:use-module (gnu packages terminals)
125 #:use-module (gnu packages tex)
126 #:use-module (gnu packages texinfo)
127 #:use-module (gnu packages time)
128 #:use-module (gnu packages tls)
129 #:use-module (gnu packages version-control)
130 #:use-module (gnu packages video)
131 #:use-module (gnu packages web)
132 #:use-module (gnu packages base)
133 #:use-module (gnu packages xml)
134 #:use-module (gnu packages xorg)
135 #:use-module (gnu packages xdisorg)
136 #:use-module (gnu packages tcl)
137 #:use-module (gnu packages bdw-gc)
138 #:use-module (guix packages)
139 #:use-module (guix download)
140 #:use-module (guix git-download)
141 #:use-module (guix utils)
142 #:use-module (guix build-system gnu)
143 #:use-module (guix build-system cmake)
144 #:use-module (guix build-system python)
145 #:use-module (guix build-system trivial)
146 #:use-module (srfi srfi-1))
147
148 (define-public python-2.7
149 (package
150 (name "python2")
151 (version "2.7.14")
152 (replacement python-2/fixed)
153 (source
154 (origin
155 (method url-fetch)
156 (uri (string-append "https://www.python.org/ftp/python/"
157 version "/Python-" version ".tar.xz"))
158 (sha256
159 (base32
160 "0rka541ys16jwzcnnvjp2v12m4cwgd2jp6wj4kj511p715pb5zvi"))
161 (patches (search-patches "python-2.7-search-paths.patch"
162 "python-2-deterministic-build-info.patch"
163 "python-2.7-site-prefixes.patch"
164 "python-2.7-source-date-epoch.patch"
165 "python-2.7-adjust-tests.patch"))
166 (modules '((guix build utils)))
167 ;; suboptimal to delete failing tests here, but if we delete them in the
168 ;; arguments then we need to make sure to strip out that phase when it
169 ;; gets inherited by python and python-minimal.
170 (snippet
171 '(begin
172 (for-each delete-file
173 '("Lib/test/test_compileall.py"
174 "Lib/test/test_ctypes.py" ; fails on mips64el
175 "Lib/test/test_distutils.py"
176 "Lib/test/test_import.py"
177 "Lib/test/test_shutil.py"
178 "Lib/test/test_socket.py"
179 "Lib/test/test_subprocess.py"))
180 #t))))
181 (outputs '("out"
182 "tk")) ;tkinter; adds 50 MiB to the closure
183 (build-system gnu-build-system)
184 (arguments
185 `(;; 356 tests OK.
186 ;; 6 tests failed:
187 ;; test_compileall test_distutils test_import test_shutil test_socket
188 ;; test_subprocess
189 ;; 39 tests skipped:
190 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
191 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
192 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
193 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
194 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
195 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
196 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
197 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
198 ;; test_winreg test_winsound test_zipfile64
199 ;; 4 skips unexpected on linux2:
200 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
201 #:test-target "test"
202 #:configure-flags
203 (list "--enable-shared" ;allow embedding
204 "--with-system-ffi" ;build ctypes
205 "--with-ensurepip=install" ;install pip and setuptools
206 "--enable-unicode=ucs4"
207 (string-append "LDFLAGS=-Wl,-rpath="
208 (assoc-ref %outputs "out") "/lib"))
209
210 #:modules ((ice-9 ftw) (ice-9 match)
211 (guix build utils) (guix build gnu-build-system))
212 #:phases
213 (modify-phases %standard-phases
214 (add-before
215 'configure 'patch-lib-shells
216 (lambda _
217 ;; Filter for existing files, since some may not exist in all
218 ;; versions of python that are built with this recipe.
219 (substitute* (filter file-exists?
220 '("Lib/subprocess.py"
221 "Lib/popen2.py"
222 "Lib/distutils/tests/test_spawn.py"
223 "Lib/test/support/__init__.py"
224 "Lib/test/test_subprocess.py"))
225 (("/bin/sh") (which "sh")))
226
227 ;; Use zero as the timestamp in .pyc files so that builds are
228 ;; deterministic. TODO: Remove it when this variable is set in
229 ;; gnu-build-system.scm.
230 (setenv "SOURCE_DATE_EPOCH" "1")
231 #t))
232 (add-before 'configure 'do-not-record-configure-flags
233 (lambda* (#:key configure-flags #:allow-other-keys)
234 ;; Remove configure flags from the installed '_sysconfigdata.py'
235 ;; and 'Makefile' so we don't end up keeping references to the
236 ;; build tools.
237 ;;
238 ;; Preserve at least '--with-system-ffi' since otherwise the
239 ;; thing tries to build libffi, fails, and we end up with a
240 ;; Python that lacks ctypes.
241 (substitute* "configure"
242 (("^CONFIG_ARGS=.*$")
243 (format #f "CONFIG_ARGS='~a'\n"
244 (if (member "--with-system-ffi" configure-flags)
245 "--with-system-ffi"
246 ""))))
247 #t))
248 (add-before
249 'check 'pre-check
250 (lambda _
251 ;; 'Lib/test/test_site.py' needs a valid $HOME
252 (setenv "HOME" (getcwd))
253 #t))
254 (add-after
255 'unpack 'set-source-file-times-to-1980
256 ;; XXX One of the tests uses a ZIP library to pack up some of the
257 ;; source tree, and fails with "ZIP does not support timestamps
258 ;; before 1980". Work around this by setting the file times in the
259 ;; source tree to sometime in early 1980.
260 (lambda _
261 (let ((circa-1980 (* 10 366 24 60 60)))
262 (ftw "." (lambda (file stat flag)
263 (utime file circa-1980 circa-1980)
264 #t))
265 #t)))
266 (add-after 'install 'remove-tests
267 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
268 ;; because these files are used by some libraries out there.
269 (lambda* (#:key outputs #:allow-other-keys)
270 (let ((out (assoc-ref outputs "out")))
271 (match (scandir (string-append out "/lib")
272 (lambda (name)
273 (string-prefix? "python" name)))
274 ((pythonX.Y)
275 (let ((testdir (string-append out "/lib/" pythonX.Y
276 "/test")))
277 (with-directory-excursion testdir
278 (for-each delete-file-recursively
279 (scandir testdir
280 (match-lambda
281 ((or "." "..") #f)
282 (file
283 (not
284 (string-prefix? "test_support."
285 file))))))
286 (call-with-output-file "__init__.py" (const #t))
287 #t)))))))
288 (add-before 'strip 'make-libraries-writable
289 (lambda* (#:key outputs #:allow-other-keys)
290 ;; Make .so files writable so they can be stripped.
291 (let ((out (assoc-ref outputs "out")))
292 (for-each (lambda (file)
293 (chmod file #o755))
294 (find-files (string-append out "/lib")
295 "\\.so"))
296 #t)))
297 (add-after 'install 'move-tk-inter
298 (lambda* (#:key outputs #:allow-other-keys)
299 ;; When Tkinter support is built move it to a separate output so
300 ;; that the main output doesn't contain a reference to Tcl/Tk.
301 (let ((out (assoc-ref outputs "out"))
302 (tk (assoc-ref outputs "tk")))
303 (when tk
304 (match (find-files out "tkinter.*\\.so")
305 ((tkinter.so)
306 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
307 ;; want it under TK/lib/pythonX.Y/site-packages.
308 (let* ((len (string-length out))
309 (target (string-append
310 tk "/"
311 (string-drop
312 (dirname (dirname tkinter.so))
313 len)
314 "/site-packages")))
315 (install-file tkinter.so target)
316 (delete-file tkinter.so)))))
317 #t))))))
318 (inputs
319 `(("bzip2" ,bzip2)
320 ("gdbm" ,gdbm)
321 ("libffi" ,libffi) ; for ctypes
322 ("sqlite" ,sqlite) ; for sqlite extension
323 ("openssl" ,openssl)
324 ("readline" ,readline)
325 ("zlib" ,zlib)
326 ("tcl" ,tcl)
327 ("tk" ,tk))) ; for tkinter
328 (native-inputs
329 `(("pkg-config" ,pkg-config)))
330 (native-search-paths
331 (list (search-path-specification
332 (variable "PYTHONPATH")
333 (files '("lib/python2.7/site-packages")))))
334 (home-page "https://www.python.org")
335 (synopsis "High-level, dynamically-typed programming language")
336 (description
337 "Python is a remarkably powerful dynamic programming language that
338 is used in a wide variety of application domains. Some of its key
339 distinguishing features include: clear, readable syntax; strong
340 introspection capabilities; intuitive object orientation; natural
341 expression of procedural code; full modularity, supporting hierarchical
342 packages; exception-based error handling; and very high level dynamic
343 data types.")
344 (license license:psfl)))
345
346 ;; Current 2.x version.
347 (define-public python-2 python-2.7)
348
349 (define python-2/fixed
350 (package
351 (inherit python-2)
352 (source (origin
353 (inherit (package-source python-2))
354 (patches (append
355 (origin-patches (package-source python-2))
356 (search-patches "python2-CVE-2018-1060.patch"
357 "python2-CVE-2018-1061.patch"
358 "python2-CVE-2018-14647.patch"
359 "python2-CVE-2018-1000802.patch")))))))
360
361 (define-public python2-called-python
362 ;; Both 2.x and 3.x used to be called "python". In commit
363 ;; a7714d42de2c3082f3609d1e63c83d703fb39cf9 (March 2018), we renamed the
364 ;; Python 2.x package to "python2".
365 (package
366 (inherit python-2)
367 (name "python")
368 (properties `((superseded . ,python-2)))))
369
370 (define-public python-3.6
371 (package (inherit python-2)
372 (name "python")
373 (version "3.6.5")
374 (replacement python-3/fixed)
375 (source (origin
376 (method url-fetch)
377 (uri (string-append "https://www.python.org/ftp/python/"
378 version "/Python-" version ".tar.xz"))
379 (patches (search-patches
380 "python-fix-tests.patch"
381 "python-3-fix-tests.patch"
382 "python-3-deterministic-build-info.patch"
383 "python-3-search-paths.patch"))
384 (patch-flags '("-p0"))
385 (sha256
386 (base32
387 "19l7inxm056jjw33zz97z0m02hsi7jnnx5kyb76abj5ml4xhad7l"))
388 (snippet
389 '(begin
390 (for-each delete-file
391 '("Lib/ctypes/test/test_structures.py" ; fails on aarch64
392 "Lib/ctypes/test/test_win32.py" ; fails on aarch64
393 "Lib/test/test_fcntl.py")) ; fails on aarch64
394 #t))))
395 (arguments
396 (substitute-keyword-arguments (package-arguments python-2)
397 ((#:tests? _) #t)
398 ((#:phases phases)
399 `(modify-phases ,phases
400 (add-after 'unpack 'patch-timestamp-for-pyc-files
401 (lambda _
402 ;; We set DETERMINISTIC_BUILD to only override the mtime when
403 ;; building with Guix, lest we break auto-compilation in
404 ;; environments.
405 (setenv "DETERMINISTIC_BUILD" "1")
406 (substitute* "Lib/py_compile.py"
407 (("source_stats\\['mtime'\\]")
408 "(1 if 'DETERMINISTIC_BUILD' in os.environ else source_stats['mtime'])"))
409
410 ;; Use deterministic hashes for strings, bytes, and datetime
411 ;; objects.
412 (setenv "PYTHONHASHSEED" "0")
413
414 ;; Reset mtime when validating bytecode header.
415 (substitute* "Lib/importlib/_bootstrap_external.py"
416 (("source_mtime = int\\(source_stats\\['mtime'\\]\\)")
417 "source_mtime = 1"))
418 #t))
419 ;; These tests fail because of our change to the bytecode
420 ;; validation. They fail because expected exceptions do not get
421 ;; thrown. This seems to be no problem.
422 (add-after 'unpack 'disable-broken-bytecode-tests
423 (lambda _
424 (substitute* "Lib/test/test_importlib/source/test_file_loader.py"
425 (("test_bad_marshal")
426 "disable_test_bad_marshal")
427 (("test_no_marshal")
428 "disable_test_no_marshal")
429 (("test_non_code_marshal")
430 "disable_test_non_code_marshal"))
431 #t))
432 ;; Unset DETERMINISTIC_BUILD to allow for tests that check that
433 ;; stale pyc files are rebuilt.
434 (add-before 'check 'allow-non-deterministic-compilation
435 (lambda _ (unsetenv "DETERMINISTIC_BUILD") #t))
436 ;; We need to rebuild all pyc files for three different
437 ;; optimization levels to replace all files that were not built
438 ;; deterministically.
439
440 ;; FIXME: Without this phase we have close to 2000 files that
441 ;; differ across different builds of this package. With this phase
442 ;; there are about 500 files left that differ.
443 (add-after 'install 'rebuild-bytecode
444 (lambda* (#:key outputs #:allow-other-keys)
445 (setenv "DETERMINISTIC_BUILD" "1")
446 (let ((out (assoc-ref outputs "out")))
447 (for-each
448 (lambda (opt)
449 (format #t "Compiling with optimization level: ~a\n"
450 (if (null? opt) "none" (car opt)))
451 (for-each (lambda (file)
452 (apply invoke
453 `(,(string-append out "/bin/python3")
454 ,@opt
455 "-m" "compileall"
456 "-f" ; force rebuild
457 ;; Don't build lib2to3, because it's Python 2 code.
458 ;; Also don't build obviously broken test code.
459 "-x" "(lib2to3|test/bad.*)"
460 ,file)))
461 (find-files out "\\.py$")))
462 (list '() '("-O") '("-OO")))
463 #t)))))))
464 (native-search-paths
465 (list (search-path-specification
466 (variable "PYTHONPATH")
467 (files (list (string-append "lib/python"
468 (version-major+minor version)
469 "/site-packages"))))))))
470
471 ;; Current 3.x version.
472 (define-public python-3 python-3.6)
473
474 (define python-3/fixed
475 (package
476 (inherit python-3)
477 (source (origin
478 (inherit (package-source python-3))
479 (patches (append (origin-patches (package-source python-3))
480 (search-patches "python-CVE-2018-14647.patch")))))
481 (arguments
482 (substitute-keyword-arguments (package-arguments python-3)
483 ((#:phases phases)
484 `(modify-phases ,phases
485 (add-after 'unpack 'delete-broken-test
486 (lambda _
487 ;; Delete test which fails on recent kernels:
488 ;; <https://bugs.python.org/issue34587>.
489 (delete-file "Lib/test/test_socket.py")
490 #t))))))))
491
492 ;; Current major version.
493 (define-public python python-3)
494
495 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
496 ;; Python (Tk -> libxcb -> Python.)
497
498 (define-public python2-minimal
499 (package/inherit python-2
500 (name "python2-minimal")
501 (outputs '("out"))
502
503 ;; Keep zlib, which is used by 'pip' (via the 'zipimport' module), which
504 ;; is invoked upon 'make install'. 'pip' also expects 'ctypes' and thus
505 ;; libffi.
506 (inputs `(("libffi" ,libffi)
507 ("zlib" ,zlib)))))
508
509 (define-public python-minimal
510 (package/inherit python
511 (name "python-minimal")
512 (outputs '("out"))
513
514 ;; Build fails due to missing ctypes without libffi.
515 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
516 ;; zlib is required by 'zipimport', used by pip.
517 (inputs `(("libffi" ,libffi)
518 ("openssl" ,openssl)
519 ("zlib" ,zlib)))))
520
521 (define-public python-debug
522 (package/inherit python
523 (name "python-debug")
524 (outputs '("out" "debug"))
525 (build-system gnu-build-system)
526 (arguments
527 (substitute-keyword-arguments (package-arguments python)
528 ((#:configure-flags flags '())
529 `(cons "--with-pydebug" ,flags))))
530 (synopsis
531 "High-level, dynamically-typed programming language (for debugging)")
532 (description
533 "This variant of Python provides an interpreter built with
534 @code{--with-pydebug} to help develop and debug extensions. See
535 @url{https://pythonextensionpatterns.readthedocs.io/en/latest/debugging/debug.html},
536 for more information.")))
537
538 (define* (wrap-python3 python
539 #:optional
540 (name (string-append (package-name python) "-wrapper")))
541 (package/inherit python
542 (name name)
543 (source #f)
544 (build-system trivial-build-system)
545 (outputs '("out"))
546 (inputs `(("bash" ,bash)))
547 (propagated-inputs `(("python" ,python)))
548 (arguments
549 `(#:modules ((guix build utils))
550 #:builder
551 (begin
552 (use-modules (guix build utils))
553 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
554 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
555 (mkdir-p bin)
556 (for-each
557 (lambda (old new)
558 (symlink (string-append python old)
559 (string-append bin "/" new)))
560 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
561 `("python" ,"pydoc" ,"idle" ,"pip"))
562 ;; python-config outputs search paths based upon its location,
563 ;; use a bash wrapper to avoid changing its outputs.
564 (let ((bash (string-append (assoc-ref %build-inputs "bash")
565 "/bin/bash"))
566 (old (string-append python "python3-config"))
567 (new (string-append bin "/python-config")))
568 (with-output-to-file new
569 (lambda ()
570 (format #t "#!~a~%" bash)
571 (format #t "exec \"~a\" \"$@\"~%" old)
572 (chmod new #o755)
573 #t)))))))
574 (synopsis "Wrapper for the Python 3 commands")
575 (description
576 "This package provides wrappers for the commands of Python@tie{}3.x such
577 that they can be invoked under their usual name---e.g., @command{python}
578 instead of @command{python3}.")))
579
580 (define-public python-wrapper (wrap-python3 python))
581 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
582
583 (define-public python-psutil
584 (package
585 (name "python-psutil")
586 (version "5.4.3")
587 (source
588 (origin
589 (method url-fetch)
590 (uri (pypi-uri "psutil" version))
591 (sha256
592 (base32
593 "063v69x7spyclyaxrd3gmzj3p16q5ayg97xqhwb1kyn22a9pwip2"))))
594 (build-system python-build-system)
595 (arguments
596 ;; FIXME: some tests does not return and times out.
597 '(#:tests? #f))
598 (home-page "https://www.github.com/giampaolo/psutil")
599 (synopsis "Library for retrieving information on running processes")
600 (description
601 "psutil (Python system and process utilities) is a library for retrieving
602 information on running processes and system utilization (CPU, memory, disks,
603 network) in Python. It is useful mainly for system monitoring, profiling and
604 limiting process resources and management of running processes. It implements
605 many functionalities offered by command line tools such as: ps, top, lsof,
606 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
607 pidof, tty, taskset, pmap.")
608 (properties `((python2-variant . ,(delay python2-psutil))))
609 (license license:bsd-3)))
610
611 (define-public python2-psutil
612 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
613 (package
614 (inherit base)
615 (propagated-inputs
616 `(("python2-enum34" ,python2-enum34) ;optional
617 ,@(package-propagated-inputs base))))))
618
619 (define-public python-shapely
620 (package
621 (name "python-shapely")
622 (version "1.6.3")
623 (source
624 (origin
625 (method url-fetch)
626 (uri (pypi-uri "Shapely" version))
627 (sha256
628 (base32
629 "0svc58dzcw9gj92b4sgq35sdxkf85z0qwlzxarkzq4bp3h8jy58l"))))
630 (build-system python-build-system)
631 (native-inputs
632 `(("python-cython" ,python-cython)
633 ("python-matplotlib" ,python-matplotlib)
634 ("python-pytest" ,python-pytest)
635 ("python-pytest-cov" ,python-pytest-cov)))
636 (inputs
637 `(("geos" ,geos)))
638 (propagated-inputs
639 `(("python-numpy" ,python-numpy)))
640 (arguments
641 `(#:phases
642 (modify-phases %standard-phases
643 (add-after 'unpack 'patch-geos-path
644 (lambda* (#:key inputs #:allow-other-keys)
645 (let ((geos (assoc-ref inputs "geos"))
646 (glibc (assoc-ref inputs ,(if (%current-target-system)
647 "cross-libc" "libc"))))
648 (substitute* "shapely/geos.py"
649 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
650 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
651 geos "/lib/libgeos_c.so'])"))
652 (("free = load_dll\\('c'\\)\\.free")
653 (string-append "free = load_dll('c', fallbacks=['"
654 glibc "/lib/libc.so.6']).free"))))
655 #t)))))
656 (home-page "https://github.com/Toblerity/Shapely")
657 (synopsis "Library for the manipulation and analysis of geometric objects")
658 (description "Shapely is a Python package for manipulation and analysis of
659 planar geometric objects. It is based on the @code{GEOS} library.")
660 (license license:bsd-3)))
661
662 (define-public python-logwrap
663 (package
664 (name "python-logwrap")
665 (version "3.2.1")
666 (source
667 (origin
668 (method url-fetch)
669 (uri (pypi-uri "logwrap" version ".zip"))
670 (sha256
671 (base32
672 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
673 (build-system python-build-system)
674 (propagated-inputs
675 `(("python-six" ,python-six)
676 ("python-typing" ,python-typing)))
677 (native-inputs
678 `(("unzip" ,unzip)
679 ("python-cython" ,python-cython)
680 ("python-pytest" ,python-pytest)
681 ("python-pytest-cov" ,python-pytest-cov)
682 ("python-pytest-runner" ,python-pytest-runner)))
683 (home-page "https://github.com/penguinolog/logwrap")
684 (synopsis "Decorator for logging function arguments")
685 (description "This package provides a decorator to log function arguments
686 and function call return values in a human-readable way.")
687 (license license:asl2.0)))
688
689 (define-public python2-shapely
690 (package-with-python2 python-shapely))
691
692 (define-public python-clyent
693 (package
694 (name "python-clyent")
695 (version "1.2.1")
696 (source
697 (origin
698 (method url-fetch)
699 (uri (pypi-uri "clyent" version))
700 (sha256
701 (base32
702 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
703 (build-system python-build-system)
704 (native-inputs
705 `(("python-mock" ,python-mock)))
706 (home-page "https://github.com/binstar/clyent")
707 (synopsis "Command line client library")
708 (description "Clyent is a Python command line utiliy library. It is used
709 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
710 (license license:bsd-3)))
711
712 (define-public python2-clyent
713 (package-with-python2 python-clyent))
714
715 (define-public python-babel
716 (package
717 (name "python-babel")
718 (version "2.3.4")
719 (source
720 (origin
721 (method url-fetch)
722 (uri (pypi-uri "Babel" version))
723 (sha256
724 (base32
725 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
726 (build-system python-build-system)
727 (propagated-inputs
728 `(("python-pytz" ,python-pytz)))
729 (arguments `(#:tests? #f)) ; no test target
730 (home-page "http://babel.pocoo.org/")
731 (synopsis
732 "Tools for internationalizing Python applications")
733 (description
734 "Babel is composed of two major parts:
735 - tools to build and work with gettext message catalogs
736 - a Python interface to the CLDR (Common Locale Data Repository), providing
737 access to various locale display names, localized number and date formatting,
738 etc. ")
739 (license license:bsd-3)))
740
741 (define-public python2-babel
742 (package-with-python2 python-babel))
743
744 (define-public python2-backport-ssl-match-hostname
745 (package
746 (name "python2-backport-ssl-match-hostname")
747 (version "3.5.0.1")
748 (source
749 (origin
750 (method url-fetch)
751 (uri (string-append
752 "https://pypi.python.org/packages/source/b/"
753 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
754 version ".tar.gz"))
755 (sha256
756 (base32
757 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
758 (build-system python-build-system)
759 (arguments
760 `(#:python ,python-2
761 #:tests? #f)) ; no test target
762 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
763 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
764 (description
765 "This backport brings the ssl.match_hostname() function to users of
766 earlier versions of Python. The function checks the hostname in the
767 certificate returned by the server to which a connection has been established,
768 and verifies that it matches the intended target hostname.")
769 (license license:psfl)))
770
771 (define-public python-hdf4
772 (package
773 (name "python-hdf4")
774 (version "0.9")
775 (source
776 (origin
777 (method url-fetch)
778 (uri (pypi-uri name version))
779 (sha256
780 (base32
781 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
782 (build-system python-build-system)
783 (native-inputs `(("nose" ,python-nose)))
784 (propagated-inputs `(("numpy" ,python-numpy)))
785 (inputs
786 `(("hdf4" ,hdf4)
787 ("libjpeg" ,libjpeg)
788 ("zlib" ,zlib)))
789 (arguments
790 `(#:phases
791 (modify-phases %standard-phases
792 (replace 'check
793 (lambda _
794 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
795 ;; on to import numpy. Somehow this works on their CI system.
796 ;; Let's just manage PYTHONPATH here instead.
797 (substitute* "runexamples.sh"
798 (("export PYTHONPATH=.*") ""))
799 (setenv "PYTHONPATH"
800 (string-append (getcwd) ":"
801 (getenv "PYTHONPATH")))
802 (invoke "./runexamples.sh")
803 (invoke "nosetests" "-v"))))))
804 (home-page "https://github.com/fhs/python-hdf4")
805 (synopsis "Python interface to the NCSA HDF4 library")
806 (description
807 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
808 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
809 NetCDF files can also be read and modified. Python-HDF4 is a fork of
810 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
811 (license license:expat)))
812
813 (define-public python2-hdf4
814 (package-with-python2 python-hdf4))
815
816 (define-public python-h5py
817 (package
818 (name "python-h5py")
819 (version "2.8.0")
820 (source
821 (origin
822 (method url-fetch)
823 (uri (pypi-uri "h5py" version))
824 (sha256
825 (base32
826 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
827 (build-system python-build-system)
828 (arguments
829 `(#:tests? #f ; no test target
830 #:phases
831 (modify-phases %standard-phases
832 (add-after 'unpack 'fix-hdf5-paths
833 (lambda* (#:key inputs #:allow-other-keys)
834 (let ((prefix (assoc-ref inputs "hdf5")))
835 (substitute* "setup_build.py"
836 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
837 (string-append "['" prefix "/lib" "']"))
838 (("'/opt/local/include', '/usr/local/include'")
839 (string-append "'" prefix "/include" "'")))
840 (substitute* "setup_configure.py"
841 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
842 (string-append "['" prefix "/lib" "']")))
843 #t))))))
844 (propagated-inputs
845 `(("python-six" ,python-six)
846 ("python-numpy" ,python-numpy)))
847 (inputs
848 `(("hdf5" ,hdf5)))
849 (native-inputs
850 `(("python-cython" ,python-cython)
851 ("python-pkgconfig" ,python-pkgconfig)))
852 (home-page "http://www.h5py.org/")
853 (synopsis "Read and write HDF5 files from Python")
854 (description
855 "The h5py package provides both a high- and low-level interface to the
856 HDF5 library from Python. The low-level interface is intended to be a
857 complete wrapping of the HDF5 API, while the high-level component supports
858 access to HDF5 files, datasets and groups using established Python and NumPy
859 concepts.")
860 (license license:bsd-3)))
861
862 (define-public python2-h5py
863 (package-with-python2 python-h5py))
864
865 (define-public python-netcdf4
866 (package
867 (name "python-netcdf4")
868 (version "1.2.9")
869 (source
870 (origin
871 (method url-fetch)
872 (uri (pypi-uri "netCDF4" version))
873 (sha256
874 (base32
875 "1h6jq338amlbk0ilzvjyl7cck80i0bah9a5spn9in71vy2qxm7i5"))))
876 (build-system python-build-system)
877 (native-inputs
878 `(("python-cython" ,python-cython)))
879 (propagated-inputs
880 `(("python-numpy" ,python-numpy)))
881 (inputs
882 `(("netcdf" ,netcdf)
883 ("hdf4" ,hdf4)
884 ("hdf5" ,hdf5)))
885 (arguments
886 '(#:phases
887 (modify-phases %standard-phases
888 (replace 'check
889 (lambda _
890 (setenv "NO_NET" "1") ; disable opendap tests
891 (with-directory-excursion "test"
892 (setenv "PYTHONPATH" ; find and add the library we just built
893 (string-append
894 (car (find-files "../build" "lib.*"
895 #:directories? #:t
896 #:fail-on-error? #:t))
897 ":" (getenv "PYTHONPATH")))
898 (zero? (system* "python" "run_all.py"))))))))
899 (home-page
900 "https://github.com/Unidata/netcdf4-python")
901 (synopsis "Python/numpy interface to the netCDF library")
902 (description "Netcdf4-python is a Python interface to the netCDF C
903 library. netCDF version 4 has many features not found in earlier
904 versions of the library and is implemented on top of HDF5. This module
905 can read and write files in both the new netCDF 4 and the old netCDF 3
906 format, and can create files that are readable by HDF5 clients. The
907 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
908 to users of that module.")
909 ;; The software is mainly ISC, but includes some files covered
910 ;; by the Expat license.
911 (license (list license:isc license:expat))))
912
913 (define-public python2-netcdf4
914 (package-with-python2 python-netcdf4))
915
916 (define-public python-lockfile
917 (package
918 (name "python-lockfile")
919 (version "0.12.2")
920 (source
921 (origin
922 (method url-fetch)
923 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
924 "lockfile-" version ".tar.gz"))
925 (sha256
926 (base32
927 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
928 (build-system python-build-system)
929 (arguments '(#:test-target "check"))
930 (native-inputs
931 `(("python-pbr" ,python-pbr)))
932 (home-page "https://launchpad.net/pylockfile")
933 (synopsis "Platform-independent file locking module")
934 (description
935 "The lockfile package exports a LockFile class which provides a simple
936 API for locking files.")
937 (license license:expat)))
938
939 (define-public python2-lockfile
940 (package-with-python2 python-lockfile))
941
942 (define-public python-semantic-version
943 (package
944 (name "python-semantic-version")
945 (version "2.6.0")
946 (source
947 (origin
948 (method url-fetch)
949 (uri (pypi-uri "semantic_version" version))
950 (sha256
951 (base32
952 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
953 (build-system python-build-system)
954 (arguments
955 `(#:tests? #f)) ; PyPI tarball lacks tests
956 (home-page "https://github.com/rbarrois/python-semanticversion")
957 (synopsis "Semantic versioning module for Python")
958 (description
959 "The @code{semantic_version} class is a small library for handling
960 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
961
962 It can compare versions, generate a new version that represents a bump in one of
963 the version levels, and check whether any given string is a proper semantic
964 version identifier.")
965 (license license:bsd-3)))
966
967 (define-public python2-semantic-version
968 (package-with-python2 python-semantic-version))
969
970 (define-public python-setuptools
971 (package
972 (name "python-setuptools")
973 (version "31.0.0")
974 (source
975 (origin
976 (method url-fetch)
977 (uri (pypi-uri "setuptools" version))
978 (sha256
979 (base32
980 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
981 (modules '((guix build utils)))
982 (snippet
983 '(begin
984 ;; Remove included binaries which are used to build self-extracting
985 ;; installers for Windows.
986 ;; TODO: Find some way to build them ourself so we can include them.
987 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
988 #t))))
989 (build-system python-build-system)
990 ;; FIXME: Tests require pytest, which itself relies on setuptools.
991 ;; One could bootstrap with an internal untested setuptools.
992 (arguments
993 `(#:tests? #f))
994 (home-page "https://pypi.python.org/pypi/setuptools")
995 (synopsis
996 "Library designed to facilitate packaging Python projects")
997 (description
998 "Setuptools is a fully-featured, stable library designed to facilitate
999 packaging Python projects, where packaging includes:
1000 Python package and module definitions,
1001 distribution package metadata,
1002 test hooks,
1003 project installation,
1004 platform-specific details,
1005 Python 3 support.")
1006 ;; TODO: setuptools now bundles the following libraries:
1007 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1008 (license (list license:psfl ; setuptools itself
1009 license:expat ; six, appdirs, pyparsing
1010 license:asl2.0 ; packaging is dual ASL2/BSD-2
1011 license:bsd-2))))
1012
1013 (define-public python2-setuptools
1014 (package-with-python2 python-setuptools))
1015
1016 (define-public python-uniseg
1017 (package
1018 (name "python-uniseg")
1019 (version "0.7.1")
1020 (source
1021 (origin
1022 (method url-fetch)
1023 (uri (pypi-uri "uniseg" version ".zip"))
1024 (sha256
1025 (base32
1026 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1027 (build-system python-build-system)
1028 (arguments
1029 '(#:tests? #f)) ; The test suite requires network access.
1030 (native-inputs
1031 `(("unzip" ,unzip)))
1032 (home-page
1033 "https://bitbucket.org/emptypage/uniseg-python")
1034 (synopsis
1035 "Python library to determine Unicode text segmentations")
1036 (description
1037 "Uniseg is a Python package used to determine Unicode text segmentations.
1038 Supported segmentations include:
1039 @enumerate
1040 @item @dfn{Code point} (any value in the Unicode codespace)
1041 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1042 multiple Unicode code points, e.g. \"G\" + acute-accent)
1043 @item Word break
1044 @item Sentence break
1045 @item Line break
1046 @end enumerate")
1047 (license license:expat)))
1048
1049 (define-public python2-uniseg
1050 (package-with-python2 python-uniseg))
1051
1052 (define-public python-humanfriendly
1053 (package
1054 (name "python-humanfriendly")
1055 (version "4.4.1")
1056 (source
1057 (origin
1058 (method url-fetch)
1059 (uri (pypi-uri "humanfriendly" version))
1060 (sha256
1061 (base32
1062 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
1063 (build-system python-build-system)
1064 (arguments
1065 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1066 #:tests? #f))
1067 (propagated-inputs
1068 `(("python-monotonic" ,python-monotonic)))
1069 (home-page "https://humanfriendly.readthedocs.io")
1070 (synopsis "Human-friendly input and output in Python")
1071 (description
1072 "The functions and classes in @code{humanfriendly} can be used to make
1073 text interfaces more user-friendly. It includes tools to parse and format
1074 numbers, file sizes, and timespans, timers for long-running operations, menus
1075 to allow the user to choose from a list of options, and terminal interaction
1076 helpers.")
1077 (license license:expat)))
1078
1079 (define-public python2-humanfriendly
1080 (package-with-python2 python-humanfriendly))
1081
1082 (define-public python-capturer
1083 (package
1084 (name "python-capturer")
1085 (version "2.4")
1086 (source
1087 (origin
1088 (method url-fetch)
1089 (uri (pypi-uri "capturer" version))
1090 (sha256
1091 (base32
1092 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1093 (build-system python-build-system)
1094 (arguments
1095 `(#:tests? #f))
1096 (propagated-inputs
1097 `(("python-humanfriendly" ,python-humanfriendly)))
1098 (home-page "https://capturer.readthedocs.io")
1099 (synopsis "Capture stdout and stderr streams of the current process")
1100 (description
1101 "The capturer package makes it easy to capture the stdout and stderr
1102 streams of the current process and subprocesses. Output can be relayed
1103 to the terminal in real time but is also available to the Python program
1104 for additional processing.")
1105 (license license:expat)))
1106
1107 (define-public python2-capturer
1108 (package-with-python2 python-capturer))
1109
1110 (define-public python-verboselogs
1111 (package
1112 (name "python-verboselogs")
1113 (version "1.7")
1114 (source
1115 (origin
1116 (method url-fetch)
1117 (uri (pypi-uri "verboselogs" version))
1118 (sha256
1119 (base32
1120 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1121 (build-system python-build-system)
1122 (native-inputs
1123 `(("python-mock" ,python-mock)
1124 ("python-astroid" ,python-astroid)
1125 ("python-pylint" ,python-pylint)))
1126 (home-page "https://verboselogs.readthedocs.io")
1127 (synopsis "Verbose logging level for Python's logging module")
1128 (description
1129 "The @code{verboselogs} package extends Python's @code{logging} module to
1130 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1131 (license license:expat)))
1132
1133 (define-public python2-verboselogs
1134 (package-with-python2 python-verboselogs))
1135
1136 (define-public python-coloredlogs
1137 (package
1138 (name "python-coloredlogs")
1139 (version "7.3")
1140 (source
1141 (origin
1142 (method url-fetch)
1143 (uri (pypi-uri "coloredlogs" version))
1144 (sha256
1145 (base32
1146 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
1147 (build-system python-build-system)
1148 (arguments
1149 `(;Tests require some updated modules
1150 #:tests? #f))
1151 (propagated-inputs
1152 `(("python-capturer" ,python-capturer)))
1153 (home-page "https://coloredlogs.readthedocs.io")
1154 (synopsis "Colored stream handler for Python's logging module")
1155 (description
1156 "The @code{coloredlogs} package enables colored terminal output for
1157 Python's logging module. The @code{ColoredFormatter} class inherits from
1158 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
1159 messages in color.")
1160 (license license:expat)))
1161
1162 (define-public python2-coloredlogs
1163 (package-with-python2 python-coloredlogs))
1164
1165 (define-public python-eventlet
1166 (package
1167 (name "python-eventlet")
1168 (version "0.20.1")
1169 (source
1170 (origin
1171 (method url-fetch)
1172 (uri (pypi-uri "eventlet" version))
1173 (sha256
1174 (base32
1175 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1176 (build-system python-build-system)
1177 (propagated-inputs
1178 `(("python-greenlet" ,python-greenlet)))
1179 (arguments
1180 ;; TODO: Requires unpackaged 'enum-compat'.
1181 '(#:tests? #f))
1182 (home-page "http://eventlet.net")
1183 (synopsis "Concurrent networking library for Python")
1184 (description
1185 "Eventlet is a concurrent networking library for Python that
1186 allows you to change how you run your code, not how you write it.
1187 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1188 Coroutines ensure that the developer uses a blocking style of programming
1189 that is similar to threading, but provide the benefits of non-blocking I/O.
1190 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1191 from the Python interpreter, or as a small part of a larger application.")
1192 (license license:expat)))
1193
1194 (define-public python2-eventlet
1195 (let ((base (package-with-python2
1196 (strip-python2-variant python-eventlet))))
1197 (package (inherit base)
1198 (propagated-inputs
1199 `(("python2-enum34" ,python2-enum34)
1200 ,@(package-propagated-inputs base))))))
1201
1202 (define-public python-six
1203 (package
1204 (name "python-six")
1205 (version "1.11.0")
1206 (source
1207 (origin
1208 (method url-fetch)
1209 (uri (pypi-uri "six" version))
1210 (sha256
1211 (base32
1212 "1scqzwc51c875z23phj48gircqjgnn3af8zy2izjwmnlxrxsgs3h"))))
1213 (build-system python-build-system)
1214 (arguments
1215 `(#:phases
1216 (modify-phases %standard-phases
1217 (replace 'check
1218 (lambda _
1219 (invoke "py.test" "-v"))))))
1220 (native-inputs
1221 `(("python-py" ,python-py)
1222 ("python-pytest" ,python-pytest-bootstrap)))
1223 (home-page "https://pypi.python.org/pypi/six/")
1224 (synopsis "Python 2 and 3 compatibility utilities")
1225 (description
1226 "Six is a Python 2 and 3 compatibility library. It provides utility
1227 functions for smoothing over the differences between the Python versions with
1228 the goal of writing Python code that is compatible on both Python versions.
1229 Six supports every Python version since 2.5. It is contained in only one
1230 Python file, so it can be easily copied into your project.")
1231 (license license:x11)))
1232
1233 (define-public python2-six
1234 (package-with-python2 python-six))
1235
1236 (define-public python-six-bootstrap
1237 (package
1238 (inherit python-six)
1239 (name "python-six-bootstrap")
1240 (native-inputs `())
1241 (arguments `(#:tests? #f))))
1242
1243 (define-public python2-six-bootstrap
1244 (package-with-python2 python-six-bootstrap))
1245
1246 (define-public python-schedule
1247 (package
1248 (name "python-schedule")
1249 (version "0.4.3")
1250 (source
1251 (origin
1252 (method url-fetch)
1253 (uri (pypi-uri "schedule" version))
1254 (sha256
1255 (base32
1256 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1257 (build-system python-build-system)
1258 (native-inputs
1259 `(("python-pytest" ,python-pytest)
1260 ("python-mock" ,python-mock)))
1261 (home-page "https://github.com/dbader/schedule")
1262 (synopsis "Schedule periodic function calls in Python")
1263 (description
1264 "Schedule is an in-process scheduler for periodic jobs that uses the
1265 builder pattern for configuration. Schedule lets you run Python functions (or
1266 any other callable) periodically at pre-determined intervals using a simple,
1267 human-friendly syntax.")
1268 (license license:expat)))
1269
1270 (define-public python2-schedule
1271 (package-with-python2 python-schedule))
1272
1273 (define-public python-pandas
1274 (package
1275 (name "python-pandas")
1276 (version "0.23.1")
1277 (source
1278 (origin
1279 (method url-fetch)
1280 (uri (pypi-uri "pandas" version))
1281 (sha256
1282 (base32 "142nvwb01r2wv42y2cz40bx33hd8ffh6s6gynapg859fmzr2mdah"))))
1283 (build-system python-build-system)
1284 (arguments
1285 `(#:modules ((guix build utils)
1286 (guix build python-build-system)
1287 (ice-9 ftw)
1288 (srfi srfi-26))
1289 #:phases (modify-phases %standard-phases
1290 (replace 'check
1291 (lambda _
1292 (let ((build-directory
1293 (string-append
1294 (getcwd) "/build/"
1295 (car (scandir "build"
1296 (cut string-prefix? "lib." <>))))))
1297 (with-directory-excursion build-directory
1298 ;; Delete tests that require "moto" which is not yet in Guix.
1299 (for-each delete-file
1300 '("pandas/tests/io/conftest.py"
1301 "pandas/tests/io/json/test_compression.py"
1302 "pandas/tests/io/test_excel.py"
1303 "pandas/tests/io/test_parquet.py"))
1304 (invoke "pytest" "-v" "pandas" "-k"
1305 (string-append
1306 "not network and not disabled"
1307 ;; XXX: Due to the deleted tests above.
1308 " and not test_read_s3_jsonl")))))))))
1309 (propagated-inputs
1310 `(("python-numpy" ,python-numpy)
1311 ("python-pytz" ,python-pytz)
1312 ("python-dateutil" ,python-dateutil)))
1313 (native-inputs
1314 `(("python-cython" ,python-cython)
1315 ("python-beautifulsoup4" ,python-beautifulsoup4)
1316 ("python-lxml" ,python-lxml)
1317 ("python-html5lib" ,python-html5lib)
1318 ("python-nose" ,python-nose)
1319 ("python-pytest" ,python-pytest)))
1320 (home-page "https://pandas.pydata.org")
1321 (synopsis "Data structures for data analysis, time series, and statistics")
1322 (description
1323 "Pandas is a Python package providing fast, flexible, and expressive data
1324 structures designed to make working with structured (tabular,
1325 multidimensional, potentially heterogeneous) and time series data both easy
1326 and intuitive. It aims to be the fundamental high-level building block for
1327 doing practical, real world data analysis in Python.")
1328 (license license:bsd-3)))
1329
1330 (define-public python2-pandas
1331 (package-with-python2 python-pandas))
1332
1333 (define-public python2-mechanize
1334 (package
1335 (name "python2-mechanize")
1336 (version "0.2.5")
1337 (source
1338 (origin
1339 (method url-fetch)
1340 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1341 version ".tar.gz"))
1342 (sha256
1343 (base32
1344 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1345 (build-system python-build-system)
1346 (arguments
1347 `(#:python ,python-2 ; apparently incompatible with Python 3
1348 #:tests? #f))
1349 ;; test fails with message
1350 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1351 ;; (python-3.3.2) or
1352 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1353 ;; (python-2.7.5).
1354 ;; The source code is from March 2011 and probably not up-to-date
1355 ;; with respect to python unit tests.
1356 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1357 (synopsis
1358 "Stateful programmatic web browsing in Python")
1359 (description
1360 "Mechanize implements stateful programmatic web browsing in Python,
1361 after Andy Lester’s Perl module WWW::Mechanize.")
1362 (license (license:non-copyleft
1363 "file://COPYING"
1364 "See COPYING in the distribution."))))
1365
1366
1367 (define-public python-simplejson
1368 (package
1369 (name "python-simplejson")
1370 (version "3.14.0")
1371 (source
1372 (origin
1373 (method url-fetch)
1374 (uri (pypi-uri "simplejson" version))
1375 (sha256
1376 (base32
1377 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1378 (build-system python-build-system)
1379 (home-page "http://simplejson.readthedocs.org/en/latest/")
1380 (synopsis
1381 "Json library for Python")
1382 (description
1383 "JSON (JavaScript Object Notation) is a subset of JavaScript
1384 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1385 format.
1386
1387 Simplejson exposes an API familiar to users of the standard library marshal
1388 and pickle modules. It is the externally maintained version of the json
1389 library contained in Python 2.6, but maintains compatibility with Python 2.5
1390 and (currently) has significant performance advantages, even without using
1391 the optional C extension for speedups. Simplejson is also supported on
1392 Python 3.3+.")
1393 (license license:x11)))
1394
1395 (define-public python2-simplejson
1396 (package-with-python2 python-simplejson))
1397
1398
1399 (define-public python-pyicu
1400 (package
1401 (name "python-pyicu")
1402 (version "1.9.8")
1403 (source
1404 (origin
1405 (method url-fetch)
1406 (uri (pypi-uri "PyICU" version))
1407 (sha256
1408 (base32
1409 "05nz4p2dpkhwj6y9kik24xbvmfxji39nl0xw0sc0nvp9fgzf6xnd"))))
1410 (build-system python-build-system)
1411 (inputs
1412 `(("icu4c" ,icu4c)))
1413 (native-inputs
1414 `(("python-pytest" ,python-pytest)
1415 ("python-six" ,python-six)))
1416 (home-page "https://github.com/ovalhub/pyicu")
1417 (synopsis "Python extension wrapping the ICU C++ API")
1418 (description
1419 "PyICU is a python extension wrapping the ICU C++ API.")
1420 (properties `((python2-variant . ,(delay python2-pyicu))))
1421 (license license:x11)))
1422
1423 (define-public python2-pyicu
1424 (let ((base (package-with-python2
1425 (strip-python2-variant python-pyicu))))
1426 (package
1427 (inherit base)
1428 (arguments
1429 `(,@(package-arguments base)
1430 #:phases
1431 (modify-phases %standard-phases
1432 (add-before 'check 'delete-failing-test
1433 (λ _
1434 ;; XXX: This fails due to Unicode issues unique to Python 2,
1435 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1436 (delete-file "test/test_Script.py")
1437 #t))))))))
1438
1439 (define-public python2-dogtail
1440 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1441 ;; spaces in indentation" with Python 3.
1442 (package
1443 (name "python2-dogtail")
1444 (version "0.9.9")
1445 (source (origin
1446 (method url-fetch)
1447 (uri (pypi-uri "dogtail" version))
1448 (sha256
1449 (base32
1450 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1451 (build-system python-build-system)
1452 (arguments `(#:python ,python-2
1453 #:tests? #f)) ; invalid command "test"
1454 ;; Currently no offical homepage.
1455 (home-page "https://pypi.python.org/pypi/dogtail/")
1456 (synopsis "GUI test tool and automation framework written in Python")
1457 (description
1458 "Dogtail is a GUI test tool and automation framework written in Python.
1459 It uses Accessibility (a11y) technologies to communicate with desktop
1460 applications. dogtail scripts are written in Python and executed like any
1461 other Python program.")
1462 (license license:gpl2+)))
1463
1464 (define-public python-empy
1465 (package
1466 (name "python-empy")
1467 (version "3.3")
1468 (source (origin
1469 (method url-fetch)
1470 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1471 version ".tar.gz"))
1472 (sha256
1473 (base32
1474 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1475 (build-system python-build-system)
1476 (arguments
1477 `(#:tests? #f)) ;python2 only
1478 (home-page "http://www.alcyone.com/software/empy/")
1479 (synopsis "Templating system for Python")
1480 (description
1481 "EmPy is a system for embedding Python expressions and statements in
1482 template text; it takes an EmPy source file, processes it, and produces
1483 output. This is accomplished via expansions, which are special signals to the
1484 EmPy system and are set off by a special prefix (by default the at sign, @@).
1485 EmPy can expand arbitrary Python expressions and statements in this way, as
1486 well as a variety of special forms. Textual data not explicitly delimited in
1487 this way is sent unaffected to the output, allowing Python to be used in
1488 effect as a markup language. Also supported are callbacks via hooks,
1489 recording and playback via diversions, and dynamic, chainable filters. The
1490 system is highly configurable via command line options and embedded
1491 commands.")
1492 (license license:lgpl2.1+)))
1493
1494 (define-public python2-empy
1495 (package-with-python2 python-empy))
1496
1497 (define-public python2-element-tree
1498 (package
1499 (name "python2-element-tree")
1500 (version "1.2.6")
1501 (source (origin
1502 (method url-fetch)
1503 (uri (string-append
1504 "http://effbot.org/media/downloads/elementtree-"
1505 version "-20050316.tar.gz"))
1506 (sha256
1507 (base32
1508 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1509 (build-system python-build-system)
1510 (arguments
1511 `(#:python ,python-2 ; seems to be part of Python 3
1512 #:tests? #f)) ; no 'test' sub-command
1513 (synopsis "Toolkit for XML processing in Python")
1514 (description
1515 "ElementTree is a Python library supporting lightweight XML processing.")
1516 (home-page "http://effbot.org/zone/element-index.htm")
1517 (license (license:x11-style
1518 "http://docs.python.org/2/license.html"
1519 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1520
1521 (define-public python2-pybugz
1522 (package
1523 (name "python2-pybugz")
1524 (version "0.6.11")
1525 (source (origin
1526 (method url-fetch)
1527 (uri (string-append
1528 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1529 version ".tar.gz"))
1530 (sha256
1531 (base32
1532 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1533 (patches (search-patches "pybugz-stty.patch"
1534 "pybugz-encode-error.patch"))))
1535 (build-system python-build-system)
1536 (arguments
1537 `(#:python ,python-2 ; SyntaxError with Python 3
1538 #:tests? #f)) ; no 'test' sub-command
1539 (propagated-inputs
1540 `(("element-tree" ,python2-element-tree)))
1541 (synopsis "Python and command-line interface to Bugzilla")
1542 (description
1543 "PyBugz is a Python library and command-line tool to query the Bugzilla
1544 bug tracking system. It is meant as an aid to speed up interaction with the
1545 bug tracker.")
1546 (home-page "http://www.liquidx.net/pybugz/")
1547 (license license:gpl2)))
1548
1549 (define-public python2-enum
1550 (package
1551 (name "python2-enum")
1552 (version "0.4.6")
1553 (source (origin
1554 (method url-fetch)
1555 (uri (pypi-uri "enum" version))
1556 (sha256
1557 (base32
1558 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1559 (build-system python-build-system)
1560 (arguments
1561 `(#:python ,python-2))
1562 (home-page "http://pypi.python.org/pypi/enum/")
1563 (synopsis "Robust enumerated type support in Python")
1564 (description
1565 "This provides a module for robust enumerations in Python. It has
1566 been superseded by the Python standard library and is provided only for
1567 compatibility.")
1568 ;; Choice of either license.
1569 (license (list license:gpl3+ license:psfl))))
1570
1571 (define-public python-enum34
1572 (package
1573 (name "python-enum34")
1574 (version "1.1.6")
1575 (source
1576 (origin
1577 (method url-fetch)
1578 (uri (pypi-uri "enum34" version))
1579 (sha256
1580 (base32
1581 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1582 (build-system python-build-system)
1583 (home-page "https://pypi.python.org/pypi/enum34")
1584 (synopsis "Backported Python 3.4 Enum")
1585 (description
1586 "Enum34 is the new Python stdlib enum module available in Python 3.4
1587 backported for previous versions of Python from 2.4 to 3.3.")
1588 (license license:bsd-3)))
1589
1590 (define-public python2-enum34
1591 (package-with-python2 python-enum34))
1592
1593 (define-public python-parse-type
1594 (package
1595 (name "python-parse-type")
1596 (version "0.4.2")
1597 (source
1598 (origin
1599 (method url-fetch)
1600 (uri (pypi-uri "parse_type" version))
1601 (sha256
1602 (base32
1603 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1604 (build-system python-build-system)
1605 (propagated-inputs
1606 `(("python-six" ,python-six)
1607 ("python-parse" ,python-parse)))
1608 (native-inputs
1609 `(("python-pytest" ,python-pytest)
1610 ("python-pytest-runner" ,python-pytest-runner)))
1611 (home-page "https://github.com/jenisys/parse_type")
1612 (synopsis "Extended parse module")
1613 (description
1614 "Parse_type extends the python parse module.")
1615 (properties
1616 `((python2-variant . ,(delay python2-parse-type))))
1617 (license license:bsd-3)))
1618
1619 (define-public python2-parse-type
1620 (let ((base (package-with-python2
1621 (strip-python2-variant python-parse-type))))
1622 (package (inherit base)
1623 (propagated-inputs
1624 `(("python2-enum34" ,python2-enum34)
1625 ,@(package-propagated-inputs base))))))
1626
1627 (define-public python-parse
1628 (package
1629 (name "python-parse")
1630 (version "1.8.4")
1631 (source
1632 (origin
1633 (method url-fetch)
1634 (uri (pypi-uri "parse" version))
1635 (sha256
1636 (base32
1637 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1638 (build-system python-build-system)
1639 (arguments
1640 `(#:phases
1641 (modify-phases %standard-phases
1642 (replace 'check
1643 (lambda _ (invoke "python" "test_parse.py"))))))
1644 (home-page "https://github.com/r1chardj0n3s/parse")
1645 (synopsis "Parse strings")
1646 (description
1647 "Parse strings using a specification based on the Python @code{format()}
1648 syntax.")
1649 (license license:x11)))
1650
1651 (define-public python-polib
1652 (package
1653 (name "python-polib")
1654 (version "1.0.8")
1655 (source (origin
1656 (method url-fetch)
1657 (uri (pypi-uri "polib" version))
1658 (sha256
1659 (base32
1660 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1661 (build-system python-build-system)
1662 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1663 (synopsis "Manipulate, create and modify gettext files")
1664 (description "Polib can manipulate any gettext format (po, pot and mo)
1665 files. It can be used to create po files from scratch or to modify
1666 existing ones.")
1667 (license license:expat)))
1668
1669 (define-public python2-polib
1670 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1671 (package
1672 (inherit base)
1673 (arguments `(,@(package-arguments base)
1674 ;; Tests don't work with python2.
1675 #:tests? #f)))))
1676
1677 (define-public scons
1678 (package
1679 (name "scons")
1680 (version "3.0.1")
1681 (source (origin
1682 (method url-fetch)
1683 (uri (string-append "mirror://sourceforge/scons/scons/" version
1684 "/scons-" version ".tar.gz"))
1685 (sha256
1686 (base32
1687 "0wzid419mlwqw9llrg8gsx4nkzhqy16m4m40r0xnh6cwscw5wir4"))))
1688 (build-system python-build-system)
1689 (arguments
1690 `(#:use-setuptools? #f ; still relies on distutils
1691 #:tests? #f)) ; no 'python setup.py test' command
1692 (home-page "http://scons.org/")
1693 (synopsis "Software construction tool written in Python")
1694 (description
1695 "SCons is a software construction tool. Think of SCons as an improved,
1696 cross-platform substitute for the classic Make utility with integrated
1697 functionality similar to autoconf/automake and compiler caches such as ccache.
1698 In short, SCons is an easier, more reliable and faster way to build
1699 software.")
1700 (license license:x11)))
1701
1702 (define-public scons-python2
1703 (package
1704 (inherit (package-with-python2 scons))
1705 (name "scons-python2")))
1706
1707 (define-public python-extras
1708 (package
1709 (name "python-extras")
1710 (version "1.0.0")
1711 (source
1712 (origin
1713 (method url-fetch)
1714 (uri (pypi-uri "extras" version))
1715 (sha256
1716 (base32
1717 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1718 (build-system python-build-system)
1719 (arguments
1720 ;; FIXME: Circular dependency on testtools.
1721 '(#:tests? #f))
1722 (home-page "https://github.com/testing-cabal/extras")
1723 (synopsis "Useful extensions to the Python standard library")
1724 (description
1725 "Extras is a set of extensions to the Python standard library.")
1726 (license license:expat)))
1727
1728 (define-public python2-extras
1729 (package-with-python2 python-extras))
1730
1731 (define-public python-mimeparse
1732 (package
1733 (name "python-mimeparse")
1734 (version "1.6.0")
1735 (source
1736 (origin
1737 (method url-fetch)
1738 (uri (string-append
1739 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1740 version ".tar.gz"))
1741 (sha256
1742 (base32
1743 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1744 (build-system python-build-system)
1745 (arguments
1746 '(#:phases
1747 (modify-phases %standard-phases
1748 (replace 'check
1749 (lambda _
1750 (invoke "./mimeparse_test.py"))))))
1751 (home-page
1752 "https://github.com/dbtsai/python-mimeparse")
1753 (synopsis "Python library for parsing MIME types")
1754 (description
1755 "Mimeparse provides basic functions for parsing MIME type names and
1756 matching them against a list of media-ranges.")
1757 (license license:expat)))
1758
1759 (define-public python2-mimeparse
1760 (package-with-python2 python-mimeparse))
1761
1762 (define-public python-pafy
1763 (package
1764 (name "python-pafy")
1765 (version "0.5.3.1")
1766 (source
1767 (origin
1768 (method url-fetch)
1769 (uri (pypi-uri "pafy" version))
1770 (sha256
1771 (base32
1772 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1773 (build-system python-build-system)
1774 (arguments
1775 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1776 (propagated-inputs
1777 ;; Youtube-dl is a python package which is imported in the file
1778 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1779 `(("youtube-dl" ,youtube-dl)))
1780 (home-page "https://np1.github.io/pafy/")
1781 (synopsis "Retrieve YouTube content and metadata")
1782 (description
1783 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1784 (license license:lgpl3+)))
1785
1786 (define-public python2-funcsigs
1787 (package
1788 (name "python2-funcsigs")
1789 (version "1.0.2")
1790 (source (origin
1791 (method url-fetch)
1792 (uri (pypi-uri "funcsigs" version))
1793 (sha256
1794 (base32
1795 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1796 (build-system python-build-system)
1797 (arguments
1798 `(#:python ,python-2))
1799 (native-inputs
1800 `(("python2-unittest2" ,python2-unittest2)))
1801 (home-page "http://funcsigs.readthedocs.org")
1802 (synopsis "Python function signatures from PEP362")
1803 (description
1804 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1805 (license license:asl2.0)))
1806
1807 (define-public python2-funcsigs-bootstrap
1808 (package
1809 (inherit python2-funcsigs)
1810 (name "python2-funcsigs-bootstrap")
1811 (native-inputs `())
1812 (arguments
1813 `(#:tests? #f
1814 ,@(package-arguments python2-funcsigs)))))
1815
1816 (define-public python-py
1817 (package
1818 (name "python-py")
1819 (version "1.5.3")
1820 (source
1821 (origin
1822 (method url-fetch)
1823 (uri (pypi-uri "py" version))
1824 (sha256
1825 (base32
1826 "10gq2lckvgwlk9w6yzijhzkarx44hsaknd0ypa08wlnpjnsgmj99"))))
1827 (build-system python-build-system)
1828 (arguments
1829 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1830 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1831 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1832 ;; Is this module globally installed?"
1833 '(#:tests? #f))
1834 (home-page "https://pylib.readthedocs.io/")
1835 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1836 (description
1837 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1838 code introspection, and logging.")
1839 (license license:expat)))
1840
1841 (define-public python2-py
1842 (package-with-python2 python-py))
1843
1844 ;; Recent versions of python-fixtures and python-testrepository need
1845 ;; python-pbr for packaging, which itself needs these two packages for
1846 ;; testing.
1847 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1848 ;; same source, just without any test dependencies and with tests disabled.
1849 ;; python-pbr-minmal is then used to package python-fixtures and
1850 ;; python-testrepository.
1851 ;; Strictly speaking we currently could remove the test-requirements from the
1852 ;; normal python-pbr package (and save this package) since test are disabled
1853 ;; there anyway. But this may change in future.
1854 (define-public python-pbr-minimal
1855 (package
1856 (name "python-pbr-minimal")
1857 (version "3.0.1")
1858 (source
1859 (origin
1860 (method url-fetch)
1861 (uri (pypi-uri "pbr" version))
1862 (sha256
1863 (base32
1864 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1865 (build-system python-build-system)
1866 (arguments
1867 `(#:tests? #f))
1868 (home-page "http://docs.openstack.org/developer/pbr/")
1869 (synopsis "Minimal build of python-pbr used for bootstrapping")
1870 (description
1871 "Used only for bootstrapping python2-pbr, you should not need this.")
1872 (license license:asl2.0)))
1873
1874 (define-public python2-pbr-minimal
1875 (package-with-python2 python-pbr-minimal))
1876
1877 (define-public python-pbr
1878 (package
1879 (inherit python-pbr-minimal)
1880 (name "python-pbr")
1881 (arguments
1882 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1883 (propagated-inputs
1884 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1885 (native-inputs
1886 `(("python-fixtures" ,python-fixtures-bootstrap)
1887 ;; discover, coverage, hacking, subunit
1888 ("python-mock" ,python-mock)
1889 ("python-six" ,python-six)
1890 ("python-sphinx" ,python-sphinx)
1891 ("python-testrepository" ,python-testrepository-bootstrap)
1892 ("python-testresources" ,python-testresources-bootstrap)
1893 ("python-testscenarios" ,python-testscenarios-bootstrap)
1894 ("python-testtools" ,python-testtools-bootstrap)
1895 ("python-virtualenv" ,python-virtualenv)))
1896 (synopsis "Enhance the default behavior of Python’s setuptools")
1897 (description
1898 "Python Build Reasonableness (PBR) is a library that injects some useful
1899 and sensible default behaviors into your setuptools run. It will set
1900 versions, process requirements files and generate AUTHORS and ChangeLog file
1901 from git information.
1902 ")))
1903
1904 (define-public python2-pbr
1905 (package-with-python2 python-pbr))
1906
1907 (define-public python-exif-read
1908 (package
1909 (name "python-exif-read")
1910 (version "2.1.2")
1911 (source (origin
1912 (method url-fetch)
1913 (uri (pypi-uri "ExifRead" version))
1914 (sha256
1915 (base32
1916 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1917 (build-system python-build-system)
1918 (arguments `(#:tests? #f)) ; no tests
1919 (home-page "https://github.com/ianare/exif-py")
1920 (synopsis "Python library to extract EXIF data from image files")
1921 (description
1922 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1923 files.")
1924 (license license:bsd-3)))
1925
1926 (define-public python2-exif-read
1927 (package-with-python2 python-exif-read))
1928
1929 (define-public python-pyld
1930 (package
1931 (name "python-pyld")
1932 (version "1.0.3")
1933 (source (origin
1934 (method url-fetch)
1935 (uri (pypi-uri "PyLD" version))
1936 (sha256
1937 (base32
1938 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1939 (build-system python-build-system)
1940 (home-page "https://github.com/digitalbazaar/pyld")
1941 (synopsis "Python implementation of the JSON-LD specification")
1942 (description
1943 "PyLD is an implementation of the JSON-LD specification.")
1944 (license license:bsd-3)))
1945
1946 (define-public python2-pyld
1947 (package-with-python2 python-pyld))
1948
1949 (define-public python-click
1950 (package
1951 (name "python-click")
1952 (version "6.7")
1953 (source
1954 (origin
1955 (method url-fetch)
1956 (uri (pypi-uri "click" version))
1957 (sha256
1958 (base32
1959 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
1960 (build-system python-build-system)
1961 (arguments
1962 `(;; The tests are fragile, depending on a specific version of pytest:
1963 ;; <https://github.com/pallets/click/issues/823>
1964 #:tests? #f
1965 #:phases
1966 (modify-phases %standard-phases
1967 (add-after 'unpack 'fix-paths
1968 (lambda* (#:key inputs #:allow-other-keys)
1969 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1970 "cross-libc" "libc"))))
1971 (substitute* "click/_unicodefun.py"
1972 (("'locale'")
1973 (string-append "'" glibc "/bin/locale'"))))
1974 #t)))))
1975 (native-inputs
1976 `(("python-pytest" ,python-pytest)))
1977 (home-page "http://click.pocoo.org")
1978 (synopsis "Command line library for Python")
1979 (description
1980 "Click is a Python package for creating command line interfaces in a
1981 composable way with as little code as necessary. Its name stands for
1982 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1983 with sensible defaults out of the box.")
1984 (license license:bsd-3)))
1985
1986 (define-public python2-click
1987 (package-with-python2 python-click))
1988
1989 (define-public python-wheel
1990 (package
1991 (name "python-wheel")
1992 (version "0.30.0a0")
1993 (source
1994 (origin
1995 (method url-fetch)
1996 (uri (pypi-uri "wheel" version))
1997 (sha256
1998 (base32
1999 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
2000 (build-system python-build-system)
2001 (native-inputs
2002 `(("python-jsonschema" ,python-jsonschema)
2003 ("python-pytest-cov" ,python-pytest-cov)))
2004 (home-page "https://bitbucket.org/pypa/wheel/")
2005 (synopsis "Format for built Python packages")
2006 (description
2007 "A wheel is a ZIP-format archive with a specially formatted filename and
2008 the @code{.whl} extension. It is designed to contain all the files for a PEP
2009 376 compatible install in a way that is very close to the on-disk format. Many
2010 packages will be properly installed with only the @code{Unpack} step and the
2011 unpacked archive preserves enough information to @code{Spread} (copy data and
2012 scripts to their final locations) at any later time. Wheel files can be
2013 installed with a newer @code{pip} or with wheel's own command line utility.")
2014 (license license:expat)
2015 (properties `((python2-variant . ,(delay python2-wheel))))))
2016
2017 (define-public python2-wheel
2018 (let ((wheel (package-with-python2
2019 (strip-python2-variant python-wheel))))
2020 (package (inherit wheel)
2021 (native-inputs `(("python2-functools32" ,python2-functools32)
2022 ,@(package-native-inputs wheel))))))
2023
2024 (define-public python-vcversioner
2025 (package
2026 (name "python-vcversioner")
2027 (version "2.16.0.0")
2028 (source
2029 (origin
2030 (method url-fetch)
2031 (uri (pypi-uri "vcversioner" version))
2032 (sha256
2033 (base32
2034 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2035 (build-system python-build-system)
2036 (synopsis "Python library for version number discovery")
2037 (description "Vcversioner is a Python library that inspects tagging
2038 information in a variety of version control systems in order to discover
2039 version numbers.")
2040 (home-page "https://github.com/habnabit/vcversioner")
2041 (license license:isc)))
2042
2043 (define-public python2-vcversioner
2044 (package-with-python2 python-vcversioner))
2045
2046 (define-public python-jsonschema
2047 (package
2048 (name "python-jsonschema")
2049 (version "2.6.0")
2050 (source (origin
2051 (method url-fetch)
2052 (uri
2053 (string-append
2054 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2055 version ".tar.gz"))
2056 (sha256
2057 (base32
2058 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2059 (build-system python-build-system)
2060 (arguments
2061 '(#:phases
2062 (modify-phases %standard-phases
2063 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
2064 (native-inputs
2065 `(("python-nose" ,python-nose)
2066 ("python-vcversioner" ,python-vcversioner)))
2067 (home-page "https://github.com/Julian/jsonschema")
2068 (synopsis "Implementation of JSON Schema for Python")
2069 (description
2070 "Jsonschema is an implementation of JSON Schema for Python.")
2071 (license license:expat)
2072 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2073
2074 (define-public python2-jsonschema
2075 (let ((jsonschema (package-with-python2
2076 (strip-python2-variant python-jsonschema))))
2077 (package (inherit jsonschema)
2078 (native-inputs
2079 `(("python2-mock" ,python2-mock)
2080 ,@(package-native-inputs jsonschema)))
2081 (propagated-inputs
2082 `(("python2-functools32" ,python2-functools32))))))
2083
2084 (define-public python-schema
2085 (package
2086 (name "python-schema")
2087 (version "0.6.6")
2088 (source
2089 (origin
2090 (method url-fetch)
2091 (uri (pypi-uri "schema" version))
2092 (sha256
2093 (base32
2094 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2095 (build-system python-build-system)
2096 (native-inputs
2097 `(("python-pytest" ,python-pytest)))
2098 (home-page "https://github.com/keleshev/schema")
2099 (synopsis "Simple data validation library")
2100 (description
2101 "@code{python-schema} is a library for validating Python data
2102 structures, such as those obtained from config-files, forms, external
2103 services or command-line parsing, converted from JSON/YAML (or
2104 something else) to Python data-types.")
2105 (license license:psfl)))
2106
2107 (define-public python2-schema
2108 (package-with-python2 python-schema))
2109
2110 (define-public python-schema-0.5
2111 (package (inherit python-schema)
2112 (version "0.5.0")
2113 (source
2114 (origin
2115 (method url-fetch)
2116 (uri (pypi-uri "schema" version))
2117 (sha256
2118 (base32
2119 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2120
2121 (define-public python2-schema-0.5
2122 (package-with-python2 python-schema-0.5))
2123
2124 (define-public python-kitchen
2125 (package
2126 (name "python-kitchen")
2127 (version "1.2.5")
2128 (source
2129 (origin
2130 (method url-fetch)
2131 (uri (pypi-uri "kitchen" version))
2132 (sha256
2133 (base32
2134 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2135 (build-system python-build-system)
2136 (propagated-inputs
2137 `(("python-chardet" ,python-chardet)))
2138 (home-page "https://github.com/fedora-infra/kitchen")
2139 (synopsis "Python API for snippets")
2140 (description "@code{kitchen} module provides a python API for all sorts of
2141 little useful snippets of code that everybody ends up writing for their projects
2142 but never seem big enough to build an independent release. Use kitchen and stop
2143 cutting and pasting that code over and over.")
2144 (license (list license:lgpl2.1+
2145 ;; subprocess.py, test_subprocess.py,
2146 ;; kitchen/pycompat25/defaultdict.py:
2147 license:psfl))))
2148
2149 (define-public python2-kitchen
2150 (package-with-python2 python-kitchen))
2151
2152 (define-public python-unidecode
2153 (package
2154 (name "python-unidecode")
2155 (version "0.04.21")
2156 (source (origin
2157 (method url-fetch)
2158 (uri (pypi-uri "Unidecode" version))
2159 (sha256
2160 (base32
2161 "0lfhp9c5xrbpjvbpr12ji52g1lx04404bzzdg6pvabhzisw6l2i8"))))
2162 (build-system python-build-system)
2163 (home-page "https://pypi.python.org/pypi/Unidecode")
2164 (synopsis "ASCII transliterations of Unicode text")
2165 (description
2166 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2167 useful when integrating with legacy code that doesn't support Unicode, or for
2168 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2169 machine identifiers from human-readable Unicode strings that should still be
2170 somewhat intelligible.")
2171 (license license:gpl2+)))
2172
2173 (define-public python2-unidecode
2174 (package-with-python2 python-unidecode))
2175
2176 (define-public python-pyjwt
2177 (package
2178 (name "python-pyjwt")
2179 (version "1.5.3")
2180 (source
2181 (origin
2182 (method url-fetch)
2183 (uri (pypi-uri "PyJWT" version))
2184 (sha256
2185 (base32
2186 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2187 (modules '((guix build utils)))
2188 (snippet
2189 '(begin
2190 (for-each delete-file-recursively
2191 (find-files "." "\\.pyc$"))
2192 #t))))
2193 (build-system python-build-system)
2194 (native-inputs
2195 `(("python-pytest" ,python-pytest)
2196 ("python-pytest-cov" ,python-pytest-cov)
2197 ("python-pytest-runner" ,python-pytest-runner)))
2198 (home-page "https://github.com/progrium/pyjwt")
2199 (synopsis "JSON Web Token implementation in Python")
2200 (description
2201 "PyJWT is a JSON Web Token implementation written in Python.")
2202 (license license:expat)))
2203
2204 (define-public python2-pyjwt
2205 (package-with-python2 python-pyjwt))
2206
2207 (define-public python-pykka
2208 (package
2209 (name "python-pykka")
2210 (version "1.2.1")
2211 (source
2212 (origin
2213 (method url-fetch)
2214 (uri (pypi-uri "Pykka" version))
2215 (sha256
2216 (base32
2217 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2218 (build-system python-build-system)
2219 (native-inputs
2220 `(("python-mock" ,python-mock)
2221 ("python-nose" ,python-nose)
2222 ("python-gevent" ,python-gevent)
2223 ("python-eventlet" ,python-eventlet)))
2224 (home-page "https://www.pykka.org/")
2225 (synopsis "Pykka is a Python implementation of the actor model")
2226 (description
2227 "Pykka is a Python implementation of the actor model.
2228 The actor model introduces some simple rules to control the sharing
2229 of state and cooperation between execution units, which makes it
2230 easier to build concurrent applications.")
2231 (license license:asl2.0)))
2232
2233 (define-public python2-pykka
2234 (package-with-python2 python-pykka))
2235
2236 (define-public python-itsdangerous
2237 (package
2238 (name "python-itsdangerous")
2239 (version "0.24")
2240 (source
2241 (origin
2242 (method url-fetch)
2243 (uri (string-append
2244 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2245 version ".tar.gz"))
2246 (sha256
2247 (base32
2248 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2249 (build-system python-build-system)
2250 (home-page "https://github.com/mitsuhiko/itsdangerous")
2251 (synopsis "Python library for passing data to/from untrusted environments")
2252 (description
2253 "Itsdangerous provides various helpers to pass trusted data to untrusted
2254 environments and back.")
2255 (license license:bsd-3)))
2256
2257 (define-public python2-itsdangerous
2258 (package-with-python2 python-itsdangerous))
2259
2260 (define-public python-pyyaml
2261 (package
2262 (name "python-pyyaml")
2263 (version "3.13")
2264 (source
2265 (origin
2266 (method url-fetch)
2267 (uri (pypi-uri "PyYAML" version))
2268 (sha256
2269 (base32
2270 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2271 (build-system python-build-system)
2272 (inputs
2273 `(("libyaml" ,libyaml)))
2274 (home-page "http://pyyaml.org/wiki/PyYAML")
2275 (synopsis "YAML parser and emitter for Python")
2276 (description
2277 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2278 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2279 API, and sensible error messages. PyYAML supports standard YAML tags and
2280 provides Python-specific tags that allow to represent an arbitrary Python
2281 object.")
2282 (license license:expat)))
2283
2284 (define-public python2-pyyaml
2285 (package-with-python2 python-pyyaml))
2286
2287 (define-public python-virtualenv
2288 (package
2289 (name "python-virtualenv")
2290 (version "15.0.3")
2291 (source
2292 (origin
2293 (method url-fetch)
2294 (uri (pypi-uri "virtualenv" version))
2295 (sha256
2296 (base32
2297 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
2298 (build-system python-build-system)
2299 (arguments
2300 `(#:phases
2301 (modify-phases %standard-phases
2302 (replace 'check
2303 (lambda _
2304 ;; Disable failing test. See upstream bug report
2305 ;; https://github.com/pypa/virtualenv/issues/957
2306 (substitute* "tests/test_virtualenv.py"
2307 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2308 (zero? (system* "py.test")))))))
2309 (native-inputs
2310 `(("python-mock" ,python-mock)
2311 ("python-pytest" ,python-pytest)))
2312 (home-page "https://virtualenv.pypa.io/")
2313 (synopsis "Virtual Python environment builder")
2314 (description
2315 "Virtualenv is a tool to create isolated Python environments.")
2316 (license license:expat)))
2317
2318 (define-public python2-virtualenv
2319 (package-with-python2 python-virtualenv))
2320
2321 (define-public python-markupsafe
2322 (package
2323 (name "python-markupsafe")
2324 (version "0.23")
2325 (source
2326 (origin
2327 (method url-fetch)
2328 (uri (string-append
2329 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2330 version ".tar.gz"))
2331 (sha256
2332 (base32
2333 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2334 (build-system python-build-system)
2335 (home-page "https://github.com/mitsuhiko/markupsafe")
2336 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2337 (description
2338 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2339 for Python.")
2340 (license license:bsd-3)))
2341
2342 (define-public python2-markupsafe
2343 (package-with-python2 python-markupsafe))
2344
2345 (define-public python-jinja2
2346 (package
2347 (name "python-jinja2")
2348 (version "2.9.6")
2349 (source
2350 (origin
2351 (method url-fetch)
2352 (uri (pypi-uri "Jinja2" version))
2353 (sha256
2354 (base32
2355 "1zzrkywhziqffrzks14kzixz7nd4yh2vc0fb04a68vfd2ai03anx"))))
2356 (build-system python-build-system)
2357 (propagated-inputs
2358 `(("python-markupsafe" ,python-markupsafe)))
2359 (home-page "http://jinja.pocoo.org/")
2360 (synopsis "Python template engine")
2361 (description
2362 "Jinja2 is a small but fast and easy to use stand-alone template engine
2363 written in pure Python.")
2364 (license license:bsd-3)))
2365
2366 (define-public python2-jinja2
2367 (package-with-python2 python-jinja2))
2368
2369 (define-public python-pystache
2370 (package
2371 (name "python-pystache")
2372 (version "0.5.4")
2373 (source (origin
2374 (method url-fetch)
2375 (uri (pypi-uri "pystache" version))
2376 (sha256
2377 (base32
2378 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2379 (build-system python-build-system)
2380 (arguments
2381 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2382 (home-page "http://defunkt.io/pystache/")
2383 (synopsis "Python logic-less template engine")
2384 (description
2385 "Pystache is a Python implementation of the framework agnostic,
2386 logic-free templating system Mustache.")
2387 (license license:expat)
2388 (properties `((python2-variant . ,(delay python2-pystache))))))
2389
2390 (define-public python2-pystache
2391 (package (inherit (package-with-python2
2392 (strip-python2-variant python-pystache)))
2393 (arguments
2394 `(#:python ,python-2
2395 #:phases
2396 (modify-phases %standard-phases
2397 (replace 'check
2398 (lambda _
2399 (zero? (system* "python" "test_pystache.py")))))))))
2400
2401 (define-public python-joblib
2402 (package
2403 (name "python-joblib")
2404 (version "0.10.3")
2405 (source (origin
2406 (method url-fetch)
2407 (uri (pypi-uri "joblib" version))
2408 (sha256
2409 (base32
2410 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2411 (modules '((guix build utils)))
2412 (snippet
2413 '(begin
2414 ;; Remove pre-compiled .pyc files from source.
2415 (for-each delete-file-recursively
2416 (find-files "." "__pycache__" #:directories? #t))
2417 (for-each delete-file (find-files "." "\\.pyc$"))
2418 #t))))
2419 (build-system python-build-system)
2420 (arguments
2421 `(#:phases
2422 (modify-phases %standard-phases
2423 (add-before 'check 'disable-failing-tests
2424 (lambda _
2425 ;; This numpydoc tests fails for unknown reasons
2426 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2427 ;; This numpydoc test depends on matplotlib, which is not a
2428 ;; required input.
2429 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2430 ;; These tests fail to execute sys.executable
2431 (substitute* "joblib/test/test_parallel.py"
2432 (("import nose" line)
2433 (string-append "from nose.plugins.skip import SkipTest\n" line))
2434 (("def test_nested_parallel_warnings" line)
2435 (string-append "@SkipTest\n" line))
2436 (("def test_parallel_with_interactively_defined_functions" line)
2437 (string-append "@SkipTest\n" line)))
2438 #t)))))
2439 ;; Provide nose to enable tests command
2440 (native-inputs
2441 `(("python-nose" ,python-nose)
2442 ("python-sphinx" ,python-sphinx)
2443 ("python-docutils" ,python-docutils)
2444 ("python-numpydoc" ,python-numpydoc)))
2445 (home-page "http://pythonhosted.org/joblib/")
2446 (synopsis "Using Python functions as pipeline jobs")
2447 (description
2448 "Joblib is a set of tools to provide lightweight pipelining in Python.
2449 In particular, joblib offers: transparent disk-caching of the output values
2450 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2451 logging and tracing of the execution.")
2452 (license license:bsd-3)))
2453
2454 (define-public python2-joblib
2455 (package-with-python2 python-joblib))
2456
2457 (define-public python-docutils
2458 (package
2459 (name "python-docutils")
2460 (version "0.14")
2461 (source
2462 (origin
2463 (method url-fetch)
2464 (uri (pypi-uri "docutils" version))
2465 (sha256
2466 (base32
2467 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2468 (build-system python-build-system)
2469 (arguments
2470 '(#:tests? #f)) ; no setup.py test command
2471 (home-page "http://docutils.sourceforge.net/")
2472 (synopsis "Python Documentation Utilities")
2473 (description
2474 "Docutils is a modular system for processing documentation into useful
2475 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2476 reStructuredText.")
2477 ;; Most of the source code is public domain, but some source files are
2478 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2479 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2480
2481 (define-public python2-docutils
2482 (package-with-python2 python-docutils))
2483
2484 (define-public python-pygments
2485 (package
2486 (name "python-pygments")
2487 (version "2.2.0")
2488 (source
2489 (origin
2490 (method url-fetch)
2491 (uri (pypi-uri "Pygments" version))
2492 (sha256
2493 (base32
2494 "1k78qdvir1yb1c634nkv6rbga8wv4289xarghmsbbvzhvr311bnv"))))
2495 (build-system python-build-system)
2496 (arguments
2497 ;; FIXME: Tests require sphinx, which depends on this.
2498 '(#:tests? #f))
2499 (home-page "http://pygments.org/")
2500 (synopsis "Syntax highlighting")
2501 (description
2502 "Pygments is a syntax highlighting package written in Python.")
2503 (license license:bsd-2)))
2504
2505 (define-public python2-pygments
2506 (package-with-python2 python-pygments))
2507
2508 (define-public python-sphinxcontrib-websupport
2509 (package
2510 (name "python-sphinxcontrib-websupport")
2511 (version "1.0.1")
2512 (source (origin
2513 (method url-fetch)
2514 (uri (pypi-uri "sphinxcontrib-websupport" version))
2515 (sha256
2516 (base32
2517 "1f9f0wjpi9nhikbyaz6d19s7qvzdf1nq2g5dsh640fma4q9rd1bs"))))
2518 (build-system python-build-system)
2519 (propagated-inputs
2520 `(("python-mock" ,python-mock)
2521 ("python-pytest" ,python-pytest)
2522 ("python-xapian-bindings" ,python-xapian-bindings)))
2523 ;; Needed for running the test suite
2524 (native-inputs
2525 `(("python-six" ,python-six)
2526 ("python-jinja2" ,python-jinja2)
2527 ("python-docutils" ,python-docutils)
2528 ("python-sphinx" ,python-sphinx)
2529 ("python-sqlalchemy" ,python-sqlalchemy)
2530 ("python-whoosh" ,python-whoosh)))
2531 (home-page "http://sphinx-doc.org/")
2532 (synopsis "Sphinx API for web applications")
2533 (description "This package provides a Python API to easily integrate
2534 Sphinx documentation into your web application. It provides tools to
2535 integrate Sphinx documents in web templates and to handle searches.")
2536 (license license:bsd-3)))
2537
2538 (define-public python-sphinx
2539 (package
2540 (name "python-sphinx")
2541 (version "1.5.1")
2542 (source
2543 (origin
2544 (method url-fetch)
2545 (uri (pypi-uri "Sphinx" version))
2546 (sha256
2547 (base32
2548 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
2549 (build-system python-build-system)
2550 (arguments
2551 `(#:phases
2552 (modify-phases %standard-phases
2553 (replace 'check
2554 (lambda _
2555 ;; Requires Internet access.
2556 (delete-file "tests/test_build_linkcheck.py")
2557 (zero? (system* "make" "test")))))))
2558 (propagated-inputs
2559 `(("python-imagesize" ,python-imagesize)
2560 ("python-sphinx-alabaster-theme"
2561 ,python-sphinx-alabaster-theme)
2562 ("python-babel" ,python-babel)
2563 ("python-snowballstemmer" ,python-snowballstemmer)
2564 ("python-docutils" ,python-docutils)
2565 ("python-jinja2" ,python-jinja2)
2566 ("python-pygments" ,python-pygments)
2567 ("python-requests" ,python-requests)
2568 ("python-six" ,python-six)))
2569 (native-inputs
2570 `(("graphviz" ,graphviz)
2571 ("python-html5lib" ,python-html5lib)
2572 ("python-mock" ,python-mock)
2573 ("python-nose" ,python-nose)))
2574 (home-page "http://sphinx-doc.org/")
2575 (synopsis "Python documentation generator")
2576 (description "Sphinx is a tool that makes it easy to create documentation
2577 for Python projects or other documents consisting of multiple reStructuredText
2578 sources.")
2579 (license license:bsd-3)
2580 (properties `((python2-variant . ,(delay python2-sphinx))))))
2581
2582 (define-public python-sphinx-1.6
2583 (package (inherit python-sphinx)
2584 (name "python-sphinx")
2585 (version "1.6.4")
2586 (source (origin
2587 (method url-fetch)
2588 (uri (pypi-uri "Sphinx" version))
2589 (sha256
2590 (base32
2591 "0gjakw9fv5pwqb5yyclxycs36sapxizk1vx6mkcdizmzgzcfy0gi"))))
2592 (arguments
2593 `(#:phases
2594 (modify-phases %standard-phases
2595 (replace 'check
2596 (lambda _
2597 ;; Requires Internet access.
2598 (delete-file "tests/test_build_linkcheck.py")
2599 (substitute* "tests/test_build_latex.py"
2600 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
2601 "@pytest.mark.skip()"))
2602 (zero? (system* "make" "test")))))))
2603 (propagated-inputs
2604 `(("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)
2605 ,@(package-propagated-inputs python-sphinx)))
2606 (native-inputs
2607 `(("python-pytest" ,python-pytest)
2608 ("imagemagick" ,imagemagick) ; for "convert"
2609 ,@(package-native-inputs python-sphinx)))
2610 (properties `((python2-variant . ,(delay python2-sphinx-1.6))))))
2611
2612 (define-public python2-sphinx-1.6
2613 (let ((base (package-with-python2 (strip-python2-variant python-sphinx-1.6))))
2614 (package
2615 (inherit base)
2616 (propagated-inputs
2617 `(("python2-typing" ,python2-typing)
2618 ,@(package-propagated-inputs base)))
2619 (native-inputs `(("python2-enum34" ,python2-enum34)
2620 ,@(package-native-inputs base))))))
2621
2622 (define-public python-sphinx-1.5.3
2623 (package
2624 (inherit python-sphinx)
2625 (name "python-sphinx")
2626 (version "1.5.3")
2627 (source
2628 (origin
2629 (method url-fetch)
2630 (uri (pypi-uri "Sphinx" version))
2631 (sha256
2632 (base32
2633 "0kw1axswbvaavr8ggyf4qr6hnisnrzlbkkcdada69vk1x9xjassg"))))
2634 (native-inputs
2635 `(("python-pytest" ,python-pytest)
2636 ,@(package-native-inputs python-sphinx)))))
2637
2638 (define-public python2-sphinx
2639 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
2640 (package
2641 (inherit base)
2642 (native-inputs `(("python2-mock" ,python2-mock)
2643 ("python2-enum34" ,python2-enum34)
2644 ,@(package-native-inputs base)))
2645 (propagated-inputs `(("python2-pytz" ,python2-pytz)
2646 ,@(package-propagated-inputs base))))))
2647
2648 (define-public python-sphinx-gallery
2649 (package
2650 (name "python-sphinx-gallery")
2651 (version "0.1.13")
2652 (source (origin
2653 (method url-fetch)
2654 (uri (string-append "https://github.com/sphinx-gallery/sphinx-gallery"
2655 "/archive/v" version ".tar.gz"))
2656 (file-name (string-append name "-" version ".tar.gz"))
2657 (sha256
2658 (base32
2659 "03fs99mcb1r7qp0xixqv07vcz98sk21yq19ffdysi0infdcpzfkd"))))
2660 (build-system python-build-system)
2661 (arguments
2662 ;; FIXME: Tests attempt to download <https://docs.python.org/3/objects.inv>,
2663 ;; <https://docs.scipy.org/doc/numpy/objects.inv>, and
2664 ;; <https://matplotlib.org/objects.inv>.
2665 `(#:tests? #f))
2666 (native-inputs
2667 `(("python-pytest-runner" ,python-pytest-runner)))
2668 (home-page "https://sphinx-gallery.github.io/")
2669 (synopsis "Generate an examples gallery automatically")
2670 (description
2671 "@code{sphinx_gallery} is a Sphinx extension that builds an HTML version
2672 from any set of Python scripts and puts it into an examples gallery.")
2673 (license license:bsd-3)))
2674
2675 (define-public python2-sphinx-gallery
2676 (package-with-python2 python-sphinx-gallery))
2677
2678 (define-public python-sphinx-rtd-theme
2679 (package
2680 (name "python-sphinx-rtd-theme")
2681 (version "0.2.4")
2682 (source
2683 (origin
2684 (method url-fetch)
2685 (uri (pypi-uri "sphinx_rtd_theme" version))
2686 (sha256
2687 (base32
2688 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
2689 (build-system python-build-system)
2690 (arguments '(#:tests? #f)) ; No tests.
2691 (propagated-inputs
2692 `(("python-sphinx" ,python-sphinx)))
2693 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2694 (synopsis "ReadTheDocs.org theme for Sphinx")
2695 (description "A theme for Sphinx used by ReadTheDocs.org.")
2696 (license license:expat)))
2697
2698 (define-public python2-sphinx-rtd-theme
2699 (package-with-python2 python-sphinx-rtd-theme))
2700
2701 (define-public python-guzzle-sphinx-theme
2702 (package
2703 (name "python-guzzle-sphinx-theme")
2704 (version "0.7.11")
2705 (source
2706 (origin
2707 (method url-fetch)
2708 (uri (pypi-uri "guzzle_sphinx_theme" version))
2709 (sha256
2710 (base32
2711 "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
2712 (build-system python-build-system)
2713 (propagated-inputs
2714 `(("python-sphinx" ,python-sphinx)))
2715 (home-page "https://github.com/guzzle/guzzle_sphinx_theme")
2716 (synopsis "Sphinx theme used by Guzzle")
2717 (description "This package provides guzzle_sphinx_theme, a theme for the
2718 Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
2719 and several other projects.")
2720 (license license:expat)))
2721
2722 (define-public python2-guzzle-sphinx-theme
2723 (package-with-python2 python-guzzle-sphinx-theme))
2724
2725 (define-public python-rst.linker
2726 (package
2727 (name "python-rst.linker")
2728 (version "1.10")
2729 (source
2730 (origin
2731 (method url-fetch)
2732 (uri (pypi-uri "rst.linker" version))
2733 (sha256
2734 (base32
2735 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2736 (build-system python-build-system)
2737 (propagated-inputs
2738 `(("python-dateutil" ,python-dateutil)
2739 ("python-six" ,python-six)))
2740 (native-inputs
2741 `(("python-setuptools-scm" ,python-setuptools-scm)))
2742 ;; Test would require path.py, which would introduce a cyclic dependence.
2743 (arguments `(#:tests? #f))
2744 ;; Note: As of version 1.7 the documentation is not worth building.
2745 (home-page "https://github.com/jaraco/rst.linker")
2746 (synopsis "Sphinx plugin to add links and timestamps")
2747 (description "rst.linker allows to automatically replace text by a
2748 reStructuredText external reference or timestamps. It's primary purpose is to
2749 augment the changelog, but it can be used for other documents, too.")
2750 (license license:expat)))
2751
2752 (define-public python2-rst.linker
2753 (package-with-python2 python-rst.linker))
2754
2755 (define-public python-feedgenerator
2756 (package
2757 (name "python-feedgenerator")
2758 (version "1.9")
2759 (source
2760 (origin
2761 (method url-fetch)
2762 (uri (pypi-uri "feedgenerator" version))
2763 (sha256
2764 (base32
2765 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2766 (modules '((guix build utils)))
2767 (snippet
2768 '(begin
2769 ;; Remove pre-compiled .pyc files from source.
2770 (for-each delete-file-recursively
2771 (find-files "." "__pycache__" #:directories? #t))
2772 (for-each delete-file (find-files "." "\\.pyc$"))
2773 #t))))
2774 (build-system python-build-system)
2775 (propagated-inputs
2776 `(("python-pytz" ,python-pytz)
2777 ("python-six" ,python-six)))
2778 (home-page "https://github.com/getpelican/feedgenerator")
2779 (synopsis
2780 "Standalone version of Django's Atom/RSS feed generator")
2781 (description
2782 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2783 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2784 (license license:bsd-3)))
2785
2786 (define-public python2-feedgenerator
2787 (package-with-python2 python-feedgenerator))
2788
2789 (define-public python-toml
2790 (package
2791 (name "python-toml")
2792 (version "0.9.4")
2793 (source
2794 (origin
2795 (method url-fetch)
2796 (uri (pypi-uri "toml" version))
2797 (sha256
2798 (base32
2799 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2800 (build-system python-build-system)
2801 (arguments
2802 `(#:tests? #f)) ;no tests suite in release
2803 (home-page "https://github.com/uiri/toml")
2804 (synopsis "Library for TOML")
2805 (description
2806 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2807 Language (TOML) configuration files.")
2808 (license license:expat)))
2809
2810 (define-public python-black
2811 (package
2812 (name "python-black")
2813 (version "18.6b4")
2814 (source
2815 (origin
2816 (method url-fetch)
2817 (uri (pypi-uri "black" version))
2818 (sha256
2819 (base32
2820 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
2821 (build-system python-build-system)
2822 (arguments
2823 `(#:phases
2824 (modify-phases %standard-phases
2825 (add-after 'patch-source-shebangs 'patch-extra-shebangs
2826 (lambda _
2827 (let ((python3 (which "python3")))
2828 (substitute* '("tests/data/fmtonoff.py"
2829 "tests/data/string_prefixes.py"
2830 "tests/data/function.py")
2831 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
2832 (string-append "#!" python3 (if (string? minor-version)
2833 minor-version
2834 ""))))))))))
2835 (propagated-inputs
2836 `(("python-click" ,python-click)
2837 ("python-attrs" ,python-attrs)
2838 ("python-appdirs" ,python-appdirs)
2839 ("python-toml" ,python-toml)))
2840 (home-page "https://github.com/ambv/black")
2841 (synopsis "The uncompromising code formatter")
2842 (description "Black is the uncompromising Python code formatter.")
2843 (license license:expat)))
2844
2845 (define-public python-blinker
2846 (package
2847 (name "python-blinker")
2848 (version "1.4")
2849 (source
2850 (origin
2851 (method url-fetch)
2852 (uri (pypi-uri "blinker" version))
2853 (sha256
2854 (base32
2855 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2856 (build-system python-build-system)
2857 (home-page "http://pythonhosted.org/blinker/")
2858 (synopsis "Fast, simple object-to-object and broadcast signaling")
2859 (description
2860 "Blinker provides a fast dispatching system that allows any number of
2861 interested parties to subscribe to events, or \"signals\".")
2862 (license license:expat)))
2863
2864 (define-public python2-blinker
2865 (package-with-python2 python-blinker))
2866
2867 (define-public pelican
2868 (package
2869 (name "pelican")
2870 (version "3.6.3")
2871 (source
2872 (origin
2873 (method url-fetch)
2874 (uri (pypi-uri "pelican" version))
2875 (sha256
2876 (base32
2877 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
2878 (build-system python-build-system)
2879 (propagated-inputs
2880 `(("python-feedgenerator" ,python-feedgenerator)
2881 ("python-jinja2" ,python-jinja2)
2882 ("python-pygments" ,python-pygments)
2883 ("python-docutils" ,python-docutils)
2884 ("python-pytz" ,python-pytz)
2885 ("python-blinker" ,python-blinker)
2886 ("python-unidecode" ,python-unidecode)
2887 ("python-six" ,python-six)
2888 ("python-dateutil" ,python-dateutil)
2889 ("python-markdown" ,python-markdown)))
2890 (home-page "http://getpelican.com/")
2891 (arguments
2892 `(;; XXX Requires a lot more packages to do unit tests :P
2893 #:tests? #f
2894 #:phases (modify-phases %standard-phases
2895 (add-before
2896 'install 'adjust-requires
2897 ;; Since feedgenerator is installed from git, it doesn't
2898 ;; conform to the version requirements.
2899 ;;
2900 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2901 ;; version requirement so setuptools doesn't get confused.
2902 (lambda _
2903 (substitute* "setup.py"
2904 (("['\"]feedgenerator.*?['\"]")
2905 "'feedgenerator'")))))))
2906 (synopsis "Python-based static site publishing system")
2907 (description
2908 "Pelican is a tool to generate a static blog from reStructuredText,
2909 Markdown input files, and more. Pelican uses Jinja2 for templating
2910 and is very extensible.")
2911 (license license:agpl3+)))
2912
2913 (define-public python-scikit-image
2914 (package
2915 (name "python-scikit-image")
2916 (version "0.11.3")
2917 (source
2918 (origin
2919 (method url-fetch)
2920 (uri (string-append
2921 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
2922 version ".tar.gz"))
2923 (sha256
2924 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
2925 (build-system python-build-system)
2926 (arguments
2927 ;; TODO: Some tests require running X11 server. Disable them?
2928 '(#:tests? #f))
2929 ;; See DEPENDS.txt for the list of build and run time requiremnts
2930 (propagated-inputs
2931 `(("python-matplotlib" ,python-matplotlib)
2932 ("python-networkx" ,python-networkx)
2933 ("python-scipy" ,python-scipy)
2934 ("python-pillow" ,python-pillow)))
2935 (native-inputs
2936 `(("python-numpy" ,python-numpy)
2937 ("python-cython" ,python-cython)
2938 ("python-six" ,python-six)))
2939 (home-page "http://scikit-image.org/")
2940 (synopsis "Image processing in Python")
2941 (description
2942 "Scikit-image is a collection of algorithms for image processing.")
2943 (license license:bsd-3)))
2944
2945 (define-public python2-scikit-image
2946 (package-with-python2 python-scikit-image))
2947
2948 (define-public python-cython
2949 (package
2950 (name "python-cython")
2951 (version "0.28.4")
2952 (source
2953 (origin
2954 (method url-fetch)
2955 (uri (pypi-uri "Cython" version))
2956 (sha256
2957 (base32
2958 "0imw9s2rbrh32clbl10csnwmig9p3nzkrd2baxxxfmnrsc42pb3n"))))
2959 (build-system python-build-system)
2960 ;; we need the full python package and not just the python-wrapper
2961 ;; because we need libpython3.3m.so
2962 (inputs
2963 `(("python" ,python)))
2964 (arguments
2965 `(#:phases
2966 (modify-phases %standard-phases
2967 (add-before 'check 'set-HOME
2968 ;; some tests require access to "$HOME/.cython"
2969 (lambda _ (setenv "HOME" "/tmp") #t))
2970
2971 ;; FIXME: These tests started failing on armhf after the 0.28 update
2972 ;; (commit c69d11c5930), both with an error such as this:
2973 ;; compiling (cpp) and running dictcomp ...
2974 ;; === C/C++ compiler error output: ===
2975 ;; ‘
2976 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
2977 ;; See <https://hydra.gnu.org/build/2948724> for logs.
2978 ,@(if (target-arm32?)
2979 `((add-before 'check 'disable-failing-tests
2980 (lambda _
2981 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
2982 (for-each (lambda (test)
2983 (format disabled-tests "~a\n" test))
2984 '("memslice" "dictcomp"))
2985 (close-port disabled-tests)))))
2986 '())
2987
2988 (replace 'check
2989 (lambda _ (invoke "python" "runtests.py" "-vv"))))))
2990 (home-page "http://cython.org/")
2991 (synopsis "C extensions for Python")
2992 (description "Cython is an optimising static compiler for both the Python
2993 programming language and the extended Cython programming language. It makes
2994 writing C extensions for Python as easy as Python itself.")
2995 (license license:asl2.0)
2996 (properties `((python2-variant . ,(delay python2-cython))))))
2997
2998 (define-public python2-cython
2999 (package (inherit (package-with-python2
3000 (strip-python2-variant python-cython)))
3001 (name "python2-cython")
3002 (inputs
3003 `(("python-2" ,python-2))))) ; this is not automatically changed
3004
3005 ;; The RPython toolchain currently does not support Python 3.
3006 (define-public python2-rpython
3007 (package
3008 (name "python2-rpython")
3009 (version "0.2.1")
3010 (source
3011 (origin
3012 (method url-fetch)
3013 (uri (pypi-uri "rpython" version))
3014 (sha256
3015 (base32
3016 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3017 (build-system python-build-system)
3018 (arguments `(#:python ,python-2))
3019 (native-inputs
3020 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3021 (home-page "https://rpython.readthedocs.org")
3022 (synopsis "Framework for implementing interpreters and virtual machines")
3023 (description "RPython is a translation and support framework for
3024 producing implementations of dynamic languages, emphasizing a clean separation
3025 between language specification and implementation aspects.")
3026 (license license:expat)))
3027
3028 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3029 ;; python-scipy still build, as these three packages are often used together.
3030 (define-public python-numpy
3031 (package
3032 (name "python-numpy")
3033 (version "1.14.5")
3034 (source
3035 (origin
3036 (method url-fetch)
3037 (uri (string-append
3038 "https://github.com/numpy/numpy/releases/download/v"
3039 version "/numpy-" version ".tar.gz"))
3040 (sha256
3041 (base32
3042 "0admjpkih63lm19zbbilq8ck4f6ny5kqi03dk3m6b2mnixsh4jhv"))))
3043 (build-system python-build-system)
3044 (inputs
3045 `(("openblas" ,openblas)
3046 ("lapack" ,lapack)))
3047 (native-inputs
3048 `(("python-cython" ,python-cython)
3049 ("python-nose" ,python-nose)
3050 ("gfortran" ,gfortran)))
3051 (arguments
3052 `(#:phases
3053 (modify-phases %standard-phases
3054 (add-before 'build 'configure-blas-lapack
3055 (lambda* (#:key inputs #:allow-other-keys)
3056 (call-with-output-file "site.cfg"
3057 (lambda (port)
3058 (format port
3059 "[openblas]
3060 libraries = openblas
3061 library_dirs = ~a/lib
3062 include_dirs = ~a/include
3063
3064 # backslash-n to make emacs happy
3065 \n[lapack]
3066 lapack_libs = lapack
3067 library_dirs = ~a/lib
3068 include_dirs = ~a/include
3069 "
3070 (assoc-ref inputs "openblas")
3071 (assoc-ref inputs "openblas")
3072 (assoc-ref inputs "lapack")
3073 (assoc-ref inputs "lapack"))))
3074 #t))
3075 (add-before 'build 'fix-executable-paths
3076 (lambda* (#:key inputs #:allow-other-keys)
3077 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3078 ;; instead of /bin/sh.
3079 (substitute* "numpy/distutils/exec_command.py"
3080 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3081 (string-append match-start (assoc-ref inputs "bash") match-end)))
3082 ;; Use "gcc" executable, not "cc".
3083 (substitute* "numpy/distutils/system_info.py"
3084 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3085 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3086 #t))
3087 ;; Tests can only be run after the library has been installed and not
3088 ;; within the source directory.
3089 (delete 'check)
3090 (add-after 'install 'check
3091 (lambda* (#:key outputs inputs #:allow-other-keys)
3092 ;; Make installed package available for running the tests
3093 (add-installed-pythonpath inputs outputs)
3094 (with-directory-excursion "/tmp"
3095 (zero? (system* "python" "-c"
3096 "import numpy; numpy.test(verbose=2)"))))))))
3097 (home-page "http://www.numpy.org/")
3098 (synopsis "Fundamental package for scientific computing with Python")
3099 (description "NumPy is the fundamental package for scientific computing
3100 with Python. It contains among other things: a powerful N-dimensional array
3101 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3102 and Fortran code, useful linear algebra, Fourier transform, and random number
3103 capabilities.")
3104 (license license:bsd-3)))
3105
3106 (define-public python2-numpy
3107 (package-with-python2 python-numpy))
3108
3109 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3110 ;; interest only for legacy code going back to NumPy's predecessor
3111 ;; Numeric.
3112 (define-public python2-numpy-1.8
3113 (package (inherit python2-numpy)
3114 (version "1.8.2")
3115 (source
3116 (origin
3117 (method url-fetch)
3118 (uri (string-append
3119 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3120 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3121 (sha256
3122 (base32
3123 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3124 (arguments
3125 (substitute-keyword-arguments (package-arguments python2-numpy)
3126 ((#:phases phases)
3127 `(modify-phases ,phases
3128 (replace 'configure-blas-lapack
3129 (lambda* (#:key inputs #:allow-other-keys)
3130 (call-with-output-file "site.cfg"
3131 (lambda (port)
3132 (format port
3133 "[openblas]
3134 libraries = openblas,lapack
3135 library_dirs = ~a/lib:~a/lib
3136 include_dirs = ~a/include:~a/include
3137 "
3138 (assoc-ref inputs "openblas")
3139 (assoc-ref inputs "lapack")
3140 (assoc-ref inputs "openblas")
3141 (assoc-ref inputs "lapack"))))
3142 #t))))))
3143 (description "NumPy is the fundamental package for scientific computing
3144 with Python. It contains among other things: a powerful N-dimensional array
3145 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3146 and Fortran code, useful linear algebra, Fourier transform, and random number
3147 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3148 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3149 Numeric.")
3150 (license license:bsd-3)))
3151
3152 (define-public python-munch
3153 (package
3154 (name "python-munch")
3155 (version "2.0.4")
3156 (source
3157 (origin
3158 (method url-fetch)
3159 (uri (pypi-uri "munch" version))
3160 (sha256
3161 (base32
3162 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3163 (build-system python-build-system)
3164 (home-page "https://github.com/Infinidat/munch")
3165 (synopsis "Dot-accessible dictionary")
3166 (description "Munch is a dot-accessible dictionary similar to JavaScript
3167 objects.")
3168 (license license:expat)))
3169
3170 (define-public python2-munch
3171 (package-with-python2 python-munch))
3172
3173 (define-public python-colormath
3174 (package
3175 (name "python-colormath")
3176 (version "3.0.0")
3177 (source
3178 (origin
3179 (method url-fetch)
3180 (uri (pypi-uri "colormath" version))
3181 (sha256
3182 (base32
3183 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3184 (build-system python-build-system)
3185 (propagated-inputs
3186 `(("python-networkx" ,python-networkx)
3187 ("python-numpy" ,python-numpy)))
3188 (home-page "https://github.com/gtaylor/python-colormath")
3189 (synopsis "Color math and conversion library")
3190 (description
3191 "This is a Python library for color math and conversions.")
3192 (license license:bsd-3)))
3193
3194 (define-public python2-colormath
3195 (package-with-python2 python-colormath))
3196
3197 (define-public python-spectra
3198 (package
3199 (name "python-spectra")
3200 (version "0.0.11")
3201 (source
3202 (origin
3203 (method url-fetch)
3204 (uri (pypi-uri "spectra" version))
3205 (sha256
3206 (base32
3207 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3208 (build-system python-build-system)
3209 (arguments
3210 `(#:phases
3211 (modify-phases %standard-phases
3212 (replace 'check
3213 (lambda _
3214 (zero? (system* "nosetests" "-v")))))))
3215 (propagated-inputs
3216 `(("python-colormath" ,python-colormath)))
3217 (native-inputs
3218 `(("python-nose" ,python-nose)))
3219 (home-page "https://github.com/jsvine/spectra")
3220 (synopsis "Color scales and color conversion")
3221 (description
3222 "This package provides a Python library intended to make color math,
3223 color scales, and color space conversion easy. It has support for:
3224
3225 @enumerate
3226 @item Color scales
3227 @item Color ranges
3228 @item Color blending
3229 @item Brightening/darkening colors
3230 @item Saturating/desaturating colors
3231 @item Conversion to/from multiple color spaces.
3232 @end enumerate\n")
3233 (license license:expat)))
3234
3235 (define-public python2-spectra
3236 (package-with-python2 python-spectra))
3237
3238 (define-public python2-fastlmm
3239 (package
3240 (name "python2-fastlmm")
3241 (version "0.2.21")
3242 (source
3243 (origin
3244 (method url-fetch)
3245 (uri (pypi-uri "fastlmm" version ".zip"))
3246 (sha256
3247 (base32
3248 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3249 (build-system python-build-system)
3250 (arguments
3251 `(#:python ,python-2)) ; only Python 2.7 is supported
3252 (propagated-inputs
3253 `(("python2-numpy" ,python2-numpy)
3254 ("python2-scipy" ,python2-scipy)
3255 ("python2-matplotlib" ,python2-matplotlib)
3256 ("python2-pandas" ,python2-pandas)
3257 ("python2-scikit-learn" ,python2-scikit-learn)
3258 ("python2-pysnptools" ,python2-pysnptools)))
3259 (native-inputs
3260 `(("unzip" ,unzip)
3261 ("python2-cython" ,python2-cython)
3262 ("python2-mock" ,python2-mock)
3263 ("python2-nose" ,python2-nose)))
3264 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3265 (synopsis "Perform genome-wide association studies on large data sets")
3266 (description
3267 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3268 Models, is a program for performing both single-SNP and SNP-set genome-wide
3269 association studies (GWAS) on extremely large data sets.")
3270 (license license:asl2.0)))
3271
3272 (define-public python-numpy-documentation
3273 (package
3274 (name "python-numpy-documentation")
3275 (version (package-version python-numpy))
3276 (source (package-source python-numpy))
3277 (build-system python-build-system)
3278 (native-inputs
3279 `(("python-matplotlib" ,python-matplotlib)
3280 ("python-numpy" ,python-numpy)
3281 ("pkg-config" ,pkg-config)
3282 ("python-sphinx" ,python-sphinx)
3283 ("python-numpydoc" ,python-numpydoc)
3284 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3285 texlive-fonts-ec
3286 texlive-generic-ifxetex
3287 texlive-generic-pdftex
3288 texlive-latex-amsfonts
3289 texlive-latex-capt-of
3290 texlive-latex-cmap
3291 texlive-latex-environ
3292 texlive-latex-eqparbox
3293 texlive-latex-etoolbox
3294 texlive-latex-expdlist
3295 texlive-latex-fancyhdr
3296 texlive-latex-fancyvrb
3297 texlive-latex-fncychap
3298 texlive-latex-float
3299 texlive-latex-framed
3300 texlive-latex-geometry
3301 texlive-latex-graphics
3302 texlive-latex-hyperref
3303 texlive-latex-mdwtools
3304 texlive-latex-multirow
3305 texlive-latex-oberdiek
3306 texlive-latex-parskip
3307 texlive-latex-preview
3308 texlive-latex-tabulary
3309 texlive-latex-threeparttable
3310 texlive-latex-titlesec
3311 texlive-latex-trimspaces
3312 texlive-latex-ucs
3313 texlive-latex-upquote
3314 texlive-latex-url
3315 texlive-latex-varwidth
3316 texlive-latex-wrapfig)))
3317 ("texinfo" ,texinfo)
3318 ("perl" ,perl)
3319 ("scipy-sphinx-theme"
3320 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3321 (method git-fetch)
3322 (uri (git-reference
3323 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3324 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3325 (sha256
3326 (base32
3327 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3328 ,@(package-native-inputs python-numpy)))
3329 (arguments
3330 `(#:tests? #f ; we're only generating the documentation
3331 #:phases
3332 (modify-phases %standard-phases
3333 (delete 'build)
3334 (replace 'install
3335 (lambda* (#:key inputs outputs #:allow-other-keys)
3336 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3337 (doc (string-append
3338 data "/doc/" ,name "-"
3339 ,(package-version python-numpy)))
3340 (info-reader (string-append data "/info"))
3341 (html (string-append doc "/html"))
3342 (scipy-sphinx-theme "scipy-sphinx-theme")
3343 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3344 (pyver ,(string-append "PYVER=")))
3345
3346 ;; FIXME: this is needed to for texlive-union to generate
3347 ;; fonts, which are not found.
3348 (setenv "HOME" "/tmp")
3349
3350 (with-directory-excursion "doc"
3351 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3352 (mkdir-p html)
3353 (system* "make" "html" pyver)
3354 (system* "make" "latex" "PAPER=a4" pyver)
3355 (system* "make" "-C" "build/latex"
3356 "all-pdf" "PAPER=a4" pyver)
3357 ;; FIXME: Generation of the info file fails.
3358 ;; (system* "make" "info" pyver)
3359 ;; (mkdir-p info)
3360 ;; (copy-file "build/texinfo/numpy.info"
3361 ;; (string-append info "/numpy.info"))
3362 (for-each (lambda (file)
3363 (copy-file (string-append "build/latex" file)
3364 (string-append doc file)))
3365 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3366 (with-directory-excursion "build/html"
3367 (for-each (lambda (file)
3368 (let* ((dir (dirname file))
3369 (tgt-dir (string-append html "/" dir)))
3370 (unless (equal? "." dir)
3371 (mkdir-p tgt-dir))
3372 (install-file file html)))
3373 (find-files "." ".*")))))
3374 #t)))))
3375 (home-page (package-home-page python-numpy))
3376 (synopsis "Documentation for the python-numpy package")
3377 (description (package-description python-numpy))
3378 (license (package-license python-numpy))))
3379
3380 (define-public python2-numpy-documentation
3381 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3382 (package
3383 (inherit numpy-documentation)
3384 (native-inputs `(("python2-functools32" ,python2-functools32)
3385 ,@(package-native-inputs numpy-documentation))))))
3386
3387 (define-public python-pygit2
3388 (package
3389 (name "python-pygit2")
3390 (version "0.26.4")
3391 (source
3392 (origin
3393 (method url-fetch)
3394 (uri (pypi-uri "pygit2" version))
3395 (sha256
3396 (base32
3397 "145k3fsd21274swia7mcc7n3kzlbd47xmg55mxsjdb5d9b7fr858"))))
3398 (build-system python-build-system)
3399 (propagated-inputs
3400 `(("python-six" ,python-six)
3401 ("python-cffi" ,python-cffi)
3402 ("libgit2" ,libgit2)
3403 ("python-tox" ,python-tox)))
3404 (home-page "https://github.com/libgit2/pygit2")
3405 (synopsis "Python bindings for libgit2")
3406 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3407 library, libgit2 implements Git plumbing.")
3408 ;; GPL2.0 only, with linking exception.
3409 (license license:gpl2)))
3410
3411 (define-public python2-pygit2
3412 (package-with-python2 python-pygit2))
3413
3414 (define-public python-pyparsing
3415 (package
3416 (name "python-pyparsing")
3417 (version "2.2.1")
3418 (source
3419 (origin
3420 (method url-fetch)
3421 (uri (pypi-uri "pyparsing" version))
3422 (sha256
3423 (base32 "06dgd0iilvf8m0ssmfpcbh8l6jf0zkp8adbb84llksg17crfx4zl"))))
3424 (build-system python-build-system)
3425 (outputs '("out" "doc"))
3426 (arguments
3427 `(#:tests? #f ; no test target
3428 #:phases
3429 (modify-phases %standard-phases
3430 (add-after 'install 'install-doc
3431 (lambda* (#:key outputs #:allow-other-keys)
3432 (let* ((doc (string-append (assoc-ref outputs "doc")
3433 "/share/doc/" ,name "-" ,version))
3434 (html-doc (string-append doc "/html"))
3435 (examples (string-append doc "/examples")))
3436 (mkdir-p html-doc)
3437 (mkdir-p examples)
3438 (for-each
3439 (lambda (dir tgt)
3440 (map (lambda (file)
3441 (install-file file tgt))
3442 (find-files dir ".*")))
3443 (list "docs" "htmldoc" "examples")
3444 (list doc html-doc examples))
3445 #t))))))
3446 (home-page "https://github.com/pyparsing/pyparsing")
3447 (synopsis "Python parsing class library")
3448 (description
3449 "The pyparsing module is an alternative approach to creating and
3450 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3451 of regular expressions. The pyparsing module provides a library of classes
3452 that client code uses to construct the grammar directly in Python code.")
3453 (license license:expat)))
3454
3455 (define-public python2-pyparsing
3456 (package-with-python2 python-pyparsing))
3457
3458 (define-public python-numpydoc
3459 (package
3460 (name "python-numpydoc")
3461 (version "0.5")
3462 (source
3463 (origin
3464 (method url-fetch)
3465 (uri (string-append
3466 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3467 version ".tar.gz"))
3468 (sha256
3469 (base32
3470 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3471 (modules '((guix build utils)))
3472 (snippet
3473 '(begin
3474 ;; Drop a test requiring matplotlib, which we cannot add as an
3475 ;; input since it would create a circular dependency: Extend the
3476 ;; test for Python 3, where it is already dropped, to Python 2.
3477 (substitute* "numpydoc/tests/test_plot_directive.py"
3478 (("3") "2"))
3479 #t))))
3480 (build-system python-build-system)
3481 (propagated-inputs
3482 `(("python-sphinx" ,python-sphinx)))
3483 (native-inputs
3484 `(("python-nose" ,python-nose)))
3485 (home-page "https://pypi.python.org/pypi/numpydoc")
3486 (synopsis
3487 "Numpy's Sphinx extensions")
3488 (description
3489 "Sphinx extension to support docstrings in Numpy format.")
3490 (license license:bsd-2)))
3491
3492 (define-public python2-numpydoc
3493 (package-with-python2 python-numpydoc))
3494
3495 (define-public python-numexpr
3496 (package
3497 (name "python-numexpr")
3498 (version "2.6.5")
3499 (source
3500 (origin
3501 (method url-fetch)
3502 (uri (pypi-uri "numexpr" version))
3503 (sha256
3504 (base32
3505 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3506 (build-system python-build-system)
3507 (arguments `(#:tests? #f)) ; no tests included
3508 (propagated-inputs
3509 `(("python-numpy" ,python-numpy)))
3510 (home-page "https://github.com/pydata/numexpr")
3511 (synopsis "Fast numerical expression evaluator for NumPy")
3512 (description
3513 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3514 expressions that operate on arrays are accelerated and use less memory than
3515 doing the same calculation in Python. In addition, its multi-threaded
3516 capabilities can make use of all your cores, which may accelerate
3517 computations, most specially if they are not memory-bounded (e.g. those using
3518 transcendental functions).")
3519 (license license:expat)))
3520
3521 (define-public python2-numexpr
3522 (package-with-python2 python-numexpr))
3523
3524 (define-public python-cycler
3525 (package
3526 (name "python-cycler")
3527 (version "0.10.0")
3528 (source (origin
3529 (method url-fetch)
3530 (uri (pypi-uri "cycler" version))
3531 (sha256
3532 (base32
3533 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3534 (build-system python-build-system)
3535 (arguments
3536 ;; XXX: The current version requires 'coveralls' which we don't have.
3537 ;; Enable this for the next release which uses 'python-pytest'.
3538 '(#:tests? #f))
3539 (propagated-inputs
3540 `(("python-six" ,python-six)))
3541 (home-page "http://matplotlib.org/cycler/")
3542 (synopsis "Composable keyword argument iterator")
3543 (description
3544 "When using @code{matplotlib} and plotting more than one line, it is
3545 common to want to be able to want to be able to cycle over one or more artist
3546 styles; but the plotting logic can quickly become involved.
3547 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3548 @code{Cycler} class was developed.")
3549 (license license:bsd-3)))
3550
3551 (define-public python2-cycler
3552 (package-with-python2 python-cycler))
3553
3554 (define-public python-colorspacious
3555 (package
3556 (name "python-colorspacious")
3557 (version "1.1.0")
3558 (source
3559 (origin
3560 (method url-fetch)
3561 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3562 version ".tar.gz"))
3563 (file-name (string-append name "-" version))
3564 (sha256
3565 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3566 (build-system python-build-system)
3567 (propagated-inputs
3568 `(("python-numpy" ,python-numpy)))
3569 (native-inputs
3570 `(("python-nose" ,python-nose)))
3571 (arguments
3572 `(#:phases
3573 (modify-phases %standard-phases
3574 (replace 'check
3575 (lambda _
3576 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
3577 (home-page "https://github.com/njsmith/colorspacious")
3578 (synopsis "Python library for colorspace conversions")
3579 (description "@code{colorspacious} is a Python library that lets you
3580 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3581 (license license:expat)))
3582
3583 (define-public python2-colorspacious
3584 (package-with-python2 python-colorspacious))
3585
3586 (define-public python-matplotlib
3587 (package
3588 (name "python-matplotlib")
3589 (version "2.2.3")
3590 (source
3591 (origin
3592 (method url-fetch)
3593 (uri (pypi-uri "matplotlib" version))
3594 (sha256
3595 (base32
3596 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3597 (build-system python-build-system)
3598 (propagated-inputs ; the following packages are all needed at run time
3599 `(("python-cycler" ,python-cycler)
3600 ("python-kiwisolver" ,python-kiwisolver)
3601 ("python-pyparsing" ,python-pyparsing)
3602 ("python-pygobject" ,python-pygobject)
3603 ("gobject-introspection" ,gobject-introspection)
3604 ("python-tkinter" ,python "tk")
3605 ("python-dateutil" ,python-dateutil)
3606 ("python-numpy" ,python-numpy)
3607 ("python-pillow" ,python-pillow)
3608 ("python-pytz" ,python-pytz)
3609 ("python-six" ,python-six)
3610 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3611 ;; from 'gtk+') provides the required 'typelib' files used by
3612 ;; 'gobject-introspection'. The location of these files is set with the
3613 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3614 ;; is done automatically by a 'native-search-path' procedure. However,
3615 ;; at run-time the user must set this variable as follows:
3616 ;;
3617 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3618 ("gtk+" ,gtk+)
3619 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3620 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3621 ;; object. For this reason we need to import both libraries.
3622 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3623 ("python-pycairo" ,python-pycairo)
3624 ;; XXX: qtwebkit cannot be built reliably.
3625 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3626 ("python-cairocffi" ,python-cairocffi)))
3627 (inputs
3628 `(("libpng" ,libpng)
3629 ("imagemagick" ,imagemagick)
3630 ("freetype" ,freetype)
3631 ("cairo" ,cairo)
3632 ("glib" ,glib)
3633 ;; FIXME: Add backends when available.
3634 ;("python-wxpython" ,python-wxpython)
3635 ("tcl" ,tcl)
3636 ("tk" ,tk)))
3637 (native-inputs
3638 `(("pkg-config" ,pkg-config)
3639 ("python-nose" ,python-nose)
3640 ("python-mock" ,python-mock)))
3641 (arguments
3642 `(#:phases
3643 (modify-phases %standard-phases
3644 (add-before 'build 'configure-environment
3645 (lambda* (#:key outputs inputs #:allow-other-keys)
3646 (let ((cairo (assoc-ref inputs "cairo"))
3647 (gtk+ (assoc-ref inputs "gtk+")))
3648 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3649 ;; has not effect.
3650 (setenv "LD_LIBRARY_PATH"
3651 (string-append cairo "/lib:" gtk+ "/lib"))
3652 (setenv "HOME" (getcwd))
3653 (call-with-output-file "setup.cfg"
3654 (lambda (port)
3655 (format port "[directories]~%
3656 basedirlist = ~a,~a~%
3657 [rc_options]~%
3658 backend = TkAgg~%"
3659 (assoc-ref inputs "tcl")
3660 (assoc-ref inputs "tk")))))
3661 #t)))))
3662 (home-page "http://matplotlib.org")
3663 (synopsis "2D plotting library for Python")
3664 (description
3665 "Matplotlib is a Python 2D plotting library which produces publication
3666 quality figures in a variety of hardcopy formats and interactive environments
3667 across platforms. Matplotlib can be used in Python scripts, the python and
3668 ipython shell, web application servers, and six graphical user interface
3669 toolkits.")
3670 (license license:psfl)
3671 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3672
3673 (define-public python2-matplotlib
3674 (let ((matplotlib (package-with-python2
3675 (strip-python2-variant python-matplotlib))))
3676 (package (inherit matplotlib)
3677 ;; Make sure to use special packages for Python 2 instead
3678 ;; of those automatically rewritten by package-with-python2.
3679 (propagated-inputs
3680 `(("python2-pycairo" ,python2-pycairo)
3681 ("python2-backports-functools-lru-cache"
3682 ,python2-backports-functools-lru-cache)
3683 ("python2-functools32" ,python2-functools32)
3684 ("python2-pygobject-2" ,python2-pygobject-2)
3685 ("python2-subprocess32" ,python2-subprocess32)
3686 ("python2-tkinter" ,python-2 "tk")
3687 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3688 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3689
3690 (define-public python-matplotlib-documentation
3691 (package
3692 (name "python-matplotlib-documentation")
3693 (version (package-version python-matplotlib))
3694 (source (package-source python-matplotlib))
3695 (build-system python-build-system)
3696 (native-inputs
3697 `(("python-matplotlib" ,python-matplotlib)
3698 ("python-colorspacious" ,python-colorspacious)
3699 ("python-sphinx" ,python-sphinx-1.6)
3700 ("python-sphinx-gallery" ,python-sphinx-gallery)
3701 ("python-numpydoc" ,python-numpydoc)
3702 ("python-ipython" ,python-ipython)
3703 ("python-mock" ,python-mock)
3704 ("graphviz" ,graphviz)
3705 ("texlive" ,texlive)
3706 ("texinfo" ,texinfo)
3707 ,@(package-native-inputs python-matplotlib)))
3708 (arguments
3709 `(#:tests? #f ; we're only generating documentation
3710 #:phases
3711 (modify-phases %standard-phases
3712 (replace 'build
3713 (lambda _
3714 (chdir "doc")
3715 ;; Produce pdf in 'A4' format.
3716 (substitute* "conf.py"
3717 (("latex_paper_size = 'letter'") "")
3718 ;; latex_paper_size is deprecated -> set paper size using
3719 ;; latex_elements
3720 (("latex_elements\\['pointsize'\\] = '11pt'" match)
3721 ;; insert at a point where latex_elements{} is defined:
3722 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
3723 (invoke "make" "SPHINXBUILD=sphinx-build" "html" "latex" "texinfo")))
3724 (replace 'install
3725 (lambda* (#:key inputs outputs #:allow-other-keys)
3726 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3727 (doc (string-append data "/doc/python-matplotlib-" ,version))
3728 (info (string-append data "/info"))
3729 (html (string-append doc "/html")))
3730 (mkdir-p html)
3731 (mkdir-p info)
3732 (copy-recursively "build/html" html)
3733 (symlink (string-append html "/_images")
3734 (string-append info "/matplotlib-figures"))
3735 (with-directory-excursion "build/texinfo"
3736 (substitute* "matplotlib.texi"
3737 (("@image\\{([^,]*)" all file)
3738 (string-append "@image{matplotlib-figures/" file)))
3739 (symlink (string-append html "/_images")
3740 "./matplotlib-figures")
3741 (system* "makeinfo" "--no-split"
3742 "-o" "matplotlib.info" "matplotlib.texi"))
3743 (copy-file "build/texinfo/matplotlib.info"
3744 (string-append info "/matplotlib.info"))
3745 (copy-file "build/latex/Matplotlib.pdf"
3746 (string-append doc "/Matplotlib.pdf")))
3747 #t)))))
3748 (home-page (package-home-page python-matplotlib))
3749 (synopsis "Documentation for the python-matplotlib package")
3750 (description (package-description python-matplotlib))
3751 (license (package-license python-matplotlib))))
3752
3753 (define-public python2-matplotlib-documentation
3754 (package-with-python2 python-matplotlib-documentation))
3755
3756 (define-public python2-pysnptools
3757 (package
3758 (name "python2-pysnptools")
3759 (version "0.3.9")
3760 (source
3761 (origin
3762 (method url-fetch)
3763 (uri (pypi-uri "pysnptools" version ".zip"))
3764 (sha256
3765 (base32
3766 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
3767 (build-system python-build-system)
3768 (arguments
3769 `(#:python ,python-2)) ; only Python 2.7 is supported
3770 (propagated-inputs
3771 `(("python2-numpy" ,python2-numpy)
3772 ("python2-scipy" ,python2-scipy)
3773 ("python2-pandas" ,python2-pandas)))
3774 (native-inputs
3775 `(("python2-cython" ,python2-cython)))
3776 (native-inputs
3777 `(("unzip" ,unzip)))
3778 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3779 (synopsis "Library for reading and manipulating genetic data")
3780 (description
3781 "PySnpTools is a library for reading and manipulating genetic data. It
3782 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3783 those files. It can also efficiently manipulate ranges of integers using set
3784 operators such as union, intersection, and difference.")
3785 (license license:asl2.0)))
3786
3787 (define-public python-rpy2
3788 (package
3789 (name "python-rpy2")
3790 (version "2.9.4")
3791 (source
3792 (origin
3793 (method url-fetch)
3794 (uri (pypi-uri "rpy2" version))
3795 (sha256
3796 (base32
3797 "0bl1d2qhavmlrvalir9hmkjh74w21vzkvc2sg3cbb162s10zfmxy"))))
3798 (build-system python-build-system)
3799 (arguments
3800 '(#:modules ((ice-9 ftw)
3801 (srfi srfi-1)
3802 (srfi srfi-26)
3803 (guix build utils)
3804 (guix build python-build-system))
3805 #:phases
3806 (modify-phases %standard-phases
3807 (replace 'check
3808 (lambda* (#:key outputs inputs #:allow-other-keys)
3809 (let ((cwd (getcwd)))
3810 (setenv "PYTHONPATH"
3811 (string-append cwd "/build/"
3812 (find (cut string-prefix? "lib" <>)
3813 (scandir (string-append cwd "/build")))
3814 ":"
3815 (getenv "PYTHONPATH"))))
3816 (invoke "python" "-m" "rpy2.tests" "-v"))))))
3817 (propagated-inputs
3818 `(("python-six" ,python-six)
3819 ("python-jinja2" ,python-jinja2)
3820 ("python-pytz" ,python-pytz)))
3821 (inputs
3822 `(("readline" ,readline)
3823 ("icu4c" ,icu4c)
3824 ("pcre" ,pcre)
3825 ("r-minimal" ,r-minimal)
3826 ("r-survival" ,r-survival)
3827 ("r-ggplot2" ,r-ggplot2)
3828 ("r-rsqlite" ,r-rsqlite)
3829 ("r-dplyr" ,r-dplyr)
3830 ("r-dbplyr" ,r-dbplyr)
3831 ("python-numpy" ,python-numpy)))
3832 (native-inputs
3833 `(("zlib" ,zlib)))
3834 (home-page "https://rpy2.bitbucket.io/")
3835 (synopsis "Python interface to the R language")
3836 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3837 low-level interface to R from Python, a proposed high-level interface,
3838 including wrappers to graphical libraries, as well as R-like structures and
3839 functions.")
3840 ;; Any of these licenses can be picked for the R interface. The whole
3841 ;; project is released under GPLv2+ according to the license declaration
3842 ;; in "setup.py".
3843 (license (list license:mpl2.0 license:gpl2+ license:lgpl2.1+))))
3844
3845 (define-public python-scipy
3846 (package
3847 (name "python-scipy")
3848 (version "1.0.1")
3849 (source
3850 (origin
3851 (method url-fetch)
3852 (uri (pypi-uri "scipy" version))
3853 (sha256
3854 (base32
3855 "1fj0r7bg0cfk5clvl57ga06y9bfh05iwlv1dqqs1r6pd89wccfc7"))))
3856 (build-system python-build-system)
3857 (propagated-inputs
3858 `(("python-numpy" ,python-numpy)
3859 ("python-matplotlib" ,python-matplotlib)
3860 ("python-pyparsing" ,python-pyparsing)))
3861 (inputs
3862 `(("lapack" ,lapack)
3863 ("openblas" ,openblas)))
3864 (native-inputs
3865 `(("python-cython" ,python-cython)
3866 ("python-pytest" ,python-pytest)
3867 ("python-sphinx" ,python-sphinx)
3868 ("python-numpydoc" ,python-numpydoc)
3869 ("gfortran" ,gfortran)
3870 ("perl" ,perl)
3871 ("which" ,which)))
3872 (outputs '("out" "doc"))
3873 (arguments
3874 `(#:phases
3875 (modify-phases %standard-phases
3876 (add-after 'unpack 'disable-broken-tests
3877 (lambda _
3878 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
3879 (("^( +)def test_threads_parallel\\(self\\):" m indent)
3880 (string-append indent
3881 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3882 m)))
3883 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
3884 (("^def test_parallel_threads\\(\\):" m)
3885 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3886 m)))
3887 #t))
3888 (add-before 'build 'configure-openblas
3889 (lambda* (#:key inputs #:allow-other-keys)
3890 (call-with-output-file "site.cfg"
3891 (lambda (port)
3892 (format port
3893 "[blas]
3894 libraries = openblas
3895 library_dirs = ~a/lib
3896 include_dirs = ~a/include
3897
3898 # backslash-n to make emacs happy
3899 \n[atlas]
3900 library_dirs = ~a/lib
3901 atlas_libs = openblas
3902 "
3903 (assoc-ref inputs "openblas")
3904 (assoc-ref inputs "openblas")
3905 (assoc-ref inputs "openblas"))))
3906 #t))
3907 (add-after 'install 'install-doc
3908 (lambda* (#:key inputs outputs #:allow-other-keys)
3909 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3910 (doc (string-append data "/doc/" ,name "-" ,version))
3911 (html (string-append doc "/html"))
3912 (pyver ,(string-append "PYVER=" (version-major+minor
3913 (package-version python))))
3914 ;; By default it tries to run sphinx-build through the Python
3915 ;; interpreter which won't work with our shell wrapper.
3916 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
3917 ;; Make installed package available for building the
3918 ;; documentation
3919 (add-installed-pythonpath inputs outputs)
3920 (with-directory-excursion "doc"
3921 ;; Fix generation of images for mathematical expressions.
3922 (substitute* (find-files "source" "conf\\.py")
3923 (("pngmath_use_preview = True")
3924 "pngmath_use_preview = False"))
3925 (mkdir-p html)
3926 (invoke "make" "html" pyver sphinxbuild)
3927 (with-directory-excursion "build/html"
3928 (for-each (lambda (file)
3929 (let* ((dir (dirname file))
3930 (tgt-dir (string-append html "/" dir)))
3931 (install-file file html)))
3932 (find-files "." ".*")))))
3933 #t))
3934 ;; Tests can only be run after the library has been installed and not
3935 ;; within the source directory.
3936 (delete 'check)
3937 (add-after 'install 'check
3938 (lambda* (#:key inputs outputs #:allow-other-keys)
3939 (add-installed-pythonpath inputs outputs)
3940 (with-directory-excursion "/tmp"
3941 (invoke "python" "-c"
3942 "import scipy; scipy.test(verbose=2)")))))))
3943 (home-page "https://www.scipy.org/")
3944 (synopsis "The Scipy library provides efficient numerical routines")
3945 (description "The SciPy library is one of the core packages that make up
3946 the SciPy stack. It provides many user-friendly and efficient numerical
3947 routines such as routines for numerical integration and optimization.")
3948 (properties `((python2-variant . ,(delay python2-scipy))))
3949 (license license:bsd-3)))
3950
3951 (define-public python2-scipy
3952 (package-with-python2
3953 (strip-python2-variant python-scipy)))
3954
3955 (define-public python-socksipy-branch
3956 (package
3957 (name "python-socksipy-branch")
3958 (version "1.01")
3959 (source
3960 (origin
3961 (method url-fetch)
3962 (uri (pypi-uri "SocksiPy-branch" version))
3963 (sha256
3964 (base32
3965 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3966 (build-system python-build-system)
3967 (arguments
3968 `(#:tests? #f)) ; There are no tests
3969 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3970 (synopsis "Python SOCKS module")
3971 (description
3972 "SocksiPy - A Python SOCKS client module. It provides a
3973 socket-like interface that supports connections to any TCP
3974 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3975 The original version was developed by Dan Haim, this is a
3976 branch created by Mario Vilas to address some open issues,
3977 as the original project seems to have been abandoned circa 2007.")
3978 (license license:bsd-3)))
3979
3980 (define-public python2-socksipy-branch
3981 (package-with-python2 python-socksipy-branch))
3982
3983 (define-public python-pycodestyle
3984 (package
3985 (name "python-pycodestyle")
3986 (version "2.3.1")
3987 (source
3988 (origin
3989 (method url-fetch)
3990 (uri (pypi-uri "pycodestyle" version))
3991 (sha256
3992 (base32
3993 "0rk78b66p57ala26mdldl9lafr48blv5s659sah9q50qnfjmc8k8"))))
3994 (build-system python-build-system)
3995 (home-page "https://pycodestyle.readthedocs.io/")
3996 (synopsis "Python style guide checker")
3997 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3998 Python code against some of the style conventions in
3999 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4000 (license license:expat)))
4001
4002 (define-public python2-pycodestyle
4003 (package-with-python2 python-pycodestyle))
4004
4005 (define-public python-multidict
4006 (package
4007 (name "python-multidict")
4008 (version "4.2.0")
4009 (source
4010 (origin
4011 (method url-fetch)
4012 (uri (pypi-uri "multidict" version))
4013 (sha256
4014 (base32
4015 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4016 (build-system python-build-system)
4017 (native-inputs
4018 `(("python-pytest" ,python-pytest)
4019 ("python-pytest-runner" ,python-pytest-runner)))
4020 (home-page "https://github.com/aio-libs/multidict/")
4021 (synopsis "Multidict implementation")
4022 (description "Multidict is dict-like collection of key-value pairs
4023 where key might be occurred more than once in the container.")
4024 (license license:asl2.0)))
4025
4026 (define-public python-orderedmultidict
4027 (package
4028 (name "python-orderedmultidict")
4029 (version "0.7.11")
4030 (source
4031 (origin
4032 (method url-fetch)
4033 (uri (pypi-uri "orderedmultidict" version))
4034 (sha256
4035 (base32
4036 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4037 (build-system python-build-system)
4038 (arguments
4039 `(#:phases
4040 (modify-phases %standard-phases
4041 (add-after 'unpack 'fix-tests
4042 (lambda _
4043 ;; The package uses nosetest for running the tests.
4044 ;; Adding this initfile allows to run the test suite
4045 ;; without requiring nosetest.
4046 (zero? (system* "touch" "tests/__init__.py")))))))
4047 (propagated-inputs
4048 `(("python-six" ,python-six)))
4049 (native-inputs
4050 `(("python-pycodestyle" ,python-pycodestyle)))
4051 (home-page "https://github.com/gruns/orderedmultidict")
4052 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4053 (description "This package contains a library for ordered multivalue
4054 dictionaries. A multivalue dictionary is a dictionary that can store
4055 multiple values for the same key. An ordered multivalue dictionary is a
4056 multivalue dictionary that retains the order of insertions and deletions.")
4057 (license license:unlicense)))
4058
4059 (define-public python2-orderedmultidict
4060 (package-with-python2 python-orderedmultidict))
4061
4062 (define-public python-autopep8
4063 (package
4064 (name "python-autopep8")
4065 (version "1.3.5")
4066 (source
4067 (origin
4068 (method url-fetch)
4069 (uri (pypi-uri "autopep8" version))
4070 (sha256
4071 (base32
4072 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4073 (build-system python-build-system)
4074 (propagated-inputs
4075 `(("python-pycodestyle" ,python-pycodestyle)))
4076 (home-page "https://github.com/hhatto/autopep8")
4077 (synopsis "Format Python code according to the PEP 8 style guide")
4078 (description
4079 "@code{autopep8} automatically formats Python code to conform to
4080 the PEP 8 style guide. It uses the pycodestyle utility to determine
4081 what parts of the code needs to be formatted. @code{autopep8} is
4082 capable of fixing most of the formatting issues that can be reported
4083 by pycodestyle.")
4084 (license (license:non-copyleft
4085 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4086
4087 (define-public python2-autopep8
4088 (package-with-python2 python-autopep8))
4089
4090 (define-public python-distutils-extra
4091 (package
4092 (name "python-distutils-extra")
4093 (version "2.38")
4094 (source
4095 (origin
4096 (method url-fetch)
4097 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4098 version "/+download/python-distutils-extra-"
4099 version ".tar.gz"))
4100 (sha256
4101 (base32
4102 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4103 (build-system python-build-system)
4104 (home-page "https://launchpad.net/python-distutils-extra/")
4105 (synopsis "Enhancements to Python's distutils")
4106 (description
4107 "The python-distutils-extra module enables you to easily integrate
4108 gettext support, themed icons, and scrollkeeper-based documentation into
4109 Python's distutils.")
4110 (license license:gpl2)))
4111
4112 (define-public python2-distutils-extra
4113 (package-with-python2 python-distutils-extra))
4114
4115 (define-public python2-elib.intl
4116 (package
4117 (name "python2-elib.intl")
4118 (version "0.0.3")
4119 (source
4120 (origin
4121 ;; This project doesn't tag releases or publish tarballs, so we take
4122 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4123 (method git-fetch)
4124 (uri (git-reference
4125 (url "https://github.com/dieterv/elib.intl.git")
4126 (commit "d09997cfef")))
4127 (file-name (string-append name "-" version "-checkout"))
4128 (sha256
4129 (base32
4130 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4131 (build-system python-build-system)
4132 (arguments
4133 ;; incompatible with Python 3 (exception syntax)
4134 `(#:python ,python-2
4135 #:tests? #f))
4136 (home-page "https://github.com/dieterv/elib.intl")
4137 (synopsis "Enhanced internationalization for Python")
4138 (description
4139 "The elib.intl module provides enhanced internationalization (I18N)
4140 services for your Python modules and applications.")
4141 (license license:lgpl3+)))
4142
4143 (define-public python-olefile
4144 (package
4145 (name "python-olefile")
4146 (version "0.44")
4147 (source
4148 (origin
4149 (method url-fetch)
4150 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
4151 version ".tar.gz"))
4152 (file-name (string-append name "-" version ".tar.gz"))
4153 (sha256
4154 (base32
4155 "1wmxbrhyqjry2000zx0zdhqdqxhgi06nz7sbzjlh222q2zjv1gpj"))))
4156 (build-system python-build-system)
4157 (home-page
4158 "https://www.decalage.info/python/olefileio")
4159 (synopsis "Read and write Microsoft OLE2 files.")
4160 (description
4161 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4162 Storage or Compound Document, Microsoft Office). It is an improved version of
4163 the OleFileIO module from PIL, the Python Image Library.")
4164 (license license:bsd-3)))
4165
4166 (define-public python2-olefile
4167 (package-with-python2 python-olefile))
4168
4169 (define-public python-pillow
4170 (package
4171 (name "python-pillow")
4172 (version "4.3.0")
4173 (source
4174 (origin
4175 (method url-fetch)
4176 (uri (pypi-uri "Pillow" version))
4177 (sha256
4178 (base32
4179 "09xmn7rl6840sli2iz1k3fgxfgmri2nqz6vkinmb9mgg8ifp2z59"))
4180 (patch-flags '("-p1" "--binary"))
4181 (patches (search-patches "python-pillow-fix-failing-tests.patch"))))
4182 (build-system python-build-system)
4183 (native-inputs
4184 `(("python-nose" ,python-nose)))
4185 (inputs
4186 `(("freetype" ,freetype)
4187 ("lcms" ,lcms)
4188 ("zlib" ,zlib)
4189 ("libjpeg" ,libjpeg)
4190 ("openjpeg" ,openjpeg)
4191 ("libtiff" ,libtiff)
4192 ("libwebp" ,libwebp)))
4193 (propagated-inputs
4194 `(("python-olefile" ,python-olefile)))
4195 (arguments
4196 `(#:phases (modify-phases %standard-phases
4197 (add-after
4198 'install 'check-installed
4199 (lambda* (#:key outputs inputs #:allow-other-keys)
4200 (begin
4201 (setenv "HOME" (getcwd))
4202 ;; Make installed package available for running the
4203 ;; tests
4204 (add-installed-pythonpath inputs outputs)
4205 (and (zero? (system* "python" "selftest.py"
4206 "--installed"))
4207 (zero? (system* "python" "test-installed.py"))))))
4208 (delete 'check))))
4209 (home-page "https://pypi.python.org/pypi/Pillow")
4210 (synopsis "Fork of the Python Imaging Library")
4211 (description
4212 "The Python Imaging Library adds image processing capabilities to your
4213 Python interpreter. This library provides extensive file format support, an
4214 efficient internal representation, and fairly powerful image processing
4215 capabilities. The core image library is designed for fast access to data
4216 stored in a few basic pixel formats. It should provide a solid foundation for
4217 a general image processing tool.")
4218 (license (license:x11-style
4219 "http://www.pythonware.com/products/pil/license.htm"
4220 "The PIL Software License"))))
4221
4222 (define-public python2-pillow
4223 (package-with-python2 python-pillow))
4224
4225 (define-public python-pycparser
4226 (package
4227 (name "python-pycparser")
4228 (version "2.17")
4229 (source
4230 (origin
4231 (method url-fetch)
4232 (uri (pypi-uri "pycparser" version))
4233 (sha256
4234 (base32
4235 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
4236 (outputs '("out" "doc"))
4237 (build-system python-build-system)
4238 (native-inputs
4239 `(("pkg-config" ,pkg-config)))
4240 (arguments
4241 `(#:phases
4242 (modify-phases %standard-phases
4243 (replace 'check
4244 (lambda _
4245 (with-directory-excursion "tests"
4246 (zero? (system* "python" "all_tests.py")))))
4247 (add-after 'install 'install-doc
4248 (lambda* (#:key outputs #:allow-other-keys)
4249 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4250 (doc (string-append data "/doc/" ,name "-" ,version))
4251 (examples (string-append doc "/examples")))
4252 (mkdir-p examples)
4253 (for-each (lambda (file)
4254 (copy-file (string-append "." file)
4255 (string-append doc file)))
4256 '("/README.rst" "/CHANGES" "/LICENSE"))
4257 (copy-recursively "examples" examples)))))))
4258 (home-page "https://github.com/eliben/pycparser")
4259 (synopsis "C parser in Python")
4260 (description
4261 "Pycparser is a complete parser of the C language, written in pure Python
4262 using the PLY parsing library. It parses C code into an AST and can serve as
4263 a front-end for C compilers or analysis tools.")
4264 (license license:bsd-3)))
4265
4266 (define-public python2-pycparser
4267 (package-with-python2 python-pycparser))
4268
4269 (define-public python-xcffib
4270 (package
4271 (name "python-xcffib")
4272 (version "0.5.1")
4273 (source
4274 (origin
4275 (method url-fetch)
4276 (uri (pypi-uri "xcffib" version))
4277 (sha256
4278 (base32
4279 "09gbnmr5vn58mm8xi3fmd7fz6743cks6c46dphnxzwax6zsxmy60"))))
4280 (build-system python-build-system)
4281 (inputs
4282 `(("libxcb" ,libxcb)))
4283 (propagated-inputs
4284 `(("python-cffi" ,python-cffi) ; used at run time
4285 ("python-six" ,python-six)))
4286 (arguments
4287 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4288 #:tests? #f
4289 #:phases
4290 (modify-phases %standard-phases
4291 (add-after 'unpack 'fix-libxcb-path
4292 (lambda* (#:key inputs #:allow-other-keys)
4293 (let ((libxcb (assoc-ref inputs "libxcb")))
4294 (substitute* '("xcffib/__init__.py")
4295 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4296 #t)))
4297 (add-after 'install 'install-doc
4298 (lambda* (#:key outputs #:allow-other-keys)
4299 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4300 "/doc/" ,name "-" ,version)))
4301 (mkdir-p doc)
4302 (copy-file "README.md"
4303 (string-append doc "/README.md"))
4304 #t))))))
4305 (home-page "https://github.com/tych0/xcffib")
4306 (synopsis "XCB Python bindings")
4307 (description
4308 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4309 support for Python 3 and PyPy. It is based on cffi.")
4310 (license license:expat)))
4311
4312 (define-public python2-xcffib
4313 (package-with-python2 python-xcffib))
4314
4315 (define-public python-cairocffi
4316 (package
4317 (name "python-cairocffi")
4318 (version "0.8.0")
4319 (source
4320 (origin
4321 (method url-fetch)
4322 ;; The archive on pypi is missing the 'utils' directory!
4323 (uri (string-append "https://github.com/Kozea/cairocffi/archive/v"
4324 version ".tar.gz"))
4325 (file-name (string-append name "-" version ".tar.gz"))
4326 (sha256
4327 (base32
4328 "1rk2dvy3fxrga6bvvxc2fi5lbaynm5h4a0w0aaxyn3bc77rszjg9"))
4329 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4330 (build-system python-build-system)
4331 (outputs '("out" "doc"))
4332 (inputs
4333 `(("glib" ,glib)
4334 ("gtk+" ,gtk+)
4335 ("gdk-pixbuf" ,gdk-pixbuf)
4336 ("cairo" ,cairo)
4337 ("pango" ,pango)))
4338 (native-inputs
4339 `(("pkg-config" ,pkg-config)
4340 ("python-pytest" ,python-pytest)
4341 ("python-sphinx" ,python-sphinx)
4342 ("python-docutils" ,python-docutils)))
4343 (propagated-inputs
4344 `(("python-xcffib" ,python-xcffib))) ; used at run time
4345 (arguments
4346 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
4347 #:tests? #t
4348 #:phases
4349 (modify-phases %standard-phases
4350 (add-after 'unpack 'patch-paths
4351 (lambda* (#:key inputs outputs #:allow-other-keys)
4352 (substitute* (find-files "." "\\.py$")
4353 (("dlopen\\(ffi, 'cairo'")
4354 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4355 "/lib/libcairo.so.2'"))
4356 (("dlopen\\(ffi, 'gdk-3'")
4357 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4358 "/lib/libgtk-3.so.0'"))
4359 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4360 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4361 "/lib/libgdk_pixbuf-2.0.so.0'"))
4362 (("dlopen\\(ffi, 'glib-2.0'")
4363 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4364 "/lib/libglib-2.0.so.0'"))
4365 (("dlopen\\(ffi, 'gobject-2.0'")
4366 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4367 "/lib/libgobject-2.0.so.0'"))
4368 (("dlopen\\(ffi, 'pangocairo-1.0'")
4369 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4370 "/lib/libpangocairo-1.0.so.0'"))
4371 (("dlopen\\(ffi, 'pango-1.0'")
4372 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4373 "/lib/libpango-1.0.so.0'")))
4374 #t))
4375 (add-after 'install 'install-doc
4376 (lambda* (#:key inputs outputs #:allow-other-keys)
4377 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4378 (doc (string-append data "/doc/" ,name "-" ,version))
4379 (html (string-append doc "/html")))
4380 (setenv "LD_LIBRARY_PATH"
4381 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4382 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4383 (setenv "LANG" "en_US.UTF-8")
4384 (mkdir-p html)
4385 (for-each (lambda (file)
4386 (copy-file (string-append "." file)
4387 (string-append doc file)))
4388 '("/README.rst" "/CHANGES" "/LICENSE"))
4389 (system* "python" "setup.py" "build_sphinx")
4390 (copy-recursively "docs/_build/html" html)
4391 #t))))))
4392 (home-page "https://github.com/Kozea/cairocffi")
4393 (synopsis "Python bindings and object-oriented API for Cairo")
4394 (description
4395 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4396 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4397 graphics library with support for multiple backends including image buffers,
4398 PNG, PostScript, PDF, and SVG file output.")
4399 (license license:bsd-3)))
4400
4401 (define-public python2-cairocffi
4402 (package-with-python2 python-cairocffi))
4403
4404 (define-public python-decorator
4405 (package
4406 (name "python-decorator")
4407 (version "4.3.0")
4408 (source
4409 (origin
4410 (method url-fetch)
4411 (uri (pypi-uri "decorator" version))
4412 (sha256
4413 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4414 (build-system python-build-system)
4415 (home-page "https://pypi.python.org/pypi/decorator/")
4416 (synopsis "Python module to simplify usage of decorators")
4417 (description
4418 "The aim of the decorator module is to simplify the usage of decorators
4419 for the average programmer, and to popularize decorators usage giving examples
4420 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4421 etc. The core of this module is a decorator factory.")
4422 (license license:expat)))
4423
4424 (define-public python2-decorator
4425 (package-with-python2 python-decorator))
4426
4427 (define-public python-drmaa
4428 (package
4429 (name "python-drmaa")
4430 (version "0.7.7")
4431 (source
4432 (origin
4433 (method url-fetch)
4434 (uri (pypi-uri "drmaa" version))
4435 (sha256
4436 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4437 (build-system python-build-system)
4438 ;; The test suite requires libdrmaa which is provided by the cluster
4439 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4440 ;; should be set to the path of the libdrmaa library.
4441 (arguments '(#:tests? #f))
4442 (native-inputs
4443 `(("python-nose" ,python-nose)))
4444 (home-page "https://pypi.python.org/pypi/drmaa")
4445 (synopsis "Python bindings for the DRMAA library")
4446 (description
4447 "A Python package for Distributed Resource Management (DRM) job
4448 submission and control. This package is an implementation of the DRMAA 1.0
4449 Python language binding specification.")
4450 (license license:bsd-3)))
4451
4452 (define-public python2-drmaa
4453 (package-with-python2 python-drmaa))
4454
4455 (define-public python-grako
4456 (package
4457 (name "python-grako")
4458 (version "3.99.9")
4459 (source
4460 (origin
4461 (method url-fetch)
4462 (uri
4463 (pypi-uri "grako" version ".zip"))
4464 (sha256
4465 (base32
4466 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4467 (build-system python-build-system)
4468 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4469 (native-inputs
4470 `(("unzip" ,unzip)
4471 ("python-pytest" ,python-pytest)
4472 ("python-pytest-runner" ,python-pytest-runner)))
4473 (home-page "https://bitbucket.org/neogeny/grako")
4474 (synopsis "EBNF parser generator")
4475 (description
4476 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4477 memoizing PEG/Packrat parser in Python.")
4478 (license license:bsd-3)))
4479
4480 (define-public python2-grako
4481 (package-with-python2 python-grako))
4482
4483 (define-public python-gridmap
4484 (package
4485 (name "python-gridmap")
4486 (version "0.13.0")
4487 (source
4488 (origin
4489 (method url-fetch)
4490 (uri (string-append
4491 "https://github.com/pygridtools/gridmap/archive/v"
4492 version ".tar.gz"))
4493 (file-name (string-append name "-" version ".tar.gz"))
4494 (sha256
4495 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4496 (build-system python-build-system)
4497 (arguments
4498 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4499 (propagated-inputs
4500 `(("python-psutil" ,python-psutil)
4501 ("python-drmaa" ,python-drmaa)
4502 ("python-pyzmq" ,python-pyzmq)))
4503 (home-page "https://github.com/pygridtools/gridmap")
4504 (synopsis "Create jobs on a cluster directly from Python")
4505 (description
4506 "Gridmap is a Python package to allow you to easily create jobs on the
4507 cluster directly from Python. You can directly map Python functions onto the
4508 cluster without needing to write any wrapper code yourself.")
4509 (license license:gpl3+)))
4510
4511 (define-public python2-gridmap
4512 (package-with-python2 python-gridmap))
4513
4514 (define-public python-honcho
4515 (package
4516 (name "python-honcho")
4517 (version "1.0.1")
4518 (source
4519 (origin
4520 (method url-fetch)
4521 (uri (string-append
4522 "https://github.com/nickstenning/honcho/archive/v"
4523 version ".tar.gz"))
4524 (file-name (string-append name "-" version ".tar.gz"))
4525 (sha256
4526 (base32 "0zizn61n5z5hq421hkypk9pw8s6fpxw30f4hsg7k4ivwzy3gjw9j"))))
4527 (build-system python-build-system)
4528 (native-inputs
4529 `(("python-pytest" ,python-pytest)
4530 ("python-mock" ,python-mock)
4531 ("python-tox" ,python-tox)
4532 ("which" ,which))) ;for tests
4533 (propagated-inputs
4534 `(("python-jinja2" ,python-jinja2)))
4535 (arguments
4536 `(#:phases
4537 (modify-phases %standard-phases
4538 (delete 'check)
4539 (add-after 'install 'check
4540 (lambda* (#:key outputs inputs #:allow-other-keys)
4541 ;; fix honcho path in testsuite
4542 (substitute* "tests/conftest.py"
4543 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4544 "/bin/honcho" "'")))
4545 ;; It's easier to run tests after install.
4546 ;; Make installed package available for running the tests
4547 (add-installed-pythonpath inputs outputs)
4548 (zero? (system* "py.test" "-v")))))))
4549 (home-page "https://github.com/nickstenning/honcho")
4550 (synopsis "Manage Procfile-based applications")
4551 (description
4552 "A Procfile is a file which describes how to run an application
4553 consisting of serveral processes. honcho starts all listed processes.
4554 The output of all running processes is collected by honcho and
4555 displayed.")
4556 (license license:expat)))
4557
4558 (define-public python2-honcho
4559 (package-with-python2 python-honcho))
4560
4561 (define-public python-pexpect
4562 (package
4563 (name "python-pexpect")
4564 (version "4.2.1")
4565 (source
4566 (origin
4567 (method url-fetch)
4568 (uri (pypi-uri "pexpect" version))
4569 (sha256
4570 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
4571 (build-system python-build-system)
4572 (arguments
4573 `(#:phases
4574 (modify-phases %standard-phases
4575 (add-before 'check 'prepare-tests
4576 (lambda _
4577 (substitute* (find-files "tests")
4578 (("/bin/ls") (which "ls"))
4579 (("/bin/echo") (which "echo"))
4580 (("/bin/which") (which "which"))
4581 ;; Many tests try to use the /bin directory which
4582 ;; is not present in the build environment.
4583 ;; Use one that's non-empty and unlikely to change.
4584 (("/bin'") "/dev'"))
4585 ;; XXX: Socket connection test gets "Connection reset by peer".
4586 ;; Why does it not work? Delete for now.
4587 (delete-file "tests/test_socket.py")
4588 #t))
4589 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4590 (native-inputs
4591 `(("python-nose" ,python-nose)
4592 ("python-pytest" ,python-pytest)
4593 ("man-db" ,man-db)
4594 ("which" ,which)
4595 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4596 (propagated-inputs
4597 `(("python-ptyprocess" ,python-ptyprocess)))
4598 (home-page "http://pexpect.readthedocs.org/")
4599 (synopsis "Controlling interactive console applications")
4600 (description
4601 "Pexpect is a pure Python module for spawning child applications;
4602 controlling them; and responding to expected patterns in their output.
4603 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4604 child application and control it as if a human were typing commands.")
4605 (license license:isc)))
4606
4607 (define-public python2-pexpect
4608 (package-with-python2 python-pexpect))
4609
4610 (define-public python-setuptools-scm
4611 (package
4612 (name "python-setuptools-scm")
4613 (version "1.15.6")
4614 (source (origin
4615 (method url-fetch)
4616 (uri (pypi-uri "setuptools_scm" version))
4617 (sha256
4618 (base32
4619 "0pzvfmx8s20yrgkgwfbxaspz2x1g38qv61jpm0ns91lrb22ldas9"))))
4620 (build-system python-build-system)
4621 (home-page "https://github.com/pypa/setuptools_scm/")
4622 (synopsis "Manage Python package versions in SCM metadata")
4623 (description
4624 "Setuptools_scm handles managing your Python package versions in
4625 @dfn{software configuration management} (SCM) metadata instead of declaring
4626 them as the version argument or in a SCM managed file.")
4627 (license license:expat)))
4628
4629 (define-public python2-setuptools-scm
4630 (package-with-python2 python-setuptools-scm))
4631
4632 (define-public python-pathpy
4633 (package
4634 (name "python-pathpy")
4635 (version "11.0.1")
4636 (source
4637 (origin
4638 (method url-fetch)
4639 (uri (pypi-uri "path.py" version))
4640 (sha256
4641 (base32 "07x15v8c7ry9bvycw294c9yq6ky9v2b0dalvgi6rn38ilh69vsz7"))))
4642 ;; (outputs '("out" "doc"))
4643 (build-system python-build-system)
4644 (propagated-inputs
4645 `(("python-appdirs" ,python-appdirs)))
4646 (native-inputs
4647 `(("python-setuptools-scm" ,python-setuptools-scm)
4648 ("python-sphinx" ,python-sphinx)
4649 ("python-rst.linker" ,python-rst.linker)
4650 ("python-pytest" ,python-pytest)
4651 ("python-pytest-runner" ,python-pytest-runner)))
4652 (arguments
4653 ;; FIXME: Documentation and tests require "jaraco.packaging".
4654 `(#:tests? #f))
4655 ;; #:phases
4656 ;; (modify-phases %standard-phases
4657 ;; (add-after 'build 'build-doc
4658 ;; (lambda _
4659 ;; (setenv "LANG" "en_US.UTF-8")
4660 ;; (zero? (system* "python" "setup.py" "build_sphinx"))))
4661 ;; (add-after 'install 'install-doc
4662 ;; (lambda* (#:key outputs #:allow-other-keys)
4663 ;; (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4664 ;; (doc (string-append data "/doc/" ,name "-" ,version))
4665 ;; (html (string-append doc "/html")))
4666 ;; (mkdir-p html)
4667 ;; (for-each (lambda (file)
4668 ;; (copy-file file (string-append doc "/" file)))
4669 ;; '("README.rst" "CHANGES.rst"))
4670 ;; (copy-recursively "build/sphinx/html" html)))))))
4671 (home-page "https://github.com/jaraco/path.py")
4672 (synopsis "Python module wrapper for built-in os.path")
4673 (description
4674 "@code{path.py} implements path objects as first-class entities, allowing
4675 common operations on files to be invoked on those path objects directly.")
4676 (license license:expat)))
4677
4678 (define-public python2-pathpy
4679 (package-with-python2 python-pathpy))
4680
4681 (define-public python-simplegeneric
4682 (package
4683 (name "python-simplegeneric")
4684 (version "0.8.1")
4685 (source
4686 (origin
4687 (method url-fetch)
4688 (uri (string-append "https://pypi.python.org/packages/source/s/"
4689 "simplegeneric/simplegeneric-" version ".zip"))
4690 (sha256
4691 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4692 (build-system python-build-system)
4693 (native-inputs
4694 `(("unzip" ,unzip)))
4695 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4696 (synopsis "Python module for simple generic functions")
4697 (description
4698 "The simplegeneric module lets you define simple single-dispatch generic
4699 functions, akin to Python’s built-in generic functions like @code{len()},
4700 @code{iter()} and so on. However, instead of using specially-named methods,
4701 these generic functions use simple lookup tables, akin to those used by
4702 e.g. @code{pickle.dump()} and other generic functions found in the Python
4703 standard library.")
4704 (license license:zpl2.1)))
4705
4706 (define-public python2-simplegeneric
4707 (package-with-python2 python-simplegeneric))
4708
4709 (define-public python-ipython-genutils
4710 ;; TODO: This package is retired, check if can be removed, see description.
4711 (package
4712 (name "python-ipython-genutils")
4713 (version "0.1.0")
4714 (source
4715 (origin
4716 (method url-fetch)
4717 (uri (string-append "https://pypi.python.org/packages/source/i/"
4718 "ipython_genutils/ipython_genutils-"
4719 version ".tar.gz"))
4720 (sha256
4721 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4722 (build-system python-build-system)
4723 (arguments `(#:tests? #f)) ; no tests
4724 (home-page "https://ipython.org")
4725 (synopsis "Vestigial utilities from IPython")
4726 (description
4727 "This package provides retired utilities from IPython. No packages
4728 outside IPython/Jupyter should depend on it.
4729
4730 This package shouldn't exist. It contains some common utilities shared by
4731 Jupyter and IPython projects during The Big Split. As soon as possible, those
4732 packages will remove their dependency on this, and this package will go
4733 away.")
4734 (license license:bsd-3)))
4735
4736 (define-public python2-ipython-genutils
4737 (package-with-python2 python-ipython-genutils))
4738
4739 (define-public python-traitlets
4740 (package
4741 (name "python-traitlets")
4742 (version "4.2.0")
4743 (source
4744 (origin
4745 (method url-fetch)
4746 (uri (pypi-uri "traitlets" version))
4747 (sha256
4748 (base32
4749 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
4750 (build-system python-build-system)
4751 (arguments
4752 `(#:phases
4753 (modify-phases %standard-phases
4754 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4755 (propagated-inputs
4756 `(("python-ipython-genutils" ,python-ipython-genutils)
4757 ("python-decorator" ,python-decorator)))
4758 (native-inputs
4759 `(("python-mock" ,python-mock)
4760 ("python-nose" ,python-nose)))
4761 (home-page "https://ipython.org")
4762 (synopsis "Configuration system for Python applications")
4763 (description
4764 "Traitlets is a framework that lets Python classes have attributes with
4765 type checking, dynamically calculated default values, and ‘on change’
4766 callbacks. The package also includes a mechanism to use traitlets for
4767 configuration, loading values from files or from command line arguments. This
4768 is a distinct layer on top of traitlets, so you can use traitlets in your code
4769 without using the configuration machinery.")
4770 (license license:bsd-3)))
4771
4772 (define-public python2-traitlets
4773 (package-with-python2 python-traitlets))
4774
4775 (define-public python-jupyter-core
4776 (package
4777 (name "python-jupyter-core")
4778 (version "4.4.0")
4779 (source
4780 (origin
4781 (method url-fetch)
4782 (uri (string-append (pypi-uri "jupyter_core" version)))
4783 (sha256
4784 (base32
4785 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
4786 (build-system python-build-system)
4787 ;; FIXME: not sure how to run the tests
4788 (arguments `(#:tests? #f))
4789 (propagated-inputs
4790 `(("python-traitlets" ,python-traitlets)))
4791 (home-page "http://jupyter.org/")
4792 (synopsis "Jupyter base package")
4793 (description
4794 "Jupyter core is the base package on which Jupyter projects rely.")
4795 (license license:bsd-3)))
4796
4797 (define-public python2-jupyter-core
4798 (package-with-python2 python-jupyter-core))
4799
4800 (define-public python-jupyter-client
4801 (package
4802 (name "python-jupyter-client")
4803 (version "4.4.0")
4804 (source
4805 (origin
4806 (method url-fetch)
4807 (uri (pypi-uri "jupyter_client" version))
4808 (sha256
4809 (base32
4810 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4811 (build-system python-build-system)
4812 ;; Tests fail because of missing native python kernel which I assume is
4813 ;; provided by the ipython package, which we cannot use because it would
4814 ;; cause a dependency cycle.
4815 (arguments `(#:tests? #f))
4816 (propagated-inputs
4817 `(("python-pyzmq" ,python-pyzmq)
4818 ("python-traitlets" ,python-traitlets)
4819 ("python-jupyter-core" ,python-jupyter-core)))
4820 (home-page "http://jupyter.org/")
4821 (synopsis "Jupyter protocol implementation and client libraries")
4822 (description
4823 "The @code{jupyter_client} package contains the reference implementation
4824 of the Jupyter protocol. It also provides client and kernel management APIs
4825 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4826 installing @code{kernelspec}s for use with Jupyter frontends.")
4827 (license license:bsd-3)))
4828
4829 (define-public python2-jupyter-client
4830 (package-with-python2 python-jupyter-client))
4831
4832 (define-public python-ipykernel
4833 (package
4834 (name "python-ipykernel")
4835 (version "4.5.2")
4836 (source
4837 (origin
4838 (method url-fetch)
4839 (uri (pypi-uri "ipykernel" version))
4840 (sha256
4841 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
4842 (build-system python-build-system)
4843 ;; The tests load a submodule of IPython. However, IPython itself depends
4844 ;; on ipykernel.
4845 (arguments `(#:tests? #f))
4846 (propagated-inputs
4847 ;; imported at runtime during connect
4848 `(("python-jupyter-client" ,python-jupyter-client)))
4849 (home-page "https://ipython.org")
4850 (synopsis "IPython Kernel for Jupyter")
4851 (description
4852 "This package provides the IPython kernel for Jupyter.")
4853 (license license:bsd-3)))
4854
4855 (define-public python2-ipykernel
4856 (package-with-python2 python-ipykernel))
4857
4858 (define-public python-ipython
4859 (package
4860 (name "python-ipython")
4861 (version "5.5.0")
4862 (source
4863 (origin
4864 (method url-fetch)
4865 (uri (pypi-uri "ipython" version ".tar.gz"))
4866 (sha256
4867 (base32 "03qmzpfy00if10i9k8fjkam1s4xg22j73f933x5d228z9n4rwik6"))))
4868 (build-system python-build-system)
4869 (outputs '("out" "doc"))
4870 (propagated-inputs
4871 `(("python-pyzmq" ,python-pyzmq)
4872 ("python-prompt-toolkit" ,python-prompt-toolkit)
4873 ("python-terminado" ,python-terminado)
4874 ("python-matplotlib" ,python-matplotlib)
4875 ("python-numpy" ,python-numpy)
4876 ("python-numpydoc" ,python-numpydoc)
4877 ("python-jinja2" ,python-jinja2)
4878 ("python-jupyter-console"
4879 ;; The python-ipython and python-jupyter-console require each
4880 ;; other. To get the functionality in both packages working, strip
4881 ;; down the python-jupyter-console package when using it as an input
4882 ;; to python-ipython.
4883 ,python-jupyter-console-minimal)
4884 ("python-mistune" ,python-mistune)
4885 ("python-pexpect" ,python-pexpect)
4886 ("python-pickleshare" ,python-pickleshare)
4887 ("python-simplegeneric" ,python-simplegeneric)
4888 ("python-jsonschema" ,python-jsonschema)
4889 ("python-traitlets" ,python-traitlets)
4890 ("python-ipykernel" ,python-ipykernel)
4891 ("python-nbformat" ,python-nbformat)
4892 ("python-pygments" ,python-pygments)))
4893 (inputs
4894 `(("readline" ,readline)
4895 ("which" ,which)))
4896 (native-inputs
4897 `(("graphviz" ,graphviz)
4898 ("pkg-config" ,pkg-config)
4899 ("python-requests" ,python-requests) ;; for tests
4900 ("python-testpath" ,python-testpath)
4901 ("python-nose" ,python-nose)
4902 ("python-sphinx" ,python-sphinx)
4903 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
4904 ;; FIXME: It's possible that a smaller union would work just as well.
4905 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
4906 texlive-fonts-ec
4907 texlive-generic-ifxetex
4908 texlive-generic-pdftex
4909 texlive-latex-amsfonts
4910 texlive-latex-capt-of
4911 texlive-latex-cmap
4912 texlive-latex-environ
4913 texlive-latex-eqparbox
4914 texlive-latex-etoolbox
4915 texlive-latex-expdlist
4916 texlive-latex-fancyhdr
4917 texlive-latex-fancyvrb
4918 texlive-latex-fncychap
4919 texlive-latex-float
4920 texlive-latex-framed
4921 texlive-latex-geometry
4922 texlive-latex-graphics
4923 texlive-latex-hyperref
4924 texlive-latex-mdwtools
4925 texlive-latex-multirow
4926 texlive-latex-oberdiek
4927 texlive-latex-parskip
4928 texlive-latex-preview
4929 texlive-latex-tabulary
4930 texlive-latex-threeparttable
4931 texlive-latex-titlesec
4932 texlive-latex-trimspaces
4933 texlive-latex-ucs
4934 texlive-latex-upquote
4935 texlive-latex-url
4936 texlive-latex-varwidth
4937 texlive-latex-wrapfig)))
4938 ("texinfo" ,texinfo)))
4939 (arguments
4940 `(#:phases
4941 (modify-phases %standard-phases
4942 (add-after
4943 'install 'install-doc
4944 (lambda* (#:key inputs outputs #:allow-other-keys)
4945 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4946 (doc (string-append data "/doc/" ,name "-" ,version))
4947 (html (string-append doc "/html"))
4948 (man1 (string-append data "/man/man1"))
4949 (info (string-append data "/info"))
4950 (examples (string-append doc "/examples"))
4951 (python-arg (string-append "PYTHON=" (which "python"))))
4952 (setenv "LANG" "en_US.utf8")
4953 ;; Make installed package available for running the tests
4954 (add-installed-pythonpath inputs outputs)
4955 (with-directory-excursion "docs"
4956 ;; FIXME: pdf fails to build
4957 ;;(system* "make" "pdf" "PAPER=a4")
4958 (system* "make" python-arg "html")
4959 (system* "make" python-arg "info"))
4960 (copy-recursively "docs/man" man1)
4961 (copy-recursively "examples" examples)
4962 (copy-recursively "docs/build/html" html)
4963 ;; (copy-file "docs/build/latex/ipython.pdf"
4964 ;; (string-append doc "/ipython.pdf"))
4965 (mkdir-p info)
4966 (copy-file "docs/build/texinfo/ipython.info"
4967 (string-append info "/ipython.info"))
4968 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4969 ;; Tests can only be run after the library has been installed and not
4970 ;; within the source directory.
4971 (delete 'check)
4972 (add-after
4973 'install 'check
4974 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4975 (if tests?
4976 (with-directory-excursion "/tmp"
4977 ;; Make installed package available for running the tests
4978 (add-installed-pythonpath inputs outputs)
4979 (setenv "HOME" "/tmp/") ;; required by a test
4980 (zero? (system* (string-append (assoc-ref outputs "out")
4981 "/bin/iptest"))))
4982 #t)))
4983 (add-before
4984 'install 'fix-tests
4985 (lambda* (#:key inputs #:allow-other-keys)
4986 (substitute* "./IPython/utils/_process_posix.py"
4987 (("/usr/bin/env', 'which") (which "which")))
4988 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4989 (("#!/usr/bin/env python")
4990 (string-append "#!" (which "python"))))
4991 ;; Disable 1 failing test
4992 (substitute* "./IPython/core/tests/test_magic.py"
4993 (("def test_dirops\\(\\):" all)
4994 (string-append "@dec.skipif(True)\n" all))))))))
4995 (home-page "https://ipython.org")
4996 (synopsis "IPython is a tool for interactive computing in Python")
4997 (description
4998 "IPython provides a rich architecture for interactive computing with:
4999 Powerful interactive shells, a browser-based notebook, support for interactive
5000 data visualization, embeddable interpreters and tools for parallel
5001 computing.")
5002 (license license:bsd-3)
5003 (properties `((python2-variant . ,(delay python2-ipython))))))
5004
5005 (define-public python2-ipython
5006 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
5007 (package
5008 (inherit ipython)
5009 ;; FIXME: add pyreadline once available.
5010 (propagated-inputs
5011 `(("python2-backports-shutil-get-terminal-size"
5012 ,python2-backports-shutil-get-terminal-size)
5013 ("python2-pathlib2" ,python2-pathlib2)
5014 ,@(package-propagated-inputs ipython)))
5015 (native-inputs
5016 `(("python2-mock" ,python2-mock)
5017 ,@(package-native-inputs ipython))))))
5018
5019 (define-public python-urwid
5020 (package
5021 (name "python-urwid")
5022 (version "2.0.1")
5023 (source
5024 (origin
5025 (method url-fetch)
5026 (uri (pypi-uri "urwid" version))
5027 (sha256
5028 (base32
5029 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5030 (build-system python-build-system)
5031 (home-page "http://urwid.org")
5032 (synopsis "Console user interface library for Python")
5033 (description
5034 "Urwid is a curses-based UI/widget library for Python. It includes many
5035 features useful for text console applications.")
5036 (license license:lgpl2.1+)))
5037
5038 (define-public python2-urwid
5039 (package-with-python2 python-urwid))
5040
5041 (define-public python-urwidtrees
5042 (package
5043 (name "python-urwidtrees")
5044 (version "1.0.2")
5045 (source
5046 (origin
5047 (method url-fetch)
5048 ;; package author intends on distributing via github rather than pypi:
5049 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5050 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5051 version ".tar.gz"))
5052 (file-name (string-append name "-" version ".tar.gz"))
5053 (sha256
5054 (base32
5055 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5056 (build-system python-build-system)
5057 (arguments
5058 '(#:tests? #f)) ; no tests
5059 (propagated-inputs `(("python-urwid" ,python-urwid)))
5060 (home-page "https://github.com/pazz/urwidtrees")
5061 (synopsis "Tree widgets for urwid")
5062 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5063 toolkit. Use it to build trees of widgets.")
5064 (license license:gpl3+)))
5065
5066 (define-public python2-urwidtrees
5067 (package-with-python2 python-urwidtrees))
5068
5069 (define-public python-ua-parser
5070 (package
5071 (name "python-ua-parser")
5072 (version "0.8.0")
5073 (source
5074 (origin
5075 (method url-fetch)
5076 (uri (pypi-uri "ua-parser" version))
5077 (sha256
5078 (base32
5079 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5080 (build-system python-build-system)
5081 (arguments
5082 `(#:tests? #f)) ;no test suite in release
5083 (native-inputs
5084 `(("python-pyyaml" ,python-pyyaml)))
5085 (home-page "https://github.com/ua-parser/uap-python")
5086 (synopsis "User agent parser")
5087 (description
5088 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5089 (license license:asl2.0)))
5090
5091 (define-public python2-ua-parser
5092 (package-with-python2 python-ua-parser))
5093
5094 (define-public python-user-agents
5095 (package
5096 (name "python-user-agents")
5097 (version "1.1.0")
5098 (source
5099 (origin
5100 (method url-fetch)
5101 (uri (pypi-uri "user-agents" version))
5102 (sha256
5103 (base32
5104 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5105 (build-system python-build-system)
5106 (arguments
5107 `(#:tests? #f)) ;missing devices.json test file in release
5108 (propagated-inputs
5109 `(("python-ua-parser" ,python-ua-parser)))
5110 (home-page "https://github.com/selwin/python-user-agents")
5111 (synopsis "User Agent strings parsing library")
5112 (description
5113 "A library to identify devices (phones, tablets) and their capabilities by
5114 parsing (browser/HTTP) user agent strings.")
5115 (license license:expat)))
5116
5117 (define-public python2-user-agents
5118 (package-with-python2 python-user-agents))
5119
5120 (define-public python-dbus
5121 (package
5122 (name "python-dbus")
5123 (version "1.2.0")
5124 (source
5125 (origin
5126 (method url-fetch)
5127 (uri (string-append
5128 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
5129 version ".tar.gz"))
5130 (sha256
5131 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
5132 (build-system gnu-build-system)
5133 (arguments
5134 '(#:phases
5135 (modify-phases %standard-phases
5136 (add-before
5137 'check 'pre-check
5138 (lambda _
5139 ;; XXX: For the missing '/etc/machine-id'.
5140 (substitute* "test/run-test.sh"
5141 (("DBUS_FATAL_WARNINGS=1")
5142 "DBUS_FATAL_WARNINGS=0"))
5143 #t)))))
5144 (native-inputs
5145 `(("pkg-config" ,pkg-config)))
5146 (inputs
5147 `(("python" ,python)
5148 ("dbus-glib" ,dbus-glib)))
5149 (synopsis "Python bindings for D-bus")
5150 (description "python-dbus provides bindings for libdbus, the reference
5151 implementation of D-Bus.")
5152 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5153 (license license:expat)))
5154
5155 (define-public python2-dbus
5156 (package (inherit python-dbus)
5157 (name "python2-dbus")
5158 (inputs `(("python" ,python-2)
5159 ,@(alist-delete "python"
5160 (package-inputs python-dbus)
5161 equal?)))
5162 ;; FIXME: on Python 2, the test_utf8 fails with:
5163 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5164 (arguments `(#:tests? #f))))
5165
5166 (define-public python-lxml
5167 (package
5168 (name "python-lxml")
5169 (version "3.8.0")
5170 (source
5171 (origin
5172 (method url-fetch)
5173 (uri (pypi-uri "lxml" version))
5174 (sha256
5175 (base32
5176 "15nvf6n285n282682qyw3wihsncb0x5amdhyi4b83bfa2nz74vvk"))))
5177 (build-system python-build-system)
5178 (inputs
5179 `(("libxml2" ,libxml2)
5180 ("libxslt" ,libxslt)))
5181 (home-page "http://lxml.de/")
5182 (synopsis
5183 "Python XML processing library")
5184 (description
5185 "The lxml XML toolkit is a Pythonic binding for the C libraries
5186 libxml2 and libxslt.")
5187 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5188
5189 (define-public python2-lxml
5190 (package-with-python2 python-lxml))
5191
5192 ;; beautifulsoup4 has a totally different namespace than 3.x,
5193 ;; and pypi seems to put it under its own name, so I guess we should too
5194 (define-public python-beautifulsoup4
5195 (package
5196 (name "python-beautifulsoup4")
5197 (version "4.5.3")
5198 (source
5199 (origin
5200 (method url-fetch)
5201 (uri (pypi-uri "beautifulsoup4" version))
5202 (sha256
5203 (base32
5204 "0glaw1vyxnbp03fni7h5496n6iib0n5iim4gax1n0ngscs9s075j"))))
5205 (build-system python-build-system)
5206 (arguments
5207 `(#:phases
5208 (modify-phases %standard-phases
5209 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5210 ;; must use this conversion script when building with Python 3. The
5211 ;; conversion script also runs the tests.
5212 ;; For more information, see the file 'convert-py3k' in the source
5213 ;; distribution.
5214 (replace 'check
5215 (lambda _ (zero? (system* "./convert-py3k")))))))
5216 (home-page
5217 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5218 (synopsis
5219 "Python screen-scraping library")
5220 (description
5221 "Beautiful Soup is a Python library designed for rapidly setting up
5222 screen-scraping projects. It offers Pythonic idioms for navigating,
5223 searching, and modifying a parse tree, providing a toolkit for
5224 dissecting a document and extracting what you need. It automatically
5225 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5226 (license license:expat)
5227 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5228
5229 (define-public python2-beautifulsoup4
5230 (package
5231 (inherit (package-with-python2
5232 (strip-python2-variant python-beautifulsoup4)))
5233 (arguments `(#:python ,python-2))))
5234
5235 (define-public python-netifaces
5236 (package
5237 (name "python-netifaces")
5238 (version "0.10.7")
5239 (source
5240 (origin
5241 (method url-fetch)
5242 (uri (pypi-uri "netifaces" version))
5243 (sha256
5244 (base32
5245 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5246 (build-system python-build-system)
5247 (home-page "https://github.com/al45tair/netifaces")
5248 (synopsis
5249 "Python module for portable network interface information")
5250 (description
5251 "Netifaces is a Python module providing information on network
5252 interfaces in an easy and portable manner.")
5253 (license license:expat)))
5254
5255 (define-public python2-netifaces
5256 (package-with-python2 python-netifaces))
5257
5258 (define-public python-networkx
5259 (package
5260 (name "python-networkx")
5261 (version "2.2")
5262 (source
5263 (origin
5264 (method url-fetch)
5265 (uri (pypi-uri "networkx" version ".zip"))
5266 (sha256
5267 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5268 (build-system python-build-system)
5269 ;; python-decorator is needed at runtime.
5270 (propagated-inputs
5271 `(("python-decorator" ,python-decorator)))
5272 (native-inputs
5273 `(("python-nose" ,python-nose)
5274 ("unzip" ,unzip)))
5275 (home-page "https://networkx.github.io/")
5276 (synopsis "Python module for creating and manipulating graphs and networks")
5277 (description
5278 "NetworkX is a Python package for the creation, manipulation, and study
5279 of the structure, dynamics, and functions of complex networks.")
5280 (license license:bsd-3)))
5281
5282 (define-public python2-networkx
5283 (package-with-python2 python-networkx))
5284
5285 ;; Define new package, because the current version of python-colormath does
5286 ;; not build against 2.0.
5287 (define-public python-networkx2
5288 (package (inherit python-networkx)
5289 (name "python-networkx2")
5290 (version "2.0")
5291 (source
5292 (origin
5293 (method url-fetch)
5294 (uri (pypi-uri "networkx" version ".zip"))
5295 (sha256
5296 (base32
5297 "1ajl2jp8qry9nyjzzkqpy0vmsr14d23z1qk7y0vr5iwjbpvzhpyd"))
5298 (patches
5299 (search-patches "python-networkx2-reproducible-build.patch"))))))
5300
5301 (define-public python2-networkx2
5302 (package-with-python2 python-networkx2))
5303
5304 (define-public python-datrie
5305 (package
5306 (name "python-datrie")
5307 (version "0.7.1")
5308 (source
5309 (origin
5310 (method url-fetch)
5311 (uri (pypi-uri "datrie" version))
5312 (sha256
5313 (base32
5314 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
5315 (build-system python-build-system)
5316 (native-inputs
5317 `(("python-cython" ,python-cython)
5318 ("python-hypothesis" ,python-hypothesis)
5319 ("python-pytest" ,python-pytest)
5320 ("python-pytest-runner" ,python-pytest-runner)))
5321 (home-page "https://github.com/kmike/datrie")
5322 (synopsis "Fast, efficiently stored trie for Python")
5323 (description
5324 "This package provides a fast, efficiently stored trie implementation for
5325 Python.")
5326 (license license:lgpl2.1+)))
5327
5328 (define-public snakemake
5329 (package
5330 (name "snakemake")
5331 (version "5.2.4")
5332 (source
5333 (origin
5334 (method url-fetch)
5335 (uri (pypi-uri "snakemake" version))
5336 (sha256
5337 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5338 (build-system python-build-system)
5339 (arguments
5340 ;; TODO: Package missing test dependencies.
5341 '(#:tests? #f
5342 #:phases
5343 (modify-phases %standard-phases
5344 ;; For cluster execution Snakemake will call Python. Since there is
5345 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5346 ;; this by calling the snakemake wrapper instead.
5347 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5348 (lambda* (#:key outputs #:allow-other-keys)
5349 (substitute* "snakemake/executors.py"
5350 (("\\{sys.executable\\} -m snakemake")
5351 (string-append (assoc-ref outputs "out")
5352 "/bin/snakemake")))
5353 #t)))))
5354 (propagated-inputs
5355 `(("python-gitpython" ,python-gitpython)
5356 ("python-wrapt" ,python-wrapt)
5357 ("python-requests" ,python-requests)
5358 ("python-appdirs" ,python-appdirs)
5359 ("python-configargparse" ,python-configargparse)
5360 ("python-datrie" ,python-datrie)
5361 ("python-docutils" ,python-docutils)
5362 ("python-jinja2" ,python-jinja2)
5363 ("python-jsonschema" ,python-jsonschema)
5364 ("python-networkx" ,python-networkx)
5365 ("python-pyyaml" ,python-pyyaml)
5366 ("python-ratelimiter" ,python-ratelimiter)))
5367 (home-page "https://snakemake.readthedocs.io")
5368 (synopsis "Python-based execution environment for make-like workflows")
5369 (description
5370 "Snakemake aims to reduce the complexity of creating workflows by
5371 providing a clean and modern domain specific specification language (DSL) in
5372 Python style, together with a fast and comfortable execution environment.")
5373 (license license:expat)))
5374
5375 ;; This is currently needed for the pigx-* packages.
5376 (define-public snakemake-4
5377 (package (inherit snakemake)
5378 (version "4.4.0")
5379 (source
5380 (origin
5381 (method url-fetch)
5382 (uri (pypi-uri "snakemake" version))
5383 (sha256
5384 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5385 (propagated-inputs
5386 `(("python-wrapt" ,python-wrapt)
5387 ("python-requests" ,python-requests)
5388 ("python-appdirs" ,python-appdirs)
5389 ("python-configargparse" ,python-configargparse)
5390 ("python-pyyaml" ,python-pyyaml)
5391 ("python-ratelimiter" ,python-ratelimiter)))))
5392
5393 (define-public python-pyqrcode
5394 (package
5395 (name "python-pyqrcode")
5396 (version "1.2.1")
5397 (source
5398 (origin
5399 (method url-fetch)
5400 (uri (pypi-uri "PyQRCode" version))
5401 (sha256
5402 (base32
5403 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5404 (build-system python-build-system)
5405 (home-page
5406 "https://github.com/mnooner256/pyqrcode")
5407 (synopsis "QR code generator")
5408 (description
5409 "Pyqrcode is a QR code generator written purely in Python with
5410 SVG, EPS, PNG and terminal output.")
5411 (license license:bsd-3)))
5412
5413 (define-public python-seaborn
5414 (package
5415 (name "python-seaborn")
5416 (version "0.7.1")
5417 (source
5418 (origin
5419 (method url-fetch)
5420 (uri (pypi-uri "seaborn" version))
5421 (sha256
5422 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
5423 (build-system python-build-system)
5424 (arguments
5425 '(#:tests? #f)) ; Tests requires a running X11 server.
5426 (propagated-inputs
5427 `(("python-pandas" ,python-pandas)
5428 ("python-matplotlib" ,python-matplotlib)
5429 ("python-scipy" ,python-scipy)))
5430 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5431 (synopsis "Statistical data visualization")
5432 (description
5433 "Seaborn is a library for making attractive and informative statistical
5434 graphics in Python. It is built on top of matplotlib and tightly integrated
5435 with the PyData stack, including support for numpy and pandas data structures
5436 and statistical routines from scipy and statsmodels.")
5437 (license license:bsd-3)
5438 (properties `((python2-variant . ,(delay python2-seaborn))))))
5439
5440 (define-public python2-seaborn
5441 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5442 (package
5443 (inherit base)
5444 (propagated-inputs `(("python2-pytz" ,python2-pytz)
5445 ,@(package-propagated-inputs base))))))
5446
5447 (define-public python-mpmath
5448 (package
5449 (name "python-mpmath")
5450 (version "0.19")
5451 (source (origin
5452 (method url-fetch)
5453 (uri (string-append "http://mpmath.org/files/mpmath-"
5454 version ".tar.gz"))
5455 (sha256
5456 (base32
5457 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5458 (build-system python-build-system)
5459 (arguments
5460 '(#:phases
5461 (modify-phases %standard-phases
5462 (replace 'check
5463 (lambda _
5464 (zero?
5465 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
5466 (home-page "http://mpmath.org")
5467 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5468 (description
5469 "@code{mpmath} can be used as an arbitrary-precision substitute for
5470 Python's float/complex types and math/cmath modules, but also does much
5471 more advanced mathematics.")
5472 (license license:bsd-3)))
5473
5474 (define-public python2-mpmath
5475 (package-with-python2 python-mpmath))
5476
5477 (define-public python-bigfloat
5478 (package
5479 (name "python-bigfloat")
5480 (version "0.3.0")
5481 (source
5482 (origin
5483 (method url-fetch)
5484 (uri (pypi-uri "bigfloat" version))
5485 (sha256
5486 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
5487 (build-system python-build-system)
5488 (inputs
5489 `(("mpfr" ,mpfr)))
5490 (home-page "https://github.com/mdickinson/bigfloat")
5491 (synopsis "Arbitrary precision floating-point arithmetic for Python")
5492 (description
5493 "This packages provides a Python interface to the MPFR library for
5494 multiprecision arithmetic.")
5495 (license license:lgpl3+)))
5496
5497 (define-public python2-bigfloat
5498 (package-with-python2 python-bigfloat))
5499
5500 (define-public python-sympy
5501 (package
5502 (name "python-sympy")
5503 (version "1.1.1")
5504 (source
5505 (origin
5506 (method url-fetch)
5507 (uri (string-append
5508 "https://github.com/sympy/sympy/releases/download/sympy-"
5509 version "/sympy-" version ".tar.gz"))
5510 (sha256
5511 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
5512 (build-system python-build-system)
5513 (arguments
5514 `(#:phases
5515 (modify-phases %standard-phases
5516 ;; Run the core tests after installation. By default it would run
5517 ;; *all* tests, which take a very long time to complete and are known
5518 ;; to be flaky.
5519 (delete 'check)
5520 (add-after 'install 'check
5521 (lambda* (#:key outputs #:allow-other-keys)
5522 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
5523 #t)))))
5524 (propagated-inputs
5525 `(("python-mpmath" ,python-mpmath)))
5526 (home-page "http://www.sympy.org/")
5527 (synopsis "Python library for symbolic mathematics")
5528 (description
5529 "SymPy is a Python library for symbolic mathematics. It aims to become a
5530 full-featured computer algebra system (CAS) while keeping the code as simple
5531 as possible in order to be comprehensible and easily extensible.")
5532 (license license:bsd-3)))
5533
5534 (define-public python2-sympy
5535 (package
5536 (inherit (package-with-python2 python-sympy))
5537 (arguments
5538 `(#:phases
5539 (modify-phases %standard-phases
5540 ;; Run the core tests after installation. By default it would run
5541 ;; *all* tests, which take a very long time to complete and are known
5542 ;; to be flaky.
5543 (delete 'check)
5544 (add-after 'install 'check
5545 (lambda* (#:key outputs #:allow-other-keys)
5546 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
5547 #t)))))))
5548
5549 (define-public python-q
5550 (package
5551 (name "python-q")
5552 (version "2.6")
5553 (source
5554 (origin
5555 (method url-fetch)
5556 (uri (pypi-uri "q" version))
5557 (sha256
5558 (base32
5559 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5560 (build-system python-build-system)
5561 (home-page "https://github.com/zestyping/q")
5562 (synopsis "Quick-and-dirty debugging output for tired programmers")
5563 (description
5564 "q is a Python module for \"print\" style of debugging Python code. It
5565 provides convenient short API for print out of values, tracebacks, and
5566 falling into the Python interpreter.")
5567 (license license:asl2.0)))
5568
5569 (define-public python2-q
5570 (package-with-python2 python-q))
5571
5572 (define-public python2-xlib
5573 (package
5574 (name "python2-xlib")
5575 (version "0.14")
5576 (source (origin
5577 (method url-fetch)
5578 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5579 "/" version "/"
5580 "python-xlib-" version ".tar.gz"))
5581 (sha256
5582 (base32
5583 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5584 (build-system python-build-system)
5585 (arguments
5586 `(#:python ,python-2 ;Python 2 only
5587 #:tests? #f)) ;no tests
5588 (home-page "http://python-xlib.sourceforge.net/")
5589 (synopsis "Python X11 client library")
5590 (description
5591 "The Python X Library is intended to be a fully functional X client
5592 library for Python programs. It is useful to implement low-level X clients.
5593 It is written entirely in Python.")
5594 (license license:gpl2+)))
5595
5596 (define-public python-singledispatch
5597 (package
5598 (name "python-singledispatch")
5599 (version "3.4.0.3")
5600 (source
5601 (origin
5602 (method url-fetch)
5603 (uri (pypi-uri "singledispatch" version))
5604 (sha256
5605 (base32
5606 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5607 (build-system python-build-system)
5608 (native-inputs
5609 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5610 (home-page
5611 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5612 (synopsis "Backport of singledispatch feature from Python 3.4")
5613 (description
5614 "This library brings functools.singledispatch from Python 3.4 to Python
5615 2.6-3.3.")
5616 (license license:expat)))
5617
5618 (define-public python2-singledispatch
5619 (package-with-python2 python-singledispatch))
5620
5621 ;; the python- version can be removed with python-3.5
5622 (define-public python-backports-abc
5623 (package
5624 (name "python-backports-abc")
5625 (version "0.5")
5626 (source
5627 (origin
5628 (method url-fetch)
5629 (uri (pypi-uri "backports_abc" version))
5630 (sha256
5631 (base32
5632 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5633 (build-system python-build-system)
5634 (home-page "https://github.com/cython/backports_abc")
5635 (synopsis "Backport of additions to the 'collections.abc' module")
5636 (description
5637 "Python-backports-abc provides a backport of additions to the
5638 'collections.abc' module in Python-3.5.")
5639 (license license:psfl)))
5640
5641 (define-public python2-backports-abc
5642 (package-with-python2 python-backports-abc))
5643
5644 (define-public python-backports-csv
5645 (package
5646 (name "python-backports-csv")
5647 (version "1.0.5")
5648 (source
5649 (origin
5650 (method url-fetch)
5651 (uri (pypi-uri "backports.csv" version))
5652 (sha256
5653 (base32
5654 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
5655 (build-system python-build-system)
5656 (home-page "https://github.com/ryanhiebert/backports.csv")
5657 (synopsis "Backport of Python 3's csv module for Python 2")
5658 (description
5659 "Provides a backport of Python 3's @code{csv} module for parsing
5660 comma separated values. The API of the @code{csv} module in Python 2
5661 is drastically different from the @code{csv} module in Python 3.
5662 This is due, for the most part, to the difference between str in
5663 Python 2 and Python 3.")
5664 (license license:psfl)))
5665
5666 (define-public python2-backports-csv
5667 (package-with-python2 python-backports-csv))
5668
5669 (define-public python2-backports-shutil-get-terminal-size
5670 (package
5671 (name "python2-backports-shutil-get-terminal-size")
5672 (version "1.0.0")
5673 (source
5674 (origin
5675 (method url-fetch)
5676 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
5677 (sha256
5678 (base32
5679 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
5680 (build-system python-build-system)
5681 (arguments
5682 `(#:python ,python-2
5683 #:phases
5684 (modify-phases %standard-phases
5685 (replace 'check
5686 (lambda _
5687 (zero? (system* "py.test" "-v")))))))
5688 (native-inputs
5689 `(("python2-pytest" ,python2-pytest)))
5690 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
5691 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
5692 (description
5693 "This package provides a backport of the @code{get_terminal_size
5694 function} from Python 3.3's @code{shutil}.
5695 Unlike the original version it is written in pure Python rather than C,
5696 so it might be a tiny bit slower.")
5697 (license license:expat)))
5698
5699 (define-public python-waf
5700 (package
5701 (name "python-waf")
5702 (version "1.9.8")
5703 (source (origin
5704 (method url-fetch)
5705 (uri (string-append "https://waf.io/"
5706 "waf-" version ".tar.bz2"))
5707 (sha256
5708 (base32
5709 "0wl4cnmp06lfxqjxaan58bqxn27smhydz0sg5prrfbl3bsw4gv6q"))))
5710 (build-system python-build-system)
5711 (arguments
5712 '(#:phases
5713 (modify-phases %standard-phases
5714 (replace 'build
5715 (lambda _
5716 (invoke "python" "waf-light" "configure" "build")))
5717 (replace 'check
5718 (lambda _
5719 (invoke "python" "waf" "--version")))
5720 (replace 'install
5721 (lambda _
5722 (copy-file "waf" %output)
5723 #t)))))
5724 (home-page "https://waf.io/")
5725 (synopsis "Python-based build system")
5726 (description
5727 "Waf is a Python-based framework for configuring, compiling and installing
5728 applications.")
5729 (license license:bsd-3)))
5730
5731 (define-public python2-waf
5732 (package-with-python2 python-waf))
5733
5734 (define-public python-pyzmq
5735 (package
5736 (name "python-pyzmq")
5737 (version "15.1.0")
5738 (source
5739 (origin
5740 (method url-fetch)
5741 (uri (pypi-uri "pyzmq" version))
5742 (sha256
5743 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
5744 (build-system python-build-system)
5745 (arguments
5746 `(#:configure-flags
5747 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5748 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5749 ;; --inplace' for 'python setup.py test' to work.
5750 #:tests? #f))
5751 (inputs
5752 `(("zeromq" ,zeromq)))
5753 (native-inputs
5754 `(("pkg-config" ,pkg-config)
5755 ("python-nose" ,python-nose)))
5756 (home-page "https://github.com/zeromq/pyzmq")
5757 (synopsis "Python bindings for 0MQ")
5758 (description
5759 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5760 (license license:bsd-4)))
5761
5762 (define-public python2-pyzmq
5763 (package-with-python2 python-pyzmq))
5764
5765 (define-public python-pep8
5766 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
5767 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
5768 ;; some dependents' test suites, and nothing more.
5769 (package
5770 (name "python-pep8")
5771 (version "1.7.0")
5772 (source
5773 (origin
5774 (method url-fetch)
5775 (uri (pypi-uri "pep8" version))
5776 (sha256
5777 (base32
5778 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5779 (build-system python-build-system)
5780 (home-page "https://pep8.readthedocs.org/")
5781 (synopsis "Python style guide checker")
5782 (description
5783 "This tools checks Python code against some of the style conventions in
5784 PEP 8.")
5785 (license license:expat)))
5786
5787 (define-public python2-pep8
5788 (package-with-python2 python-pep8))
5789
5790 (define-public python-pyflakes
5791 (package
5792 (name "python-pyflakes")
5793 (version "1.5.0")
5794 (source
5795 (origin
5796 (method url-fetch)
5797 (uri (pypi-uri "pyflakes" version))
5798 (sha256
5799 (base32
5800 "1x1pcca4a24k4pw8x1c77sgi58cg1wl2k38mp8a25k608pzls3da"))))
5801 (build-system python-build-system)
5802 (home-page
5803 "https://github.com/pyflakes/pyflakes")
5804 (synopsis "Passive checker of Python programs")
5805 (description
5806 "Pyflakes statically checks Python source code for common errors.")
5807 (license license:expat)))
5808
5809 (define-public python2-pyflakes
5810 (package-with-python2 python-pyflakes))
5811
5812 (define-public python-mccabe
5813 (package
5814 (name "python-mccabe")
5815 (version "0.6.1")
5816 (source
5817 (origin
5818 (method url-fetch)
5819 (uri (pypi-uri "mccabe" version))
5820 (sha256
5821 (base32
5822 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
5823 (build-system python-build-system)
5824 (native-inputs
5825 `(("python-pytest" ,python-pytest-bootstrap)
5826 ("python-pytest-runner" ,python-pytest-runner)))
5827 (home-page "https://github.com/flintwork/mccabe")
5828 (synopsis "McCabe checker, plugin for flake8")
5829 (description
5830 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5831 complexity of Python source code.")
5832 (license license:expat)))
5833
5834 (define-public python2-mccabe
5835 (package-with-python2 python-mccabe))
5836
5837 (define-public python-mccabe-0.2.1
5838 (package (inherit python-mccabe)
5839 (version "0.2.1")
5840 (source
5841 (origin
5842 (method url-fetch)
5843 (uri (pypi-uri "mccabe" version))
5844 (sha256
5845 (base32
5846 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5847
5848 (define-public python2-mccabe-0.2.1
5849 (package-with-python2 python-mccabe-0.2.1))
5850
5851 ;; Flake8 2.4.1 requires an older version of pep8.
5852 ;; This should be removed ASAP.
5853 (define-public python-pep8-1.5.7
5854 (package (inherit python-pep8)
5855 (version "1.5.7")
5856 (source
5857 (origin
5858 (method url-fetch)
5859 (uri (string-append
5860 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5861 version
5862 ".tar.gz"))
5863 (sha256
5864 (base32
5865 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
5866 (arguments
5867 ;; XXX Tests not compatible with Python 3.5.
5868 '(#:tests? #f))))
5869
5870 (define-public python2-pep8-1.5.7
5871 (package-with-python2 python-pep8-1.5.7))
5872
5873 ;; Flake8 2.4.1 requires an older version of pyflakes.
5874 ;; This should be removed ASAP.
5875 (define-public python-pyflakes-0.8.1
5876 (package (inherit python-pyflakes)
5877 (version "0.8.1")
5878 (source
5879 (origin
5880 (method url-fetch)
5881 (uri (string-append
5882 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5883 version
5884 ".tar.gz"))
5885 (sha256
5886 (base32
5887 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
5888 (arguments
5889 ;; XXX Tests not compatible with Python 3.5.
5890 '(#:tests? #f))))
5891
5892 (define-public python2-pyflakes-0.8.1
5893 (package-with-python2 python-pyflakes-0.8.1))
5894
5895 (define-public python-flake8
5896 (package
5897 (name "python-flake8")
5898 (version "3.4.1")
5899 (source
5900 (origin
5901 (method url-fetch)
5902 (uri (pypi-uri "flake8" version))
5903 (sha256
5904 (base32
5905 "1n0i38592vy3q0x2a9bf8z6rhhn04i30wsn5i5zzcj7qkxvl8062"))))
5906 (build-system python-build-system)
5907 (arguments
5908 `(#:phases
5909 (modify-phases %standard-phases
5910 (delete 'check)
5911 (add-after 'install 'check
5912 (lambda* (#:key inputs outputs #:allow-other-keys)
5913 (add-installed-pythonpath inputs outputs)
5914 (zero? (system* "pytest" "-v")))))))
5915 (propagated-inputs
5916 `(("python-pycodestyle" ,python-pycodestyle)
5917 ("python-pyflakes" ,python-pyflakes)
5918 ;; flake8 depends on a newer setuptools than provided by python.
5919 ("python-setuptools" ,python-setuptools)
5920 ("python-mccabe" ,python-mccabe)))
5921 (native-inputs
5922 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
5923 ("python-pytest" ,python-pytest-bootstrap)
5924 ("python-pytest-runner" ,python-pytest-runner)))
5925 (home-page "https://gitlab.com/pycqa/flake8")
5926 (synopsis
5927 "The modular source code checker: pep8, pyflakes and co")
5928 (description
5929 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5930 (properties `((python2-variant . ,(delay python2-flake8))))
5931 (license license:expat)))
5932
5933 (define-public python2-flake8
5934 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
5935 (package (inherit base)
5936 (propagated-inputs
5937 `(("python2-configparser" ,python2-configparser)
5938 ("python2-enum34" ,python2-enum34)
5939 ,@(package-propagated-inputs base))))))
5940
5941 ;; python-hacking requires flake8 <2.6.0.
5942 (define-public python-flake8-2.5
5943 (package
5944 (inherit python-flake8)
5945 (version "2.5.5")
5946 (source (origin
5947 (method url-fetch)
5948 (uri (pypi-uri "flake8" version))
5949 (sha256
5950 (base32
5951 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
5952 (propagated-inputs
5953 `(("python-pep8" ,python-pep8)
5954 ,@(package-propagated-inputs python-flake8)))
5955 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
5956
5957 (define-public python2-flake8-2.5
5958 (package
5959 (inherit python2-flake8)
5960 (version (package-version python-flake8-2.5))
5961 (source (origin
5962 (inherit (package-source python-flake8-2.5))))
5963 (propagated-inputs
5964 `(("python2-pep8" ,python2-pep8)
5965 ,@(package-propagated-inputs python2-flake8)))))
5966
5967 (define-public python-flake8-polyfill
5968 (package
5969 (name "python-flake8-polyfill")
5970 (version "1.0.2")
5971 (source
5972 (origin
5973 (method url-fetch)
5974 (uri (pypi-uri "flake8-polyfill" version))
5975 (sha256
5976 (base32
5977 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
5978 (build-system python-build-system)
5979 (arguments
5980 '(#:phases
5981 (modify-phases %standard-phases
5982 (replace 'check
5983 (lambda _
5984 (setenv "PYTHONPATH"
5985 (string-append (getcwd) "/build/lib:"
5986 (getenv "PYTHONPATH")))
5987 (zero? (system* "py.test" "-v")))))))
5988 (native-inputs
5989 `(("python-flake8" ,python-flake8)
5990 ("python-mock" ,python-mock)
5991 ("python-pep8" ,python-pep8)
5992 ("python-pycodestyle" ,python-pycodestyle)
5993 ("python-pytest" ,python-pytest)))
5994 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
5995 (synopsis "Polyfill package for Flake8 plugins")
5996 (description
5997 "This package that provides some compatibility helpers for Flake8
5998 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
5999 (license license:expat)))
6000
6001 (define-public python2-flake8-polyfill
6002 (package-with-python2 python-flake8-polyfill))
6003
6004 (define-public python-mistune
6005 (package
6006 (name "python-mistune")
6007 (version "0.8.3")
6008 (source
6009 (origin
6010 (method url-fetch)
6011 (uri (pypi-uri "mistune" version))
6012 (sha256
6013 (base32
6014 "06b662p6kf46wh2jsabaqhaq4bz1srh2zxkrnx4yg96azlxw645w"))))
6015 (build-system python-build-system)
6016 (native-inputs
6017 `(("python-nose" ,python-nose)
6018 ("python-cython" ,python-cython)))
6019 (home-page "https://github.com/lepture/mistune")
6020 (synopsis "Markdown parser in pure Python")
6021 (description "This package provides a fast markdown parser in pure
6022 Python.")
6023 (license license:bsd-3)))
6024
6025 (define-public python2-mistune
6026 (package-with-python2 python-mistune))
6027
6028 (define-public python-markdown
6029 (package
6030 (name "python-markdown")
6031 (version "2.6.11")
6032 (source
6033 (origin
6034 (method url-fetch)
6035 (uri (pypi-uri "Markdown" version))
6036 (sha256
6037 (base32
6038 "108g80ryzykh8bj0i7jfp71510wrcixdi771lf2asyghgyf8cmm8"))))
6039 (build-system python-build-system)
6040 (arguments
6041 `(#:phases
6042 (modify-phases %standard-phases
6043 (replace 'check
6044 (lambda _
6045 (zero? (system* "python" "run-tests.py")))))))
6046 (native-inputs
6047 `(("python-nose" ,python-nose)
6048 ("python-pyyaml" ,python-pyyaml)))
6049 (home-page "https://pythonhosted.org/Markdown/")
6050 (synopsis "Python implementation of Markdown")
6051 (description
6052 "This package provides a Python implementation of John Gruber's
6053 Markdown. The library features international input, various Markdown
6054 extensions, and several HTML output formats. A command line wrapper
6055 markdown_py is also provided to convert Markdown files to HTML.")
6056 (license license:bsd-3)))
6057
6058 (define-public python2-markdown
6059 (package-with-python2 python-markdown))
6060
6061 (define-public python-ptyprocess
6062 (package
6063 (name "python-ptyprocess")
6064 (version "0.5.2")
6065 (source
6066 (origin
6067 (method url-fetch)
6068 (uri (pypi-uri "ptyprocess" version))
6069 (sha256
6070 (base32
6071 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6072 (build-system python-build-system)
6073 (native-inputs
6074 `(("python-nose" ,python-nose)))
6075 (arguments
6076 `(#:phases
6077 (modify-phases %standard-phases
6078 (replace 'check
6079 (lambda _
6080 (zero? (system* "nosetests")))))))
6081 (home-page "https://github.com/pexpect/ptyprocess")
6082 (synopsis "Run a subprocess in a pseudo terminal")
6083 (description
6084 "This package provides a Python library used to launch a subprocess in a
6085 pseudo terminal (pty), and interact with both the process and its pty.")
6086 (license license:isc)))
6087
6088 (define-public python2-ptyprocess
6089 (package-with-python2 python-ptyprocess))
6090
6091 (define-public python-cram
6092 (package
6093 (name "python-cram")
6094 (version "0.7")
6095 (home-page "https://bitheap.org/cram/")
6096 (source (origin
6097 (method url-fetch)
6098 (uri (list (string-append home-page "cram-"
6099 version ".tar.gz")
6100 (pypi-uri "cram" version)))
6101 (sha256
6102 (base32
6103 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6104 (arguments
6105 '(#:phases
6106 (modify-phases %standard-phases
6107 (add-after 'unpack 'patch-source
6108 (lambda _
6109 (substitute* (find-files "cram" ".*\\.py$")
6110 ;; Replace default shell path.
6111 (("/bin/sh") (which "sh")))
6112 (substitute* (find-files "tests" ".*\\.t$")
6113 (("md5") "md5sum")
6114 (("/bin/bash") (which "bash"))
6115 (("/bin/sh") (which "sh")))
6116 (substitute* "cram/_test.py"
6117 ;; This hack works around a bug triggered by substituting
6118 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6119 ;; "cram -h", which breaks the output at 80 characters. This
6120 ;; causes the line showing the default shell to break into two
6121 ;; lines, but the test expects a single line...
6122 (("env\\['COLUMNS'\\] = '80'")
6123 "env['COLUMNS'] = '160'"))
6124 #t))
6125 (delete 'check)
6126 (add-after 'install 'check
6127 ;; The test phase uses the built library and executable.
6128 ;; It's easier to run it after install since the build
6129 ;; directory contains version-specific PATH.
6130 (lambda* (#:key inputs outputs #:allow-other-keys)
6131 (add-installed-pythonpath inputs outputs)
6132 (setenv "PATH" (string-append (getenv "PATH") ":"
6133 (assoc-ref outputs "out") "/bin"))
6134 (zero? (system* "make" "test")))))))
6135 (build-system python-build-system)
6136 (native-inputs
6137 `(("python-coverage" ,python-coverage)
6138 ("which" ,which)))
6139 (synopsis "Simple testing framework for command line applications")
6140 (description
6141 "Cram is a functional testing framework for command line applications.
6142 Cram tests look like snippets of interactive shell sessions. Cram runs each
6143 command and compares the command output in the test with the command’s actual
6144 output.")
6145 (license license:gpl2+)))
6146
6147 (define-public python2-cram
6148 (package-with-python2 python-cram))
6149
6150 (define-public python-straight-plugin
6151 (package
6152 (name "python-straight-plugin")
6153 (version "1.4.1")
6154 (source
6155 (origin
6156 (method url-fetch)
6157 (uri (pypi-uri "straight.plugin" version))
6158 (sha256
6159 (base32
6160 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6161 (build-system python-build-system)
6162 (home-page "https://github.com/ironfroggy/straight.plugin")
6163 (synopsis "Simple namespaced plugin facility")
6164 (description "Straight Plugin provides a type of plugin you can create from
6165 almost any existing Python modules, and an easy way for outside developers to
6166 add functionality and customization to your projects with their own plugins.")
6167 (license license:expat)))
6168
6169 (define-public python2-straight-plugin
6170 (package-with-python2 python-straight-plugin))
6171
6172 (define-public python-fonttools
6173 (package
6174 (name "python-fonttools")
6175 (version "3.15.1")
6176 (source (origin
6177 (method url-fetch)
6178 (uri (pypi-uri "fonttools" version ".zip"))
6179 (sha256
6180 (base32
6181 "1hhj97izwliy0vybmza72d90l5d4mcn50y8akq7kyccfl82vdx4d"))))
6182 (build-system python-build-system)
6183 (arguments
6184 '(#:test-target "check"
6185 #:phases
6186 (modify-phases %standard-phases
6187 (add-after 'unpack 'patch-setuppy
6188 ;; Remove the undocumented "extra_path" argument, which adds an
6189 ;; intervening directories between site-packages and the package
6190 ;; directory.
6191 (lambda _
6192 (substitute* "setup.py"
6193 (("^[ \t]*extra_path *= *'FontTools',") ""))
6194 #t)))))
6195 (native-inputs
6196 `(("unzip" ,unzip)))
6197 (home-page "https://github.com/behdad/fonttools")
6198 (synopsis "Tools to manipulate font files")
6199 (description
6200 "FontTools/TTX is a library to manipulate font files from Python. It
6201 supports reading and writing of TrueType/OpenType fonts, reading and writing
6202 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6203 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6204 from an XML-based format.")
6205 (license (license:non-copyleft
6206 "file://LICENSE.txt"
6207 "See LICENSE.txt in the distribution."))))
6208
6209 (define-public python2-fonttools
6210 (package-with-python2 python-fonttools))
6211
6212 (define-public python-ly
6213 (package
6214 (name "python-ly")
6215 (version "0.9.5")
6216 (source
6217 (origin
6218 (method url-fetch)
6219 (uri (pypi-uri name version))
6220 (sha256
6221 (base32
6222 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6223 (build-system python-build-system)
6224 (arguments
6225 ;; FIXME: Some tests need network access.
6226 '(#:tests? #f))
6227 (synopsis "Tool and library for manipulating LilyPond files")
6228 (description "This package provides a Python library to parse, manipulate
6229 or create documents in LilyPond format. A command line program ly is also
6230 provided that can be used to do various manipulations with LilyPond files.")
6231 (home-page "https://pypi.python.org/pypi/python-ly")
6232 (license license:gpl2+)))
6233
6234 (define-public python-appdirs
6235 (package
6236 (name "python-appdirs")
6237 (version "1.4.3")
6238 (source
6239 (origin
6240 (method url-fetch)
6241 (uri (pypi-uri "appdirs" version))
6242 (sha256
6243 (base32
6244 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6245 (build-system python-build-system)
6246 (home-page "https://github.com/ActiveState/appdirs")
6247 (synopsis
6248 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6249 (description
6250 "This module provides a portable way of finding out where user data
6251 should be stored on various operating systems.")
6252 (license license:expat)))
6253
6254 (define-public python2-appdirs
6255 (package-with-python2 python-appdirs))
6256
6257 (define-public python-llfuse
6258 (package
6259 (name "python-llfuse")
6260 (version "1.3.3")
6261 (source (origin
6262 (method url-fetch)
6263 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6264 (sha256
6265 (base32
6266 "1rqww632y2zz71xmr6ch7yq80kvza9mhqr2z773k0d8l1lwzl575"))))
6267 (build-system python-build-system)
6268 (inputs
6269 `(("fuse" ,fuse)
6270 ("attr" ,attr)))
6271 (native-inputs
6272 `(("pkg-config" ,pkg-config)))
6273 (synopsis "Python bindings for FUSE")
6274 (description
6275 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6276 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6277 (license license:lgpl2.0+)
6278 (properties `((python2-variant . ,(delay python2-llfuse))))))
6279
6280 (define-public python2-llfuse
6281 (package (inherit (package-with-python2
6282 (strip-python2-variant python-llfuse)))
6283 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6284
6285 ;; For attic-0.16
6286 (define-public python-llfuse-0.41
6287 (package (inherit python-llfuse)
6288 (version "0.41.1")
6289 (source (origin
6290 (method url-fetch)
6291 (uri (string-append
6292 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6293 "llfuse-" version ".tar.bz2"))
6294 (sha256
6295 (base32
6296 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6297 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6298 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6299 (license (list license:expat license:lgpl2.0+))))
6300
6301 (define-public python-msgpack
6302 (package
6303 (name "python-msgpack")
6304 (version "0.5.6")
6305 (source (origin
6306 (method url-fetch)
6307 (uri (pypi-uri "msgpack" version))
6308 (sha256
6309 (base32
6310 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6311 (build-system python-build-system)
6312 (arguments
6313 `(#:modules ((guix build utils)
6314 (guix build python-build-system)
6315 (ice-9 ftw)
6316 (srfi srfi-1)
6317 (srfi srfi-26))
6318 #:phases
6319 (modify-phases %standard-phases
6320 (replace 'check
6321 (lambda _
6322 (let ((cwd (getcwd)))
6323 (setenv "PYTHONPATH"
6324 (string-append cwd "/build/"
6325 (find (cut string-prefix? "lib" <>)
6326 (scandir (string-append cwd "/build")))
6327 ":"
6328 (getenv "PYTHONPATH")))
6329 (invoke "pytest" "-v" "test")))))))
6330 (native-inputs
6331 `(("python-pytest" ,python-pytest)))
6332 (synopsis "MessagePack (de)serializer")
6333 (description "MessagePack is a fast, compact binary serialization format,
6334 suitable for similar data to JSON. This package provides CPython bindings for
6335 reading and writing MessagePack data.")
6336 (home-page "https://pypi.python.org/pypi/msgpack/")
6337 (license license:asl2.0)))
6338
6339 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6340 ;; release 0.5. Some packages like borg still call it by the old name for now.
6341 ;; <https://bugs.gnu.org/30662>
6342 (define-public python-msgpack-transitional
6343 (package
6344 (inherit python-msgpack)
6345 (name "python-msgpack-transitional")
6346 (arguments
6347 (substitute-keyword-arguments (package-arguments python-msgpack)
6348 ((#:phases phases)
6349 `(modify-phases ,phases
6350 (add-after 'unpack 'configure-transitional
6351 (lambda _
6352 ;; Keep using the old name.
6353 (substitute* "setup.py"
6354 (("TRANSITIONAL = False")
6355 "TRANSITIONAL = 1"))
6356 #t))))))))
6357
6358 (define-public python2-msgpack
6359 (package-with-python2 python-msgpack))
6360
6361 (define-public python-netaddr
6362 (package
6363 (name "python-netaddr")
6364 (version "0.7.19")
6365 (source
6366 (origin
6367 (method url-fetch)
6368 (uri (pypi-uri "netaddr" version))
6369 (sha256
6370 (base32
6371 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6372 (build-system python-build-system)
6373 (arguments `(#:tests? #f)) ;; No tests.
6374 (home-page "https://github.com/drkjam/netaddr/")
6375 (synopsis "Pythonic manipulation of network addresses")
6376 (description
6377 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6378 and MAC network addresses.")
6379 (license license:bsd-3)))
6380
6381 (define-public python2-netaddr
6382 (package-with-python2 python-netaddr))
6383
6384 (define-public python-wrapt
6385 (package
6386 (name "python-wrapt")
6387 (version "1.10.11")
6388 (source
6389 (origin
6390 (method url-fetch)
6391 (uri (pypi-uri "wrapt" version))
6392 (sha256
6393 (base32
6394 "1ip3dwib39xhp79kblskgvz3fjzcwxgx3fs3ahdixhpjg7a61mfl"))))
6395 (build-system python-build-system)
6396 (arguments
6397 ;; Tests are not included in the tarball, they are only available in the
6398 ;; git repository.
6399 `(#:tests? #f))
6400 (home-page "https://github.com/GrahamDumpleton/wrapt")
6401 (synopsis "Module for decorators, wrappers and monkey patching")
6402 (description
6403 "The aim of the wrapt module is to provide a transparent object proxy for
6404 Python, which can be used as the basis for the construction of function
6405 wrappers and decorator functions.")
6406 (license license:bsd-2)))
6407
6408 (define-public python2-wrapt
6409 (package-with-python2 python-wrapt))
6410
6411 (define-public python-xlrd
6412 (package
6413 (name "python-xlrd")
6414 (version "1.0.0")
6415 (source (origin
6416 (method url-fetch)
6417 (uri (pypi-uri "xlrd" version))
6418 (sha256
6419 (base32
6420 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6421 (build-system python-build-system)
6422 (arguments
6423 `(#:phases
6424 (modify-phases %standard-phases
6425 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6426 ;; run tests instead for now.
6427 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
6428 (native-inputs `(("python-nose" ,python-nose)))
6429 (home-page "http://www.python-excel.org/")
6430 (synopsis "Library for extracting data from Excel files")
6431 (description "This packages provides a library to extract data from
6432 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6433 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6434 Unicode-aware. It is not intended as an end-user tool.")
6435 (license license:bsd-3)))
6436
6437 (define-public python2-xlrd
6438 (package-with-python2 python-xlrd))
6439
6440 (define-public python-prettytable
6441 (package
6442 (name "python-prettytable")
6443 (version "0.7.2")
6444 (source
6445 (origin
6446 (method url-fetch)
6447 (uri (string-append
6448 "https://pypi.python.org/packages/source/P/PrettyTable/"
6449 "prettytable-" version ".tar.bz2"))
6450 (sha256
6451 (base32
6452 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6453 (build-system python-build-system)
6454 (home-page "http://code.google.com/p/prettytable/")
6455 (synopsis "Display tabular data in an ASCII table format")
6456 (description
6457 "A library designed to represent tabular data in visually appealing ASCII
6458 tables. PrettyTable allows for selection of which columns are to be printed,
6459 independent alignment of columns (left or right justified or centred) and
6460 printing of sub-tables by specifying a row range.")
6461 (license license:bsd-3)))
6462
6463 (define-public python2-prettytable
6464 (package-with-python2 python-prettytable))
6465
6466 (define-public python-tables
6467 (package
6468 (name "python-tables")
6469 (version "3.4.4")
6470 (source
6471 (origin
6472 (method url-fetch)
6473 (uri (pypi-uri "tables" version))
6474 (sha256
6475 (base32
6476 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
6477 (modules '((guix build utils)))
6478 (snippet
6479 '(begin
6480 ;; Remove pre-compiled .pyc files from source.
6481 (for-each delete-file-recursively
6482 (find-files "." "__pycache__" #:directories? #t))
6483 (for-each delete-file (find-files "." "\\.pyc$"))
6484 #t))))
6485 (build-system python-build-system)
6486 (arguments
6487 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6488 ;; or "check", so we must override the build and check phases.
6489 #:phases
6490 (modify-phases %standard-phases
6491 (add-after 'unpack 'use-gcc
6492 (lambda _
6493 (substitute* "setup.py"
6494 (("compiler = new_compiler\\(\\)" line)
6495 (string-append line
6496 "\ncompiler.set_executables(compiler='gcc',"
6497 "compiler_so='gcc',"
6498 "linker_exe='gcc',"
6499 "linker_so='gcc -shared')")))
6500 #t))
6501 (replace 'build
6502 (lambda* (#:key inputs #:allow-other-keys)
6503 (zero? (system* "python" "setup.py" "build"
6504 (string-append "--hdf5="
6505 (assoc-ref inputs "hdf5"))))))
6506 (replace 'check
6507 (lambda* (#:key inputs #:allow-other-keys)
6508 (zero? (system* "python" "setup.py" "check"
6509 (string-append "--hdf5="
6510 (assoc-ref inputs "hdf5")))))))))
6511 (propagated-inputs
6512 `(("python-numexpr" ,python-numexpr)
6513 ("python-numpy" ,python-numpy)))
6514 (native-inputs
6515 `(("python-cython" ,python-cython)
6516 ("pkg-config" ,pkg-config)))
6517 (inputs
6518 `(("hdf5" ,hdf5)
6519 ("bzip2" ,bzip2)
6520 ("zlib" ,zlib)))
6521 (home-page "http://www.pytables.org/")
6522 (synopsis "Hierarchical datasets for Python")
6523 (description "PyTables is a package for managing hierarchical datasets and
6524 designed to efficiently cope with extremely large amounts of data.")
6525 (license license:bsd-3)))
6526
6527 (define-public python2-tables
6528 (package-with-python2 python-tables))
6529
6530 (define-public python-pyasn1
6531 (package
6532 (name "python-pyasn1")
6533 (version "0.4.3")
6534 (source
6535 (origin
6536 (method url-fetch)
6537 (uri (pypi-uri "pyasn1" version))
6538 (sha256
6539 (base32
6540 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
6541 (build-system python-build-system)
6542 (home-page "http://pyasn1.sourceforge.net/")
6543 (synopsis "ASN.1 types and codecs")
6544 (description
6545 "This is an implementation of ASN.1 types and codecs in Python. It is
6546 suitable for a wide range of protocols based on the ASN.1 specification.")
6547 (license license:bsd-2)))
6548
6549 (define-public python2-pyasn1
6550 (package-with-python2 python-pyasn1))
6551
6552 (define-public python-pyasn1-modules
6553 (package
6554 (name "python-pyasn1-modules")
6555 (version "0.2.2")
6556 (source
6557 (origin
6558 (method url-fetch)
6559 (uri (pypi-uri "pyasn1-modules" version))
6560 (sha256
6561 (base32
6562 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
6563 (build-system python-build-system)
6564 (propagated-inputs
6565 `(("python-pyasn1" ,python-pyasn1)))
6566 (home-page "https://sourceforge.net/projects/pyasn1/")
6567 (synopsis "ASN.1 codec implementations")
6568 (description
6569 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6570 implementations of ASN.1-based codecs and protocols.")
6571 (license license:bsd-3)))
6572
6573 (define-public python2-pyasn1-modules
6574 (package-with-python2 python-pyasn1-modules))
6575
6576 (define-public python-ipaddress
6577 (package
6578 (name "python-ipaddress")
6579 (version "1.0.19")
6580 (source (origin
6581 (method url-fetch)
6582 (uri (pypi-uri "ipaddress" version))
6583 (sha256
6584 (base32
6585 "10agaa1cys1bk1ycpl2w8lky9vjx8h1xh1z29mg0niqx0638c390"))))
6586 (build-system python-build-system)
6587 (home-page "https://github.com/phihag/ipaddress")
6588 (synopsis "IP address manipulation library")
6589 (description
6590 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6591 in Python. This library is used to create, poke at, and manipulate IPv4 and
6592 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6593 module to older versions of Python.")
6594 (license license:psfl)))
6595
6596 (define-public python2-ipaddress
6597 (package-with-python2 python-ipaddress))
6598
6599 (define-public python2-ipaddr
6600 (package
6601 (name "python2-ipaddr")
6602 (version "2.1.11")
6603 (source
6604 (origin
6605 (method url-fetch)
6606 (uri (pypi-uri "ipaddr" version))
6607 (sha256
6608 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6609 (build-system python-build-system)
6610 (arguments
6611 `(#:python ,python-2 ;version 2 only
6612 #:phases
6613 (modify-phases %standard-phases
6614 (replace 'check
6615 (lambda* _
6616 (zero? (system* "python" "ipaddr_test.py")))))))
6617 (home-page "https://github.com/google/ipaddr-py")
6618 (synopsis "IP address manipulation library")
6619 (description
6620 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6621 IPv6 addresses and networks.
6622
6623 For new implementations you may prefer to use the standard module
6624 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
6625 versions of Python.")
6626 (license license:asl2.0)))
6627
6628 (define-public python-idna
6629 (package
6630 (name "python-idna")
6631 (version "2.6")
6632 (source
6633 (origin
6634 (method url-fetch)
6635 (uri (pypi-uri "idna" version))
6636 (sha256
6637 (base32
6638 "13qaab6d0s15gknz8v3zbcfmbj6v86hn9pjxgkdf62ch13imssic"))))
6639 (build-system python-build-system)
6640 (home-page "https://github.com/kjd/idna")
6641 (synopsis "Internationalized domain names in applications")
6642 (description
6643 "This is a library to support the Internationalised Domain Names in
6644 Applications (IDNA) protocol as specified in RFC 5891. This version of the
6645 protocol is often referred to as “IDNA2008” and can produce different results
6646 from the earlier standard from 2003. The library is also intended to act as a
6647 suitable drop-in replacement for the “encodings.idna” module that comes with
6648 the Python standard library but currently only supports the older 2003
6649 specification.")
6650 (license license:bsd-4)))
6651
6652 (define-public python2-idna
6653 (package-with-python2 python-idna))
6654
6655 (define-public python-idna-ssl
6656 (package
6657 (name "python-idna-ssl")
6658 (version "1.0.1")
6659 (source
6660 (origin
6661 (method url-fetch)
6662 (uri (pypi-uri "idna-ssl" version))
6663 (sha256
6664 (base32
6665 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
6666 (build-system python-build-system)
6667 (arguments
6668 `(#:tests? #f)) ;circular dependency with python-aiohttp
6669 (home-page "https://github.com/aio-libs/idna-ssl")
6670 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
6671 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
6672 domains support.")
6673 (license license:expat)))
6674
6675 (define-public python-pretend
6676 (package
6677 (name "python-pretend")
6678 (version "1.0.9")
6679 (source
6680 (origin
6681 (method url-fetch)
6682 (uri (string-append "https://pypi.python.org/packages/source/p/"
6683 "pretend/pretend-" version ".tar.gz"))
6684 (sha256
6685 (base32
6686 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
6687 (build-system python-build-system)
6688 (home-page "https://github.com/alex/pretend")
6689 (synopsis "Library for stubbing in Python")
6690 (description
6691 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6692 technique for writing tests. You may hear the term mixed up with mocks,
6693 fakes, or doubles. Basically, a stub is an object that returns pre-canned
6694 responses, rather than doing any computation.")
6695 (license license:bsd-3)))
6696
6697 (define-public python2-pretend
6698 (package-with-python2 python-pretend))
6699
6700 (define-public python-pip
6701 (package
6702 (name "python-pip")
6703 (version "9.0.1")
6704 (source
6705 (origin
6706 (method url-fetch)
6707 (uri (pypi-uri "pip" version))
6708 (sha256
6709 (base32
6710 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
6711 (build-system python-build-system)
6712 (arguments
6713 '(#:tests? #f)) ; there are no tests in the pypi archive.
6714 (home-page "https://pip.pypa.io/")
6715 (synopsis "Package manager for Python software")
6716 (description
6717 "Pip is a package manager for Python software, that finds packages on the
6718 Python Package Index (PyPI).")
6719 (license license:expat)))
6720
6721 (define-public python2-pip
6722 (package-with-python2 python-pip))
6723
6724 (define-public python-tlsh
6725 (package
6726 (name "python-tlsh")
6727 (version "3.4.5")
6728 (home-page "https://github.com/trendmicro/tlsh")
6729 (source (origin
6730 (method url-fetch)
6731 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6732 version ".tar.gz"))
6733 (sha256
6734 (base32
6735 "1x1vahd4zg5kpyr9h9hs3fvh460p25rjy4cclwdnbbw8x3vc30q3"))
6736 (file-name (string-append name "-" version ".tar.gz"))))
6737 (build-system cmake-build-system)
6738 (arguments
6739 '(#:out-of-source? #f
6740 #:phases (modify-phases %standard-phases
6741 (replace
6742 'install
6743 (lambda* (#:key outputs #:allow-other-keys)
6744 ;; Build and install the Python bindings. The underlying
6745 ;; C++ library is apparently not meant to be installed.
6746 (let ((out (assoc-ref outputs "out")))
6747 (with-directory-excursion "py_ext"
6748 (and (system* "python" "setup.py" "build")
6749 (system* "python" "setup.py" "install"
6750 (string-append "--prefix=" out))))))))))
6751 (inputs `(("python" ,python-wrapper))) ;for the bindings
6752 (synopsis "Fuzzy matching library for Python")
6753 (description
6754 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6755 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6756 value which can be used for similarity comparisons. Similar objects have
6757 similar hash values, which allows for the detection of similar objects by
6758 comparing their hash values. The byte stream should have a sufficient amount
6759 of complexity; for example, a byte stream of identical bytes will not generate
6760 a hash value.")
6761 (license license:asl2.0)))
6762
6763 (define-public python2-tlsh
6764 (package
6765 (inherit python-tlsh)
6766 (name "python2-tlsh")
6767 (inputs `(("python" ,python-2)))))
6768
6769 (define-public python-termcolor
6770 (package
6771 (name "python-termcolor")
6772 (version "1.1.0")
6773 (source
6774 (origin
6775 (method url-fetch)
6776 (uri (pypi-uri "termcolor" version))
6777 (sha256
6778 (base32
6779 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6780 (build-system python-build-system)
6781 (arguments
6782 ;; There are no tests.
6783 `(#:tests? #f))
6784 (home-page "https://pypi.python.org/pypi/termcolor")
6785 (synopsis "ANSII Color formatting for terminal output")
6786 (description
6787 "This package provides ANSII Color formatting for output in terminals.")
6788 (license license:expat)))
6789
6790 (define-public python2-termcolor
6791 (package-with-python2 python-termcolor))
6792
6793 (define-public python-libarchive-c
6794 (package
6795 (name "python-libarchive-c")
6796 (version "2.8")
6797 (source (origin
6798 (method url-fetch)
6799 (uri (pypi-uri "libarchive-c" version))
6800 (sha256
6801 (base32
6802 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
6803 (build-system python-build-system)
6804 (arguments
6805 '(#:phases (modify-phases %standard-phases
6806 (add-before
6807 'build 'reference-libarchive
6808 (lambda* (#:key inputs #:allow-other-keys)
6809 ;; Retain the absolute file name of libarchive.so.
6810 (let ((libarchive (assoc-ref inputs "libarchive")))
6811 (substitute* "libarchive/ffi.py"
6812 (("find_library\\('archive'\\)")
6813 (string-append "'" libarchive
6814 "/lib/libarchive.so'"))))))
6815 (replace 'check
6816 (lambda _ (invoke "pytest" "-vv"))))))
6817 (native-inputs
6818 `(("python-mock" ,python-mock)
6819 ("python-pytest" ,python-pytest)))
6820 (inputs
6821 `(("libarchive" ,libarchive)))
6822 (home-page "https://github.com/Changaco/python-libarchive-c")
6823 (synopsis "Python interface to libarchive")
6824 (description
6825 "This package provides Python bindings to libarchive, a C library to
6826 access possibly compressed archives in many different formats. It uses
6827 Python's @code{ctypes} foreign function interface (FFI).")
6828 (license license:lgpl2.0+)))
6829
6830 (define-public python2-libarchive-c
6831 (package-with-python2 python-libarchive-c))
6832
6833 (define-public python-file
6834 (package
6835 (inherit file)
6836 (name "python-file")
6837 (build-system python-build-system)
6838 (arguments
6839 '(#:tests? #f ;no tests
6840 #:configure-flags '("--single-version-externally-managed" "--root=/")
6841 #:phases (modify-phases %standard-phases
6842 (add-before 'build 'change-directory
6843 (lambda _
6844 (chdir "python")
6845 #t))
6846 (add-before 'build 'set-library-file-name
6847 (lambda* (#:key inputs #:allow-other-keys)
6848 (let ((file (assoc-ref inputs "file")))
6849 (substitute* "magic.py"
6850 (("find_library\\('magic'\\)")
6851 (string-append "'" file "/lib/libmagic.so'")))
6852 #t))))))
6853 (inputs `(("file" ,file)))
6854 (self-native-input? #f)
6855 (synopsis "Python bindings to the libmagic file type guesser. Note that
6856 this module and the python-magic module both provide a \"magic.py\" file;
6857 these two modules, which are different and were developed separately, both
6858 serve the same purpose: provide Python bindings for libmagic.")))
6859
6860 (define-public python2-file
6861 (package-with-python2 python-file))
6862
6863 (define-public python-debian
6864 (package
6865 (name "python-debian")
6866 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
6867 (version "0.1.28")
6868 (source
6869 (origin
6870 (method url-fetch)
6871 (uri (pypi-uri name version))
6872 (sha256
6873 (base32
6874 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
6875 (build-system python-build-system)
6876 (propagated-inputs
6877 `(("python-six" ,python-six)))
6878 (synopsis "Debian package related modules")
6879 (description
6880 ;; XXX: Use @enumerate instead of @itemize to work around
6881 ;; <http://bugs.gnu.org/21772>.
6882 "This package provides Python modules that abstract many formats of
6883 Debian-related files, such as:
6884
6885 @enumerate
6886 @item Debtags information;
6887 @item @file{debian/changelog} files;
6888 @item packages files, pdiffs;
6889 @item control files of single or multiple RFC822-style paragraphs---e.g.
6890 @file{debian/control}, @file{.changes}, @file{.dsc};
6891 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6892 contained files and meta-information.
6893 @end enumerate\n")
6894
6895 ;; Modules are either GPLv2+ or GPLv3+.
6896 (license license:gpl3+)))
6897
6898 (define-public python2-debian
6899 (package-with-python2 python-debian))
6900
6901 (define-public python-nbformat
6902 (package
6903 (name "python-nbformat")
6904 (version "4.4.0")
6905 (source
6906 (origin
6907 (method url-fetch)
6908 (uri (pypi-uri "nbformat" version))
6909 (sha256
6910 (base32
6911 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
6912 (build-system python-build-system)
6913 (arguments `(#:tests? #f)) ; no test target
6914 (propagated-inputs
6915 `(("python-ipython-genutils" ,python-ipython-genutils)
6916 ("python-jsonschema" ,python-jsonschema)
6917 ("python-jupyter-core" ,python-jupyter-core)
6918 ("python-traitlets" ,python-traitlets)))
6919 (home-page "http://jupyter.org")
6920 (synopsis "Jupyter Notebook format")
6921 (description "This package provides the reference implementation of the
6922 Jupyter Notebook format and Python APIs for working with notebooks.")
6923 (license license:bsd-3)))
6924
6925 (define-public python2-nbformat
6926 (package-with-python2 python-nbformat))
6927
6928 (define-public python-bleach
6929 (package
6930 (name "python-bleach")
6931 (version "1.4.3")
6932 (source
6933 (origin
6934 (method url-fetch)
6935 (uri (pypi-uri "bleach" version))
6936 (sha256
6937 (base32
6938 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6939 (build-system python-build-system)
6940 (propagated-inputs
6941 `(("python-html5lib" ,python-html5lib-0.9)
6942 ("python-six" ,python-six)))
6943 (native-inputs
6944 `(("python-nose" ,python-nose)))
6945 (home-page "https://github.com/jsocol/bleach")
6946 (synopsis "Whitelist-based HTML-sanitizing tool")
6947 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6948 (license license:asl2.0)))
6949
6950 (define-public python2-bleach
6951 (package-with-python2 python-bleach))
6952
6953 (define-public python-entrypoints
6954 (package
6955 (name "python-entrypoints")
6956 (version "0.2.3")
6957 (source
6958 (origin
6959 (method url-fetch)
6960 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
6961 version ".tar.gz"))
6962 (file-name (string-append name "-" version ".tar.gz"))
6963 (sha256
6964 (base32
6965 "1pdvgfr5bxyvnfvxbsd3zi0dh3il71pc4k6rinx6zpps91b84a56"))))
6966 (build-system python-build-system)
6967 ;; The package does not come with a setup.py file, so we have to generate
6968 ;; one ourselves.
6969 (arguments
6970 `(#:tests? #f
6971 #:phases
6972 (modify-phases %standard-phases
6973 (add-after 'unpack 'create-setup.py
6974 (lambda _
6975 (call-with-output-file "setup.py"
6976 (lambda (port)
6977 (format port "\
6978 from setuptools import setup
6979 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6980 " ,version))))))))
6981 (home-page "https://github.com/takluyver/entrypoints")
6982 (synopsis "Discover and load entry points from installed Python packages")
6983 (description "Entry points are a way for Python packages to advertise
6984 objects with some common interface. The most common examples are
6985 @code{console_scripts} entry points, which define shell commands by
6986 identifying a Python function to run. The @code{entrypoints} module contains
6987 functions to find and load entry points.")
6988 (license license:expat)))
6989
6990 (define-public python2-entrypoints
6991 (package-with-python2 python-entrypoints))
6992
6993 (define-public python-nbconvert
6994 (package
6995 (name "python-nbconvert")
6996 (version "5.0.0b1")
6997 (source
6998 (origin
6999 (method url-fetch)
7000 (uri (pypi-uri "nbconvert" version))
7001 (sha256
7002 (base32
7003 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7004 (build-system python-build-system)
7005 (arguments
7006 `(;; The "bdist_egg" target is disabled by default, causing the installation
7007 ;; to fail.
7008 #:configure-flags (list "bdist_egg")
7009 ;; FIXME: 5 failures, 40 errors.
7010 #:tests? #f))
7011 ;; #:phases
7012 ;; (modify-phases %standard-phases
7013 ;; (replace 'check
7014 ;; (lambda _
7015 ;; (zero? (system* "py.test" "-v")))))
7016 (native-inputs
7017 `(("python-pytest" ,python-pytest)))
7018 (propagated-inputs
7019 `(("python-bleach" ,python-bleach)
7020 ("python-entrypoints" ,python-entrypoints)
7021 ("python-jinja2" ,python-jinja2)
7022 ("python-jupyter-core" ,python-jupyter-core)
7023 ("python-mistune" ,python-mistune)
7024 ("python-nbformat" ,python-nbformat)
7025 ("python-pygments" ,python-pygments)
7026 ("python-traitlets" ,python-traitlets)))
7027 (home-page "http://jupyter.org")
7028 (synopsis "Converting Jupyter Notebooks")
7029 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7030 notebooks to various other formats via Jinja templates. It allows you to
7031 convert an @code{.ipynb} notebook file into various static formats including:
7032
7033 @enumerate
7034 @item HTML
7035 @item LaTeX
7036 @item PDF
7037 @item Reveal JS
7038 @item Markdown (md)
7039 @item ReStructured Text (rst)
7040 @item executable script
7041 @end enumerate\n")
7042 (license license:bsd-3)))
7043
7044 (define-public python2-nbconvert
7045 (package-with-python2 python-nbconvert))
7046
7047 (define-public python-notebook
7048 (package
7049 (name "python-notebook")
7050 (version "4.2.3")
7051 (source (origin
7052 (method url-fetch)
7053 (uri (pypi-uri "notebook" version))
7054 (sha256
7055 (base32
7056 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
7057 (build-system python-build-system)
7058 (arguments
7059 `(#:phases
7060 (modify-phases %standard-phases
7061 (replace 'check
7062 (lambda _
7063 ;; HOME must be set for tests
7064 (setenv "HOME" "/tmp")
7065 (zero? (system* "nosetests")))))))
7066 (propagated-inputs
7067 `(("python-jupyter-core" ,python-jupyter-core)
7068 ("python-nbformat" ,python-nbformat)
7069 ("python-nbconvert" ,python-nbconvert)
7070 ("python-ipython" ,python-ipython)))
7071 (native-inputs
7072 `(("python-nose" ,python-nose)
7073 ("python-sphinx" ,python-sphinx)
7074 ("python-requests" ,python-requests)))
7075 (home-page "http://jupyter.org/")
7076 (synopsis "Web-based notebook environment for interactive computing")
7077 (description
7078 "The Jupyter HTML notebook is a web-based notebook environment for
7079 interactive computing.")
7080 (properties `((python2-variant . ,(delay python2-notebook))))
7081 (license license:bsd-3)))
7082
7083 (define-public python2-notebook
7084 (let ((base (package-with-python2
7085 (strip-python2-variant python-notebook))))
7086 (package (inherit base)
7087 (native-inputs
7088 `(("python2-mock" ,python2-mock)
7089 ,@(package-native-inputs base)))
7090 (arguments
7091 (substitute-keyword-arguments (package-arguments base)
7092 ((#:phases phases)
7093 `(modify-phases ,phases
7094 (add-before 'check 'disable-test-case
7095 ;; The test requires network access to localhost. Curiously it
7096 ;; fails with Python 2 only. Simply make the test-case return
7097 ;; immediately.
7098 (lambda _
7099 (substitute*
7100 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7101 (("formats = self.nbconvert_api") "return #")))))))))))
7102
7103 (define-public python-widgetsnbextension
7104 (package
7105 (name "python-widgetsnbextension")
7106 (version "1.2.6")
7107 (source
7108 (origin
7109 (method url-fetch)
7110 (uri (pypi-uri "widgetsnbextension" version))
7111 (sha256
7112 (base32
7113 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
7114 (build-system python-build-system)
7115 (propagated-inputs
7116 `(("python-notebook" ,python-notebook)))
7117 (native-inputs
7118 `(("python-certifi" ,python-certifi)
7119 ("python-nose" ,python-nose)))
7120 (home-page "https://ipython.org")
7121 (synopsis "IPython HTML widgets for Jupyter")
7122 (description "This package provides interactive HTML widgets for Jupyter
7123 notebooks.")
7124 (license license:bsd-3)))
7125
7126 (define-public python2-widgetsnbextension
7127 (package-with-python2 python-widgetsnbextension))
7128
7129 (define-public python-ipywidgets
7130 (package
7131 (name "python-ipywidgets")
7132 (version "5.2.2")
7133 (source
7134 (origin
7135 (method url-fetch)
7136 (uri (pypi-uri "ipywidgets" version))
7137 (sha256
7138 (base32
7139 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7140 (build-system python-build-system)
7141 ;; FIXME: it's not clear how to run the tests.
7142 (arguments `(#:tests? #f))
7143 (propagated-inputs
7144 `(("python-ipykernel" ,python-ipykernel)
7145 ("python-ipython" ,python-ipython)
7146 ("python-traitlets" ,python-traitlets)
7147 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7148 (home-page "https://ipython.org")
7149 (synopsis "IPython HTML widgets for Jupyter")
7150 (description "Ipywidgets are interactive HTML widgets for Jupyter
7151 notebooks and the IPython kernel. Notebooks come alive when interactive
7152 widgets are used. Users gain control of their data and can visualize changes
7153 in the data.")
7154 (license license:bsd-3)))
7155
7156 (define-public python2-ipywidgets
7157 (package-with-python2 python-ipywidgets))
7158
7159 (define-public python-jupyter-console
7160 (package
7161 (name "python-jupyter-console")
7162 (version "5.2.0")
7163 (source
7164 (origin
7165 (method url-fetch)
7166 (uri (pypi-uri "jupyter_console" version))
7167 (sha256
7168 (base32
7169 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7170 (build-system python-build-system)
7171 ;; FIXME: it's not clear how to run the tests.
7172 (arguments `(#:tests? #f))
7173 (propagated-inputs
7174 `(("python-ipykernel" ,python-ipykernel)
7175 ("python-ipython" ,python-ipython)
7176 ("python-jupyter-client" ,python-jupyter-client)
7177 ("python-prompt-toolkit" ,python-prompt-toolkit)
7178 ("python-pygments" ,python-pygments)))
7179 (home-page "https://jupyter.org")
7180 (synopsis "Jupyter terminal console")
7181 (description "This package provides a terminal-based console frontend for
7182 Jupyter kernels. It also allows for console-based interaction with non-Python
7183 Jupyter kernels such as IJulia and IRKernel.")
7184 (license license:bsd-3)))
7185
7186 (define-public python2-jupyter-console
7187 (package-with-python2 python-jupyter-console))
7188
7189 ;; The python-ipython and python-jupyter-console require each other. To get
7190 ;; the functionality in both packages working, strip down the
7191 ;; python-jupyter-console package when using it as an input to python-ipython.
7192 (define python-jupyter-console-minimal
7193 (package
7194 (inherit python-jupyter-console)
7195 (name "python-jupyter-console-minimal")
7196 (arguments
7197 (substitute-keyword-arguments
7198 (package-arguments python-jupyter-console)
7199 ((#:phases phases)
7200 `(modify-phases ,phases
7201 (add-after 'install 'delete-bin
7202 (lambda* (#:key outputs #:allow-other-keys)
7203 ;; Delete the bin files, to avoid conflicts in profiles
7204 ;; where python-ipython and python-jupyter-console are
7205 ;; both present.
7206 (delete-file-recursively
7207 (string-append
7208 (assoc-ref outputs "out") "/bin"))))))))
7209 ;; Remove the python-ipython propagated input, to avoid the cycle
7210 (propagated-inputs
7211 (alist-delete
7212 "python-ipython"
7213 (package-propagated-inputs python-jupyter-console)))))
7214
7215 (define-public jupyter
7216 (package
7217 (name "jupyter")
7218 (version "1.0.0")
7219 (source
7220 (origin
7221 (method url-fetch)
7222 (uri (pypi-uri "jupyter" version))
7223 (sha256
7224 (base32
7225 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7226 (build-system python-build-system)
7227 ;; FIXME: it's not clear how to run the tests.
7228 (arguments `(#:tests? #f))
7229 (propagated-inputs
7230 `(("python-ipykernel" ,python-ipykernel)
7231 ("python-ipywidgets" ,python-ipywidgets)
7232 ("python-jupyter-console" ,python-jupyter-console)
7233 ("python-nbconvert" ,python-nbconvert)
7234 ("python-notebook" ,python-notebook)))
7235
7236 (native-search-paths
7237 (list (search-path-specification
7238 (variable "JUPYTER_PATH")
7239 (files '("share/jupyter")))))
7240
7241 (home-page "http://jupyter.org")
7242 (synopsis "Web application for interactive documents")
7243 (description
7244 "The Jupyter Notebook is a web application that allows you to create and
7245 share documents that contain live code, equations, visualizations and
7246 explanatory text. Uses include: data cleaning and transformation, numerical
7247 simulation, statistical modeling, machine learning and much more.")
7248 (license license:bsd-3)))
7249
7250 (define-public python-chardet
7251 (package
7252 (name "python-chardet")
7253 (version "3.0.4")
7254 (source
7255 (origin
7256 (method url-fetch)
7257 (uri (pypi-uri "chardet" version))
7258 (sha256
7259 (base32
7260 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7261 (native-inputs
7262 `(("python-hypothesis" ,python-hypothesis)
7263 ("python-pytest" ,python-pytest)
7264 ("python-pytest-runner" ,python-pytest-runner)))
7265 (build-system python-build-system)
7266 (home-page "https://github.com/chardet/chardet")
7267 (synopsis "Universal encoding detector for Python 2 and 3")
7268 (description
7269 "This package provides @code{chardet}, a Python module that can
7270 automatically detect a wide range of file encodings.")
7271 (license license:lgpl2.1+)))
7272
7273 (define-public python2-chardet
7274 (package-with-python2 python-chardet))
7275
7276 (define-public python-docopt
7277 (package
7278 (name "python-docopt")
7279 (version "0.6.2")
7280 (source
7281 (origin
7282 (method url-fetch)
7283 ;; The release on PyPI does not include tests.
7284 (uri (string-append
7285 "https://github.com/docopt/docopt/archive/"
7286 version ".tar.gz"))
7287 (file-name (string-append name "-" version ".tar.gz"))
7288 (sha256
7289 (base32
7290 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7291 (build-system python-build-system)
7292 (native-inputs
7293 `(("python-pytest" ,python-pytest)))
7294 (arguments
7295 `(#:phases
7296 (modify-phases %standard-phases
7297 (replace 'check
7298 (lambda _ (zero? (system* "py.test")))))))
7299 (home-page "http://docopt.org")
7300 (synopsis "Command-line interface description language for Python")
7301 (description "This library allows the user to define a command-line
7302 interface from a program's help message rather than specifying it
7303 programatically with command-line parsers like @code{getopt} and
7304 @code{argparse}.")
7305 (license license:expat)))
7306
7307 (define-public python2-docopt
7308 (package-with-python2 python-docopt))
7309
7310 (define-public python-pythondialog
7311 (package
7312 (name "python-pythondialog")
7313 (version "3.4.0")
7314 (source
7315 (origin
7316 (method url-fetch)
7317 (uri (pypi-uri "pythondialog" version))
7318 (sha256
7319 (base32
7320 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7321 (build-system python-build-system)
7322 (arguments
7323 `(#:phases
7324 (modify-phases %standard-phases
7325 (add-after 'unpack 'patch-path
7326 (lambda* (#:key inputs #:allow-other-keys)
7327 (let* ((dialog (assoc-ref inputs "dialog")))
7328 ;; Since this library really wants to grovel the search path, we
7329 ;; must hardcode dialog's store path into it.
7330 (substitute* "dialog.py"
7331 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7332 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7333 #t))))
7334 #:tests? #f)) ; no test suite
7335 (propagated-inputs
7336 `(("dialog" ,dialog)))
7337 (home-page "http://pythondialog.sourceforge.net/")
7338 (synopsis "Python interface to the UNIX dialog utility")
7339 (description "A Python wrapper for the dialog utility. Its purpose is to
7340 provide an easy to use, pythonic and comprehensive Python interface to dialog.
7341 This allows one to make simple text-mode user interfaces on Unix-like systems")
7342 (license license:lgpl2.1)
7343 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7344
7345 (define-public python2-pythondialog
7346 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7347 (package
7348 (inherit base)
7349 (version (package-version python-pythondialog))
7350 (source (origin
7351 (method url-fetch)
7352 (uri (pypi-uri "python2-pythondialog" version))
7353 (sha256
7354 (base32
7355 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7356
7357 (define-public python-configobj
7358 (package
7359 (name "python-configobj")
7360 (version "5.0.6")
7361 (source (origin
7362 (method url-fetch)
7363 (uri (string-append
7364 "https://pypi.python.org/packages/source/c/configobj/"
7365 "configobj-" version ".tar.gz"))
7366 (sha256
7367 (base32
7368 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7369 ;; Patch setup.py so it looks for python-setuptools, which is
7370 ;; required to parse the keyword 'install_requires' in setup.py.
7371 (patches (search-patches "python-configobj-setuptools.patch"))))
7372 (build-system python-build-system)
7373 (propagated-inputs
7374 `(("python-six" ,python-six)))
7375 (synopsis "Config file reading, writing and validation")
7376 (description "ConfigObj is a simple but powerful config file reader and
7377 writer: an ini file round tripper. Its main feature is that it is very easy to
7378 use, with a straightforward programmer’s interface and a simple syntax for
7379 config files.")
7380 (home-page "https://github.com/DiffSK/configobj")
7381 (license license:bsd-3)))
7382
7383 (define-public python2-configobj
7384 (package-with-python2 python-configobj))
7385
7386 (define-public python-configargparse
7387 (package
7388 (name "python-configargparse")
7389 (version "0.12.0")
7390 (source (origin
7391 (method url-fetch)
7392 (uri (pypi-uri "ConfigArgParse" version))
7393 (sha256
7394 (base32
7395 "0fgkiqh6r3rbkdq3k8c48m85g52k96686rw3a6jg4lcncrkpvk98"))))
7396 (build-system python-build-system)
7397 (native-inputs
7398 `(("python-pyyaml" ,python-pyyaml)))
7399 (arguments
7400 `(#:phases
7401 (modify-phases %standard-phases
7402 (replace 'check
7403 (lambda _
7404 ;; Bypass setuptools-shim because one test relies on "setup.py"
7405 ;; being the first argument passed to the python call.
7406 ;;
7407 ;; NOTE: Many tests do not run because they rely on Python's
7408 ;; built-in test.test_argparse, but we remove the unit tests from
7409 ;; our Python installation.
7410 (zero? (system* "python" "setup.py" "test")))))))
7411 (synopsis "Replacement for argparse")
7412 (description "A drop-in replacement for argparse that allows options to also
7413 be set via config files and/or environment variables.")
7414 (home-page "https://github.com/bw2/ConfigArgParse")
7415 (license license:expat)))
7416
7417 (define-public python2-configargparse
7418 (package-with-python2 python-configargparse))
7419
7420 (define-public python-argparse-manpage
7421 (package
7422 (name "python-argparse-manpage")
7423 (version "1.1")
7424 (source
7425 (origin
7426 (method url-fetch)
7427 (uri (pypi-uri "argparse-manpage" version))
7428 (sha256
7429 (base32
7430 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
7431 (build-system python-build-system)
7432 (home-page "https://github.com/praiskup/argparse-manpage")
7433 (synopsis "Build manual page from Python's ArgumentParser object")
7434 (description
7435 "This package provides tools to build manual pages from Python's
7436 @code{ArgumentParser} object.")
7437 (license license:asl2.0)))
7438
7439 (define-public python-contextlib2
7440 (package
7441 (name "python-contextlib2")
7442 (version "0.4.0")
7443 (source
7444 (origin
7445 (method url-fetch)
7446 (uri (pypi-uri "contextlib2" version))
7447 (sha256
7448 (base32
7449 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7450 (build-system python-build-system)
7451 (arguments
7452 `(#:phases
7453 (modify-phases %standard-phases
7454 (replace 'check
7455 (lambda _ (zero?
7456 (system*
7457 "python" "test_contextlib2.py" "-v")))))))
7458 (home-page "http://contextlib2.readthedocs.org/")
7459 (synopsis "Tools for decorators and context managers")
7460 (description "This module is primarily a backport of the Python
7461 3.2 contextlib to earlier Python versions. Like contextlib, it
7462 provides utilities for common tasks involving decorators and context
7463 managers. It also contains additional features that are not part of
7464 the standard library.")
7465 (license license:psfl)))
7466
7467 (define-public python2-contextlib2
7468 (package-with-python2 python-contextlib2))
7469
7470 (define-public python-texttable
7471 (package
7472 (name "python-texttable")
7473 (version "0.8.7")
7474 (source
7475 (origin
7476 (method url-fetch)
7477 (uri (pypi-uri "texttable" version))
7478 (sha256
7479 (base32
7480 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
7481 (build-system python-build-system)
7482 (arguments '(#:tests? #f)) ; no tests
7483 (home-page "https://github.com/foutaise/texttable/")
7484 (synopsis "Python module for creating simple ASCII tables")
7485 (description "Texttable is a Python module for creating simple ASCII
7486 tables.")
7487 (license license:lgpl2.1+)))
7488
7489 (define-public python2-texttable
7490 (package-with-python2 python-texttable))
7491
7492 (define-public python-atomicwrites
7493 (package
7494 (name "python-atomicwrites")
7495 (version "1.1.5")
7496 (source (origin
7497 (method url-fetch)
7498 (uri (pypi-uri "atomicwrites" version))
7499 (sha256
7500 (base32
7501 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
7502 (build-system python-build-system)
7503 (synopsis "Atomic file writes in Python")
7504 (description "Library for atomic file writes using platform dependent tools
7505 for atomic file system operations.")
7506 (home-page "https://github.com/untitaker/python-atomicwrites")
7507 (license license:expat)))
7508
7509 (define-public python2-atomicwrites
7510 (package-with-python2 python-atomicwrites))
7511
7512 (define-public python-click-threading
7513 (package
7514 (name "python-click-threading")
7515 (version "0.4.4")
7516 (source (origin
7517 (method url-fetch)
7518 (uri (pypi-uri "click-threading" version))
7519 (sha256
7520 (base32
7521 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
7522 (build-system python-build-system)
7523 (propagated-inputs
7524 `(("python-click" ,python-click)))
7525 (synopsis "Utilities for multithreading in Click")
7526 (description "This package provides utilities for multithreading in Click
7527 applications.")
7528 (home-page "https://github.com/click-contrib/click-threading")
7529 (license license:expat)))
7530
7531 (define-public python-click-log
7532 (package
7533 (name "python-click-log")
7534 (version "0.3.2")
7535 (source (origin
7536 (method url-fetch)
7537 (uri (pypi-uri "click-log" version))
7538 (sha256
7539 (base32
7540 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
7541 (build-system python-build-system)
7542 (propagated-inputs
7543 `(("python-click" ,python-click)))
7544 (synopsis "Logging for click applications")
7545 (description "This package provides a Python library for logging Click
7546 applications.")
7547 (home-page "https://github.com/click-contrib/click-log")
7548 (license license:expat)))
7549
7550 (define-public python-apipkg
7551 (package
7552 (name "python-apipkg")
7553 (version "1.4")
7554 (source (origin
7555 (method url-fetch)
7556 (uri (pypi-uri "apipkg" version))
7557 (sha256
7558 (base32
7559 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7560 (build-system python-build-system)
7561 (native-inputs
7562 `(("python-pytest" ,python-pytest)))
7563 (synopsis "Namespace control and lazy-import mechanism")
7564 (description "With apipkg you can control the exported namespace of a Python
7565 package and greatly reduce the number of imports for your users. It is a small
7566 pure Python module that works on virtually all Python versions.")
7567 (home-page "https://github.com/pytest-dev/apipkg")
7568 (license license:expat)))
7569
7570 (define-public python2-apipkg
7571 (package-with-python2 python-apipkg))
7572
7573 (define-public python-execnet
7574 (package
7575 (name "python-execnet")
7576 (version "1.4.1")
7577 (source (origin
7578 (method url-fetch)
7579 (uri (pypi-uri "execnet" version))
7580 (sha256
7581 (base32
7582 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7583 (build-system python-build-system)
7584 (arguments
7585 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7586 ;; The two test failures are caused by the lack of an `ssh` executable.
7587 ;; The test suite can be run with pytest after the 'install' phase.
7588 #:tests? #f))
7589 (native-inputs
7590 `(("python-pytest" ,python-pytest)
7591 ("python-setuptools-scm" ,python-setuptools-scm)))
7592 (propagated-inputs
7593 `(("python-apipkg" ,python-apipkg)))
7594 (synopsis "Rapid multi-Python deployment")
7595 (description "Execnet provides a share-nothing model with
7596 channel-send/receive communication for distributing execution across many
7597 Python interpreters across version, platform and network barriers. It has a
7598 minimal and fast API targeting the following uses:
7599 @enumerate
7600 @item distribute tasks to (many) local or remote CPUs
7601 @item write and deploy hybrid multi-process applications
7602 @item write scripts to administer multiple environments
7603 @end enumerate")
7604 (home-page "http://codespeak.net/execnet/")
7605 (license license:expat)))
7606
7607 (define-public python2-execnet
7608 (package-with-python2 python-execnet))
7609
7610 (define-public python-icalendar
7611 (package
7612 (name "python-icalendar")
7613 (version "4.0.2")
7614 (source (origin
7615 (method url-fetch)
7616 (uri (pypi-uri "icalendar" version))
7617 (sha256
7618 (base32
7619 "13003kw2vbas1ha146vv3x2rdg9k7w38rdzxj63vi1i67jgjldl0"))))
7620 (build-system python-build-system)
7621 (propagated-inputs
7622 `(("python-dateutil" ,python-dateutil)
7623 ("python-pytz" ,python-pytz)))
7624 (synopsis "Python library for parsing iCalendar files")
7625 (description "The icalendar package is a parser/generator of iCalendar
7626 files for use with Python.")
7627 (home-page "https://github.com/collective/icalendar")
7628 (license license:bsd-2)))
7629
7630 (define-public python-sphinxcontrib-newsfeed
7631 (package
7632 (name "python-sphinxcontrib-newsfeed")
7633 (version "0.1.4")
7634 (source (origin
7635 (method url-fetch)
7636 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7637 (sha256
7638 (base32
7639 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7640 (arguments '(#:tests? #f)) ; No tests.
7641 (build-system python-build-system)
7642 (propagated-inputs
7643 `(("python-sphinx" ,python-sphinx)))
7644 (synopsis "News Feed extension for Sphinx")
7645 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7646 Blog, News or Announcements section to a Sphinx website.")
7647 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7648 (license license:bsd-2)))
7649
7650 (define-public python-args
7651 (package
7652 (name "python-args")
7653 (version "0.1.0")
7654 (source (origin
7655 (method url-fetch)
7656 (uri (pypi-uri "args" version))
7657 (sha256
7658 (base32
7659 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7660 (build-system python-build-system)
7661 (home-page "https://github.com/kennethreitz/args")
7662 (synopsis "Command-line argument parser")
7663 (description
7664 "This library provides a Python module to parse command-line arguments.")
7665 (license license:bsd-3)))
7666
7667 (define-public python2-args
7668 (package-with-python2 python-args))
7669
7670 (define-public python-clint
7671 (package
7672 (name "python-clint")
7673 (version "0.5.1")
7674 (source (origin
7675 (method url-fetch)
7676 (uri (pypi-uri "clint" version))
7677 (sha256
7678 (base32
7679 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7680 (build-system python-build-system)
7681 (arguments
7682 '(#:phases
7683 (modify-phases %standard-phases
7684 (replace 'check
7685 (lambda _
7686 (zero? (system* "py.test" "-v")))))))
7687 (native-inputs
7688 `(("python-pytest" ,python-pytest)))
7689 (propagated-inputs
7690 `(("python-args" ,python-args)))
7691 (home-page "https://github.com/kennethreitz/clint")
7692 (synopsis "Command-line interface tools")
7693 (description
7694 "Clint is a Python module filled with a set of tools for developing
7695 command-line applications, including tools for colored and indented
7696 output, progress bar display, and pipes.")
7697 (license license:isc)))
7698
7699 (define-public python2-clint
7700 (package-with-python2 python-clint))
7701
7702 (define-public python-astor
7703 (package
7704 (name "python-astor")
7705 (version "0.5")
7706 (source (origin
7707 (method url-fetch)
7708 (uri (pypi-uri "astor" version))
7709 (sha256
7710 (base32
7711 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7712 (build-system python-build-system)
7713 (home-page "https://github.com/berkerpeksag/astor")
7714 (synopsis "Read and write Python ASTs")
7715 (description
7716 "Astor is designed to allow easy manipulation of Python source via the
7717 Abstract Syntax Tree.")
7718 (license license:bsd-3)))
7719
7720 (define-public python2-astor
7721 (package-with-python2 python-astor))
7722
7723 (define-public python-rply
7724 (package
7725 (name "python-rply")
7726 (version "0.7.5")
7727 (source (origin
7728 (method url-fetch)
7729 (uri (pypi-uri "rply" version))
7730 (sha256
7731 (base32
7732 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
7733 (build-system python-build-system)
7734 (propagated-inputs
7735 `(("python-appdirs" ,python-appdirs)))
7736 (home-page "https://github.com/alex/rply")
7737 (synopsis "Parser generator for Python")
7738 (description
7739 "This package provides a pure Python based parser generator, that also
7740 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7741 with a new public API, and RPython support.")
7742 (license license:bsd-3)))
7743
7744 (define-public python2-rply
7745 (package-with-python2 python-rply))
7746
7747 (define-public python-hy
7748 (package
7749 (name "python-hy")
7750 (version "0.13.0")
7751 (source (origin
7752 (method url-fetch)
7753 (uri (pypi-uri "hy" version))
7754 (sha256
7755 (base32
7756 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
7757 (build-system python-build-system)
7758 (arguments
7759 '(#:phases
7760 (modify-phases %standard-phases
7761 (replace 'check
7762 (lambda _
7763 ;; Tests require write access to HOME.
7764 (setenv "HOME" "/tmp")
7765 (zero? (system* "nosetests")))))))
7766 (native-inputs
7767 `(("python-coverage" ,python-coverage)
7768 ("python-nose" ,python-nose)))
7769 (propagated-inputs
7770 `(("python-astor" ,python-astor)
7771 ("python-clint" ,python-clint)
7772 ("python-rply" ,python-rply)))
7773 (home-page "http://hylang.org/")
7774 (synopsis "Lisp frontend to Python")
7775 (description
7776 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7777 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7778 Python at your fingertips, in Lisp form.")
7779 (license license:expat)))
7780
7781 (define-public python2-hy
7782 (package-with-python2 python-hy))
7783
7784 (define-public python2-functools32
7785 (package
7786 (name "python2-functools32")
7787 (version "3.2.3-2")
7788 (source
7789 (origin
7790 (method url-fetch)
7791 (uri (pypi-uri "functools32" version))
7792 (sha256
7793 (base32
7794 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7795 (build-system python-build-system)
7796 (arguments
7797 `(#:python ,python-2
7798 #:tests? #f)) ; no test target
7799 (home-page "https://github.com/MiCHiLU/python-functools32")
7800 (synopsis
7801 "Backport of the functools module from Python 3.2.3")
7802 (description
7803 "This package is a backport of the @code{functools} module from Python
7804 3.2.3 for use with older versions of Python and PyPy.")
7805 (license license:expat)))
7806
7807 (define-public python2-subprocess32
7808 (package
7809 (name "python2-subprocess32")
7810 (version "3.2.7")
7811 (source (origin
7812 (method url-fetch)
7813 (uri (pypi-uri "subprocess32" version))
7814 (sha256
7815 (base32
7816 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
7817 (patches
7818 (search-patches "python2-subprocess32-disable-input-test.patch"))))
7819 (build-system python-build-system)
7820 (arguments
7821 `(#:python ,python-2
7822 ;; The test suite fails with Python > 2.7.13:
7823 ;; import test.support
7824 ;; ImportError: No module named support
7825 #:tests? #f
7826 #:phases
7827 (modify-phases %standard-phases
7828 (add-after 'unpack 'patch-/bin/sh
7829 (lambda _
7830 (substitute* '("subprocess32.py"
7831 "test_subprocess32.py")
7832 (("/bin/sh") (which "sh")))
7833 #t)))))
7834 (home-page "https://github.com/google/python-subprocess32")
7835 (synopsis "Backport of the subprocess module from Python 3.2")
7836 (description
7837 "This is a backport of the @code{subprocess} standard library module
7838 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
7839 new features. On POSIX systems it is guaranteed to be reliable when used
7840 in threaded applications. It includes timeout support from Python 3.3 but
7841 otherwise matches 3.2’s API.")
7842 (license license:psfl)))
7843
7844 (define-public python2-futures
7845 (package
7846 (name "python2-futures")
7847 (version "3.0.5")
7848 (source
7849 (origin
7850 (method url-fetch)
7851 (uri (pypi-uri "futures" version))
7852 (sha256
7853 (base32
7854 "1pw1z4329xvlabdpwqa6b7v2fxf7hl64m4cgr22ckbym8m8m4hh5"))))
7855 (build-system python-build-system)
7856 (arguments `(#:python ,python-2))
7857 (home-page "https://github.com/agronholm/pythonfutures")
7858 (synopsis
7859 "Backport of the concurrent.futures package from Python 3.2")
7860 (description
7861 "The concurrent.futures module provides a high-level interface for
7862 asynchronously executing callables. This package backports the
7863 concurrent.futures package from Python 3.2")
7864 (license license:bsd-3)))
7865
7866 (define-public python-promise
7867 (package
7868 (name "python-promise")
7869 (version "0.4.2")
7870 (source
7871 (origin
7872 (method url-fetch)
7873 (uri (pypi-uri "promise" version))
7874 (sha256
7875 (base32
7876 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7877 (build-system python-build-system)
7878 ;; Tests wants python-futures, which is a python2 only program, and
7879 ;; can't be found by python-promise at test time.
7880 (arguments `(#:tests? #f))
7881 (home-page "https://github.com/syrusakbary/promise")
7882 (synopsis "Promises/A+ implementation for Python")
7883 (description
7884 "Promises/A+ implementation for Python")
7885 (properties `((python2-variant . ,(delay python2-promise))))
7886 (license license:expat)))
7887
7888 (define-public python2-promise
7889 (let ((promise (package-with-python2
7890 (strip-python2-variant python-promise))))
7891 (package (inherit promise)
7892 (arguments (substitute-keyword-arguments (package-arguments promise)
7893 ((#:tests? _) #t)))
7894 (native-inputs
7895 `(("python2-futures" ,python2-futures)
7896 ("python2-pytest" ,python2-pytest)
7897 ,@(package-native-inputs promise))))))
7898
7899 (define-public python-colorama
7900 (package
7901 (name "python-colorama")
7902 (version "0.3.9")
7903 (source
7904 (origin
7905 (method url-fetch)
7906 (uri (pypi-uri "colorama" version))
7907 (sha256
7908 (base32
7909 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
7910 (build-system python-build-system)
7911 (synopsis "Colored terminal text rendering for Python")
7912 (description "Colorama is a Python library for rendering colored terminal
7913 text.")
7914 (home-page "https://pypi.python.org/pypi/colorama")
7915 (license license:bsd-3)))
7916
7917 (define-public python2-colorama
7918 (package-with-python2 python-colorama))
7919
7920 (define-public python-rsa
7921 (package
7922 (name "python-rsa")
7923 (version "3.4.2")
7924 (source
7925 (origin
7926 (method url-fetch)
7927 (uri (pypi-uri "rsa" version))
7928 (sha256
7929 (base32
7930 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
7931 (build-system python-build-system)
7932 (propagated-inputs
7933 `(("python-pyasn1" ,python-pyasn1)))
7934 (synopsis "Pure-Python RSA implementation")
7935 (description "Python-RSA is a pure-Python RSA implementation. It supports
7936 encryption and decryption, signing and verifying signatures, and key
7937 generation according to PKCS#1 version 1.5. It can be used as a Python
7938 library as well as on the command line.")
7939 (home-page "https://stuvel.eu/rsa")
7940 (license license:asl2.0)))
7941
7942 (define-public python2-rsa
7943 (package-with-python2 python-rsa))
7944
7945 (define-public python-pluggy
7946 (package
7947 (name "python-pluggy")
7948 (version "0.6.0")
7949 (source
7950 (origin
7951 (method url-fetch)
7952 (uri (pypi-uri "pluggy" version))
7953 (sha256
7954 (base32
7955 "1zqckndfn85l1cd8pndw212zg1bq9fkg1nnj32kp2mppppsyg2kz"))))
7956 (build-system python-build-system)
7957 (synopsis "Plugin and hook calling mechanism for Python")
7958 (description "Pluggy is an extraction of the plugin manager as used by
7959 Pytest but stripped of Pytest specific details.")
7960 (home-page "https://pypi.python.org/pypi/pluggy")
7961 (license license:expat)))
7962
7963 (define-public python2-pluggy
7964 (package-with-python2 python-pluggy))
7965
7966 (define-public python-tox
7967 (package
7968 (name "python-tox")
7969 (version "2.8.1")
7970 (source
7971 (origin
7972 (method url-fetch)
7973 (uri (pypi-uri "tox" version))
7974 (sha256
7975 (base32
7976 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
7977 (build-system python-build-system)
7978 (arguments
7979 ;; FIXME: Tests require pytest-timeout, which itself requires
7980 ;; pytest>=2.8.0 for installation.
7981 '(#:tests? #f))
7982 (propagated-inputs
7983 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
7984 ("python-py" ,python-py)
7985 ("python-virtualenv" ,python-virtualenv)))
7986 (native-inputs
7987 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
7988 ("python-pytest" ,python-pytest) ; >= 2.3.5
7989 ("python-setuptools-scm" ,python-setuptools-scm)))
7990 (home-page "http://tox.testrun.org/")
7991 (synopsis "Virtualenv-based automation of test activities")
7992 (description "Tox is a generic virtualenv management and test command line
7993 tool. It can be used to check that a package installs correctly with
7994 different Python versions and interpreters, or run tests in each type of
7995 supported environment, or act as a frontend to continuous integration
7996 servers.")
7997 (license license:expat)))
7998
7999 (define-public python2-tox
8000 (package-with-python2 python-tox))
8001
8002 (define-public python-jmespath
8003 (package
8004 (name "python-jmespath")
8005 (version "0.9.3")
8006 (source
8007 (origin
8008 (method url-fetch)
8009 (uri (pypi-uri "jmespath" version))
8010 (sha256
8011 (base32
8012 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8013 (build-system python-build-system)
8014 (native-inputs
8015 `(("python-nose" ,python-nose)))
8016 (synopsis "JSON Matching Expressions")
8017 (description "JMESPath (pronounced “james path”) is a Python library that
8018 allows one to declaratively specify how to extract elements from a JSON
8019 document.")
8020 (home-page "https://github.com/jmespath/jmespath.py")
8021 (license license:expat)))
8022
8023 (define-public python2-jmespath
8024 (package-with-python2 python-jmespath))
8025
8026 (define-public python-botocore
8027 (package
8028 (name "python-botocore")
8029 (version "1.8.43")
8030 (source
8031 (origin
8032 (method url-fetch)
8033 (uri (pypi-uri "botocore" version))
8034 (sha256
8035 (base32
8036 "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg"))))
8037 (build-system python-build-system)
8038 (arguments
8039 ;; FIXME: Many tests are failing.
8040 '(#:tests? #f))
8041 (propagated-inputs
8042 `(("python-dateutil" ,python-dateutil)
8043 ("python-docutils" ,python-docutils)
8044 ("python-jmespath" ,python-jmespath)))
8045 (native-inputs
8046 `(("python-mock" ,python-mock)
8047 ("python-nose" ,python-nose)
8048 ("behave" ,behave)
8049 ("python-tox" ,python-tox)
8050 ("python-wheel" ,python-wheel)))
8051 (home-page "https://github.com/boto/botocore")
8052 (synopsis "Low-level interface to AWS")
8053 (description "Botocore is a Python library that provides a low-level
8054 interface to the Amazon Web Services (AWS) API.")
8055 (license license:asl2.0)))
8056
8057 (define-public python2-botocore
8058 (package-with-python2 python-botocore))
8059
8060 (define-public python-xdo
8061 (package
8062 (name "python-xdo")
8063 (version "0.3")
8064 (source (origin
8065 (method url-fetch)
8066 (uri (string-append
8067 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8068 "python-xdo_" version ".orig.tar.gz"))
8069 (sha256
8070 (base32
8071 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8072 (build-system python-build-system)
8073 (arguments
8074 '(#:phases
8075 (modify-phases %standard-phases
8076 (add-before 'install 'patch-libxdo-path
8077 ;; Hardcode the path of dynamically loaded libxdo library.
8078 (lambda* (#:key inputs #:allow-other-keys)
8079 (let ((libxdo (string-append
8080 (assoc-ref inputs "xdotool")
8081 "/lib/libxdo.so")))
8082 (substitute* "xdo/_xdo.py"
8083 (("find_library\\(\"xdo\"\\)")
8084 (simple-format #f "\"~a\"" libxdo)))
8085 #t))))
8086 #:tests? #f)) ; no tests provided
8087 (propagated-inputs
8088 `(("python-six" ,python-six)))
8089 (inputs
8090 `(("xdotool" ,xdotool)
8091 ("libX11" ,libx11)))
8092 (home-page "https://tracker.debian.org/pkg/python-xdo")
8093 (synopsis "Python library for simulating X11 keyboard/mouse input")
8094 (description "Provides bindings to libxdo for manipulating X11 via simulated
8095 input. (Note that this is mostly a legacy library; you may wish to look at
8096 python-xdo for newer bindings.)")
8097 (license license:bsd-3)))
8098
8099 (define-public python2-xdo
8100 (package-with-python2 python-xdo))
8101
8102 (define-public python-mako
8103 (package
8104 (name "python-mako")
8105 (version "1.0.7")
8106 (source
8107 (origin
8108 (method url-fetch)
8109 (uri (pypi-uri "Mako" version))
8110 (sha256
8111 (base32
8112 "1bi5gnr8r8dva06qpyx4kgjc6spm2k1y908183nbbaylggjzs0jf"))))
8113 (build-system python-build-system)
8114 (propagated-inputs
8115 `(("python-markupsafe" ,python-markupsafe)))
8116 (native-inputs
8117 `(("python-mock" ,python-mock)
8118 ("python-nose" ,python-nose)
8119 ("python-pytest" ,python-pytest)))
8120 (home-page "http://www.makotemplates.org/")
8121 (synopsis "Templating language for Python")
8122 (description "Mako is a templating language for Python that compiles
8123 templates into Python modules.")
8124 (license license:expat)))
8125
8126 (define-public python2-mako
8127 (package-with-python2 python-mako))
8128
8129 (define-public python-waitress
8130 (package
8131 (name "python-waitress")
8132 (version "1.1.0")
8133 (source
8134 (origin
8135 (method url-fetch)
8136 (uri (pypi-uri "waitress" version))
8137 (patches (search-patches "python-waitress-fix-tests.patch"))
8138 (sha256
8139 (base32
8140 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8141 (build-system python-build-system)
8142 (home-page "https://github.com/Pylons/waitress")
8143 (synopsis "Waitress WSGI server")
8144 (description "Waitress is meant to be a production-quality pure-Python WSGI
8145 server with very acceptable performance.")
8146 (license license:zpl2.1)))
8147
8148 (define-public python2-waitress
8149 (package-with-python2 python-waitress))
8150
8151 (define-public python-pyquery
8152 (package
8153 (name "python-pyquery")
8154 (version "1.2.17")
8155 (source
8156 (origin
8157 (method url-fetch)
8158 (uri (pypi-uri "pyquery" version))
8159 (sha256
8160 (base32
8161 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8162 (build-system python-build-system)
8163 (native-inputs
8164 `(("python-webob" ,python-webob)
8165 ("python-webtest" ,python-webtest)))
8166 (propagated-inputs
8167 `(("python-lxml" ,python-lxml)
8168 ("python-cssselect" ,python-cssselect)))
8169 (home-page "https://github.com/gawel/pyquery")
8170 (synopsis "Make jQuery-like queries on xml documents")
8171 (description "pyquery allows you to make jQuery queries on xml documents.
8172 The API is as much as possible the similar to jQuery. pyquery uses lxml for
8173 fast xml and html manipulation.")
8174 (license license:bsd-3)))
8175
8176 (define-public python2-pyquery
8177 (package-with-python2 python-pyquery))
8178
8179 (define-public python-anyjson
8180 (package
8181 (name "python-anyjson")
8182 (version "0.3.3")
8183 (source
8184 (origin
8185 (method url-fetch)
8186 (uri (pypi-uri "anyjson" version))
8187 (sha256
8188 (base32
8189 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8190 (build-system python-build-system)
8191 (arguments
8192 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8193 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8194 ;; whatever) so this transformation needs to be done before the tests
8195 ;; can be run. Maybe we could add a build step to transform beforehand
8196 ;; but it could be annoying/difficult.
8197 ;; We can enable tests for the Python 2 version, though, and do below.
8198 #:tests? #f))
8199 (home-page "https://bitbucket.org/runeh/anyjson/")
8200 (synopsis
8201 "Wraps best available JSON implementation in a common interface")
8202 (description
8203 "Anyjson loads whichever is the fastest JSON module installed
8204 and provides a uniform API regardless of which JSON implementation is used.")
8205 (license license:bsd-3)
8206 (properties `((python2-variant . ,(delay python2-anyjson))))))
8207
8208 (define-public python2-anyjson
8209 (let ((anyjson (package-with-python2
8210 (strip-python2-variant python-anyjson))))
8211 (package
8212 (inherit anyjson)
8213 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8214 #:tests? #t
8215 ,@(package-arguments anyjson)))
8216 (native-inputs `(("python2-nose" ,python2-nose))))))
8217
8218 (define-public python-amqp
8219 (package
8220 (name "python-amqp")
8221 (version "1.4.9")
8222 (source
8223 (origin
8224 (method url-fetch)
8225 (uri (pypi-uri "amqp" version))
8226 (sha256
8227 (base32
8228 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
8229 (build-system python-build-system)
8230 (native-inputs
8231 `(("python-nose" ,python-nose)
8232 ("python-mock" ,python-mock)))
8233 (home-page "https://github.com/celery/py-amqp")
8234 (synopsis
8235 "Low-level AMQP client for Python (fork of amqplib)")
8236 (description
8237 "This is a fork of amqplib which was originally written by Barry Pederson.
8238 It is maintained by the Celery project, and used by kombu as a pure python
8239 alternative when librabbitmq is not available.")
8240 (license license:lgpl2.1+)
8241 (properties `((python2-variant . ,(delay python2-amqp))))))
8242
8243 (define-public python2-amqp
8244 (let ((amqp (package-with-python2
8245 (strip-python2-variant python-amqp))))
8246 (package
8247 (inherit amqp)
8248 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8249 ;; unmaintained. Weirdly, does not do this on the python 3
8250 ;; version?
8251 #:tests? #f
8252 ,@(package-arguments amqp))))))
8253
8254 (define-public python-txamqp
8255 (package
8256 (name "python-txamqp")
8257 (version "0.8.2")
8258 (source
8259 (origin
8260 (method url-fetch)
8261 (uri (pypi-uri "txAMQP" version))
8262 (sha256
8263 (base32
8264 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8265 (build-system python-build-system)
8266 (propagated-inputs
8267 `(("python-six" ,python-six)
8268 ("python-twisted" ,python-twisted)))
8269 (home-page "https://github.com/txamqp/txamqp")
8270 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8271 (description
8272 "This package provides a Python library for communicating with AMQP peers
8273 and brokers using the asynchronous networking framework Twisted. It contains
8274 all the necessary code to connect, send and receive messages to/from an
8275 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8276 also includes support for using Thrift RPC over AMQP in Twisted
8277 applications.")
8278 (license license:asl2.0)))
8279
8280 (define-public python2-txamqp
8281 (package-with-python2 python-txamqp))
8282
8283 (define-public python-kombu
8284 (package
8285 (name "python-kombu")
8286 (version "3.0.37")
8287 (source
8288 (origin
8289 (method url-fetch)
8290 (uri (pypi-uri "kombu" version))
8291 (sha256
8292 (base32
8293 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
8294 (build-system python-build-system)
8295 (native-inputs
8296 `(("python-mock" ,python-mock)
8297 ("python-nose" ,python-nose)))
8298 (propagated-inputs
8299 `(("python-anyjson" ,python-anyjson)
8300 ("python-amqp" ,python-amqp)
8301 ("python-redis" ,python-redis)))
8302 (home-page "http://kombu.readthedocs.org")
8303 (synopsis "Message passing library for Python")
8304 (description "The aim of Kombu is to make messaging in Python as easy as
8305 possible by providing an idiomatic high-level interface for the AMQ protocol,
8306 and also provide proven and tested solutions to common messaging problems.
8307 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8308 message orientation, queuing, routing, reliability and security, for which the
8309 RabbitMQ messaging server is the most popular implementation.")
8310 (license license:bsd-3)
8311 (properties `((python2-variant . ,(delay python2-kombu))))))
8312
8313 (define-public python2-kombu
8314 (let ((kombu (package-with-python2
8315 (strip-python2-variant python-kombu))))
8316 (package
8317 (inherit kombu)
8318 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8319 ;; It works fine on the python3 variant.
8320 #:tests? #f
8321 ,@(package-arguments kombu)))
8322 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8323 ,@(package-native-inputs kombu))))))
8324
8325 (define-public python-billiard
8326 (package
8327 (name "python-billiard")
8328 (version "3.3.0.23")
8329 (source
8330 (origin
8331 (method url-fetch)
8332 (uri (pypi-uri "billiard" version))
8333 (sha256
8334 (base32
8335 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
8336 (build-system python-build-system)
8337 (native-inputs
8338 `(("python-nose" ,python-nose)))
8339 (home-page "https://github.com/celery/billiard")
8340 (synopsis
8341 "Python multiprocessing fork with improvements and bugfixes")
8342 (description
8343 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8344 multiprocessing package itself is a renamed and updated version of R Oudkerk's
8345 pyprocessing package. This standalone variant is intended to be compatible with
8346 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8347 (license license:bsd-3)
8348 (properties `((python2-variant . ,(delay python2-billiard))))))
8349
8350 (define-public python2-billiard
8351 (let ((billiard (package-with-python2
8352 (strip-python2-variant python-billiard))))
8353 (package
8354 (inherit billiard)
8355 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8356 ("python2-mock" ,python2-mock)
8357 ,@(package-native-inputs billiard))))))
8358
8359 (define-public python-celery
8360 (package
8361 (name "python-celery")
8362 (version "3.1.24")
8363 (source
8364 (origin
8365 (method url-fetch)
8366 (uri (pypi-uri "celery" version))
8367 (sha256
8368 (base32
8369 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
8370 (build-system python-build-system)
8371 (arguments
8372 `(#:phases
8373 (modify-phases %standard-phases
8374 ;; These tests break with Python 3.5:
8375 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
8376 (replace 'check
8377 (lambda _
8378 (zero?
8379 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
8380 (native-inputs
8381 `(("python-nose" ,python-nose)))
8382 (propagated-inputs
8383 `(("python-pytz" ,python-pytz)
8384 ("python-billiard" ,python-billiard)
8385 ("python-kombu" ,python-kombu)))
8386 (home-page "http://celeryproject.org")
8387 (synopsis "Distributed Task Queue")
8388 (description "Celery is an asynchronous task queue/job queue based on
8389 distributed message passing. It is focused on real-time operation, but
8390 supports scheduling as well. The execution units, called tasks, are executed
8391 concurrently on a single or more worker servers using multiprocessing,
8392 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8393 synchronously (wait until ready).")
8394 (license license:bsd-3)
8395 (properties `((python2-variant . ,(delay python2-celery))))))
8396
8397 (define-public python2-celery
8398 (let ((celery (package-with-python2
8399 (strip-python2-variant python-celery))))
8400 (package
8401 (inherit celery)
8402 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8403 ("python2-mock" ,python2-mock)
8404 ,@(package-native-inputs celery))))))
8405
8406 (define-public python-translitcodec
8407 (package
8408 (name "python-translitcodec")
8409 (version "0.4.0")
8410 (source
8411 (origin
8412 (method url-fetch)
8413 (uri (pypi-uri "translitcodec" version))
8414 (sha256
8415 (base32
8416 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8417 (build-system python-build-system)
8418 (arguments
8419 `(#:tests? #f)) ; no tests provided
8420 (home-page
8421 "https://github.com/claudep/translitcodec")
8422 (synopsis
8423 "Unicode to 8-bit charset transliteration codec")
8424 (description
8425 "This package contains codecs for transliterating ISO 10646 texts into
8426 best-effort representations using smaller coded character sets (ASCII,
8427 ISO 8859, etc.).")
8428 (license license:expat)))
8429
8430 (define-public python2-translitcodec
8431 (package-with-python2 python-translitcodec))
8432
8433 (define-public python-editor
8434 (package
8435 (name "python-editor")
8436 (version "0.5")
8437 (source
8438 (origin
8439 (method url-fetch)
8440 (uri (pypi-uri "python-editor" version))
8441 (sha256
8442 (base32
8443 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8444 (build-system python-build-system)
8445 (home-page
8446 "https://github.com/fmoo/python-editor")
8447 (synopsis
8448 "Programmatically open an editor, capture the result")
8449 (description
8450 "python-editor is a library that provides the editor module for
8451 programmatically interfacing with your system's $EDITOR.")
8452 (license license:asl2.0)))
8453
8454 (define-public python2-editor
8455 (package-with-python2 python-editor))
8456
8457 (define-public python-sphinxcontrib-programoutput
8458 (package
8459 (name "python-sphinxcontrib-programoutput")
8460 (version "0.10")
8461 (source (origin
8462 (method url-fetch)
8463 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8464 (sha256
8465 (base32
8466 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
8467 (build-system python-build-system)
8468 (arguments
8469 ;; FIXME: Many tests are failing and the upstream is gone.
8470 '(#:tests? #f))
8471 (propagated-inputs
8472 `(("python-sphinx" ,python-sphinx)))
8473 (synopsis "Sphinx extension to include program output")
8474 (description "A Sphinx extension to literally insert the output of arbitrary
8475 commands into documents, helping you to keep your command examples up to date.")
8476 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8477 (license license:bsd-2)))
8478
8479 (define-public python2-sphinxcontrib-programoutput
8480 (package-with-python2 python-sphinxcontrib-programoutput))
8481
8482 (define-public python-sphinx-repoze-autointerface
8483 (package
8484 (name "python-sphinx-repoze-autointerface")
8485 (version "0.8")
8486 (source (origin
8487 (method url-fetch)
8488 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8489 (sha256
8490 (base32
8491 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8492 (build-system python-build-system)
8493 (arguments '(#:tests? #f)) ; No tests.
8494 (propagated-inputs
8495 `(("python-sphinx" ,python-sphinx)
8496 ("python-zope-interface" ,python-zope-interface)))
8497 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8498 (description "This package defines an extension for the Sphinx documentation
8499 system. The extension allows generation of API documentation by
8500 introspection of @code{zope.interface} instances in code.")
8501 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8502 (license license:repoze)))
8503
8504 (define-public python2-sphinx-repoze-autointerface
8505 (package-with-python2 python-sphinx-repoze-autointerface))
8506
8507 (define-public python-vobject
8508 (package
8509 (name "python-vobject")
8510 (version "0.9.5")
8511 (source (origin
8512 (method url-fetch)
8513 (uri (pypi-uri "vobject" version))
8514 (sha256
8515 (base32
8516 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
8517 (build-system python-build-system)
8518 (arguments
8519 '(;; The test suite relies on some non-portable Windows interfaces.
8520 #:tests? #f))
8521 (propagated-inputs
8522 `(("python-dateutil" ,python-dateutil)
8523 ("python-pyicu" ,python-pyicu)))
8524 (synopsis "Parse and generate vCard and vCalendar files")
8525 (description "Vobject is intended to be a full featured Python package for
8526 parsing and generating vCard and vCalendar files. Currently, iCalendar files
8527 are supported and well tested. vCard 3.0 files are supported, and all data
8528 should be imported, but only a few components are understood in a sophisticated
8529 way.")
8530 (home-page "http://eventable.github.io/vobject/")
8531 (license license:asl2.0)))
8532
8533 (define-public python2-vobject
8534 (package-with-python2 python-vobject))
8535
8536 (define-public python-munkres
8537 (package
8538 (name "python-munkres")
8539 (version "1.0.8")
8540 (source (origin
8541 (method url-fetch)
8542 (uri (pypi-uri "munkres" version))
8543 (sha256
8544 (base32
8545 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
8546 (build-system python-build-system)
8547 (arguments
8548 '(#:tests? #f)) ; no test suite
8549 (home-page "http://software.clapper.org/munkres/")
8550 (synopsis "Implementation of the Munkres algorithm")
8551 (description "The Munkres module provides an implementation of the Munkres
8552 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8553 useful for solving the Assignment Problem.")
8554 (license license:bsd-3)))
8555
8556 (define-public python2-munkres
8557 (package-with-python2 python-munkres))
8558
8559 (define-public python-whoosh
8560 (package
8561 (name "python-whoosh")
8562 (version "2.7.4")
8563 (source
8564 (origin
8565 (method url-fetch)
8566 (uri (pypi-uri "Whoosh" version))
8567 (sha256
8568 (base32
8569 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8570 (build-system python-build-system)
8571 (native-inputs
8572 `(("python-pytest" ,python-pytest)))
8573 (home-page "https://bitbucket.org/mchaput/whoosh")
8574 (synopsis "Full text indexing, search, and spell checking library")
8575 (description
8576 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8577 checking library.")
8578 (license license:bsd-2)))
8579
8580 (define-public python2-whoosh
8581 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8582 (package (inherit whoosh)
8583 (propagated-inputs
8584 `(("python2-backport-ssl-match-hostname"
8585 ,python2-backport-ssl-match-hostname)
8586 ,@(package-propagated-inputs whoosh))))))
8587
8588 (define-public python-pathlib
8589 (package
8590 (name "python-pathlib")
8591 (version "1.0.1")
8592 (source (origin
8593 (method url-fetch)
8594 (uri (pypi-uri "pathlib" version))
8595 (sha256
8596 (base32
8597 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8598 (build-system python-build-system)
8599 ;; The tests depend on the internal "test" module, which does not provide
8600 ;; a stable interface.
8601 (arguments `(#:tests? #f))
8602 (home-page "https://pathlib.readthedocs.org/")
8603 (synopsis "Object-oriented file system paths")
8604 (description "Pathlib offers a set of classes to handle file system paths.
8605 It offers the following advantages over using string objects:
8606
8607 @enumerate
8608 @item No more cumbersome use of os and os.path functions. Everything can
8609 be done easily through operators, attribute accesses, and method calls.
8610 @item Embodies the semantics of different path types. For example,
8611 comparing Windows paths ignores casing.
8612 @item Well-defined semantics, eliminating any inconsistencies or
8613 ambiguities (forward vs. backward slashes, etc.).
8614 @end enumerate
8615
8616 Note: In Python 3.4, pathlib is now part of the standard library. For other
8617 Python versions please consider python-pathlib2 instead, which tracks the
8618 standard library module. This module (python-pathlib) isn't maintained
8619 anymore.")
8620 (license license:expat)))
8621
8622 (define-public python2-pathlib
8623 (package-with-python2 python-pathlib))
8624
8625 (define-public python2-pathlib2
8626 (package
8627 (name "python2-pathlib2")
8628 (version "2.3.2")
8629 (source (origin
8630 (method url-fetch)
8631 (uri (pypi-uri "pathlib2" version))
8632 (sha256
8633 (base32
8634 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
8635 (build-system python-build-system)
8636 ;; We only need the the Python 2 variant, since for Python 3 our minimum
8637 ;; version is 3.4 which already includes this package as part of the
8638 ;; standard library.
8639 (arguments
8640 `(#:python ,python-2))
8641 (propagated-inputs
8642 `(("python2-scandir" ,python2-scandir)
8643 ("python2-six" ,python2-six)))
8644 (home-page "https://pypi.python.org/pypi/pathlib2/")
8645 (synopsis "Object-oriented file system paths - backport of standard
8646 pathlib module")
8647 (description "The goal of pathlib2 is to provide a backport of standard
8648 pathlib module which tracks the standard library module, so all the newest
8649 features of the standard pathlib can be used also on older Python versions.
8650
8651 Pathlib offers a set of classes to handle file system paths. It offers the
8652 following advantages over using string objects:
8653
8654 @enumerate
8655 @item No more cumbersome use of os and os.path functions. Everything can
8656 be done easily through operators, attribute accesses, and method calls.
8657 @item Embodies the semantics of different path types. For example,
8658 comparing Windows paths ignores casing.
8659 @item Well-defined semantics, eliminating any inconsistencies or
8660 ambiguities (forward vs. backward slashes, etc.).
8661 @end enumerate")
8662 (license license:expat)))
8663
8664 (define-public python-jellyfish
8665 (package
8666 (name "python-jellyfish")
8667 (version "0.5.6")
8668 (source (origin
8669 (method url-fetch)
8670 (uri (pypi-uri "jellyfish" version))
8671 (sha256
8672 (base32
8673 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
8674 (build-system python-build-system)
8675 (native-inputs
8676 `(("python-pytest" ,python-pytest)))
8677 (home-page "https://github.com/jamesturk/jellyfish")
8678 (synopsis "Approximate and phonetic matching of strings")
8679 (description "Jellyfish uses a variety of string comparison and phonetic
8680 encoding algorithms to do fuzzy string matching.")
8681 (license license:bsd-2)
8682 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8683
8684 (define-public python2-jellyfish
8685 (let ((jellyfish (package-with-python2
8686 (strip-python2-variant python-jellyfish))))
8687 (package (inherit jellyfish)
8688 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
8689 ,@(package-native-inputs jellyfish))))))
8690
8691 (define-public python2-unicodecsv
8692 (package
8693 (name "python2-unicodecsv")
8694 (version "0.14.1")
8695 (source (origin
8696 (method url-fetch)
8697 ;; The test suite is not included in the PyPi release.
8698 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8699 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8700 "archive/" version ".tar.gz"))
8701 (file-name (string-append name "-" version ".tar.gz"))
8702 (sha256
8703 (base32
8704 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8705 (build-system python-build-system)
8706 (arguments
8707 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8708 #:python ,python-2))
8709 (native-inputs
8710 `(("python2-unittest2" ,python2-unittest2)))
8711 (home-page "https://github.com/jdunck/python-unicodecsv")
8712 (synopsis "Unicode CSV module for Python 2")
8713 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8714 module, adding support for Unicode strings.")
8715 (license license:bsd-2)))
8716
8717 (define-public python-rarfile
8718 (package
8719 (name "python-rarfile")
8720 (version "2.8")
8721 (source (origin
8722 (method url-fetch)
8723 (uri (pypi-uri "rarfile" version))
8724 (sha256
8725 (base32
8726 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
8727 (build-system python-build-system)
8728 (arguments
8729 '(#:phases
8730 (modify-phases %standard-phases
8731 (replace 'check
8732 ;; Many tests fail, but the installation proceeds.
8733 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
8734 (native-inputs
8735 `(("which" ,which))) ; required for tests
8736 (propagated-inputs
8737 `(("libarchive" ,libarchive)))
8738 (home-page "https://github.com/markokr/rarfile")
8739 (synopsis "RAR archive reader for Python")
8740 (description "This is Python module for RAR archive reading. The interface
8741 is made as zipfile like as possible.")
8742 (license license:isc)))
8743
8744 (define-public python2-rarfile
8745 (package-with-python2 python-rarfile))
8746
8747 (define-public python-magic
8748 (package
8749 (name "python-magic")
8750 (version "0.4.15")
8751 (source
8752 (origin
8753 (method url-fetch)
8754 (uri (pypi-uri "python-magic" version))
8755 (sha256
8756 (base32
8757 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
8758 (file-name (string-append name "-" version "-checkout"))))
8759 (build-system python-build-system)
8760 (arguments
8761 ;; The tests are unreliable, so don't run them. The tests fail
8762 ;; under Python3 because they were written for Python2 and
8763 ;; contain import statements that do not work in Python3. One of
8764 ;; the tests fails under Python2 because its assertions are
8765 ;; overly stringent; it relies on comparing output strings which
8766 ;; are brittle and can change depending on the version of
8767 ;; libmagic being used and the system on which the test is
8768 ;; running. In my case, under GuixSD 0.10.0, only one test
8769 ;; failed, and it seems to have failed only because the version
8770 ;; of libmagic that is packaged in Guix outputs a slightly
8771 ;; different (but not wrong) string than the one that the test
8772 ;; expected.
8773 '(#:tests? #f
8774 #:phases (modify-phases %standard-phases
8775 ;; Replace a specific method call with a hard-coded
8776 ;; path to the necessary libmagic.so file in the
8777 ;; store. If we don't do this, then the method call
8778 ;; will fail to find the libmagic.so file, which in
8779 ;; turn will cause any application using
8780 ;; python-magic to fail.
8781 (add-before 'build 'hard-code-path-to-libmagic
8782 (lambda* (#:key inputs #:allow-other-keys)
8783 (let ((file (assoc-ref inputs "file")))
8784 (substitute* "magic.py"
8785 (("ctypes.util.find_library\\('magic'\\)")
8786 (string-append "'" file "/lib/libmagic.so'")))
8787 #t)))
8788 (add-before 'install 'disable-egg-compression
8789 (lambda _
8790 (let ((port (open-file "setup.cfg" "a")))
8791 (display "\n[easy_install]\nzip_ok = 0\n"
8792 port)
8793 (close-port port)
8794 #t))))))
8795 (inputs
8796 ;; python-magic needs to be able to find libmagic.so.
8797 `(("file" ,file)))
8798 (home-page
8799 "https://github.com/ahupp/python-magic")
8800 (synopsis
8801 "File type identification using libmagic")
8802 (description
8803 "This module uses ctypes to access the libmagic file type
8804 identification library. It makes use of the local magic database and
8805 supports both textual and MIME-type output. Note that this module and
8806 the python-file module both provide a \"magic.py\" file; these two
8807 modules, which are different and were developed separately, both serve
8808 the same purpose: to provide Python bindings for libmagic.")
8809 (license license:expat)))
8810
8811 (define-public python2-magic
8812 (package-with-python2 python-magic))
8813
8814 (define-public python2-s3cmd
8815 (package
8816 (name "python2-s3cmd")
8817 (version "1.6.1")
8818 (source
8819 (origin
8820 (method url-fetch)
8821 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
8822 "s3cmd-" version ".tar.gz"))
8823 (sha256
8824 (base32
8825 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8826 (build-system python-build-system)
8827 (arguments
8828 ;; s3cmd is written for python2 only and contains no tests.
8829 `(#:python ,python-2
8830 #:tests? #f))
8831 (propagated-inputs
8832 `(("python2-dateutil" ,python2-dateutil)
8833 ;; The python-file package also provides a magic.py module.
8834 ;; This is an unfortunate state of affairs; however, s3cmd
8835 ;; fails to install if it cannot find specifically the
8836 ;; python-magic package. Thus we include it, instead of using
8837 ;; python-file. Ironically, s3cmd sometimes works better
8838 ;; without libmagic bindings at all:
8839 ;; https://github.com/s3tools/s3cmd/issues/198
8840 ("python2-magic" ,python2-magic)))
8841 (home-page "http://s3tools.org/s3cmd")
8842 (synopsis "Command line tool for S3-compatible storage services")
8843 (description
8844 "S3cmd is a command line tool for uploading, retrieving and managing data
8845 in storage services that are compatible with the Amazon Simple Storage
8846 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
8847 GnuPG encryption, and more. It also supports management of Amazon's
8848 CloudFront content delivery network.")
8849 (license license:gpl2+)))
8850
8851 (define-public python-pkgconfig
8852 (package
8853 (name "python-pkgconfig")
8854 (version "1.3.1")
8855 (source
8856 (origin
8857 (method url-fetch)
8858 (uri (pypi-uri "pkgconfig" version))
8859 (sha256
8860 (base32
8861 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
8862 (build-system python-build-system)
8863 (native-inputs
8864 `(("python-nose" ,python-nose)))
8865 (inputs
8866 `(("pkg-config" ,pkg-config)))
8867 (arguments
8868 `(#:phases
8869 (modify-phases %standard-phases
8870 (add-before 'build 'patch
8871 ;; Hard-code the path to pkg-config.
8872 (lambda _
8873 (substitute* "pkgconfig/pkgconfig.py"
8874 (("cmd = 'pkg-config")
8875 (string-append "cmd = '" (which "pkg-config"))))
8876 #t))
8877 (replace 'check
8878 (lambda _
8879 (invoke "nosetests" "test.py"))))))
8880 (home-page "https://github.com/matze/pkgconfig")
8881 (synopsis "Python interface for pkg-config")
8882 (description "This module provides a Python interface to pkg-config. It
8883 can be used to find all pkg-config packages, check if a package exists,
8884 check if a package meets certain version requirements, query CFLAGS and
8885 LDFLAGS and parse the output to build extensions with setup.py.")
8886 (license license:expat)))
8887
8888 (define-public python2-pkgconfig
8889 (package-with-python2 python-pkgconfig))
8890
8891 (define-public python-bz2file
8892 (package
8893 (name "python-bz2file")
8894 (version "0.98")
8895 (source
8896 (origin
8897 (method url-fetch)
8898 (uri (pypi-uri "bz2file" version))
8899 (sha256
8900 (base32
8901 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
8902 (build-system python-build-system)
8903 (arguments
8904 `(#:tests? #f)) ; Tests use deprecated python modules.
8905 (home-page "https://github.com/nvawda/bz2file")
8906 (synopsis "Read and write bzip2-compressed files")
8907 (description
8908 "Bz2file is a Python library for reading and writing bzip2-compressed
8909 files. It contains a drop-in replacement for the I/O interface in the
8910 standard library's @code{bz2} module, including features from the latest
8911 development version of CPython that are not available in older releases.")
8912 (license license:asl2.0)
8913 (properties `((python2-variant . ,(delay python2-bz2file))))))
8914
8915 (define-public python2-bz2file
8916 (let ((base (package-with-python2
8917 (strip-python2-variant python-bz2file))))
8918 (package
8919 (inherit base)
8920 (arguments
8921 `(#:python ,python-2
8922 #:phases
8923 (modify-phases %standard-phases
8924 ;; 'python setup.py test' does not work as of 0.98.
8925 ;; There is only the one test file, so we run it directly.
8926 (replace 'check
8927 (lambda _ (zero? (system* "python"
8928 "test_bz2file.py"))))))))))
8929
8930 (define-public python-future
8931 (package
8932 (name "python-future")
8933 (version "0.16.0")
8934 (source
8935 (origin
8936 (method url-fetch)
8937 (uri (pypi-uri "future" version))
8938 (sha256
8939 (base32
8940 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
8941 (build-system python-build-system)
8942 ;; Many tests connect to the network or are otherwise flawed.
8943 ;; https://github.com/PythonCharmers/python-future/issues/210
8944 (arguments
8945 `(#:tests? #f))
8946 (home-page "http://python-future.org")
8947 (synopsis "Single-source support for Python 3 and 2")
8948 (description
8949 "@code{python-future} is the missing compatibility layer between Python 2 and
8950 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
8951 to support both Python 2 and Python 3 with minimal overhead.")
8952 (license license:expat)))
8953
8954 (define-public python2-future
8955 (package-with-python2 python-future))
8956
8957 (define-public python-cysignals
8958 (package
8959 (name "python-cysignals")
8960 (version "1.1.0")
8961 (source
8962 (origin
8963 (method url-fetch)
8964 (uri (pypi-uri "cysignals" version ".tar.bz2"))
8965 (sha256
8966 (base32
8967 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
8968 (build-system python-build-system)
8969 (native-inputs
8970 `(("python-cython" ,python-cython)
8971 ("python-sphinx" ,python-sphinx)))
8972 (inputs
8973 `(("pari-gp" ,pari-gp)))
8974 (arguments
8975 `(#:modules ((guix build python-build-system)
8976 ((guix build gnu-build-system) #:prefix gnu:)
8977 (guix build utils))
8978 ;; FIXME: Tests are executed after installation and currently fail
8979 ;; when not installing into standard locations; the author is working
8980 ;; on a fix.
8981 #:tests? #f
8982 #:phases
8983 (modify-phases %standard-phases
8984 (add-before
8985 'build 'configure
8986 (assoc-ref gnu:%standard-phases 'configure)))))
8987 (home-page
8988 "https://github.com/sagemath/cysignals")
8989 (synopsis
8990 "Handling of interrupts and signals for Cython")
8991 (description
8992 "The cysignals package provides mechanisms to handle interrupts (and
8993 other signals and errors) in Cython code, using two related approaches,
8994 for mixed Cython/Python code or external C libraries and pure Cython code,
8995 respectively.")
8996 (license license:lgpl3+)))
8997
8998 (define-public python2-cysignals
8999 (package-with-python2 python-cysignals))
9000
9001 (define-public python2-shedskin
9002 (package
9003 (name "python2-shedskin")
9004 (version "0.9.4")
9005 (source
9006 (origin
9007 (method url-fetch)
9008 (uri (string-append "https://github.com/shedskin/shedskin/"
9009 "releases/download/v" version
9010 "/shedskin-" version ".tgz"))
9011 (sha256
9012 (base32
9013 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9014 (build-system python-build-system)
9015 (arguments
9016 `(#:python ,python-2
9017 #:phases (modify-phases %standard-phases
9018 (add-after 'unpack 'fix-resulting-include-libs
9019 (lambda* (#:key inputs #:allow-other-keys)
9020 (let ((libgc (assoc-ref inputs "libgc"))
9021 (pcre (assoc-ref inputs "pcre")))
9022 (substitute* "shedskin/makefile.py"
9023 (("variable == 'CCFLAGS':[ ]*")
9024 (string-append "variable == 'CCFLAGS':\n"
9025 " line += ' -I " pcre "/include"
9026 " -I " libgc "/include'"))
9027 (("variable == 'LFLAGS':[ ]*")
9028 (string-append "variable == 'LFLAGS':\n"
9029 " line += ' -L" pcre "/lib"
9030 " -L " libgc "/lib'")))
9031 #t))))))
9032 (inputs `(("pcre" ,pcre)
9033 ("libgc" ,libgc)))
9034 (home-page "https://shedskin.github.io/")
9035 (synopsis "Experimental Python-2 to C++ Compiler")
9036 (description (string-append "This is an experimental compiler for a subset of
9037 Python. It generates C++ code and a Makefile."))
9038 (license (list license:gpl3 license:bsd-3 license:expat))))
9039
9040 (define-public python2-rope
9041 (package
9042 (name "python2-rope")
9043 (version "0.10.3")
9044 (source
9045 (origin
9046 (method url-fetch)
9047 (uri (pypi-uri "rope" version))
9048 (sha256
9049 (base32
9050 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
9051 (arguments
9052 ;; Rope is currently python-2 only.
9053 ;; https://github.com/python-rope/rope/issues/57
9054 `(#:python ,python-2))
9055 (build-system python-build-system)
9056 (native-inputs
9057 `(("python2-unittest2" ,python2-unittest2)))
9058 (home-page "https://github.com/python-rope/rope")
9059 (synopsis "Refactoring library for Python")
9060 (description "Rope is a refactoring library for Python. It facilitates
9061 the renaming, moving and extracting of attributes, functions, modules, fields
9062 and parameters in Python 2 source code. These refactorings can also be applied
9063 to occurrences in strings and comments.")
9064 (license license:gpl2)))
9065
9066 (define-public python-py3status
9067 (package
9068 (name "python-py3status")
9069 (version "3.7")
9070 (source
9071 (origin
9072 (method url-fetch)
9073 (uri (pypi-uri "py3status" version))
9074 (sha256
9075 (base32
9076 "0shxcfz4wcczj0mhwp4w0dvwd2fdd9bgprq8slim1519iiqzgwhq"))))
9077 (build-system python-build-system)
9078 (inputs
9079 `(("file" ,file)))
9080 (arguments
9081 '(#:phases
9082 (modify-phases %standard-phases
9083 ;; 'file' is used for detection of configuration file encoding
9084 ;; let's make link the dependency to particular input
9085 (add-before 'build 'patch-file-path
9086 (lambda* (#:key inputs #:allow-other-keys)
9087 (let ((file-path (assoc-ref inputs "file")))
9088 (substitute* "py3status/parse_config.py"
9089 (("\\['file', '-b'")
9090 (string-append "['" file-path "/bin/file', '-b'")))
9091 #t))))
9092 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9093 (home-page "https://github.com/ultrabug/py3status")
9094 (synopsis "Extensible i3status wrapper written in Python")
9095 (description "py3status is an i3status wrapper which extends i3status
9096 functionality in a modular way, allowing you to extend your panel with your
9097 own code, responding to click events and updating clock every second.")
9098 (license license:bsd-3)))
9099
9100 (define-public python-tblib
9101 (package
9102 (name "python-tblib")
9103 (version "1.3.2")
9104 (source (origin
9105 (method url-fetch)
9106 (uri (pypi-uri "tblib" version))
9107 (sha256 (base32
9108 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9109 (build-system python-build-system)
9110 (arguments
9111 `(#:phases
9112 (modify-phases %standard-phases
9113 (replace 'check
9114 (lambda _
9115 ;; Upstream runs tests after installation and the package itself
9116 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9117 ;; found.
9118 (setenv "PYTHONPATH"
9119 (string-append (getcwd) "/build/lib:"
9120 (getenv "PYTHONPATH")))
9121 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
9122 (native-inputs
9123 `(("python-pytest" ,python-pytest)
9124 ("python-six" ,python-six)))
9125 (home-page "https://github.com/ionelmc/python-tblib")
9126 (synopsis "Traceback serialization library")
9127 (description
9128 "Traceback serialization allows you to:
9129
9130 @enumerate
9131 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9132 different processes. This allows better error handling when running code over
9133 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9134
9135 @item Parse traceback strings and raise with the parsed tracebacks.
9136 @end enumerate\n")
9137 (license license:bsd-3)))
9138
9139 (define-public python2-tblib
9140 (package-with-python2 python-tblib))
9141
9142 (define-public python-greenlet
9143 (package
9144 (name "python-greenlet")
9145 (version "0.4.11")
9146 (source (origin
9147 (method url-fetch)
9148 (uri (pypi-uri "greenlet" version))
9149 (sha256
9150 (base32
9151 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
9152 (build-system python-build-system)
9153 (home-page "https://greenlet.readthedocs.io/")
9154 (synopsis "Lightweight in-process concurrent programming")
9155 (description
9156 "Greenlet package is a spin-off of Stackless, a version of CPython
9157 that supports micro-threads called \"tasklets\". Tasklets run
9158 pseudo-concurrently (typically in a single or a few OS-level threads) and
9159 are synchronized with data exchanges on \"channels\".")
9160 (license (list license:psfl license:expat))))
9161
9162 (define-public python2-greenlet
9163 (package-with-python2 python-greenlet))
9164
9165 (define-public python-gevent
9166 (package
9167 (name "python-gevent")
9168 (version "1.2.2")
9169 (source (origin
9170 (method url-fetch)
9171 (uri (pypi-uri "gevent" version))
9172 (sha256
9173 (base32
9174 "0bbbjvi423y9k9xagrcsimnayaqymg6f2dj76m9z3mjpkjpci4a7"))
9175 (modules '((guix build utils)))
9176 (snippet
9177 '(begin
9178 ;; unbunding libev and c-ares
9179 (delete-file-recursively "deps")
9180 #t))))
9181 (build-system python-build-system)
9182 (arguments
9183 `(#:modules ((ice-9 ftw)
9184 (srfi srfi-26)
9185 (guix build utils)
9186 (guix build python-build-system))
9187 #:phases (modify-phases %standard-phases
9188 (add-after 'unpack 'unpack-libev
9189 (lambda* (#:key inputs #:allow-other-keys)
9190 (mkdir-p "deps/libev")
9191 ;; FIXME: gevent requires building libev, even though
9192 ;; it only links against the proper one.
9193 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
9194 "--strip-components=1" "-C" "deps/libev")))
9195 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9196 (lambda _
9197 (substitute* "src/gevent/subprocess.py"
9198 (("/bin/sh") (which "sh")))
9199 (for-each (lambda (file)
9200 (substitute* file
9201 (("/bin/sh") (which "sh"))
9202 (("/bin/true") (which "true"))))
9203 (find-files "src/greentest" "\\.py$"))
9204 #t))
9205 (add-before 'build 'do-not-use-bundled-sources
9206 (lambda _
9207 (setenv "CONFIG_SHELL" (which "bash"))
9208 (setenv "LIBEV_EMBED" "false")
9209 (setenv "CARES_EMBED" "false")
9210 (setenv "EMBED" "false")
9211 #t))
9212 (replace 'check
9213 (lambda _
9214 ;; Make sure the build directory is on PYTHONPATH.
9215 (setenv "PYTHONPATH"
9216 (string-append
9217 (getenv "PYTHONPATH") ":"
9218 (getcwd) "/build/"
9219 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9220 (with-directory-excursion "src/greentest"
9221 ;; XXX: Many tests require network access. Instead we only
9222 ;; run known-good tests. Unfortunately we cannot use
9223 ;; recursion here since this directory also contains
9224 ;; Python-version-specific subfolders.
9225 (apply invoke "python" "testrunner.py" "--config"
9226 "known_failures.py"
9227 (scandir "." (cut regexp-exec
9228 (make-regexp "test_+(subprocess|core)")
9229 <>)))))))))
9230 (propagated-inputs
9231 `(("python-greenlet" ,python-greenlet)))
9232 (native-inputs
9233 `(("libev-source" ,(package-source libev))
9234 ("python-six" ,python-six)))
9235 (inputs
9236 `(("c-ares" ,c-ares)
9237 ("libev" ,libev)))
9238 (home-page "http://www.gevent.org/")
9239 (synopsis "Coroutine-based network library")
9240 (description
9241 "gevent is a coroutine-based Python networking library that uses greenlet
9242 to provide a high-level synchronous API on top of the libev event loop.")
9243 (license license:expat)))
9244
9245 (define-public python2-gevent
9246 (package-with-python2 python-gevent))
9247
9248 (define-public python-fastimport
9249 (package
9250 (name "python-fastimport")
9251 (version "0.9.6")
9252 (source
9253 (origin
9254 (method url-fetch)
9255 (uri (pypi-uri "fastimport" version))
9256 (sha256
9257 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9258 (build-system python-build-system)
9259 (home-page "https://github.com/jelmer/python-fastimport")
9260 (synopsis "VCS fastimport parser and generator in Python")
9261 (description "This package provides a parser for and generator of the Git
9262 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9263 format.")
9264 (license license:gpl2+)))
9265
9266 (define-public python2-fastimport
9267 (package-with-python2 python-fastimport))
9268
9269 (define-public python-twisted
9270 (package
9271 (name "python-twisted")
9272 (version "17.1.0")
9273 (source (origin
9274 (method url-fetch)
9275 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9276 (sha256
9277 (base32
9278 "1p245mg15hkxp7hy5cyq2fgvlgjkb4cg0gwkwd148nzy1bbi3wnv"))))
9279 (build-system python-build-system)
9280 (arguments
9281 '(#:tests? #f)) ; FIXME: Some tests are failing.
9282 ;; #:phases
9283 ;; (modify-phases %standard-phases
9284 ;; (replace 'check
9285 ;; (lambda _
9286 ;; (zero? (system* "./bin/trial" "twisted")))))
9287 (propagated-inputs
9288 `(("python-zope-interface" ,python-zope-interface)
9289 ("python-incremental" ,python-incremental)
9290 ("python-constantly" ,python-constantly)
9291 ("python-automat" ,python-automat)))
9292 (home-page "https://twistedmatrix.com/")
9293 (synopsis "Asynchronous networking framework written in Python")
9294 (description
9295 "Twisted is an extensible framework for Python programming, with special
9296 focus on event-based network programming and multiprotocol integration.")
9297 (license license:expat)))
9298
9299 (define-public python2-twisted
9300 (package-with-python2 python-twisted))
9301
9302 (define-public python-pika
9303 (package
9304 (name "python-pika")
9305 (version "0.10.0")
9306 (source
9307 (origin
9308 (method url-fetch)
9309 (uri (pypi-uri "pika" version))
9310 (sha256
9311 (base32
9312 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
9313 (build-system python-build-system)
9314 (native-inputs
9315 `(("python-pyev" ,python-pyev)
9316 ("python-tornado" ,python-tornado)
9317 ("python-twisted" ,python-twisted)))
9318 (home-page "https://pika.readthedocs.org")
9319 (synopsis "Pure Python AMQP Client Library")
9320 (description
9321 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9322 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9323 network support library.")
9324 (license license:bsd-3)))
9325
9326 (define-public python2-pika
9327 (package-with-python2 python-pika))
9328
9329 (define-public python-ply
9330 (package
9331 (name "python-ply")
9332 (version "3.10")
9333 (source
9334 (origin
9335 (method url-fetch)
9336 (uri (pypi-uri "ply" version))
9337 (sha256
9338 (base32
9339 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9340 (build-system python-build-system)
9341 (home-page "http://www.dabeaz.com/ply/")
9342 (synopsis "Python Lex & Yacc")
9343 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9344 It uses LR parsing and does extensive error checking.")
9345 (license license:bsd-3)))
9346
9347 (define-public python2-ply
9348 (package-with-python2 python-ply))
9349
9350 (define-public python-tabulate
9351 (package
9352 (name "python-tabulate")
9353 (version "0.7.7")
9354 (source (origin
9355 (method url-fetch)
9356 (uri (pypi-uri "tabulate" version))
9357 (sha256
9358 (base32
9359 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
9360 (build-system python-build-system)
9361 (arguments
9362 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
9363 ;; and the latest release is not tagged in the upstream repository.
9364 '(#:tests? #f))
9365 (home-page "https://bitbucket.org/astanin/python-tabulate")
9366 (synopsis "Pretty-print tabular data")
9367 (description
9368 "Tabulate is a library and command-line utility to pretty-print tabular
9369 data in Python.")
9370 (license license:expat)))
9371
9372 (define-public python2-tabulate
9373 (package-with-python2 python-tabulate))
9374
9375 (define-public python-kazoo
9376 (package
9377 (name "python-kazoo")
9378 (version "2.4.0")
9379 (source
9380 (origin
9381 (method url-fetch)
9382 (uri (pypi-uri "kazoo" version))
9383 (sha256
9384 (base32
9385 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
9386 (build-system python-build-system)
9387 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9388 (propagated-inputs
9389 `(("python-six" ,python-six)))
9390 (home-page "https://kazoo.readthedocs.org")
9391 (synopsis "High-level Zookeeper client library")
9392 (description
9393 "Kazoo is a Python client library for the Apache Zookeeper distributed
9394 application service. It is designed to be easy to use and to avoid common
9395 programming errors.")
9396 (license license:asl2.0)))
9397
9398 (define-public python2-kazoo
9399 (package-with-python2 python-kazoo))
9400
9401 (define-public python-pykafka
9402 (package
9403 (name "python-pykafka")
9404 (version "2.4.0")
9405 (source (origin
9406 (method url-fetch)
9407 (uri (string-append
9408 "https://pypi.python.org/packages/8b/3e/"
9409 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
9410 "pykafka-" version ".tar.gz"))
9411 (sha256
9412 (base32
9413 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9414 (build-system python-build-system)
9415 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9416 (propagated-inputs
9417 `(("python-gevent" ,python-gevent)
9418 ("python-kazoo" ,python-kazoo)
9419 ("python-tabulate" ,python-tabulate)))
9420 (inputs
9421 `(("librdkafka" ,librdkafka)))
9422 (home-page "https://pykafka.readthedocs.io/")
9423 (synopsis "Apache Kafka client for Python")
9424 (description
9425 "PyKafka is a client for the Apache Kafka distributed messaging system.
9426 It includes Python implementations of Kafka producers and consumers, which
9427 are optionally backed by a C extension built on librdkafka.")
9428 (license license:asl2.0)))
9429
9430 (define-public python2-pykafka
9431 (package-with-python2 python-pykafka))
9432
9433 (define-public python-wcwidth
9434 (package
9435 (name "python-wcwidth")
9436 (version "0.1.7")
9437 (source
9438 (origin
9439 (method url-fetch)
9440 (uri (pypi-uri "wcwidth" version))
9441 (sha256
9442 (base32
9443 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
9444 (build-system python-build-system)
9445 (home-page "https://github.com/jquast/wcwidth")
9446 (synopsis "Measure number of terminal column cells of wide-character codes")
9447 (description "Wcwidth measures the number of terminal column cells of
9448 wide-character codes. It is useful for those implementing a terminal emulator,
9449 or programs that carefully produce output to be interpreted by one. It is a
9450 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9451 specified in POSIX.1-2001 and POSIX.1-2008.")
9452 (license license:expat)))
9453
9454 (define-public python2-wcwidth
9455 (package-with-python2 python-wcwidth))
9456
9457 (define-public python2-jsonrpclib
9458 (package
9459 (name "python2-jsonrpclib")
9460 (version "0.1.7")
9461 (source (origin
9462 (method url-fetch)
9463 (uri (string-append
9464 "https://pypi.python.org/packages/source/j/jsonrpclib/"
9465 "jsonrpclib-" version ".tar.gz"))
9466 (sha256
9467 (base32
9468 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9469 (build-system python-build-system)
9470 (arguments
9471 `(#:tests? #f
9472 #:python ,python-2))
9473 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9474 (synopsis "Implementation of JSON-RPC specification for Python")
9475 (description
9476 "This library is an implementation of the JSON-RPC specification.
9477 It supports both the original 1.0 specification, as well as the
9478 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9479 etc.")
9480 (license license:asl2.0)))
9481
9482 (define-public python-chai
9483 (package
9484 (name "python-chai")
9485 (version "1.1.2")
9486 (source (origin
9487 (method url-fetch)
9488 (uri (pypi-uri "chai" version))
9489 (sha256
9490 (base32
9491 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
9492 (build-system python-build-system)
9493 (home-page "https://github.com/agoragames/chai")
9494 (synopsis "Mocking framework for Python")
9495 (description
9496 "Chai provides an api for mocking, stubbing and spying your python
9497 objects, patterned after the Mocha library for Ruby.")
9498 (license license:bsd-3)))
9499
9500 (define-public python2-chai
9501 (package-with-python2 python-chai))
9502
9503 (define-public python-inflection
9504 (package
9505 (name "python-inflection")
9506 (version "0.3.1")
9507 (source
9508 (origin (method url-fetch)
9509 (uri (pypi-uri "inflection" version))
9510 (sha256
9511 (base32
9512 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9513 (build-system python-build-system)
9514 (native-inputs
9515 `(("python-pytest" ,python-pytest)))
9516 (home-page "https://github.com/jpvanhal/inflection")
9517 (synopsis "Python string transformation library")
9518 (description
9519 "Inflection is a string transformation library. It singularizes
9520 and pluralizes English words, and transforms strings from CamelCase to
9521 underscored string.")
9522 (license license:expat)))
9523
9524 (define-public python2-inflection
9525 (package-with-python2 python-inflection))
9526
9527 (define-public python-pylev
9528 (package
9529 (name "python-pylev")
9530 (version "1.3.0")
9531 (source (origin
9532 (method url-fetch)
9533 (uri (pypi-uri "pylev" version))
9534 (sha256
9535 (base32
9536 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9537 (build-system python-build-system)
9538 (home-page "https://github.com/toastdriven/pylev")
9539 (synopsis "Levenshtein distance implementation in Python")
9540 (description "Pure Python Levenshtein implementation, based off the
9541 Wikipedia code samples at
9542 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9543 (license license:bsd-3)))
9544
9545 (define-public python2-pylev
9546 (package-with-python2 python-pylev))
9547
9548 (define-public python-cleo
9549 (package
9550 (name "python-cleo")
9551 (version "0.6.1")
9552 (source (origin
9553 (method url-fetch)
9554 (uri (pypi-uri "cleo" version))
9555 (sha256
9556 (base32
9557 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
9558 (build-system python-build-system)
9559 (native-inputs
9560 `(;; For testing
9561 ("python-mock" ,python-mock)
9562 ("python-pytest-mock" ,python-pytest-mock)
9563 ("python-pytest" ,python-pytest)))
9564 (propagated-inputs
9565 `(("python-backpack" ,python-backpack)
9566 ("python-pastel" ,python-pastel)
9567 ("python-pylev" ,python-pylev)))
9568 (home-page "https://github.com/sdispater/cleo")
9569 (synopsis "Command-line arguments library for Python")
9570 (description
9571 "Cleo allows you to create command-line commands with signature in
9572 docstring and colored output.")
9573 (license license:expat)))
9574
9575 (define-public python2-cleo
9576 (package-with-python2 python-cleo))
9577
9578 (define-public python-lazy-object-proxy
9579 (package
9580 (name "python-lazy-object-proxy")
9581 (version "1.2.2")
9582 (source (origin
9583 (method url-fetch)
9584 (uri (pypi-uri "lazy-object-proxy" version))
9585 (sha256
9586 (base32
9587 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
9588 (build-system python-build-system)
9589 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9590 (synopsis "Lazy object proxy for python")
9591 (description
9592 "Lazy object proxy is an object that wraps a callable but defers the call
9593 until the object is actually required, and caches the result of said call.")
9594 (license license:bsd-2)))
9595
9596 (define-public python2-lazy-object-proxy
9597 (package-with-python2 python-lazy-object-proxy))
9598
9599 (define-public python-dnspython
9600 (package
9601 (name "python-dnspython")
9602 (version "1.15.0")
9603 (source (origin
9604 (method url-fetch)
9605 (uri (string-append "http://www.dnspython.org/kits/"
9606 version "/dnspython-" version ".tar.gz"))
9607 (sha256
9608 (base32
9609 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
9610 (build-system python-build-system)
9611 (arguments '(#:tests? #f)) ; XXX: requires internet access
9612 (home-page "http://www.dnspython.org")
9613 (synopsis "DNS toolkit for Python")
9614 (description
9615 "dnspython is a DNS toolkit for Python. It supports almost all record
9616 types. It can be used for queries, zone transfers, and dynamic updates.
9617 It supports TSIG authenticated messages and EDNS0.")
9618 (license license:expat)))
9619
9620 (define-public python2-dnspython
9621 (package-with-python2 python-dnspython))
9622
9623 (define-public python-email-validator
9624 (package
9625 (name "python-email-validator")
9626 (version "1.0.2")
9627 (source
9628 (origin (method url-fetch)
9629 (uri (pypi-uri "email_validator" version))
9630 (sha256
9631 (base32
9632 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
9633 (build-system python-build-system)
9634 (arguments
9635 '(#:phases
9636 (modify-phases %standard-phases
9637 (add-before 'build 'use-dnspython
9638 (lambda _
9639 (substitute* "setup.py"
9640 (("dnspython3") "dnspython"))
9641 #t)))))
9642 (propagated-inputs
9643 `(("python-dnspython" ,python-dnspython)
9644 ("python-idna" ,python-idna)))
9645 (home-page "https://github.com/JoshData/python-email-validator")
9646 (synopsis "Email address validation library for Python")
9647 (description
9648 "This library validates email address syntax and deliverability.")
9649 (license license:cc0)))
9650
9651 (define-public python2-email-validator
9652 (package-with-python2 python-email-validator))
9653
9654 (define-public python-ukpostcodeparser
9655 (package
9656 (name "python-ukpostcodeparser")
9657 (version "1.0.3")
9658 (source (origin
9659 (method url-fetch)
9660 (uri (pypi-uri "UkPostcodeParser" version))
9661 (sha256
9662 (base32
9663 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9664 (build-system python-build-system)
9665 (home-page "https://github.com/hamstah/ukpostcodeparser")
9666 (synopsis "UK Postcode parser for Python")
9667 (description
9668 "This library provides the @code{parse_uk_postcode} function for
9669 parsing UK postcodes.")
9670 (license license:expat)))
9671
9672 (define-public python2-ukpostcodeparser
9673 (package-with-python2 python-ukpostcodeparser))
9674
9675 (define-public python-faker
9676 (package
9677 (name "python-faker")
9678 (version "0.7.9")
9679 (source (origin
9680 (method url-fetch)
9681 (uri (pypi-uri "Faker" version))
9682 (sha256
9683 (base32
9684 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
9685 (patches
9686 (search-patches "python-faker-fix-build-32bit.patch"))
9687 (modules '((guix build utils)))
9688 (snippet
9689 '(begin
9690 (for-each delete-file (find-files "." "\\.pyc$"))
9691 #t))))
9692 (build-system python-build-system)
9693 (arguments
9694 '(#:phases
9695 (modify-phases %standard-phases
9696 (replace 'check
9697 (lambda _
9698 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
9699 (native-inputs
9700 `(;; For testing
9701 ("python-email-validator" ,python-email-validator)
9702 ("python-mock" ,python-mock)
9703 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
9704 (propagated-inputs
9705 `(("python-dateutil" ,python-dateutil)
9706 ("python-six" ,python-six)))
9707 (home-page "https://github.com/joke2k/faker")
9708 (synopsis "Python package that generates fake data")
9709 (description
9710 "Faker is a Python package that generates fake data such as names,
9711 addresses, and phone numbers.")
9712 (license license:expat)
9713 (properties `((python2-variant . ,(delay python2-faker))))))
9714
9715 (define-public python2-faker
9716 (let ((base (package-with-python2 (strip-python2-variant
9717 python-faker))))
9718 (package
9719 (inherit base)
9720 (propagated-inputs
9721 `(("python2-ipaddress" ,python2-ipaddress)
9722 ,@(package-propagated-inputs base))))))
9723
9724 (define-public python-pyaml
9725 (package
9726 (name "python-pyaml")
9727 (version "17.7.2")
9728 (source (origin
9729 (method url-fetch)
9730 (uri (pypi-uri "pyaml" version))
9731 (sha256
9732 (base32
9733 "132grrw0ajq4nrappi3ldbkb952k7yn9b6c7csi2rmvzm1g6ppp2"))))
9734 (build-system python-build-system)
9735 (native-inputs
9736 `(("python-unidecode" ,python-unidecode)))
9737 (propagated-inputs
9738 `(("python-pyyaml" ,python-pyyaml)))
9739 (home-page "https://github.com/mk-fg/pretty-yaml")
9740 (synopsis "YAML pretty-print library for Python")
9741 (description
9742 "pyaml is a PyYAML based python module to produce pretty and readable
9743 YAML-serialized data.")
9744 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
9745
9746 (define-public python2-pyaml
9747 (package-with-python2 python-pyaml))
9748
9749 (define-public python-backpack
9750 (package
9751 (name "python-backpack")
9752 (version "0.1")
9753 (source
9754 (origin
9755 (method url-fetch)
9756 (uri (pypi-uri "backpack" version))
9757 (sha256
9758 (base32
9759 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
9760 (build-system python-build-system)
9761 (native-inputs
9762 `(("python-pytest" ,python-pytest)
9763 ("python-nose" ,python-nose)))
9764 (propagated-inputs
9765 `(("python-simplejson" ,python-simplejson)))
9766 (home-page "https://github.com/sdispater/backpack")
9767 (synopsis "Utilities for working with Python collections")
9768 (description "Backpack provides some useful utilities for working with
9769 collections of data.")
9770 (license license:expat)))
9771
9772 (define-public python2-backpack
9773 (package-with-python2 python-backpack))
9774
9775 (define-public python-prompt-toolkit
9776 (package
9777 (name "python-prompt-toolkit")
9778 (version "1.0.15")
9779 (source
9780 (origin
9781 (method url-fetch)
9782 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9783 (sha256
9784 (base32
9785 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))
9786 (build-system python-build-system)
9787 (arguments
9788 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
9789 (propagated-inputs
9790 `(("python-wcwidth" ,python-wcwidth)
9791 ("python-six" ,python-six)
9792 ("python-pygments" ,python-pygments)))
9793 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
9794 (synopsis "Library for building command line interfaces in Python")
9795 (description
9796 "Prompt-Toolkit is a library for building interactive command line
9797 interfaces in Python. It's like GNU Readline but it also features syntax
9798 highlighting while typing, out-of-the-box multi-line input editing, advanced
9799 code completion, incremental search, support for Chinese double-width
9800 characters, mouse support, and auto suggestions.")
9801 (license license:bsd-3)))
9802
9803 (define-public python2-prompt-toolkit
9804 (package-with-python2 python-prompt-toolkit))
9805
9806 (define-public python-jedi
9807 (package
9808 (name "python-jedi")
9809 (version "0.12.1")
9810 (source
9811 (origin
9812 (method url-fetch)
9813 (uri (pypi-uri "jedi" version))
9814 (sha256
9815 (base32
9816 "1h8ypnjisn57kiv1zqrkj1im6sbfnhxllqaa8znh39qkd47ys2dl"))))
9817 (build-system python-build-system)
9818 (arguments
9819 `(#:phases
9820 (modify-phases %standard-phases
9821 (replace 'check (lambda _
9822 (invoke "py.test" "-vv"))))))
9823 (native-inputs
9824 `(("python-pytest" ,python-pytest)
9825 ("python-docopt" ,python-docopt)))
9826 (propagated-inputs
9827 `(("python-parso" ,python-parso)))
9828 (home-page "https://github.com/davidhalter/jedi")
9829 (synopsis "Autocompletion and static analysis library for Python")
9830 (description
9831 "Jedi is a static analysis tool for Python that can be used in Integrated
9832 Development Environments (@dfn{IDE}s) and text editors. It understands Python
9833 on a deeper level than many other static analysis frameworks for Python.
9834
9835 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
9836 well.")
9837 (license license:expat)))
9838
9839 (define-public python2-jedi
9840 (package-with-python2 python-jedi))
9841
9842 (define-public ptpython
9843 (package
9844 (name "ptpython")
9845 (version "0.34")
9846 (source (origin
9847 (method url-fetch)
9848 (uri (pypi-uri "ptpython" version))
9849 (sha256
9850 (base32
9851 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
9852 (build-system python-build-system)
9853 (arguments
9854 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
9855 (propagated-inputs
9856 `(("python-docopt" ,python-docopt)
9857 ("python-jedi" ,python-jedi)
9858 ("python-prompt-toolkit" ,python-prompt-toolkit)
9859 ("python-pygments" ,python-pygments)))
9860 (home-page "https://github.com/jonathanslenders/ptpython")
9861 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
9862 (description
9863 "ptpython is a Python read-eval-print loop with IDE-like features.
9864 It supports syntax highlighting, multiline editing, autocompletion, mouse,
9865 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
9866 etc.")
9867 (license license:bsd-3)
9868 (properties `((python2-variant . ,(delay ptpython-2))))))
9869
9870 (define-public ptpython-2
9871 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
9872 (package
9873 (inherit base)
9874 (name "ptpython2"))))
9875
9876 (define-public python-stem
9877 (package
9878 (name "python-stem")
9879 (version "1.6.0")
9880 (source
9881 (origin
9882 (method url-fetch)
9883 (uri (pypi-uri "stem" version))
9884 (sha256
9885 (base32
9886 "1va9p3ij7lxg6ixfsvaql06dn11l3fgpxmss1dhlvafm7sqizznp"))))
9887 (build-system python-build-system)
9888 (arguments
9889 `(#:phases
9890 (modify-phases %standard-phases
9891 (add-before 'check 'fix-test-environment
9892 (lambda _
9893 ;; Fixes: FileNotFoundError: [Errno 2] No such file or directory:
9894 ;; '/tmp/guix-build-python-stem-1.6.0.drv-0/stem-1.6.0/.gitignore'.
9895 (with-output-to-file ".gitignore"
9896 (lambda _ (format #t "%")))
9897 #t))
9898 (replace 'check
9899 (lambda _
9900 (invoke "./run_tests.py" "--unit")
9901 #t)))))
9902 (native-inputs
9903 `(("python-mock" ,python-mock)
9904 ("python-pep8" ,python-pep8)
9905 ("python-pyflakes" ,python-pyflakes)))
9906 (home-page "https://stem.torproject.org/")
9907 (synopsis
9908 "Python controller library that allows applications to interact with Tor")
9909 (description
9910 "Stem is a Python controller library for Tor. With it you can use Tor's
9911 control protocol to script against the Tor process and read descriptor data
9912 relays publish about themselves.")
9913 (license license:lgpl3)))
9914
9915 (define-public python2-stem
9916 (package-with-python2 python-stem))
9917
9918 (define-public python-pyserial
9919 (package
9920 (name "python-pyserial")
9921 (version "3.1.1")
9922 (source
9923 (origin
9924 (method url-fetch)
9925 (uri (pypi-uri "pyserial" version))
9926 (sha256
9927 (base32
9928 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
9929 (build-system python-build-system)
9930 (arguments
9931 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
9932 ;; #:phases
9933 ;; (modify-phases %standard-phases
9934 ;; (replace 'check
9935 ;; (lambda _
9936 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
9937 (home-page
9938 "https://github.com/pyserial/pyserial")
9939 (synopsis "Python Serial Port Bindings")
9940 (description "@code{pyserial} provide serial port bindings for Python. It
9941 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
9942 and/or Xon/Xoff. The port is accessed in RAW mode.")
9943 (license license:bsd-3)))
9944
9945 (define-public python2-pyserial
9946 (package-with-python2 python-pyserial))
9947
9948 (define-public python-kivy
9949 (package
9950 (name "python-kivy")
9951 (version "1.10.0")
9952 (source
9953 (origin
9954 (method url-fetch)
9955 (uri (pypi-uri "Kivy" version))
9956 (file-name (string-append name "-" version ".tar.gz"))
9957 (sha256
9958 (base32
9959 "1394zh6kvf7k5d8vlzxcsfcailr3q59xwg9b1n7qaf25bvyq1h98"))))
9960 (build-system python-build-system)
9961 (arguments
9962 `(#:tests? #f ; Tests require many optional packages
9963 #:phases
9964 (modify-phases %standard-phases
9965 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
9966 (lambda* (#:key inputs #:allow-other-keys)
9967 (setenv "KIVY_SDL2_PATH"
9968 (string-append (assoc-ref inputs "sdl-union")
9969 "/include/SDL2"))
9970 #t)))))
9971 (native-inputs
9972 `(("git" ,git)
9973 ("pkg-config" ,pkg-config)
9974 ("python-cython" ,python-cython)))
9975 (inputs
9976 `(("gstreamer" ,gstreamer)
9977 ("mesa" ,mesa)
9978 ("sdl-union"
9979 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
9980 (home-page "http://kivy.org")
9981 (synopsis
9982 "Multitouch application framework")
9983 (description
9984 "A software library for rapid development of
9985 hardware-accelerated multitouch applications.")
9986 (license license:expat)))
9987
9988 (define-public python2-kivy
9989 (package-with-python2 python-kivy))
9990
9991 (define-public python-kivy-next
9992 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
9993 (revision "1"))
9994 (package (inherit python-kivy)
9995 (name "python-kivy-next")
9996 (version (string-append "1.9.1-" revision "."
9997 (string-take commit 7)))
9998 (source
9999 (origin
10000 (method git-fetch)
10001 (uri (git-reference
10002 (url "https://github.com/kivy/kivy")
10003 (commit commit)))
10004 (file-name (string-append name "-" version "-checkout"))
10005 (sha256
10006 (base32
10007 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
10008
10009 (define-public python2-kivy-next
10010 (package-with-python2 python-kivy-next))
10011
10012 (define-public python-binaryornot
10013 (package
10014 (name "python-binaryornot")
10015 (version "0.4.4")
10016 (source (origin
10017 (method url-fetch)
10018 (uri (pypi-uri "binaryornot" version))
10019 (sha256
10020 (base32
10021 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10022 (build-system python-build-system)
10023 (propagated-inputs
10024 `(("python-chardet" ,python-chardet)
10025 ("python-hypothesis" ,python-hypothesis)))
10026 (home-page "https://github.com/audreyr/binaryornot")
10027 (synopsis "Package to check if a file is binary or text")
10028 (description "Ultra-lightweight pure Python package to check if a file is
10029 binary or text.")
10030 (license license:bsd-3)
10031 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10032
10033 (define-public python2-binaryornot
10034 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10035 (package (inherit base)
10036 (propagated-inputs
10037 `(("python2-enum34" ,python2-enum34)
10038 ,@(package-propagated-inputs base))))))
10039
10040 (define-public python-nltk
10041 (package
10042 (name "python-nltk")
10043 (version "3.2.1")
10044 (source (origin
10045 (method url-fetch)
10046 (uri (pypi-uri "nltk" version))
10047 (sha256
10048 (base32
10049 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10050 (build-system python-build-system)
10051 (arguments
10052 '(;; The tests require some extra resources to be downloaded.
10053 ;; TODO Try packaging these resources.
10054 #:tests? #f))
10055 (home-page "http://nltk.org/")
10056 (synopsis "Natural Language Toolkit")
10057 (description "It provides interfaces to over 50 corpora and lexical
10058 resources such as WordNet, along with a suite of text processing libraries
10059 for classification, tokenization, stemming, tagging, parsing, and semantic
10060 reasoning, wrappers for natural language processing libraries.")
10061 (license license:asl2.0)))
10062
10063 (define-public python2-nltk
10064 (package-with-python2 python-nltk))
10065
10066 (define-public python-pymongo
10067 (package
10068 (name "python-pymongo")
10069 (version "3.3.0")
10070 (source (origin
10071 (method url-fetch)
10072 (uri (pypi-uri "pymongo" version))
10073 (sha256
10074 (base32
10075 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
10076 (build-system python-build-system)
10077 (propagated-inputs
10078 `(("python-certifi" ,python-certifi)))
10079 (home-page "https://github.com/mongodb/mongo-python-driver")
10080 (synopsis "Python driver for MongoDB")
10081 (description "Python driver for MongoDB.")
10082 (license license:asl2.0)))
10083
10084 (define-public python2-pymongo
10085 (package-with-python2 python-pymongo))
10086
10087 (define-public python-sh
10088 (package
10089 (name "python-sh")
10090 (version "1.11")
10091 (source (origin
10092 (method url-fetch)
10093 (uri (pypi-uri "sh" version))
10094 (sha256
10095 (base32
10096 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
10097 (build-system python-build-system)
10098 (arguments
10099 `(#:tests? #f)) ; no tests
10100 (home-page "https://github.com/amoffat/sh")
10101 (synopsis "Python subprocess interface")
10102 (description "Abstracts process invocation by providing a function
10103 interface for programs.")
10104 (license license:expat)))
10105
10106 (define-public python2-sh
10107 (package-with-python2 python-sh))
10108
10109 (define-public python-consul
10110 (package
10111 (name "python-consul")
10112 (version "0.6.1")
10113 (source
10114 (origin
10115 (method url-fetch)
10116 (uri (pypi-uri "python-consul" version))
10117 (sha256
10118 (base32
10119 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10120 (build-system python-build-system)
10121 (arguments
10122 '(#:tests? #f)) ; The tests are not distributed
10123 (propagated-inputs
10124 `(("python-requests" ,python-requests)
10125 ("python-six" ,python-six)))
10126 (home-page "https://github.com/cablehead/python-consul")
10127 (synopsis "Python client for Consul")
10128 (description
10129 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10130 discovery, monitoring and configuration.")
10131 (license license:expat)))
10132
10133 (define-public python2-consul
10134 (package-with-python2 python-consul))
10135
10136 (define-public python-schematics
10137 (package
10138 (name "python-schematics")
10139 (version "1.1.1")
10140 (source
10141 (origin
10142 (method url-fetch)
10143 (uri (string-append
10144 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
10145 (file-name (string-append name "-" version ".tar.gz"))
10146 (sha256
10147 (base32
10148 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
10149 (build-system python-build-system)
10150 (propagated-inputs
10151 `(("python-six" ,python-six)))
10152 (arguments
10153 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
10154 ; version requirements (eg python-coveralls)
10155 (home-page "https://github.com/schematics/schematics")
10156 (synopsis "Python Data Structures for Humans")
10157 (description "Python Data Structures for Humans.")
10158 (license license:bsd-3)))
10159
10160 (define-public python2-schematics
10161 (package-with-python2 python-schematics))
10162
10163 (define-public python-odfpy
10164 (package
10165 (name "python-odfpy")
10166 (version "1.3.3")
10167 (source (origin
10168 (method url-fetch)
10169 (uri (pypi-uri "odfpy" version))
10170 (sha256
10171 (base32
10172 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10173 (arguments
10174 `(#:modules ((srfi srfi-1)
10175 (guix build python-build-system)
10176 (guix build utils))
10177 #:phases
10178 (modify-phases %standard-phases
10179 (replace 'check
10180 ;; The test runner invokes python2 and python3 for test*.py.
10181 ;; To avoid having both in inputs, we replicate it here.
10182 (lambda _
10183 (every (lambda (test-file)
10184 (zero? (system* "python" test-file)))
10185 (find-files "tests" "^test.*\\.py$")))))))
10186 (build-system python-build-system)
10187 (home-page "https://github.com/eea/odfpy")
10188 (synopsis "Python API and tools to manipulate OpenDocument files")
10189 (description "Collection of libraries and utility programs written in
10190 Python to manipulate OpenDocument 1.2 files.")
10191 (license
10192 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10193 ;; number of files with other licenses.
10194 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10195
10196 (define-public python2-odfpy
10197 (package-with-python2 python-odfpy))
10198
10199 (define-public python-natsort
10200 (package
10201 (name "python-natsort")
10202 (version "5.0.2")
10203 (source (origin
10204 (method url-fetch)
10205 (uri (pypi-uri "natsort" version))
10206 (sha256
10207 (base32
10208 "0bh6j0l8iapjnsgg3bs6q075cnzjl6zw1vlgqyv3qrygm2cxypkn"))))
10209 (build-system python-build-system)
10210 (arguments
10211 `(#:phases
10212 (modify-phases %standard-phases
10213 (add-before 'check 'set-cachedir
10214 ;; Tests require write access to $HOME by default
10215 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
10216 (native-inputs
10217 `(("python-hypothesis" ,python-hypothesis)
10218 ("python-pytest-cache" ,python-pytest-cache)
10219 ("python-pytest-cov" ,python-pytest-cov)
10220 ("python-pytest-flakes" ,python-pytest-flakes)
10221 ("python-pytest-pep8" ,python-pytest-pep8)))
10222 (propagated-inputs ; TODO: Add python-fastnumbers.
10223 `(("python-pyicu" ,python-pyicu)))
10224 (home-page "https://github.com/SethMMorton/natsort")
10225 (synopsis "Natural sorting for python and shell")
10226 (description
10227 "Natsort lets you apply natural sorting on lists instead of
10228 lexicographical. If you use the built-in @code{sorted} method in python
10229 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
10230 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
10231 function @code{natsorted} that identifies numbers and sorts them separately
10232 from strings. It can also sort version numbers, real numbers, mixed types
10233 and more, and comes with a shell command @command{natsort} that exposes this
10234 functionality in the command line.")
10235 (license license:expat)
10236 (properties `((python2-variant . ,(delay python2-natsort))))))
10237
10238 (define-public python2-natsort
10239 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10240 (package (inherit base)
10241 (native-inputs
10242 `(("python2-pathlib" ,python2-pathlib)
10243 ("python2-mock" ,python2-mock)
10244 ("python2-enum34" ,python2-enum34)
10245 ,@(package-native-inputs base))))))
10246
10247 (define-public python-glances
10248 (package
10249 (name "python-glances")
10250 (version "3.0.2")
10251 (source
10252 (origin
10253 (method url-fetch)
10254 (uri (pypi-uri "Glances" version))
10255 (sha256
10256 (base32
10257 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10258 (build-system python-build-system)
10259 (propagated-inputs
10260 `(("python-psutil" ,python-psutil)))
10261 (home-page
10262 "https://github.com/nicolargo/glances")
10263 (synopsis
10264 "A cross-platform curses-based monitoring tool")
10265 (description
10266 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10267 Glances uses the PsUtil library to get information from your system. It monitors
10268 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10269 (license license:lgpl3+)))
10270
10271 (define-public python2-glances
10272 (package-with-python2 python-glances))
10273
10274 (define-public python-graphql-core
10275 (package
10276 (name "python-graphql-core")
10277 (version "0.5.3")
10278 (source
10279 (origin
10280 (method url-fetch)
10281 (uri (pypi-uri "graphql-core" version))
10282 (sha256
10283 (base32
10284 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10285 (build-system python-build-system)
10286 (arguments
10287 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10288 #:phases
10289 (modify-phases %standard-phases
10290 (add-after 'unpack 'patch-hardcoded-version
10291 (lambda _ (substitute*
10292 "setup.py"
10293 (("'gevent==1.1rc1'") "'gevent'"))
10294 #t)))))
10295 (native-inputs
10296 `(("python-gevent" ,python-gevent)
10297 ("python-mock" ,python-mock)
10298 ("python-pytest-mock" ,python-pytest-mock)))
10299 (propagated-inputs
10300 `(("python-promise" ,python-promise)
10301 ("python-six" ,python-six)))
10302 (home-page "https://github.com/graphql-python/graphql-core")
10303 (synopsis "GraphQL implementation for Python")
10304 (description
10305 "GraphQL implementation for Python. GraphQL is a data query language and
10306 runtime designed and used to request and deliver data to mobile and web apps.
10307 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10308 to Python.")
10309 (license license:expat)))
10310
10311 (define-public python2-graphql-core
10312 (package-with-python2 python-graphql-core))
10313
10314 (define-public python-graphql-relay
10315 (package
10316 (name "python-graphql-relay")
10317 (version "0.4.5")
10318 (source
10319 (origin
10320 (method url-fetch)
10321 (uri (pypi-uri "graphql-relay" version))
10322 (sha256
10323 (base32
10324 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10325 (build-system python-build-system)
10326 (arguments
10327 '(#:tests? #f)) ; The tests are not distributed
10328 (propagated-inputs
10329 `(("python-graphql-core" ,python-graphql-core)
10330 ("python-promise" ,python-promise)
10331 ("python-six" ,python-six)))
10332 (home-page "https://github.com/graphql-python/graphql-relay-py")
10333 (synopsis "Relay implementation for Python")
10334 (description
10335 "This is a library to allow the easy creation of Relay-compliant servers
10336 using the GraphQL Python reference implementation of a GraphQL server. It
10337 should be noted that the code is a exact port of the original
10338 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10339 from Facebook.")
10340 (license license:expat)))
10341
10342 (define-public python2-graphql-relay
10343 (package-with-python2 python-graphql-relay))
10344
10345 (define-public python-graphene
10346 (package
10347 (name "python-graphene")
10348 (version "0.10.2")
10349 (source
10350 (origin
10351 (method url-fetch)
10352 (uri (pypi-uri "graphene" version))
10353 (sha256
10354 (base32
10355 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10356 (build-system python-build-system)
10357 (propagated-inputs
10358 `(("python-graphql-core" ,python-graphql-core)
10359 ("python-graphql-relay" ,python-graphql-relay)
10360 ("python-iso8601" ,python-iso8601)
10361 ("python-promise" ,python-promise)
10362 ("python-six" ,python-six)))
10363 (arguments
10364 `(#:tests? #f)) ; no tests/ in the PyPI tarball
10365 (home-page "http://graphene-python.org/")
10366 (synopsis "GraphQL Framework for Python")
10367 (description
10368 "Graphene is a Python library for building GraphQL schemas/types.
10369 A GraphQL schema describes your data model, and provides a GraphQL server
10370 with an associated set of resolve methods that know how to fetch data.")
10371 (properties `((python2-variant . ,(delay python2-graphene))))
10372 (license license:expat)))
10373
10374 (define-public python2-graphene
10375 (let ((base (package-with-python2
10376 (strip-python2-variant python-graphene))))
10377 (package (inherit base)
10378 (native-inputs
10379 `(("python2-sqlalchemy" ,python2-sqlalchemy)
10380 ,@(package-native-inputs base))))))
10381
10382 (define-public python-nautilus
10383 (package
10384 (name "python-nautilus")
10385 (version "0.4.9")
10386 (source
10387 (origin
10388 (method url-fetch)
10389 (uri (pypi-uri "nautilus" version))
10390 (sha256
10391 (base32
10392 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
10393 (build-system python-build-system)
10394 (arguments `(#:tests? #f)) ; fails to import test modules
10395 (propagated-inputs
10396 `(("python-bcrypt" ,python-bcrypt)
10397 ("python-click" ,python-click)
10398 ("python-consul" ,python-consul)
10399 ("python-graphene" ,python-graphene)
10400 ("python-jinja2" ,python-jinja2)
10401 ("python-peewee" ,python-peewee)
10402 ("python-pika" ,python-pika)
10403 ("python-tornado" ,python-tornado)
10404 ("python-wtforms" ,python-wtforms)))
10405 (native-inputs
10406 `(("python-nose2" ,python-nose2)))
10407 (home-page "https://github.com/AlecAivazis/nautilus")
10408 (synopsis "Library for creating microservice applications")
10409 (description
10410 "Nautilus is a framework for flux based microservices that looks to
10411 provide extendible implementations of common aspects of a cloud so that you can
10412 focus on building massively scalable web applications.")
10413 (license license:expat)))
10414
10415 (define-public python-snowballstemmer
10416 (package
10417 (name "python-snowballstemmer")
10418 (version "1.2.1")
10419 (source (origin
10420 (method url-fetch)
10421 (uri (pypi-uri "snowballstemmer" version))
10422 (sha256
10423 (base32
10424 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
10425 (build-system python-build-system)
10426 (arguments
10427 `(;; No tests exist
10428 #:tests? #f))
10429 (home-page "https://github.com/shibukawa/snowball_py")
10430 (synopsis "Snowball stemming library collection for Python")
10431 (description "This package provides 16 word stemmer algorithms generated
10432 from Snowball algorithms. It includes the 15 original ones plus the Poerter
10433 English stemmer.")
10434 (license license:bsd-3)))
10435
10436 (define-public python2-snowballstemmer
10437 (package-with-python2 python-snowballstemmer))
10438
10439 (define-public python-sphinx-cloud-sptheme
10440 (package
10441 (name "python-sphinx-cloud-sptheme")
10442 (version "1.8.0")
10443 (source (origin
10444 (method url-fetch)
10445 (uri (pypi-uri "cloud_sptheme" version))
10446 (sha256
10447 (base32
10448 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
10449 (build-system python-build-system)
10450 ;; FIXME: The 'pypi' release archive does not contain tests.
10451 (arguments '(#:tests? #f))
10452 (native-inputs
10453 `(("python-sphinx" ,python-sphinx)))
10454 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
10455 (synopsis "'Cloud' theme for Sphinx documenter")
10456 (description "This package contains the \"Cloud\" theme for Sphinx and some
10457 related extensions.")
10458 (license license:bsd-3)))
10459
10460 (define-public python2-sphinx-cloud-sptheme
10461 (package-with-python2 python-sphinx-cloud-sptheme))
10462
10463 (define-public python-sphinx-alabaster-theme
10464 (package
10465 (name "python-sphinx-alabaster-theme")
10466 (version "0.7.9")
10467 (source (origin
10468 (method url-fetch)
10469 (uri (pypi-uri "alabaster" version))
10470 (sha256
10471 (base32
10472 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
10473 (build-system python-build-system)
10474 (propagated-inputs
10475 `(("python-pygments" ,python-pygments)))
10476 (home-page "https://alabaster.readthedocs.io/")
10477 (synopsis "Configurable sidebar-enabled Sphinx theme")
10478 (description "Alabaster is a visually (c)lean, responsive, configurable
10479 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
10480 (license license:bsd-3)))
10481
10482 (define-public python2-sphinx-alabaster-theme
10483 (package-with-python2 python-sphinx-alabaster-theme))
10484
10485 (define-public python-setproctitle
10486 (package
10487 (name "python-setproctitle")
10488 (version "1.1.10")
10489 (source
10490 (origin
10491 (method url-fetch)
10492 (uri (pypi-uri "setproctitle" version))
10493 (sha256
10494 (base32
10495 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
10496 (build-system python-build-system)
10497 (arguments
10498 '(#:phases
10499 (modify-phases %standard-phases
10500 (add-before 'check 'patch-Makefile
10501 ;; Stricly this is only required for the python2 variant.
10502 ;; But adding a phase in an inherited package seems to be
10503 ;; cumbersum. So we patch even for python3.
10504 (lambda _
10505 (let ((nose (assoc-ref %build-inputs "python2-nose")))
10506 (when nose
10507 (substitute* "Makefile"
10508 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
10509 (string-append nose "/bin/nosetests "))))
10510 #t)))
10511 (replace 'check
10512 (lambda _
10513 (setenv "PYTHON" (or (which "python3") (which "python")))
10514 (setenv "PYCONFIG" (or (which "python3-config")
10515 (which "python-config")))
10516 (setenv "CC" "gcc")
10517 ;; No need to extend PYTHONPATH to find the built package, since
10518 ;; the Makefile will build anyway
10519 (invoke "make" "check"))))))
10520 (native-inputs
10521 `(("procps" ,procps))) ; required for tests
10522 (home-page
10523 "https://github.com/dvarrazzo/py-setproctitle")
10524 (synopsis
10525 "Setproctitle implementation for Python to customize the process title")
10526 (description "The library allows a process to change its title (as displayed
10527 by system tools such as ps and top).
10528
10529 Changing the title is mostly useful in multi-process systems, for
10530 example when a master process is forked: changing the children's title
10531 allows to identify the task each process is busy with. The technique
10532 is used by PostgreSQL and the OpenSSH Server for example.")
10533 (license license:bsd-3)
10534 (properties `((python2-variant . ,(delay python2-setproctitle))))))
10535
10536 (define-public python2-setproctitle
10537 (let ((base (package-with-python2
10538 (strip-python2-variant python-setproctitle))))
10539 (package
10540 (inherit base)
10541 (native-inputs `(("python2-nose" ,python2-nose)
10542 ,@(package-native-inputs base))))))
10543
10544 (define-public python-validictory
10545 (package
10546 (name "python-validictory")
10547 (version "1.0.1")
10548 (source
10549 (origin
10550 (method url-fetch)
10551 (uri (pypi-uri "validictory" version))
10552 (sha256
10553 (base32
10554 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
10555 (build-system python-build-system)
10556 (arguments
10557 '(#:phases
10558 (modify-phases %standard-phases
10559 (add-after 'unpack 'bootstrap
10560 ;; Move the tests out of the package directory to avoid
10561 ;; packaging them.
10562 (lambda* _
10563 (rename-file "validictory/tests" "tests")
10564 (delete-file "tests/__init__.py")))
10565 (replace 'check
10566 (lambda _
10567 ;; Extend PYTHONPATH so the built package will be found.
10568 (setenv "PYTHONPATH"
10569 (string-append (getcwd) "/build/lib:"
10570 (getenv "PYTHONPATH")))
10571 (zero? (system* "py.test" "-vv" )))))))
10572 (native-inputs
10573 `(("python-pytest" ,python-pytest)))
10574 (home-page
10575 "https://github.com/jamesturk/validictory")
10576 (synopsis "General purpose Python data validator")
10577 (description "It allows validation of arbitrary Python data structures.
10578
10579 The schema format is based on the JSON Schema
10580 proposal (http://json-schema.org), so combined with json the library is also
10581 useful as a validator for JSON data.")
10582 (license license:expat)))
10583
10584 (define-public python2-validictory
10585 (package-with-python2 python-validictory))
10586
10587 (define-public python-pyev
10588 (package
10589 (name "python-pyev")
10590 (version "0.9.0")
10591 (source
10592 (origin
10593 (method url-fetch)
10594 (uri (pypi-uri "pyev" version))
10595 (sha256
10596 (base32
10597 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
10598 (build-system python-build-system)
10599 (arguments
10600 `(#:tests? #f ; no test suite
10601 #:phases
10602 (modify-phases %standard-phases
10603 (add-after 'unpack 'patch
10604 (lambda* (#:key inputs #:allow-other-keys)
10605 (let ((libev (string-append (assoc-ref inputs "libev")
10606 "/lib/libev.so.4")))
10607 (substitute* "setup.py"
10608 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
10609 (string-append "libev_dll_name = \"" libev "\"")))))))))
10610 (inputs
10611 `(("libev" ,libev)))
10612 (home-page "http://pythonhosted.org/pyev/")
10613 (synopsis "Python libev interface")
10614 (description "Pyev provides a Python interface to libev.")
10615 (license license:gpl3)))
10616
10617 (define-public python2-pyev
10618 (package-with-python2 python-pyev))
10619
10620 (define-public python-imagesize
10621 (package
10622 (name "python-imagesize")
10623 (version "0.7.1")
10624 (source
10625 (origin
10626 (method url-fetch)
10627 (uri (pypi-uri "imagesize" version))
10628 (sha256
10629 (base32
10630 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
10631 (build-system python-build-system)
10632 (arguments
10633 '(;; Test files are not distributed on PyPi:
10634 ;; https://github.com/shibukawa/imagesize_py/issues/7
10635 #:tests? #f))
10636 (home-page "https://github.com/shibukawa/imagesize_py")
10637 (synopsis "Gets image size of files in variaous formats in Python")
10638 (description
10639 "This package allows determination of image size from
10640 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
10641 (license license:expat)))
10642
10643 (define-public python2-imagesize
10644 (package-with-python2 python-imagesize))
10645
10646 (define-public python-termstyle
10647 (package
10648 (name "python-termstyle")
10649 (version "0.1.11")
10650 (source
10651 (origin
10652 (method url-fetch)
10653 (uri (pypi-uri "termstyle" version))
10654 (sha256
10655 (base32
10656 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
10657 (build-system python-build-system)
10658 (arguments
10659 '(#:phases
10660 (modify-phases %standard-phases
10661 (replace 'check
10662 (lambda _
10663 (zero? (system* "python" "test3.py")))))))
10664 (home-page "https://github.com/gfxmonk/termstyle")
10665 (synopsis "Console text coloring for Python")
10666 (description "This package provides console text coloring for Python.")
10667 (license license:bsd-3)))
10668
10669 (define-public python-argcomplete
10670 (package
10671 (name "python-argcomplete")
10672 (version "1.7.0")
10673 (source
10674 (origin
10675 (method url-fetch)
10676 (uri (pypi-uri "argcomplete" version))
10677 (sha256
10678 (base32
10679 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
10680 (build-system python-build-system)
10681 (native-inputs
10682 `(("python-pexpect" ,python-pexpect)
10683 ("tcsh" ,tcsh)
10684 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
10685 (home-page "https://github.com/kislyuk/argcomplete")
10686 (synopsis "Shell tab completion for Python argparse")
10687 (description "argcomplete provides extensible command line tab completion
10688 of arguments and options for Python scripts using @code{argparse}. It's
10689 particularly useful for programs with many options or sub-parsers that can
10690 dynamically suggest completions; for example, when browsing resources over the
10691 network.")
10692 (license license:asl2.0)))
10693
10694 (define-public python2-argcomplete
10695 (package-with-python2 python-argcomplete))
10696
10697 (define-public python-xopen
10698 (package
10699 (name "python-xopen")
10700 (version "0.3.3")
10701 (source
10702 (origin
10703 (method url-fetch)
10704 (uri (pypi-uri "xopen" version))
10705 (sha256
10706 (base32
10707 "1a0wbil552wsmklwd89ssmgz3pjd86qa9i7jh8wqb9wslc8a2qjr"))
10708 (file-name (string-append name "-" version ".tar.gz"))))
10709 (build-system python-build-system)
10710 (home-page "https://github.com/marcelm/xopen/")
10711 (synopsis "Open compressed files transparently")
10712 (description "This module provides an @code{xopen} function that works like
10713 Python's built-in @code{open} function, but can also deal with compressed files.
10714 Supported compression formats are gzip, bzip2 and, xz, and are automatically
10715 recognized by their file extensions. The focus is on being as efficient as
10716 possible on all supported Python versions.")
10717 (license license:expat)))
10718
10719 (define-public python2-xopen
10720 (let ((base (package-with-python2
10721 (strip-python2-variant python-xopen))))
10722 (package
10723 (inherit base)
10724 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
10725 ,@(package-propagated-inputs base))))))
10726
10727 (define-public python2-cheetah
10728 (package
10729 (name "python2-cheetah")
10730 (version "2.4.4")
10731 (source
10732 (origin
10733 (method url-fetch)
10734 (uri (pypi-uri "Cheetah" version))
10735 (sha256
10736 (base32
10737 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
10738 (build-system python-build-system)
10739 (arguments
10740 `(#:python ,python-2))
10741 (propagated-inputs
10742 `(("python2-markdown" ,python2-markdown)))
10743 (home-page "https://pythonhosted.org/Cheetah/")
10744 (synopsis "Template engine")
10745 (description "Cheetah is a text-based template engine and Python code
10746 generator.
10747
10748 Cheetah can be used as a standalone templating utility or referenced as
10749 a library from other Python applications. It has many potential uses,
10750 but web developers looking for a viable alternative to ASP, JSP, PHP and
10751 PSP are expected to be its principle user group.
10752
10753 Features:
10754 @enumerate
10755 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
10756 text-based format.
10757 @item Cleanly separates content, graphic design, and program code.
10758 @item Blends the power and flexibility of Python with a simple template language
10759 that non-programmers can understand.
10760 @item Gives template writers full access to any Python data structure, module,
10761 function, object, or method in their templates.
10762 @item Makes code reuse easy by providing an object-orientated interface to
10763 templates that is accessible from Python code or other Cheetah templates.
10764 One template can subclass another and selectively reimplement sections of it.
10765 @item Provides a simple, yet powerful, caching mechanism that can dramatically
10766 improve the performance of a dynamic website.
10767 @item Compiles templates into optimized, yet readable, Python code.
10768 @end enumerate")
10769 (license (license:x11-style "file://LICENSE"))))
10770
10771 (define-public python-dulwich
10772 (package
10773 (name "python-dulwich")
10774 (version "0.18.6")
10775 (source
10776 (origin
10777 (method url-fetch)
10778 (uri (list (string-append "https://www.dulwich.io/releases/"
10779 "dulwich-" version ".tar.gz")
10780 (pypi-uri "dulwich" version)))
10781 (sha256
10782 (base32
10783 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
10784 (build-system python-build-system)
10785 (arguments
10786 `(#:phases
10787 (modify-phases %standard-phases
10788 (add-before 'check 'fix-tests
10789 (lambda* (#:key inputs #:allow-other-keys)
10790 ;; The tests use Popen with a custom environment which doesn't
10791 ;; include PATH.
10792 (substitute* "dulwich/tests/compat/utils.py"
10793 (("'git'") (string-append "'"
10794 (which "git")
10795 "'")))
10796 (substitute* '("dulwich/tests/test_repository.py"
10797 "dulwich/tests/test_hooks.py")
10798 (("#!/bin/sh") (string-append "#!" (which "sh"))))
10799 (setenv "TEST_RUNNER" "unittest")
10800 (setenv "PYTHONHASHSEED" "random")
10801 #t)))))
10802 (propagated-inputs
10803 `(("python-fastimport" ,python-fastimport)))
10804 (native-inputs
10805 `(("python-mock" ,python-mock)
10806 ("python-geventhttpclient" ,python-geventhttpclient)
10807 ("git" ,git)))
10808 (home-page "https://www.dulwich.io/")
10809 (synopsis "Git implementation in Python")
10810 (description "Dulwich is an implementation of the Git file formats and
10811 protocols written in pure Python.")
10812 ;; Can be used with either license.
10813 (license (list license:asl2.0 license:gpl2+))))
10814
10815 (define-public python2-dulwich
10816 (package-with-python2 python-dulwich))
10817
10818 (define-public python-pbkdf2
10819 (package
10820 (name "python-pbkdf2")
10821 (version "1.3")
10822 (source
10823 (origin
10824 (method url-fetch)
10825 (uri (pypi-uri "pbkdf2" version))
10826 (sha256
10827 (base32
10828 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
10829 (build-system python-build-system)
10830 (arguments
10831 '(#:phases
10832 (modify-phases %standard-phases
10833 (replace 'check
10834 (lambda _
10835 (setenv "PYTHONPATH"
10836 (string-append (getcwd) "/build/lib:"
10837 (getenv "PYTHONPATH")))
10838 (zero? (system* "python" "test/test_pbkdf2.py")))))))
10839 (propagated-inputs
10840 `(("python-pycrypto" ,python-pycrypto))) ; optional
10841 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
10842 (synopsis "Password-based key derivation")
10843 (description "This module implements the password-based key derivation
10844 function, PBKDF2, specified in RSA PKCS#5 v2.0.
10845
10846 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
10847 is part of the RSA Public Key Cryptography Standards series. The provided
10848 implementation takes a password or a passphrase and a salt value (and
10849 optionally a iteration count, a digest module, and a MAC module) and provides
10850 a file-like object from which an arbitrarly-sized key can be read.")
10851 (license license:expat)))
10852
10853 (define-public python2-pbkdf2
10854 (package-with-python2 python-pbkdf2))
10855
10856 (define-public python-qrcode
10857 (package
10858 (name "python-qrcode")
10859 (version "6.0")
10860 (source
10861 (origin
10862 (method url-fetch)
10863 (uri (pypi-uri "qrcode" version))
10864 (sha256
10865 (base32
10866 "1gz1g2n9kqwqkak78aavr354z1v3yyiksk7q6xp5hi1zr6s0syq3"))))
10867 (build-system python-build-system)
10868 (arguments
10869 ;; FIXME: Tests require packaging 'pymaging'.
10870 '(#:tests? #f))
10871 (propagated-inputs
10872 `(("python-lxml" ,python-lxml) ; for SVG output
10873 ("python-pillow" ,python-pillow) ; for PNG output
10874 ("python-six" ,python-six)))
10875 (inputs
10876 `(;; The setup.cfg file needs to be used, and support for this requires
10877 ;; at least version 30.3.0 of setuptools
10878 ("python-setuptools" ,python-setuptools)))
10879 (home-page "https://github.com/lincolnloop/python-qrcode")
10880 (synopsis "QR Code image generator")
10881 (description "This package provides a pure Python QR Code generator
10882 module. It uses the Python Imaging Library (PIL) to allow for the generation
10883 of QR Codes.
10884
10885 In addition this package provides a command line tool to generate QR codes and
10886 either write these QR codes to a file or do the output as ascii art at the
10887 console.")
10888 (license license:bsd-3)))
10889
10890 (define-public python2-qrcode
10891 (package-with-python2 python-qrcode))
10892
10893 (define-public python-rst2ansi
10894 (package
10895 (name "python-rst2ansi")
10896 (version "0.1.5")
10897 (source
10898 (origin
10899 (method url-fetch)
10900 (uri (pypi-uri "rst2ansi" version))
10901 (sha256
10902 (base32
10903 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
10904 (build-system python-build-system)
10905 (propagated-inputs
10906 `(("python-docutils" ,python-docutils)))
10907 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
10908 (synopsis "Convert RST to ANSI-decorated console output")
10909 (description
10910 "Python module dedicated to rendering RST (reStructuredText) documents
10911 to ansi-escaped strings suitable for display in a terminal.")
10912 (license license:expat)))
10913
10914 (define-public python-ansi2html
10915 (package
10916 (name "python-ansi2html")
10917 (version "1.2.0")
10918 (source
10919 (origin
10920 (method url-fetch)
10921 (uri (pypi-uri "ansi2html" version))
10922 (sha256
10923 (base32
10924 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
10925 (build-system python-build-system)
10926 (native-inputs
10927 `(("python-mock" ,python-mock)
10928 ("python-nose" ,python-nose)))
10929 (propagated-inputs
10930 `(("python-six" ,python-six)))
10931 (home-page "https://github.com/ralphbean/ansi2html")
10932 (synopsis "Convert ANSI-decorated console output to HTML")
10933 (description
10934 "@command{ansi2html} is a Python library and command line utility for
10935 convering text with ANSI color codes to HTML or LaTeX.")
10936 (license license:gpl3+)))
10937
10938 (define-public python2-ansi2html
10939 (package-with-python2 python-ansi2html))
10940
10941 (define-public python-ddt
10942 (package
10943 (name "python-ddt")
10944 (version "1.1.3")
10945 (source
10946 (origin
10947 (method url-fetch)
10948 (uri (pypi-uri "ddt" version))
10949 (sha256
10950 (base32
10951 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
10952 (build-system python-build-system)
10953 (native-inputs
10954 `(("python-mock" ,python-mock)
10955 ("python-nose" ,python-nose)))
10956 (propagated-inputs
10957 `(("python-six" ,python-six)
10958 ("python-pyyaml" ,python-pyyaml)))
10959 (home-page "https://github.com/txels/ddt")
10960 (synopsis "Data-Driven Tests")
10961 (description
10962 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
10963 running it with different test data, and make it appear as multiple test
10964 cases.")
10965 (license license:expat)))
10966
10967 (define-public python2-ddt
10968 (package-with-python2 python-ddt))
10969
10970 (define-public python-pycountry
10971 (package
10972 (name "python-pycountry")
10973 (version "18.5.26")
10974 (source
10975 (origin
10976 (method url-fetch)
10977 (uri (pypi-uri "pycountry" version))
10978 (sha256
10979 (base32
10980 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
10981 (build-system python-build-system)
10982 (home-page "https://bitbucket.org/flyingcircus/pycountry")
10983 (synopsis "ISO databases for languages, countries, currencies, etc.")
10984 (description
10985 "@code{pycountry} provides the ISO databases for the standards:
10986 @enumerate
10987 @item 639-3 (Languages)
10988 @item 3166 (Countries)
10989 @item 3166-3 (Deleted Countries)
10990 @item 3166-2 (Subdivisions of countries)
10991 @item 4217 (Currencies)
10992 @item 15924 (Scripts)
10993 @end enumerate
10994 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
10995 through a Python API.")
10996 (license license:lgpl2.1+)))
10997
10998 (define-public python2-pycountry
10999 (package-with-python2 python-pycountry))
11000
11001 (define-public python-pycosat
11002 (package
11003 (name "python-pycosat")
11004 (version "0.6.1")
11005 (source
11006 (origin
11007 (method url-fetch)
11008 (uri (pypi-uri "pycosat" version))
11009 (sha256
11010 (base32
11011 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11012 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11013 (build-system python-build-system)
11014 (home-page "https://github.com/ContinuumIO/pycosat")
11015 (synopsis "Bindings to picosat (a SAT solver)")
11016 (description
11017 "This package provides efficient Python bindings to @code{picosat} on
11018 the C level. When importing pycosat, the @code{picosat} solver becomes part
11019 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11020 Problem} (SAT) solver.")
11021 (license license:expat)))
11022
11023 (define-public python2-pycosat
11024 (package-with-python2 python-pycosat))
11025
11026 (define-public python2-ruamel.ordereddict
11027 (package
11028 (name "python2-ruamel.ordereddict")
11029 (version "0.4.9")
11030 (source
11031 (origin
11032 (method url-fetch)
11033 (uri (pypi-uri "ruamel.ordereddict" version))
11034 (sha256
11035 (base32
11036 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11037 (build-system python-build-system)
11038 (arguments
11039 `(#:python ,python-2
11040 #:phases
11041 (modify-phases %standard-phases
11042 (delete 'check)
11043 (add-after 'install 'check
11044 (lambda* (#:key inputs outputs #:allow-other-keys)
11045 (add-installed-pythonpath inputs outputs)
11046 (zero? (system* "python" "test/testordereddict.py")))))))
11047 (home-page "https://bitbucket.org/ruamel/ordereddict")
11048 (synopsis "Version of dict that keeps keys in insertion order")
11049 (description
11050 "This is an implementation of an ordered dictionary with @dfn{Key
11051 Insertion Order} (KIO: updates of values do not affect the position of the
11052 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11053 removed and put at the back). The standard library module @code{OrderedDict},
11054 implemented later, implements a subset of @code{ordereddict} functionality.
11055 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11056 Order} (KSO, no sorting function can be specified, but a transform can be
11057 specified to apply on the key before comparison (e.g. @code{string.lower})).")
11058 (license license:expat)))
11059
11060 (define-public python-pypeg2
11061 (package
11062 (name "python-pypeg2")
11063 (version "2.15.2")
11064 (source
11065 (origin
11066 (method url-fetch)
11067 (uri (pypi-uri "pyPEG2" version))
11068 (sha256
11069 (base32
11070 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11071 (build-system python-build-system)
11072 (propagated-inputs `(("python-lxml" ,python-lxml)))
11073 (arguments
11074 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11075 '(#:tests? #f))
11076 (home-page "https://fdik.org/pyPEG/")
11077 (synopsis "Parsering Expression Grammars in Python")
11078 (description "PyPEG is an intrinsic parser interpreter framework for
11079 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11080 parse many formal languages.")
11081 (license license:gpl2)))
11082
11083 (define-public python-incremental
11084 (package
11085 (name "python-incremental")
11086 (version "17.5.0")
11087 (source
11088 (origin
11089 (method url-fetch)
11090 (uri (pypi-uri "incremental" version))
11091 (sha256
11092 (base32
11093 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11094 (build-system python-build-system)
11095 (home-page "https://github.com/hawkowl/incremental")
11096 (synopsis "Library for versioning Python projects")
11097 (description "Incremental is a small library that versions your Python
11098 projects.")
11099 (license license:expat)))
11100
11101 (define-public python2-incremental
11102 (package-with-python2 python-incremental))
11103
11104 (define-public python-automat
11105 (package
11106 (name "python-automat")
11107 (version "0.6.0")
11108 (source (origin
11109 (method url-fetch)
11110 (uri (pypi-uri "Automat" version))
11111 (sha256
11112 (base32
11113 "1a7nsrljysfmdqmpn2apfa1gg6rfah4y9sizvns8gb08rx7d07rw"))))
11114 (build-system python-build-system)
11115 ;; We disable the tests because they require python-twisted, while
11116 ;; python-twisted depends on python-automat. Twisted is optional, but the
11117 ;; tests fail if it is not available. Also see
11118 ;; <https://github.com/glyph/automat/issues/71>.
11119 (arguments '(#:tests? #f))
11120 (native-inputs
11121 `(("python-m2r" ,python-m2r)
11122 ("python-setuptools-scm" ,python-setuptools-scm)
11123 ("python-graphviz" ,python-graphviz)))
11124 (propagated-inputs
11125 `(("python-six" ,python-six)
11126 ("python-attrs" ,python-attrs)))
11127 (home-page "https://github.com/glyph/Automat")
11128 (synopsis "Self-service finite-state machines")
11129 (description "Automat is a library for concise, idiomatic Python
11130 expression of finite-state automata (particularly deterministic finite-state
11131 transducers).")
11132 (license license:expat)))
11133
11134 (define-public python2-automat
11135 (package-with-python2 python-automat))
11136
11137 (define-public python-m2r
11138 (package
11139 (name "python-m2r")
11140 (version "0.1.12")
11141 (source (origin
11142 (method url-fetch)
11143 (uri (pypi-uri "m2r" version))
11144 (sha256
11145 (base32
11146 "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd"))))
11147 (build-system python-build-system)
11148 (propagated-inputs
11149 `(("python-docutils" ,python-docutils)
11150 ("python-mistune" ,python-mistune)))
11151 (native-inputs
11152 `(("python-pygments" ,python-pygments)
11153 ("python-mock" ,python-mock)))
11154 (home-page "https://github.com/miyakogi/m2r")
11155 (synopsis "Markdown to reStructuredText converter")
11156 (description "M2R converts a markdown file including reST markups to valid
11157 reST format.")
11158 (license license:expat)))
11159
11160 (define-public python2-m2r
11161 (package-with-python2 python-m2r))
11162
11163 (define-public python-constantly
11164 (package
11165 (name "python-constantly")
11166 (version "15.1.0")
11167 (source (origin
11168 (method url-fetch)
11169 (uri (pypi-uri "constantly" version))
11170 (sha256
11171 (base32
11172 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11173 (build-system python-build-system)
11174 (home-page "https://github.com/twisted/constantly")
11175 (synopsis "Symbolic constants in Python")
11176 (description "Constantly is a Python library that provides symbolic
11177 constant support. It includes collections and constants with text, numeric,
11178 and bit flag values.")
11179 (license license:expat)))
11180
11181 (define-public python2-constantly
11182 (package-with-python2 python-constantly))
11183
11184 (define-public python-attrs
11185 (package
11186 (name "python-attrs")
11187 (version "17.4.0")
11188 (source (origin
11189 (method url-fetch)
11190 (uri (pypi-uri "attrs" version))
11191 (sha256
11192 (base32
11193 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
11194 (build-system python-build-system)
11195 (native-inputs
11196 `(("python-coverage" ,python-coverage)
11197 ("python-hypothesis" ,python-hypothesis)
11198 ("python-pytest" ,python-pytest)
11199 ("python-six" ,python-six)
11200 ("python-sphinx" ,python-sphinx)
11201 ("python-zope-interface" ,python-zope-interface)))
11202 (home-page "https://github.com/python-attrs/attrs/")
11203 (synopsis "Attributes without boilerplate")
11204 (description "@code{attrs} is a Python package with class decorators that
11205 ease the chores of implementing the most common attribute-related object
11206 protocols.")
11207 (license license:expat)))
11208
11209 (define-public python2-attrs
11210 (package-with-python2 python-attrs))
11211
11212 (define-public python-attrs-bootstrap
11213 (package
11214 (inherit python-attrs)
11215 (name "python-attrs-bootstrap")
11216 (native-inputs `())
11217 (arguments `(#:tests? #f))))
11218
11219 (define-public python2-attrs-bootstrap
11220 (package-with-python2 python-attrs-bootstrap))
11221
11222 (define-public python2-cliapp
11223 (package
11224 (name "python2-cliapp")
11225 (version "1.20170823")
11226 (source
11227 (origin
11228 (method url-fetch)
11229 (uri (string-append
11230 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11231 version ".tar.gz"))
11232 (sha256
11233 (base32
11234 "1i9gik0xrj6jmi95s5w988jl1y265baz5xm5pbqdyvsh8h9ln6yq"))))
11235 (build-system python-build-system)
11236 (arguments
11237 `(#:python ,python-2
11238 #:phases
11239 (modify-phases %standard-phases
11240 ;; check phase needs to be run before the build phase. If not,
11241 ;; coverage-test-runner looks for tests for the built source files,
11242 ;; and fails.
11243 (delete 'check)
11244 (add-before 'build 'check
11245 (lambda _
11246 ;; Disable python3 tests
11247 (substitute* "check"
11248 (("python3") "# python3"))
11249 (zero? (system* "./check")))))))
11250 (native-inputs
11251 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11252 ("python2-pep8" ,python2-pep8)))
11253 (propagated-inputs
11254 `(("python2-pyaml" ,python2-pyaml)))
11255 (home-page "https://liw.fi/cliapp/")
11256 (synopsis "Python framework for command line programs")
11257 (description "@code{python2-cliapp} is a python framework for
11258 command line programs. It contains the typical stuff such programs
11259 need to do, such as parsing the command line for options, and
11260 iterating over input files.")
11261 (license license:gpl2+)))
11262
11263 (define-public python2-ttystatus
11264 (package
11265 (name "python2-ttystatus")
11266 (version "0.35")
11267 (source
11268 (origin
11269 (method url-fetch)
11270 (uri (string-append
11271 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
11272 version ".tar.gz"))
11273 (sha256
11274 (base32
11275 "0vivqbw7ddhsq1zj3g9cvvv4f0phl0pis2smsnwcr2szz2fk3hl6"))))
11276 (build-system python-build-system)
11277 (native-inputs
11278 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11279 ("python2-pep8" ,python2-pep8)))
11280 (arguments
11281 `(#:python ,python-2
11282 #:phases
11283 (modify-phases %standard-phases
11284 ;; check phase needs to be run before the build phase. If not,
11285 ;; coverage-test-runner looks for tests for the built source files,
11286 ;; and fails.
11287 (delete 'check)
11288 (add-before 'build 'check
11289 (lambda _
11290 (zero? (system* "make" "check")))))))
11291 (home-page "https://liw.fi/ttystatus/")
11292 (synopsis "Python library for showing progress reporting and
11293 status updates on terminals")
11294 (description "@code{python2-ttystatus} is a python library for
11295 showing progress reporting and status updates on terminals, for
11296 command line programs. Output is automatically adapted to the width
11297 of the terminal: truncated if it does not fit, and resized if the
11298 terminal size changes.")
11299 (license license:gpl3+)))
11300
11301 (define-public python2-tracing
11302 (package
11303 (name "python2-tracing")
11304 (version "0.10")
11305 (source
11306 (origin
11307 (method url-fetch)
11308 (uri (string-append
11309 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
11310 version ".tar.gz"))
11311 (sha256
11312 (base32
11313 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
11314 (build-system python-build-system)
11315 (arguments
11316 `(#:python ,python-2))
11317 (home-page "https://liw.fi/tracing/")
11318 (synopsis "Python debug logging helper")
11319 (description "@code{python2-tracing} is a python library for
11320 logging debug messages. It provides a way to turn debugging messages
11321 on and off, based on the filename they occur in. It is much faster
11322 than using @code{logging.Filter} to accomplish the same thing, which
11323 matters when code is run in production mode. The actual logging still
11324 happens using the @code{logging} library.")
11325 (license license:gpl3+)))
11326
11327 (define-public python2-larch
11328 (package
11329 (name "python2-larch")
11330 (version "1.20151025")
11331 (source
11332 (origin
11333 (method url-fetch)
11334 (uri (string-append
11335 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
11336 version ".tar.gz"))
11337 (patches (search-patches
11338 "python2-larch-coverage-4.0a6-compatibility.patch"))
11339 (sha256
11340 (base32
11341 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
11342 (build-system python-build-system)
11343 (arguments
11344 `(#:python ,python-2
11345 #:phases
11346 (modify-phases %standard-phases
11347 ;; check phase needs to be run before the build phase. If not,
11348 ;; coverage-test-runner looks for tests for the built source files,
11349 ;; and fails.
11350 (delete 'check)
11351 (add-before 'build 'check
11352 (lambda _
11353 (zero? (system* "make" "check")))))))
11354 (native-inputs
11355 `(("cmdtest" ,cmdtest)
11356 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
11357 (propagated-inputs
11358 `(("python2-tracing" ,python2-tracing)))
11359 (home-page "https://liw.fi/larch/")
11360 (synopsis "Python copy-on-write B-tree library")
11361 (description "@code{python2-larch} is an implementation of
11362 particular kind of B-tree, based on research by Ohad Rodeh. See
11363 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
11364 on the data structure.
11365
11366 The distinctive feature of this B-tree is that a node is never
11367 (conceptually) modified. Instead, all updates are done by
11368 copy-on-write. This makes it easy to clone a tree, and modify only the
11369 clone, while other processes access the original tree.")
11370 (license license:gpl3+)))
11371
11372 (define-public python-astroid
11373 (package
11374 (name "python-astroid")
11375 (version "1.5.3")
11376 (source
11377 (origin
11378 (method url-fetch)
11379 (uri (string-append
11380 "https://github.com/PyCQA/astroid/archive/astroid-"
11381 version ".tar.gz"))
11382 (sha256
11383 (base32
11384 "0isn5p7f9n48hmksgbrj7dkm9dyglnayzn5jngk37qywg8a74ngn"))))
11385 (build-system python-build-system)
11386 (propagated-inputs
11387 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
11388 ("python-six" ,python-six)
11389 ("python-wrapt" ,python-wrapt)))
11390 (arguments
11391 `(#:phases
11392 (modify-phases %standard-phases
11393 (replace 'check
11394 (lambda _
11395 (zero? (system* "python" "-m" "unittest" "discover"
11396 "-p" "unittest*.py")))))))
11397 (home-page "https://github.com/PyCQA/astroid")
11398 (synopsis "Common base representation of python source code for pylint and
11399 other projects")
11400 (description "@code{python-astroid} provides a common base representation
11401 of python source code for projects such as pychecker, pyreverse, pylint, etc.
11402
11403 It provides a compatible representation which comes from the _ast module. It
11404 rebuilds the tree generated by the builtin _ast module by recursively walking
11405 down the AST and building an extended ast. The new node classes have
11406 additional methods and attributes for different usages. They include some
11407 support for static inference and local name scopes. Furthermore, astroid
11408 builds partial trees by inspecting living objects.")
11409 (license license:lgpl2.1+)
11410 (properties `((python2-variant . ,(delay python2-astroid))))))
11411
11412 (define-public python2-astroid
11413 (let ((base (package-with-python2
11414 (strip-python2-variant python-astroid))))
11415 (package (inherit base)
11416 (propagated-inputs
11417 `(("python2-backports-functools-lru-cache"
11418 ,python2-backports-functools-lru-cache)
11419 ("python2-enum34" ,python2-enum34)
11420 ("python2-singledispatch" ,python2-singledispatch)
11421 ,@(package-propagated-inputs base))))))
11422
11423 (define-public python-isort
11424 (package
11425 (name "python-isort")
11426 (version "4.2.5")
11427 (source
11428 (origin
11429 (method url-fetch)
11430 (uri (string-append
11431 "https://github.com/timothycrosley/isort/archive/"
11432 version ".tar.gz"))
11433 (file-name (string-append name "-" version ".tar.gz"))
11434 (sha256
11435 (base32
11436 "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh"))))
11437 (build-system python-build-system)
11438 (native-inputs
11439 `(("python-mock" ,python-mock)
11440 ("python-pytest" ,python-pytest)))
11441 (home-page "https://github.com/timothycrosley/isort")
11442 (synopsis "Python utility/library to sort python imports")
11443 (description "@code{python-isort} is a python utility/library to sort
11444 imports alphabetically, and automatically separated into sections. It
11445 provides a command line utility, a python library and plugins for various
11446 editors.")
11447 (license license:expat)))
11448
11449 (define-public python2-isort
11450 (package-with-python2 python-isort))
11451
11452 (define-public python2-backports-functools-lru-cache
11453 (package
11454 (name "python2-backports-functools-lru-cache")
11455 (version "1.5")
11456 (source
11457 (origin
11458 (method url-fetch)
11459 ;; only the pypi tarballs contain the necessary metadata
11460 (uri (pypi-uri "backports.functools_lru_cache" version))
11461 (sha256
11462 (base32
11463 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
11464 (build-system python-build-system)
11465 (native-inputs
11466 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
11467 (arguments
11468 `(#:python ,python-2))
11469 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
11470 (synopsis "Backport of functools.lru_cache from Python 3.3")
11471 (description "@code{python2-backports-functools-lru-cache} is a backport
11472 of @code{functools.lru_cache} from python 3.3.")
11473 (license license:expat)))
11474
11475 (define-public python-configparser
11476 (package
11477 (name "python-configparser")
11478 (version "3.5.0")
11479 (source
11480 (origin
11481 (method url-fetch)
11482 (uri (string-append
11483 "https://bitbucket.org/ambv/configparser/get/"
11484 version ".tar.bz2"))
11485 (file-name (string-append name "-" version ".tar.gz"))
11486 (sha256
11487 (base32
11488 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
11489 (build-system python-build-system)
11490 (home-page "http://docs.python.org/py3k/library/configparser.html")
11491 (synopsis "Backport of configparser from python 3.5")
11492 (description "@code{python-configparser} is a backport of
11493 @code{configparser} from Python 3.5 so that it can be used directly
11494 in other versions.")
11495 (license license:expat)))
11496
11497 (define-public python2-configparser
11498 (package-with-python2 python-configparser))
11499
11500 (define-public python-mando
11501 (package
11502 (name "python-mando")
11503 (version "0.6.4")
11504 (source (origin
11505 (method url-fetch)
11506 (uri (pypi-uri "mando" version))
11507 (sha256
11508 (base32
11509 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
11510 (build-system python-build-system)
11511 (propagated-inputs
11512 `(("python-rst2ansi" ,python-rst2ansi)
11513 ("python-six" ,python-six)))
11514 (native-inputs
11515 `(("python-pytest" ,python-pytest)))
11516 (home-page "https://mando.readthedocs.org/")
11517 (synopsis
11518 "Wrapper around argparse, allowing creation of complete CLI applications")
11519 (description
11520 "This package is a wrapper around argparse, allowing you to write complete CLI
11521 applications in seconds while maintaining all the flexibility.")
11522 (license license:expat)))
11523
11524 (define-public python2-mando
11525 (package-with-python2 python-mando))
11526
11527 (define-public python-fudge
11528 (package
11529 (name "python-fudge")
11530 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
11531 ;; package, which is currently the only use of this package.
11532 (version "0.9.6")
11533 (source
11534 (origin
11535 (method url-fetch)
11536 (uri (pypi-uri "fudge" version))
11537 (sha256
11538 (base32
11539 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
11540 (build-system python-build-system)
11541 (arguments
11542 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
11543 (home-page "https://github.com/fudge-py/fudge")
11544 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
11545 (description
11546 "Fudge is a Python module for using fake objects (mocks and stubs) to
11547 test real ones.
11548
11549 In readable Python code, you declare the methods available on your fake object
11550 and how they should be called. Then you inject that into your application and
11551 start testing. This declarative approach means you don’t have to record and
11552 playback actions and you don’t have to inspect your fakes after running code.
11553 If the fake object was used incorrectly then you’ll see an informative
11554 exception message with a traceback that points to the culprit.")
11555 (license license:expat)))
11556
11557 (define-public python2-fudge
11558 (package-with-python2 python-fudge))
11559
11560 (define-public python-mwclient
11561 (package
11562 (name "python-mwclient")
11563 (version "0.8.4")
11564 (source
11565 (origin
11566 (method url-fetch)
11567 ;; The PyPI version wouldn't contain tests.
11568 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
11569 "v" version ".tar.gz"))
11570 (file-name (string-append name "-" version ".tar.gz"))
11571 (sha256
11572 (base32
11573 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
11574 (build-system python-build-system)
11575 (propagated-inputs
11576 `(("python-requests" ,python-requests)
11577 ("python-requests-oauthlib"
11578 ,python-requests-oauthlib)
11579 ("python-six" ,python-six)))
11580 (native-inputs
11581 `(("python-mock" ,python-mock)
11582 ("python-pytest" ,python-pytest)
11583 ("python-pytest-pep8" ,python-pytest-pep8)
11584 ("python-pytest-cache" ,python-pytest-cache)
11585 ("python-pytest-cov" ,python-pytest-cov)
11586 ("python-responses" ,python-responses)))
11587 (home-page "https://github.com/btongminh/mwclient")
11588 (synopsis "MediaWiki API client")
11589 (description "This package provides a MediaWiki API client.")
11590 (license license:expat)))
11591
11592 (define-public python2-mwclient
11593 (package-with-python2 python-mwclient))
11594
11595 (define-public python-utils
11596 (package
11597 (name "python-utils")
11598 (version "2.1.0")
11599 (source (origin
11600 (method url-fetch)
11601 (uri (pypi-uri "python-utils" version))
11602 (sha256
11603 (base32
11604 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
11605 (build-system python-build-system)
11606 (native-inputs
11607 `(("pytest-runner" ,python-pytest-runner)
11608 ("pytest" ,python-pytest)
11609 ("six" ,python-six)))
11610 (home-page "https://github.com/WoLpH/python-utils")
11611 (synopsis "Convenient utilities not included with the standard Python install")
11612 (description
11613 "Python Utils is a collection of small Python functions and classes which
11614 make common patterns shorter and easier.")
11615 (license license:bsd-2)))
11616
11617 (define-public python2-utils
11618 (package-with-python2 python-utils))
11619
11620 (define-public python-sphinx-me
11621 (package
11622 (name "python-sphinx-me")
11623 (version "0.3")
11624 (source
11625 (origin
11626 (method url-fetch)
11627 (uri (pypi-uri "sphinx-me" version))
11628 (sha256
11629 (base32
11630 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
11631 (build-system python-build-system)
11632 (home-page "https://github.com/stephenmcd/sphinx-me")
11633 (synopsis "Create a Sphinx documentation shell")
11634 (description
11635 "Create a Sphinx documentation shell for your project and include the
11636 README file as the documentation index. It handles extracting the required
11637 meta data such as the project name, author and version from your project for
11638 use in your Sphinx docs.")
11639 (license license:bsd-2)))
11640
11641 (define-public python2-sphinx-me
11642 (package-with-python2 python-sphinx-me))
11643
11644 (define-public python-diff-match-patch
11645 (package
11646 (name "python-diff-match-patch")
11647 (version "20121119")
11648 (source
11649 (origin
11650 (method url-fetch)
11651 (uri (pypi-uri "diff-match-patch" version))
11652 (sha256
11653 (base32
11654 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
11655 (build-system python-build-system)
11656 (home-page "https://code.google.com/p/google-diff-match-patch")
11657 (synopsis "Synchronize plain text")
11658 (description "Diff Match and Patch libraries offer robust algorithms to
11659 perform the operations required for synchronizing plain text.")
11660 (license license:asl2.0)))
11661
11662 (define-public python2-diff-match-patch
11663 (package-with-python2 python-diff-match-patch))
11664
11665 (define-public python-dirsync
11666 (package
11667 (name "python-dirsync")
11668 (version "2.2.3")
11669 (source
11670 (origin
11671 (method url-fetch)
11672 (uri (pypi-uri "dirsync" version))
11673 (sha256
11674 (base32
11675 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
11676 (build-system python-build-system)
11677 (propagated-inputs
11678 `(("six" ,python-six)))
11679 (home-page "https://bitbucket.org/tkhyn/dirsync")
11680 (synopsis "Advanced directory tree synchronisation tool")
11681 (description "Advanced directory tree synchronisation tool.")
11682 (license license:expat)))
11683
11684 (define-public python2-dirsync
11685 (package-with-python2 python-dirsync))
11686
11687 (define-public python-levenshtein
11688 (package
11689 (name "python-levenshtein")
11690 (version "0.12.0")
11691 (source
11692 (origin
11693 (method url-fetch)
11694 (uri (pypi-uri "python-Levenshtein" version))
11695 (sha256
11696 (base32
11697 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
11698 (build-system python-build-system)
11699 (home-page "https://github.com/ztane/python-Levenshtein")
11700 (synopsis "Fast computation of Levenshtein distance and string similarity")
11701 (description
11702 "The Levenshtein Python C extension module contains functions for fast computation of
11703 @enumerate
11704 @item Levenshtein (edit) distance, and edit operations
11705 @item string similarity
11706 @item approximate median strings, and generally string averaging
11707 @item string sequence and set similarity
11708 @end enumerate
11709 It supports both normal and Unicode strings.")
11710 (license license:gpl2+)))
11711
11712 (define-public python2-levenshtein
11713 (package-with-python2 python-levenshtein))
11714
11715 (define-public python-scandir
11716 (package
11717 (name "python-scandir")
11718 (version "1.7")
11719 (source
11720 (origin
11721 (method url-fetch)
11722 (uri (pypi-uri "scandir" version))
11723 (sha256
11724 (base32 "0gbnhjzg42rj87ljv9kb648rfxph69ly3c8r9841dxy4d7l5pmdj"))))
11725 (build-system python-build-system)
11726 (arguments
11727 `(#:phases (modify-phases %standard-phases
11728 (replace 'check
11729 (lambda _
11730 (invoke "python" "test/run_tests.py"))))))
11731 (home-page "https://github.com/benhoyt/scandir")
11732 (synopsis "Directory iteration function")
11733 (description
11734 "Directory iteration function like os.listdir(), except that instead of
11735 returning a list of bare filenames, it yields DirEntry objects that include
11736 file type and stat information along with the name. Using scandir() increases
11737 the speed of os.walk() by 2-20 times (depending on the platform and file
11738 system) by avoiding unnecessary calls to os.stat() in most cases.
11739
11740 This package is part of the Python standard library since version 3.5.")
11741 (license license:bsd-3)))
11742
11743 (define-public python2-scandir
11744 (package-with-python2 python-scandir))
11745
11746 (define-public python2-stemming
11747 (package
11748 (name "python2-stemming")
11749 (version "1.0.1")
11750 (source
11751 (origin
11752 (method url-fetch)
11753 (uri (pypi-uri "stemming" version))
11754 (sha256
11755 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
11756 (build-system python-build-system)
11757 (arguments
11758 `(#:python ,python-2))
11759 (home-page "https://bitbucket.org/mchaput/stemming/overview")
11760 (synopsis "Python implementations of various stemming algorithms")
11761 (description
11762 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
11763 stemming algorithms for English. These implementations are straightforward and
11764 efficient, unlike some Python versions of the same algorithms available on the
11765 Web. This package is an extraction of the stemming code included in the Whoosh
11766 search engine.")
11767 (license license:public-domain)))
11768
11769 (define-public python-factory-boy
11770 (package
11771 (name "python-factory-boy")
11772 (version "2.8.1")
11773 (source
11774 (origin
11775 (method url-fetch)
11776 (uri (pypi-uri "factory_boy" version))
11777 (sha256
11778 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
11779 (build-system python-build-system)
11780 (arguments
11781 ;; Tests are not included in the tarball.
11782 `(#:tests? #f))
11783 (propagated-inputs
11784 `(("faker" ,python-faker)))
11785 (home-page "https://github.com/benhoyt/scandir")
11786 (synopsis "Versatile test fixtures replacement")
11787 (description
11788 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
11789
11790 As a fixtures replacement tool, it aims to replace static, hard to maintain
11791 fixtures with easy-to-use factories for complex object.
11792
11793 Instead of building an exhaustive test setup with every possible combination
11794 of corner cases, factory_boy allows you to use objects customized for the
11795 current test, while only declaring the test-specific fields")
11796 (license license:expat)))
11797
11798 (define-public python2-factory-boy
11799 (package-with-python2 python-factory-boy))
11800
11801 (define-public python-translate-toolkit
11802 (package
11803 (name "python-translate-toolkit")
11804 (version "2.1.0")
11805 (source
11806 (origin
11807 (method url-fetch)
11808 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
11809 (sha256
11810 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
11811 (build-system python-build-system)
11812 (native-inputs
11813 `(("python-pytest" ,python-pytest)
11814 ("python-sphinx" ,python-sphinx)))
11815 (propagated-inputs
11816 `(("python-babel" ,python-babel)
11817 ("python-beautifulsoup4" ,python-beautifulsoup4)
11818 ("python-chardet" ,python-chardet)
11819 ("python-diff-match-patch" ,python-diff-match-patch)
11820 ("python-levenshtein" ,python-levenshtein)
11821 ("python-lxml" ,python-lxml)
11822 ("python-six" ,python-six)
11823 ("python-vobject" ,python-vobject)
11824 ("python-pyyaml" ,python-pyyaml)))
11825 (arguments
11826 ;; TODO: tests are not run, because they end with
11827 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
11828 ;; 'parse_funcs'
11829 ;; during test setup.
11830 `(#:tests? #f))
11831 (home-page "http://toolkit.translatehouse.org")
11832 (synopsis "Tools and API for translation and localization engineering")
11833 (description
11834 "Tools and API for translation and localization engineering. It contains
11835 several utilities, as well as an API for building localization tools.")
11836 (license license:gpl2+)))
11837
11838 (define-public python2-translate-toolkit
11839 (package-with-python2 python-translate-toolkit))
11840
11841 (define-public python-packaging
11842 (package
11843 (name "python-packaging")
11844 (version "16.8")
11845 (source
11846 (origin
11847 (method url-fetch)
11848 (uri (pypi-uri "packaging" version))
11849 (sha256
11850 (base32
11851 "17k1xbjshackwvbsnxqixbph8rbqhz4bf4g3al5xyzhavxgq6l2x"))))
11852 (build-system python-build-system)
11853 (native-inputs
11854 `(("python-pretend" ,python-pretend)
11855 ("python-pytest" ,python-pytest)))
11856 (propagated-inputs
11857 `(("python-pyparsing" ,python-pyparsing)
11858 ("python-six" ,python-six)))
11859 (home-page "https://github.com/pypa/packaging")
11860 (synopsis "Core utilities for Python packages")
11861 (description "Packaging is a Python module for dealing with Python packages.
11862 It offers an interface for working with package versions, names, and dependency
11863 information.")
11864 ;; From 'LICENSE': This software is made available under the terms of
11865 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
11866 ;; Contributions to this software is made under the terms of *both* these
11867 ;; licenses.
11868 (license (list license:asl2.0 license:bsd-2))))
11869
11870 (define-public python2-packaging
11871 (package-with-python2 python-packaging))
11872
11873 (define-public python-relatorio
11874 (package
11875 (name "python-relatorio")
11876 (version "0.8.0")
11877 (source
11878 (origin
11879 (method url-fetch)
11880 (uri (pypi-uri "relatorio" version))
11881 (sha256
11882 (base32
11883 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
11884 (build-system python-build-system)
11885 (propagated-inputs
11886 `(("python-lxml" ,python-lxml)
11887 ("python-genshi" ,python-genshi)))
11888 (native-inputs
11889 `(("python-magic" ,python-magic)))
11890 (home-page "https://relatorio.tryton.org/")
11891 (synopsis "Templating library able to output ODT and PDF files")
11892 (description "Relatorio is a templating library which provides a way to
11893 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
11894 for more filetypes can be easily added by creating plugins for them.")
11895 (license license:gpl3+)))
11896
11897 (define-public python2-relatorio
11898 (package-with-python2 python-relatorio))
11899
11900 (define-public python-radon
11901 (package
11902 (name "python-radon")
11903 (version "2.2.0")
11904 (source
11905 (origin
11906 (method url-fetch)
11907 (uri (pypi-uri "radon" version))
11908 (sha256
11909 (base32
11910 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
11911 (build-system python-build-system)
11912 (arguments
11913 `(#:phases (modify-phases %standard-phases
11914 (replace 'check
11915 (lambda _
11916 (invoke "python" "radon/tests/run.py"))))))
11917 (propagated-inputs
11918 `(("python-colorama" ,python-colorama)
11919 ("python-flake8-polyfill" ,python-flake8-polyfill)
11920 ("python-mando" ,python-mando)))
11921 (native-inputs
11922 `(("python-pytest" ,python-pytest)
11923 ("python-pytest-mock" ,python-pytest-mock)))
11924 (home-page "https://radon.readthedocs.org/")
11925 (synopsis "Code Metrics in Python")
11926 (description "Radon is a Python tool which computes various code metrics.
11927 Supported metrics are:
11928 @itemize @bullet
11929 @item raw metrics: SLOC, comment lines, blank lines, &c.
11930 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
11931 @item Halstead metrics (all of them)
11932 @item the Maintainability Index (a Visual Studio metric)
11933 @end itemize")
11934 (license license:expat)))
11935
11936 (define-public python2-radon
11937 (package-with-python2 python-radon))
11938
11939 (define-public python-sure
11940 (package
11941 (name "python-sure")
11942 (version "1.4.6")
11943 (source
11944 (origin
11945 (method url-fetch)
11946 (uri (pypi-uri "sure" version))
11947 (sha256
11948 (base32
11949 "1iyqsy2d6radi88g1qf0lziy5b39h5cpb3g5jiqyb4xi46ig3x1z"))))
11950 (build-system python-build-system)
11951 (propagated-inputs
11952 `(("python-mock" ,python-mock)
11953 ("python-six" ,python-six)))
11954 (native-inputs
11955 `(("python-nose" ,python-nose)))
11956 (home-page "https://github.com/gabrielfalcao/sure")
11957 (synopsis "Automated testing library in python for python")
11958 (description
11959 "Sure is a python library that leverages a DSL for writing assertions.
11960 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
11961 (license license:gpl3+)))
11962
11963 (define-public python2-sure
11964 (package-with-python2 python-sure))
11965
11966 (define-public python2-couleur
11967 ;; This package does not seem to support python3 at all, hence,
11968 ;; only the python2 variant definition is provided.
11969 (package
11970 (name "python2-couleur")
11971 (version "0.6.2")
11972 (source
11973 (origin
11974 (method url-fetch)
11975 (uri (pypi-uri "couleur" version))
11976 (sha256
11977 (base32
11978 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
11979 (build-system python-build-system)
11980 (arguments
11981 `(#:python ,python-2))
11982 (home-page "https://github.com/gabrielfalcao/couleur")
11983 (synopsis
11984 "ANSI terminal tool for python, colored shell and other handy fancy features")
11985 (description
11986 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
11987 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
11988 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
11989 ;; https://github.com/gabrielfalcao/couleur/issues/11
11990 (license license:lgpl3+)))
11991
11992 (define-public python-misaka
11993 (package
11994 (name "python-misaka")
11995 (version "2.1.0")
11996 (source
11997 (origin
11998 (method url-fetch)
11999 (uri (pypi-uri "misaka" version))
12000 (sha256
12001 (base32
12002 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
12003 (build-system python-build-system)
12004 (arguments
12005 `(;; Line 37 of setup.py calls self.run_command('develop')
12006 ;; in the 'check' phase. This command seems to be trying
12007 ;; to write to
12008 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12009 ;; for which it does not have the permission to write.
12010 #:tests? #f))
12011 (propagated-inputs
12012 `(("python-cffi" ,python-cffi)))
12013 (home-page "https://github.com/FSX/misaka")
12014 (synopsis "Python binding for Hoedown")
12015 (description
12016 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12017 library written in C. It features a fast HTML renderer and functionality to make custom
12018 renderers (e.g. man pages or LaTeX).")
12019 (license license:expat)))
12020
12021 (define-public python2-misaka
12022 (package-with-python2 python-misaka))
12023
12024 (define-public python2-steadymark
12025 ;; This is forced into being a python2 only variant
12026 ;; due to its dependence on couleur that has no support
12027 ;; for python3
12028 (package
12029 (name "python2-steadymark")
12030 (version "0.7.3")
12031 (source
12032 (origin
12033 (method url-fetch)
12034 (uri (pypi-uri "steadymark" version))
12035 (sha256
12036 (base32
12037 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12038 (build-system python-build-system)
12039 (native-inputs
12040 `(("python-couleur" ,python2-couleur)
12041 ("python-sure" ,python2-sure)
12042 ("python-misaka" ,python2-misaka)))
12043 (arguments
12044 `(#:python ,python-2
12045 #:phases
12046 (modify-phases %standard-phases
12047 (add-before 'build 'patch-setup-py
12048 (lambda _
12049 ;; Update requirements from dependency==version
12050 ;; to dependency>=version
12051 (substitute* "setup.py"
12052 (("==") ">="))
12053 #t)))))
12054 (home-page "https://github.com/gabrielfalcao/steadymark")
12055 (synopsis "Markdown-based test runner for python")
12056 (description
12057 "@code{Steadymark} allows documentation to be written in github-flavoured
12058 markdown. The documentation may contain snippets of code surrounded by python
12059 code blocks and @code{Steadymark} will find these snippets and run them, making
12060 sure that there are no old malfunctional examples in the documentation examples.")
12061 (license license:expat)))
12062
12063 (define-public python-jsonpointer
12064 (package
12065 (name "python-jsonpointer")
12066 (version "1.10")
12067 (source
12068 (origin
12069 (method url-fetch)
12070 (uri (pypi-uri "jsonpointer" version))
12071 (sha256
12072 (base32
12073 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12074 (build-system python-build-system)
12075 (home-page "https://github.com/stefankoegl/python-json-pointer")
12076 (synopsis "Identify specific nodes in a JSON document")
12077 (description "@code{jsonpointer} allows you to access specific nodes
12078 by path in a JSON document (see RFC 6901).")
12079 (license license:bsd-3)))
12080
12081 (define-public python2-jsonpointer
12082 (package-with-python2 python-jsonpointer))
12083
12084 (define-public python-jsonpatch
12085 (package
12086 (name "python-jsonpatch")
12087 (version "1.16")
12088 (source
12089 (origin
12090 (method url-fetch)
12091 ;; pypi version lacks tests.js
12092 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12093 "archive/v" version ".tar.gz"))
12094 (file-name (string-append name "-" version ".tar.gz"))
12095 (sha256
12096 (base32
12097 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12098 (build-system python-build-system)
12099 (native-inputs
12100 `(("python-jsonpointer" ,python-jsonpointer)))
12101 (home-page "https://github.com/stefankoegl/python-json-patch")
12102 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12103 (description "@code{jsonpatch} is a library and program that allows
12104 applying JSON Patches according to RFC 6902.")
12105 (license license:bsd-3)))
12106
12107 (define-public python2-jsonpatch
12108 (package-with-python2 python-jsonpatch))
12109
12110 (define-public python-jsonpatch-0.4
12111 (package (inherit python-jsonpatch)
12112 (name "python-jsonpatch")
12113 (version "0.4")
12114 (source
12115 (origin
12116 (method url-fetch)
12117 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12118 "archive/v" version ".tar.gz"))
12119 (file-name (string-append name "-" version ".tar.gz"))
12120 (sha256
12121 (base32
12122 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12123
12124 (define-public python2-jsonpatch-0.4
12125 (package-with-python2 python-jsonpatch-0.4))
12126
12127 (define-public python-rfc3986
12128 (package
12129 (name "python-rfc3986")
12130 (version "1.1.0")
12131 (source (origin
12132 (method url-fetch)
12133 (uri (pypi-uri "rfc3986" version))
12134 (sha256
12135 (base32
12136 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12137 (build-system python-build-system)
12138 (arguments
12139 `(#:modules ((guix build utils)
12140 (guix build python-build-system)
12141 (ice-9 ftw)
12142 (srfi srfi-1)
12143 (srfi srfi-26))
12144 #:phases
12145 (modify-phases %standard-phases
12146 (replace 'check
12147 (lambda _
12148 (let ((cwd (getcwd)))
12149 (setenv "PYTHONPATH"
12150 (string-append cwd "/build/"
12151 (find (cut string-prefix? "lib" <>)
12152 (scandir (string-append cwd "/build")))
12153 ":"
12154 (getenv "PYTHONPATH")))
12155 (invoke "pytest" "-v")))))))
12156 (native-inputs
12157 `(("python-pytest" ,python-pytest)))
12158 (home-page "https://rfc3986.readthedocs.io/")
12159 (synopsis "Parse and validate URI references")
12160 (description
12161 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12162 validation and authority parsing. This module also supports RFC@tie{}6874
12163 which adds support for zone identifiers to IPv6 addresses.")
12164 (license license:asl2.0)))
12165
12166 (define-public python2-rfc3986
12167 (package-with-python2 python-rfc3986))
12168
12169 (define-public python-rfc3987
12170 (package
12171 (name "python-rfc3987")
12172 (version "1.3.7")
12173 (source
12174 (origin
12175 (method url-fetch)
12176 (uri (pypi-uri "rfc3987" version))
12177 (sha256
12178 (base32
12179 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12180 (build-system python-build-system)
12181 (home-page "https://pypi.python.org/pypi/rfc3987")
12182 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12183 (description "@code{rfc3987} provides routines for parsing and
12184 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12185 (license license:gpl3+)))
12186
12187 (define-public python2-rfc3987
12188 (package-with-python2 python-rfc3987))
12189
12190 (define-public python-validate-email
12191 (package
12192 (name "python-validate-email")
12193 (version "1.3")
12194 (source
12195 (origin
12196 (method url-fetch)
12197 (uri (pypi-uri "validate_email" version))
12198 (sha256
12199 (base32
12200 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12201 (build-system python-build-system)
12202 (home-page "https://github.com/syrusakbary/validate_email")
12203 (synopsis "Verifies if an email address is valid and really exists")
12204 (description "@code{validate_email} can be used to verify if an email
12205 address is valid and really exists.")
12206 (license license:lgpl3+)))
12207
12208 (define-public python2-validate-email
12209 (package-with-python2 python-validate-email))
12210
12211 (define-public python-flex
12212 (package
12213 (name "python-flex")
12214 (version "6.10.0")
12215 (source
12216 (origin
12217 (method url-fetch)
12218 (uri (pypi-uri "flex" version))
12219 (sha256
12220 (base32
12221 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
12222 (build-system python-build-system)
12223 (propagated-inputs
12224 `(("python-click" ,python-click)
12225 ("python-iso8601" ,python-iso8601)
12226 ("python-jsonpointer" ,python-jsonpointer)
12227 ("python-pyyaml" ,python-pyyaml)
12228 ("python-requests" ,python-requests)
12229 ("python-rfc3987" ,python-rfc3987)
12230 ("python-six" ,python-six)
12231 ("python-validate-email" ,python-validate-email)))
12232 (home-page "https://github.com/pipermerriam/flex")
12233 (synopsis "Validates Swagger schemata")
12234 (description "@code{flex} can be used to validate Swagger schemata.")
12235 (license license:bsd-3)))
12236
12237 (define-public python2-flex
12238 (package-with-python2 python-flex))
12239
12240 (define-public python-marshmallow
12241 (package
12242 (name "python-marshmallow")
12243 (version "3.0.0b14")
12244 (source
12245 (origin
12246 (method url-fetch)
12247 (uri (pypi-uri "marshmallow" version))
12248 (sha256
12249 (base32
12250 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
12251 (build-system python-build-system)
12252 (propagated-inputs
12253 `(("python-dateutil" ,python-dateutil)
12254 ("python-simplejson" ,python-simplejson)))
12255 (native-inputs
12256 `(("python-pytest" ,python-pytest)
12257 ("python-pytz" ,python-pytz)))
12258 (home-page "https://github.com/marshmallow-code/marshmallow")
12259 (synopsis "Convert complex datatypes to and from native
12260 Python datatypes.")
12261 (description "@code{marshmallow} provides a library for converting
12262 complex datatypes to and from native Python datatypes.")
12263 (license license:expat)))
12264
12265 (define-public python2-marshmallow
12266 (package-with-python2 python-marshmallow))
12267
12268 (define-public python-apispec
12269 (package
12270 (name "python-apispec")
12271 (version "0.25.3")
12272 (source
12273 (origin
12274 (method url-fetch)
12275 (uri (pypi-uri "apispec" version))
12276 (sha256
12277 (base32
12278 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
12279 (build-system python-build-system)
12280 (propagated-inputs
12281 `(("python-pyyaml" ,python-pyyaml)))
12282 (native-inputs
12283 `(("python-pytest" ,python-pytest)
12284 ("python-flask" ,python-flask)
12285 ("python-marshmallow" ,python-marshmallow)
12286 ("python-tornado" ,python-tornado)
12287 ("python-bottle" ,python-bottle)
12288 ("python-mock" ,python-mock)))
12289 (home-page "https://github.com/marshmallow-code/apispec")
12290 (synopsis "Swagger 2.0 API specification generator")
12291 (description "@code{python-apispec} is a pluggable API specification
12292 generator. Currently supports the OpenAPI specification (f.k.a.
12293 Swagger 2.0).")
12294 (license license:expat)))
12295
12296 (define-public python2-apispec
12297 (package-with-python2 python-apispec))
12298
12299 (define-public python-flasgger
12300 (package
12301 (name "python-flasgger")
12302 (version "0.6.3")
12303 (source
12304 (origin
12305 (method url-fetch)
12306 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
12307 version ".tar.gz"))
12308 (file-name (string-append name "-" version ".tar.gz"))
12309 (sha256
12310 (base32
12311 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
12312 (build-system python-build-system)
12313 (arguments
12314 `(#:phases
12315 (modify-phases %standard-phases
12316 (replace 'check
12317 (lambda* (#:key inputs outputs #:allow-other-keys)
12318 (substitute* "Makefile"
12319 (("flake8 flasgger --ignore=F403")
12320 "flake8 flasgger --ignore=E731,F403"))
12321 (setenv "PYTHONPATH" (string-append (getcwd)
12322 ":"
12323 (getenv "PYTHONPATH")))
12324 (zero? (system* "py.test")))))))
12325 (propagated-inputs
12326 `(("python-flask" ,python-flask)
12327 ("python-pyyaml" ,python-pyyaml)
12328 ("python-jsonschema" ,python-jsonschema)
12329 ("python-mistune" ,python-mistune)
12330 ("python-six" ,python-six)))
12331 (native-inputs
12332 `(("python-decorator" ,python-decorator)
12333 ("python-flake8" ,python-flake8)
12334 ("python-flask-restful" ,python-flask-restful)
12335 ("python-flex" ,python-flex)
12336 ("python-pytest" ,python-pytest)
12337 ("python-pytest-cov" ,python-pytest-cov)
12338 ("python-marshmallow" ,python-marshmallow)
12339 ("python-apispec" ,python-apispec)))
12340 (home-page "https://github.com/rochacbruno/flasgger/")
12341 (synopsis "Extract Swagger specs from your Flask project")
12342 (description "@code{python-flasgger} allows extracting Swagger specs
12343 from your Flask project. It is a fork of Flask-Swagger.")
12344 (license license:expat)))
12345
12346 (define-public python2-flasgger
12347 (package-with-python2 python-flasgger))
12348
12349 (define-public python-swagger-spec-validator
12350 (package
12351 (name "python-swagger-spec-validator")
12352 (version "2.1.0")
12353 (source
12354 (origin
12355 (method url-fetch)
12356 (uri (pypi-uri "swagger-spec-validator" version))
12357 (sha256
12358 (base32
12359 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
12360 (build-system python-build-system)
12361 (propagated-inputs
12362 `(("python-jsonschema" ,python-jsonschema)
12363 ("python-six" ,python-six)))
12364 (home-page
12365 "https://github.com/Yelp/swagger_spec_validator")
12366 (synopsis "Validation of Swagger specifications")
12367 (description "@code{swagger_spec_validator} provides a library for
12368 validating Swagger API specifications.")
12369 (license license:asl2.0)))
12370
12371 (define-public python2-swagger-spec-validator
12372 (package-with-python2 python-swagger-spec-validator))
12373
12374 (define-public python-apache-libcloud
12375 (package
12376 (name "python-apache-libcloud")
12377 (version "2.0.0")
12378 (source
12379 (origin
12380 (method url-fetch)
12381 (uri (pypi-uri "apache-libcloud" version))
12382 (sha256
12383 (base32
12384 "1a71z02ckcxld72k4qgmdnkjan52c4wczncs3p2mp5yafh7dsan7"))))
12385 (build-system python-build-system)
12386 (arguments
12387 `(#:phases
12388 (modify-phases %standard-phases
12389 (add-after 'unpack 'patch-ssh
12390 (lambda* (#:key inputs #:allow-other-keys)
12391 (substitute* "libcloud/compute/ssh.py"
12392 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
12393 "/bin/ssh" "'")))
12394 #t))
12395 (add-after 'unpack 'patch-tests
12396 (lambda _
12397 (substitute* "./libcloud/test/test_file_fixtures.py"
12398 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
12399 (("def _ascii") "def _raw_data(self, method, url, body, headers):
12400 return (httplib.OK,
12401 \"1234abcd\",
12402 {\"test\": \"value\"},
12403 httplib.responses[httplib.OK])
12404 def _ascii"))
12405 (substitute* "libcloud/test/compute/test_ssh_client.py"
12406 (("class ShellOutSSHClientTests")
12407 "@unittest.skip(\"Guix container doesn't have ssh service\")
12408 class ShellOutSSHClientTests")
12409 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
12410 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
12411 (("'.xF0', '.x90', '.x8D', '.x88'")
12412 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
12413 #t)))))
12414 (inputs
12415 `(("openssh" ,openssh)))
12416 (propagated-inputs
12417 `(("python-paramiko" ,python-paramiko)
12418 ("python-requests" ,python-requests)))
12419 (native-inputs
12420 `(("python-lockfile" ,python-lockfile)
12421 ("python-mock" ,python-mock)
12422 ("python-requests-mock" ,python-requests-mock)))
12423 (home-page "https://libcloud.apache.org/")
12424 (synopsis "Unified Cloud API")
12425 (description "@code{libcloud} is a Python library for interacting with
12426 many of the popular cloud service providers using a unified API.")
12427 (license license:asl2.0)))
12428
12429 (define-public python2-apache-libcloud
12430 (package-with-python2 python-apache-libcloud))
12431
12432 (define-public python-smmap2
12433 (package
12434 (name "python-smmap2")
12435 (version "2.0.3")
12436 (source
12437 (origin
12438 (method url-fetch)
12439 (uri (pypi-uri "smmap2" version))
12440 (sha256
12441 (base32
12442 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
12443 (build-system python-build-system)
12444 (native-inputs
12445 `(("python-nosexcover" ,python-nosexcover)))
12446 (home-page "https://github.com/Byron/smmap")
12447 (synopsis "Python sliding window memory map manager")
12448 (description "@code{smmap2} is a pure Python implementation of a sliding
12449 window memory map manager.")
12450 (license license:bsd-3)))
12451
12452 (define-public python2-smmap2
12453 (package-with-python2 python-smmap2))
12454
12455 (define-public python-regex
12456 (package
12457 (name "python-regex")
12458 (version "2017.06.07")
12459 (source (origin
12460 (method url-fetch)
12461 (uri (pypi-uri "regex" version))
12462 (sha256
12463 (base32
12464 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
12465 (build-system python-build-system)
12466 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
12467 (synopsis "Alternative regular expression module")
12468 (description "This regular expression implementation is backwards-
12469 compatible with the standard @code{re} module, but offers additional
12470 functionality like full case-folding for case-insensitive matches in Unicode.")
12471 (license license:psfl)))
12472
12473 (define-public python2-regex
12474 (package-with-python2 python-regex))
12475
12476 (define-public python2-pyopengl
12477 (package
12478 (name "python2-pyopengl")
12479 (version "3.1.0")
12480 (source
12481 (origin
12482 (method url-fetch)
12483 (uri (pypi-uri "PyOpenGL" version))
12484 (sha256
12485 (base32
12486 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
12487 (arguments
12488 `(#:python ,python-2))
12489 (build-system python-build-system)
12490 (home-page "http://pyopengl.sourceforge.net")
12491 (synopsis "Standard OpenGL bindings for Python")
12492 (description
12493 "PyOpenGL is the most common cross platform Python binding to OpenGL and
12494 related APIs. The binding is created using the standard @code{ctypes}
12495 library.")
12496 (license license:bsd-3)))
12497
12498 (define-public python2-pyopengl-accelerate
12499 (package
12500 (inherit python2-pyopengl)
12501 (name "python2-pyopengl-accelerate")
12502 (version "3.1.0")
12503 (source
12504 (origin
12505 (method url-fetch)
12506 (uri (pypi-uri "PyOpenGL-accelerate" version))
12507 (sha256
12508 (base32
12509 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
12510 (synopsis "Acceleration code for PyOpenGL")
12511 (description
12512 "This is the Cython-coded accelerator module for PyOpenGL.")))
12513
12514 (define-public python-rencode
12515 (package
12516 (name "python-rencode")
12517 (version "1.0.5")
12518 (source
12519 (origin
12520 (method url-fetch)
12521 (uri (pypi-uri "rencode" version))
12522 (sha256
12523 (base32
12524 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
12525 (build-system python-build-system)
12526 (arguments
12527 `(#:phases
12528 (modify-phases %standard-phases
12529 (add-before 'check 'delete-bogus-test
12530 ;; This test requires /home/aresch/Downloads, which is not provided by
12531 ;; the build environment.
12532 (lambda _
12533 (delete-file "rencode/t.py")
12534 #t)))))
12535 (native-inputs `(("pkg-config" ,pkg-config)
12536 ("python-cython" ,python-cython)))
12537 (home-page "https://github.com/aresch/rencode")
12538 (synopsis "Serialization of heterogeneous data structures")
12539 (description
12540 "The @code{rencode} module is a data structure serialization library,
12541 similar to @code{bencode} from the BitTorrent project. For complex,
12542 heterogeneous data structures with many small elements, r-encoding stake up
12543 significantly less space than b-encodings. This version of rencode is a
12544 complete rewrite in Cython to attempt to increase the performance over the
12545 pure Python module.")
12546 (license license:bsd-3)))
12547
12548 (define-public python2-rencode
12549 (package-with-python2 python-rencode))
12550
12551 (define-public python-xenon
12552 (package
12553 (name "python-xenon")
12554 (version "0.5.4")
12555 (source
12556 (origin
12557 (method url-fetch)
12558 (uri (pypi-uri "xenon" version))
12559 (sha256
12560 (base32
12561 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
12562 (build-system python-build-system)
12563 (native-inputs
12564 `(("python-pyyaml" ,python-pyyaml)
12565 ("python-radon" ,python-radon)
12566 ("python-requests" ,python-requests)
12567 ("python-flake8" ,python-flake8)
12568 ("python-tox" ,python-tox)))
12569 (arguments
12570 `(#:phases
12571 (modify-phases %standard-phases
12572 (add-before 'build 'patch-test-requirements
12573 (lambda _
12574 ;; Remove httpretty dependency for tests.
12575 (substitute* "setup.py"
12576 (("httpretty") ""))
12577 #t)))))
12578 (home-page "https://xenon.readthedocs.org/")
12579 (synopsis "Monitor code metrics for Python on your CI server")
12580 (description
12581 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
12582 Ideally, @code{xenon} is run every time code is committed. Through command
12583 line options, various thresholds can be set for the complexity of code. It
12584 will fail (i.e. it will exit with a non-zero exit code) when any of these
12585 requirements is not met.")
12586 (license license:expat)))
12587
12588 (define-public python2-xenon
12589 (package-with-python2 python-xenon))
12590
12591 (define-public python-pysocks
12592 (package
12593 (name "python-pysocks")
12594 (version "1.6.7")
12595 (source
12596 (origin
12597 (method url-fetch)
12598 (uri (pypi-uri "PySocks" version))
12599 (sha256
12600 (base32
12601 "1krkiss578zqwcg4c8iqz1hwscwhsvy2djp3xyvps5gsgvr2j0yh"))))
12602 (build-system python-build-system)
12603 (arguments `(#:tests? #f))
12604 (home-page "https://github.com/Anorov/PySocks")
12605 (synopsis "SOCKS client module")
12606 (description "@code{pysocks} is an updated and semi-actively maintained
12607 version of @code{SocksiPy} with bug fixes and extra features.")
12608 (license license:bsd-3)))
12609
12610 (define-public python2-pysocks
12611 (package-with-python2 python-pysocks))
12612
12613 (define-public python-pydiff
12614 (package
12615 (name "python-pydiff")
12616 (version "0.2")
12617 (source
12618 (origin
12619 (method url-fetch)
12620 (uri (pypi-uri "pydiff" version))
12621 (sha256
12622 (base32
12623 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
12624 (build-system python-build-system)
12625 (home-page "https://github.com/myint/pydiff")
12626 (synopsis "Library to diff two Python files at the bytecode level")
12627 (description
12628 "@code{pydiff} makes it easy to look for actual code changes while
12629 ignoring formatting changes.")
12630 (license license:expat)))
12631
12632 (define-public python2-pydiff
12633 (package-with-python2 python-pydiff))
12634
12635 (define-public python-tqdm
12636 (package
12637 (name "python-tqdm")
12638 (version "4.19.6")
12639 (source
12640 (origin
12641 (method url-fetch)
12642 (uri (pypi-uri "tqdm" version))
12643 (sha256
12644 (base32
12645 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
12646 (build-system python-build-system)
12647 (native-inputs
12648 `(("python-flake8" ,python-flake8)
12649 ("python-nose" ,python-nose)
12650 ("python-coverage" ,python-coverage)))
12651 (home-page "https://github.com/tqdm/tqdm")
12652 (synopsis "Fast, extensible progress meter")
12653 (description
12654 "Make loops show a progress bar on the console by just wrapping any
12655 iterable with @code{|tqdm(iterable)|}. Offers many options to define
12656 design and layout.")
12657 (license (list license:mpl2.0 license:expat))))
12658
12659 (define-public python2-tqdm
12660 (package-with-python2 python-tqdm))
12661
12662 (define-public python-pkginfo
12663 (package
12664 (name "python-pkginfo")
12665 (version "1.4.2")
12666 (source
12667 (origin
12668 (method url-fetch)
12669 (uri (pypi-uri "pkginfo" version))
12670 (sha256
12671 (base32
12672 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
12673 (build-system python-build-system)
12674 (arguments
12675 ;; The tests are broken upstream.
12676 '(#:tests? #f))
12677 (home-page
12678 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
12679 (synopsis
12680 "Query metadatdata from sdists, bdists, and installed packages")
12681 (description
12682 "API to query the distutils metadata written in @file{PKG-INFO} inside a
12683 source distriubtion (an sdist) or a binary distribution (e.g., created by
12684 running bdist_egg). It can also query the EGG-INFO directory of an installed
12685 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
12686 created by running @code{python setup.py develop}).")
12687 (license license:expat)))
12688
12689 (define-public python2-pkginfo
12690 (package-with-python2 python-pkginfo))
12691
12692 (define-public python-twine
12693 (package
12694 (name "python-twine")
12695 (version "1.9.1")
12696 (source
12697 (origin
12698 (method url-fetch)
12699 (uri (pypi-uri "twine" version))
12700 (sha256
12701 (base32
12702 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
12703 (build-system python-build-system)
12704 (propagated-inputs
12705 `(("python-tqdm" ,python-tqdm)
12706 ("python-pkginfo" ,python-pkginfo)
12707 ("python-requests" ,python-requests)
12708 ("python-requests-toolbelt" ,python-requests-toolbelt)))
12709 (home-page "https://github.com/pypa/twine")
12710 (synopsis "Collection of utilities for interacting with PyPI")
12711 (description
12712 "@code{twine} currently supports registering projects and uploading
12713 distributions. It authenticates the user over HTTPS, allows them to pre-sign
12714 their files and supports any packaging format (including wheels).")
12715 (license license:asl2.0)))
12716
12717 (define-public python2-twine
12718 (package-with-python2 python-twine))
12719
12720 (define-public python-linecache2
12721 (package
12722 (name "python-linecache2")
12723 (version "1.0.0")
12724 (source
12725 (origin
12726 (method url-fetch)
12727 (uri (pypi-uri "linecache2" version))
12728 (sha256
12729 (base32
12730 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
12731 (build-system python-build-system)
12732 (arguments
12733 `(;; The tests depend on unittest2, and our version is a bit too old.
12734 #:tests? #f))
12735 (native-inputs
12736 `(("python-pbr" ,python-pbr-minimal)))
12737 (home-page
12738 "https://github.com/testing-cabal/linecache2")
12739 (synopsis "Backports of the linecache module")
12740 (description
12741 "The linecache module allows one to get any line from any file, while
12742 attempting to optimize internally, using a cache, the common case where many
12743 lines are read from a single file.")
12744 (license license:psfl)))
12745
12746 (define-public python2-linecache2
12747 (package-with-python2 python-linecache2))
12748
12749 (define-public python-traceback2
12750 (package
12751 (name "python-traceback2")
12752 (version "1.4.0")
12753 (source
12754 (origin
12755 (method url-fetch)
12756 (uri (pypi-uri "traceback2" version))
12757 (sha256
12758 (base32
12759 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
12760 (build-system python-build-system)
12761 (arguments
12762 `(;; python-traceback2 and python-unittest2 depend on one another.
12763 #:tests? #f))
12764 (native-inputs
12765 `(("python-pbr" ,python-pbr-minimal)))
12766 (propagated-inputs
12767 `(("python-linecache2" ,python-linecache2)))
12768 (home-page
12769 "https://github.com/testing-cabal/traceback2")
12770 (synopsis "Backports of the traceback module")
12771 (description
12772 "This module provides a standard interface to extract, format and print
12773 stack traces of Python programs. It exactly mimics the behavior of the Python
12774 interpreter when it prints a stack trace.")
12775 (license license:psfl)))
12776
12777 (define-public python2-traceback2
12778 (package-with-python2 python-traceback2))
12779
12780 (define-public python-ratelimiter
12781 (package
12782 (name "python-ratelimiter")
12783 (version "1.2.0")
12784 (source
12785 (origin
12786 (method url-fetch)
12787 (uri (pypi-uri "ratelimiter" version))
12788 (sha256
12789 (base32
12790 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
12791 (build-system python-build-system)
12792 (arguments
12793 '(#:tests? #f)) ; There are no tests in the pypi archive.
12794 (home-page "https://github.com/RazerM/ratelimiter")
12795 (synopsis "Simple rate limiting object")
12796 (description
12797 "The @code{ratelimiter} module ensures that an operation will not be
12798 executed more than a given number of times during a given period.")
12799 (license license:asl2.0)))
12800
12801 (define-public python2-ratelimiter
12802 (package-with-python2 python-ratelimiter))
12803
12804 (define-public python-dukpy
12805 (package
12806 (name "python-dukpy")
12807 (version "0.3")
12808 (source
12809 (origin
12810 (method url-fetch)
12811 (uri (string-append "https://github.com/kovidgoyal/dukpy/archive/v"
12812 version ".tar.gz"))
12813 (file-name (string-append name "-" version ".tar.gz"))
12814 (sha256
12815 (base32
12816 "0pj39rfwlzivqm5hkrsza7gssg6ggpxlq5ivc8f3h7x5pfgc6y6c"))))
12817 (build-system python-build-system)
12818 (home-page "https://github.com/kovidgoyal/dukpy")
12819 (synopsis "Run JavaScript in python")
12820 (description
12821 "dukpy is a JavaScript runtime environment for Python using the duktape
12822 embeddable JavaScript engine.")
12823 ;; Dukpy is licensed under MIT like the embedded duktape library,
12824 ;; with 'errors.c' as GPL3.
12825 (license (list license:expat license:gpl3))))
12826
12827 (define-public python2-dukpy
12828 (package-with-python2 python-dukpy))
12829
12830 (define-public python-jsonrpclib-pelix
12831 (package
12832 (name "python-jsonrpclib-pelix")
12833 (version "0.3.1")
12834 (source
12835 (origin
12836 (method url-fetch)
12837 (uri (pypi-uri "jsonrpclib-pelix" version))
12838 (sha256
12839 (base32
12840 "1qs95vxplxwspbrqy8bvc195s58iy43qkf75yrjfql2sim8b25sl"))))
12841 (build-system python-build-system)
12842 (home-page "https://github.com/tcalmant/jsonrpclib/")
12843 (synopsis "JSON-RPC 2.0 client library for Python")
12844 (description
12845 "This library implements the JSON-RPC v2.0
12846 specification (backwards-compatible) as a client library for Python. This
12847 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
12848 services.")
12849 (license license:asl2.0)))
12850
12851 (define-public python2-jsonrpclib-pelix
12852 (package-with-python2 python-jsonrpclib-pelix))
12853
12854 (define-public python-setuptools-scm-git-archive
12855 (package
12856 (name "python-setuptools-scm-git-archive")
12857 (version "1.0")
12858 (source
12859 (origin
12860 (method url-fetch)
12861 (uri (pypi-uri "setuptools_scm_git_archive" version))
12862 (sha256
12863 (base32
12864 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
12865 (build-system python-build-system)
12866 (native-inputs
12867 `(("python-pytest" ,python-pytest)))
12868 (propagated-inputs
12869 `(("python-setuptools-scm" ,python-setuptools-scm)))
12870 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
12871 (synopsis "Setuptools_scm plugin for git archives")
12872 (description
12873 "The setuptools_scm_git_archive package is a plugin to
12874 setuptools_scm, which supports obtaining versions from git archives that
12875 belong to tagged versions.")
12876 (license license:expat)))
12877
12878 (define-public python2-setuptools-scm-git-archive
12879 (package-with-python2 python-setuptools-scm-git-archive))
12880
12881 (define-public python-pyclipper
12882 (package
12883 (name "python-pyclipper")
12884 (version "1.0.6")
12885 (source
12886 (origin
12887 (method url-fetch)
12888 (uri (pypi-uri "pyclipper" version ".zip"))
12889 (sha256
12890 (base32
12891 "1zpmwv3bya3j984y5cf9x9d5108kf6mxldcba68wiq0frv5qrssw"))))
12892 (build-system python-build-system)
12893 (arguments
12894 `(#:tests? #f)); 8 Tests fail, 37 succeed
12895 (propagated-inputs
12896 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
12897 (native-inputs
12898 `(("unzip" ,unzip)))
12899 (home-page "https://github.com/greginvm/pyclipper")
12900 (synopsis "Wrapper for Angus Johnson's Clipper library")
12901 (description
12902 "Pyclipper is a Cython wrapper for the C++ translation of the
12903 Angus Johnson's polygon clipping Clipper library (ver. 6.2.1).")
12904 (license license:expat)))
12905
12906 (define-public python2-pyclipper
12907 (package-with-python2 python-pyclipper))
12908
12909 (define-public python2-booleanoperations
12910 (package
12911 (name "python2-booleanoperations")
12912 (version "0.7.1")
12913 (source
12914 (origin
12915 (method url-fetch)
12916 (uri (pypi-uri "booleanOperations" version ".zip"))
12917 (sha256
12918 (base32
12919 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
12920 (build-system python-build-system)
12921 (arguments
12922 `(#:python ,python-2))
12923 (native-inputs
12924 `(("unzip" ,unzip)
12925 ("python2-pytest" ,python2-pytest)
12926 ("python2-pytest-runner" ,python2-pytest-runner)))
12927 (propagated-inputs
12928 `(("python-fonttools" ,python2-fonttools)
12929 ("python-pyclipper" ,python2-pyclipper)
12930 ("python-ufolib" ,python2-ufolib)))
12931 (home-page "https://github.com/typemytype/booleanOperations")
12932 (synopsis "Boolean operations on paths")
12933 (description
12934 "BooleanOperations provides a Python library that enables
12935 boolean operations on paths.")
12936 (license license:expat)))
12937
12938 (define-public python-tempdir
12939 (package
12940 (name "python-tempdir")
12941 (version "0.7.1")
12942 (source
12943 (origin
12944 (method url-fetch)
12945 (uri (pypi-uri "tempdir" version))
12946 (sha256
12947 (base32
12948 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
12949 (build-system python-build-system)
12950 (home-page "https://pypi.org/project/tempdir/")
12951 (arguments
12952 ;; the package has no tests
12953 '(#:tests? #f))
12954 (synopsis "Python library for managing temporary directories")
12955 (description
12956 "This library manages temporary directories that are automatically
12957 deleted with all their contents when they are no longer needed. It is
12958 particularly convenient for use in tests.")
12959 (license license:expat)))
12960
12961 (define-public python2-tempdir
12962 (package-with-python2 python-tempdir))
12963
12964 (define-public python-activepapers
12965 (package
12966 (name "python-activepapers")
12967 (version "0.2.2")
12968 (source
12969 (origin
12970 (method url-fetch)
12971 (uri (pypi-uri "ActivePapers.Py" version))
12972 (sha256
12973 (base32
12974 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
12975 (build-system python-build-system)
12976 (arguments
12977 `(#:modules ((ice-9 ftw)
12978 (srfi srfi-1)
12979 (guix build utils)
12980 (guix build python-build-system))
12981
12982 #:phases
12983 (modify-phases %standard-phases
12984 (add-after 'unpack 'delete-python2-code
12985 (lambda _
12986 (for-each delete-file
12987 '("lib/activepapers/builtins2.py"
12988 "lib/activepapers/standardlib2.py"
12989 "lib/activepapers/utility2.py"))))
12990 (replace 'check
12991 (lambda _
12992 ;; Deactivate the test cases that download files
12993 (setenv "NO_NETWORK_ACCESS" "1")
12994 ;; For some strange reason, some tests fail if nosetests runs all
12995 ;; test modules in a single execution. They pass if each test
12996 ;; module is run individually.
12997 (for-each (lambda (filename)
12998 (invoke "nosetests"
12999 (string-append "tests/" filename)))
13000 (scandir "tests"
13001 (lambda (filename)
13002 (string-suffix? ".py" filename)))))))))
13003 (native-inputs
13004 `(("python-tempdir" ,python-tempdir)
13005 ("python-nose" ,python-nose)))
13006 (propagated-inputs
13007 `(("python-h5py" ,python-h5py)))
13008 (home-page "http://www.activepapers.org/")
13009 (synopsis "Executable papers for scientific computing")
13010 (description
13011 "ActivePapers is a tool for working with executable papers, which
13012 combine data, code, and documentation in single-file packages,
13013 suitable for publication as supplementary material or on repositories
13014 such as figshare or Zenodo.")
13015 (properties `((python2-variant . ,(delay python2-activepapers))))
13016 (license license:bsd-3)))
13017
13018 (define-public python2-activepapers
13019 (let ((base (package-with-python2
13020 (strip-python2-variant python-activepapers))))
13021 (package
13022 (inherit base)
13023 (arguments
13024 (substitute-keyword-arguments (package-arguments base)
13025 ((#:phases phases)
13026 `(modify-phases ,phases
13027 (delete 'delete-python2-code)
13028 (add-after 'unpack 'delete-python3-code
13029 (lambda _
13030 (for-each delete-file
13031 '("lib/activepapers/builtins3.py"
13032 "lib/activepapers/standardlib3.py"
13033 "lib/activepapers/utility3.py")))))))))))
13034
13035 (define-public python-semver
13036 (package
13037 (name "python-semver")
13038 (version "2.7.9")
13039 (source
13040 (origin
13041 (method url-fetch)
13042 (uri (pypi-uri "semver" version))
13043 (sha256
13044 (base32
13045 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13046 (build-system python-build-system)
13047 (arguments
13048 `(#:phases
13049 (modify-phases %standard-phases
13050 (add-after 'unpack 'patch-test-requirements
13051 (lambda _
13052 (substitute* "setup.py"
13053 ;; Our Python is new enough.
13054 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13055 #t)))))
13056 (native-inputs
13057 `(("python-tox" ,python-tox)
13058 ("python-virtualenv" ,python-virtualenv)))
13059 (home-page "https://github.com/k-bx/python-semver")
13060 (synopsis "Python helper for Semantic Versioning")
13061 (description "This package provides a Python library for
13062 @url{Semantic Versioning, http://semver.org/}.")
13063 (license license:bsd-3)))
13064
13065 (define-public python2-semver
13066 (package-with-python2 python-semver))
13067
13068 (define-public python2-pyro
13069 (package
13070 (name "python2-pyro")
13071 (version "3.16")
13072 (source
13073 (origin
13074 (method url-fetch)
13075 (uri (pypi-uri "Pyro" version))
13076 (file-name (string-append "Pyro-" version ".tar.gz"))
13077 (sha256
13078 (base32
13079 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13080 (build-system python-build-system)
13081 (arguments
13082 ;; Pyro is not compatible with Python 3
13083 `(#:python ,python-2
13084 ;; Pyro has no test cases for automatic execution
13085 #:tests? #f))
13086 (home-page "http://pythonhosted.org/Pyro/")
13087 (synopsis "Distributed object manager for Python")
13088 (description "Pyro is a Distributed Object Technology system
13089 written in Python that is designed to be easy to use. It resembles
13090 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13091 which is a system and language independent Distributed Object Technology
13092 and has much more to offer than Pyro or RMI. Pyro 3.x is no
13093 longer maintained. New projects should use Pyro4 instead, which
13094 is the new Pyro version that is actively developed.")
13095 (license license:expat)))
13096
13097 (define-public python2-scientific
13098 (package
13099 (name "python2-scientific")
13100 (version "2.9.4")
13101 (source
13102 (origin
13103 (method url-fetch)
13104 (uri (string-append "https://bitbucket.org/khinsen/"
13105 "scientificpython/downloads/ScientificPython-"
13106 version ".tar.gz"))
13107 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13108 (sha256
13109 (base32
13110 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13111 (build-system python-build-system)
13112 (inputs
13113 `(("netcdf" ,netcdf)))
13114 (propagated-inputs
13115 `(("python-numpy" ,python2-numpy-1.8)
13116 ("python-pyro" ,python2-pyro)))
13117 (arguments
13118 ;; ScientificPython is not compatible with Python 3
13119 `(#:python ,python-2
13120 #:tests? #f ; No test suite
13121 #:phases
13122 (modify-phases %standard-phases
13123 (replace 'build
13124 (lambda* (#:key inputs #:allow-other-keys)
13125 (zero? (system* "python" "setup.py" "build"
13126 (string-append "--netcdf_prefix="
13127 (assoc-ref inputs "netcdf")))))))))
13128 (home-page "https://bitbucket.org/khinsen/scientificpython")
13129 (synopsis "Python modules for scientific computing")
13130 (description "ScientificPython is a collection of Python modules that are
13131 useful for scientific computing. Most modules are rather general (Geometry,
13132 physical units, automatic derivatives, ...) whereas others are more
13133 domain-specific (e.g. netCDF and PDB support). The library is currently
13134 not actively maintained and works only with Python 2 and NumPy < 1.9.")
13135 (license license:cecill-c)))
13136
13137 (define-public python2-mmtk
13138 (package
13139 (name "python2-mmtk")
13140 (version "2.7.11")
13141 (source
13142 (origin
13143 (method url-fetch)
13144 (uri (string-append "https://bitbucket.org/khinsen/"
13145 "mmtk/downloads/MMTK-" version ".tar.gz"))
13146 (file-name (string-append "MMTK-" version ".tar.gz"))
13147 (sha256
13148 (base32
13149 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
13150 (build-system python-build-system)
13151 (native-inputs
13152 `(("netcdf" ,netcdf)))
13153 (propagated-inputs
13154 `(("python-scientific" ,python2-scientific)
13155 ("python-tkinter" ,python-2 "tk")))
13156 (arguments
13157 `(#:python ,python-2
13158 #:tests? #f
13159 #:phases
13160 (modify-phases %standard-phases
13161 (add-before 'build 'includes-from-scientific
13162 (lambda* (#:key inputs #:allow-other-keys)
13163 (mkdir-p "Include/Scientific")
13164 (copy-recursively
13165 (string-append
13166 (assoc-ref inputs "python-scientific")
13167 "/include/python2.7/Scientific")
13168 "Include/Scientific"))))))
13169 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
13170 (synopsis "Python library for molecular simulation")
13171 (description "MMTK is a library for molecular simulations with an emphasis
13172 on biomolecules. It provides widely used methods such as Molecular Dynamics
13173 and normal mode analysis, but also basic routines for implementing new methods
13174 for simulation and analysis. The library is currently not actively maintained
13175 and works only with Python 2 and NumPy < 1.9.")
13176 (license license:cecill-c)))
13177
13178 (define-public python-phonenumbers
13179 (package
13180 (name "python-phonenumbers")
13181 (version "8.9.1")
13182 (source
13183 (origin
13184 (method url-fetch)
13185 (uri (pypi-uri "phonenumbers" version))
13186 (sha256
13187 (base32
13188 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
13189 (build-system python-build-system)
13190 (home-page
13191 "https://github.com/daviddrysdale/python-phonenumbers")
13192 (synopsis
13193 "Python library for dealing with international phone numbers")
13194 (description
13195 "This package provides a Python port of Google's libphonenumber library.")
13196 (license license:asl2.0)))
13197
13198 (define-public python2-phonenumbers
13199 (package-with-python2 python-phonenumbers))
13200
13201 (define-public python-send2trash
13202 (package
13203 (name "python-send2trash")
13204 (version "1.4.2")
13205 (source
13206 (origin (method url-fetch)
13207 ;; Source tarball on PyPI doesn't include tests.
13208 (uri (string-append "https://github.com/hsoft/send2trash/archive/"
13209 version ".tar.gz"))
13210 (file-name (string-append name "-" version ".tar.gz"))
13211 (sha256
13212 (base32
13213 "0ffyhwjyx61slkdy38iwjc4gmj7fj9gs2q58f075gwvq630pzm9z"))))
13214 (build-system python-build-system)
13215 (arguments
13216 '(#:phases
13217 (modify-phases %standard-phases
13218 (add-before 'check 'pre-check
13219 (lambda _
13220 (mkdir-p "/tmp/foo")
13221 (setenv "HOME" "/tmp/foo")
13222 #t)))))
13223 (home-page "https://github.com/hsoft/send2trash")
13224 (synopsis "Send files to the user's @file{~/Trash} directory")
13225 (description "This package provides a Python library to send files to the
13226 user's @file{~/Trash} directory.")
13227 (license license:bsd-3)))
13228
13229 (define-public python2-send2trash
13230 (package
13231 (inherit (package-with-python2 python-send2trash))
13232 (arguments
13233 (substitute-keyword-arguments (package-arguments python-send2trash)
13234 ((#:phases phases)
13235 `(modify-phases ,phases
13236 (add-before 'check 'setenv
13237 (lambda _
13238 (setenv "PYTHONPATH"
13239 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13240 #t))))))
13241 (properties `((python2-variant . ,(delay python-send2trash))))))
13242
13243 (define-public python-yapf
13244 (package
13245 (name "python-yapf")
13246 (version "0.21.0")
13247 (source
13248 (origin
13249 (method url-fetch)
13250 (uri (pypi-uri "yapf" version))
13251 (sha256
13252 (base32
13253 "144gc7d6b1415vh02409rnb8qd5kxi6mxlr7y64d5cizgxbf72kx"))))
13254 (build-system python-build-system)
13255 (home-page "https://github.com/google/yapf")
13256 (synopsis "Formatter for Python code")
13257 (description "YAPF is a formatter for Python code. It's based off of
13258 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
13259 takes the code and reformats it to the best formatting that conforms to the
13260 style guide, even if the original code didn't violate the style guide.")
13261 (license license:asl2.0)))
13262
13263 (define-public python2-yapf
13264 (package-with-python2 python-yapf))
13265
13266 (define-public python-gyp
13267 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
13268 (revision "0"))
13269 (package
13270 (name "python-gyp")
13271 ;; Google does not release versions,
13272 ;; based on second most recent commit date.
13273 (version (git-version "0.0.0" revision commit))
13274 (source
13275 (origin
13276 ;; Google does not release tarballs,
13277 ;; git checkout is needed.
13278 (method git-fetch)
13279 (uri (git-reference
13280 (url "https://chromium.googlesource.com/external/gyp")
13281 (commit commit)))
13282 (file-name (git-file-name name version))
13283 (sha256
13284 (base32
13285 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
13286 (build-system python-build-system)
13287 (home-page "https://gyp.gsrc.io/")
13288 (synopsis "GYP is a Meta-Build system")
13289 (description
13290 "GYP builds build systems for large, cross platform applications.
13291 It can be used to generate XCode projects, Visual Studio projects, Ninja build
13292 files, and Makefiles.")
13293 (license license:bsd-3))))
13294
13295 (define-public python2-gyp
13296 (package-with-python2 python-gyp))
13297
13298 (define-public python-whatever
13299 (package
13300 (name "python-whatever")
13301 (version "0.5")
13302 (source
13303 (origin
13304 (method url-fetch)
13305 (uri (string-append "https://github.com/Suor/whatever/archive/" version
13306 ".tar.gz"))
13307 (sha256
13308 (base32
13309 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
13310 (file-name (string-append name "-" version ".tar.gz"))))
13311 (build-system python-build-system)
13312 (arguments
13313 `(#:phases
13314 (modify-phases %standard-phases
13315 (replace 'check
13316 (lambda _
13317 (invoke "py.test"))))))
13318 (native-inputs
13319 `(("python-pytest" ,python-pytest)))
13320 (home-page "http://github.com/Suor/whatever")
13321 (synopsis "Make anonymous functions by partial application of operators")
13322 (description "@code{whatever} provides an easy way to make anonymous
13323 functions by partial application of operators.")
13324 (license license:bsd-3)))
13325
13326 (define-public python2-whatever
13327 (package-with-python2 python-whatever))
13328
13329 (define-public python-funcy
13330 (package
13331 (name "python-funcy")
13332 (version "1.10")
13333 (source
13334 (origin
13335 (method url-fetch)
13336 (uri (string-append "https://github.com/Suor/funcy/archive/" version
13337 ".tar.gz"))
13338 (sha256
13339 (base32
13340 "1fanxivsip29vgarw6dn39xym3q4pbxcpa11plpp548lvxajpahz"))
13341 (file-name (string-append name "-" version ".tar.gz"))))
13342 (build-system python-build-system)
13343 (arguments
13344 `(#:phases
13345 (modify-phases %standard-phases
13346 (replace 'check
13347 (lambda _
13348 (invoke "py.test"))))))
13349 (native-inputs
13350 `(("python-pytest" ,python-pytest)
13351 ("python-whatever" ,python-whatever)))
13352 (home-page "http://github.com/Suor/funcy")
13353 (synopsis "Functional tools")
13354 (description "@code{funcy} is a library that provides functional tools.
13355 Examples are:
13356 @enumerate
13357 @item merge - Merges collections of the same type
13358 @item walk - Type-preserving map
13359 @item select - Selects a part of a collection
13360 @item take - Takes the first n items of a collection
13361 @item first - Takes the first item of a collection
13362 @item remove - Predicated-removes items of a collection
13363 @item concat - Concatenates two collections
13364 @item flatten - Flattens a collection with subcollections
13365 @item distinct - Returns only distinct items
13366 @item split - Predicated-splits a collection
13367 @item split_at - Splits a collection at a given item
13368 @item group_by - Groups items by group
13369 @item pairwise - Pairs off adjacent items
13370 @item partial - Partially-applies a function
13371 @item curry - Curries a function
13372 @item compose - Composes functions
13373 @item complement - Complements a predicate
13374 @item all_fn - \"all\" with predicate
13375 @end enumerate")
13376 (license license:bsd-3)))
13377
13378 (define-public python2-funcy
13379 (package-with-python2 python-funcy))
13380
13381 (define-public python-isoweek
13382 (package
13383 (name "python-isoweek")
13384 (version "1.3.3")
13385 (source
13386 (origin
13387 (method url-fetch)
13388 (uri (pypi-uri "isoweek" version))
13389 (sha256
13390 (base32
13391 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
13392 (build-system python-build-system)
13393 (home-page "https://github.com/gisle/isoweek")
13394 (synopsis "Objects representing a week")
13395 (description "The @code{isoweek} module provide the class Week that
13396 implements the week definition of ISO 8601. This standard also defines
13397 a notation for identifying weeks; yyyyWww (where the W is a literal).
13398 Week instances stringify to this form.")
13399 (license license:bsd-3)))
13400
13401 (define-public python2-isoweek
13402 (package-with-python2 python-isoweek))
13403
13404 (define-public python-tokenize-rt
13405 (package
13406 (name "python-tokenize-rt")
13407 (version "2.0.1")
13408 (source
13409 (origin
13410 (method url-fetch)
13411 (uri (pypi-uri "tokenize-rt" version))
13412 (sha256
13413 (base32
13414 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
13415 (build-system python-build-system)
13416 (home-page "https://github.com/asottile/tokenize-rt")
13417 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
13418 (description
13419 "This Python library is a wrapper around @code{tokenize} from the Python
13420 standard library. It provides two additional tokens @code{ESCAPED_NL} and
13421 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
13422 and @code{tokens_to_src} to roundtrip.")
13423 (license license:expat)))
13424
13425 (define-public python-future-fstrings
13426 (package
13427 (name "python-future-fstrings")
13428 (version "0.4.1")
13429 (source
13430 (origin
13431 (method url-fetch)
13432 (uri (pypi-uri "future_fstrings" version))
13433 (sha256
13434 (base32
13435 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
13436 (build-system python-build-system)
13437 (propagated-inputs
13438 `(("python-tokenize-rt" ,python-tokenize-rt)))
13439 (home-page "https://github.com/asottile/future-fstrings")
13440 (synopsis "Backport of fstrings to Python < 3.6")
13441 (description
13442 "This package provides a UTF-8 compatible encoding
13443 @code{future_fstrings}, which performs source manipulation. It decodes the
13444 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
13445 @code{f} strings.")
13446 (license license:expat)))
13447
13448 (define-public python-typing
13449 (package
13450 (name "python-typing")
13451 (version "3.6.6")
13452 (source
13453 (origin
13454 (method url-fetch)
13455 (uri (pypi-uri "typing" version))
13456 (sha256
13457 (base32
13458 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
13459 (build-system python-build-system)
13460 (home-page "https://docs.python.org/3/library/typing.html")
13461 (synopsis "Type hints for Python")
13462 (description "This is a backport of the standard library @code{typing}
13463 module to Python versions older than 3.5. Typing defines a standard notation
13464 for Python function and variable type annotations. The notation can be used
13465 for documenting code in a concise, standard format, and it has been designed
13466 to also be used by static and runtime type checkers, static analyzers, IDEs
13467 and other tools.")
13468 (license license:psfl)))
13469
13470 (define-public python2-typing
13471 (package-with-python2 python-typing))
13472
13473 (define-public bpython
13474 (package
13475 (name "bpython")
13476 (version "0.17.1")
13477 (source
13478 (origin
13479 (method url-fetch)
13480 (uri (pypi-uri "bpython" version))
13481 (sha256
13482 (base32
13483 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
13484 (build-system python-build-system)
13485 (arguments
13486 `(#:phases
13487 (modify-phases %standard-phases
13488 (add-after 'unpack 'remove-failing-test
13489 (lambda _
13490 ;; Remove failing test. FIXME: make it pass
13491 (delete-file "bpython/test/test_args.py")
13492 #t))
13493 (add-after 'wrap 'add-aliases
13494 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
13495 (lambda* (#:key outputs #:allow-other-keys)
13496 (let ((out (assoc-ref outputs "out")))
13497 (for-each
13498 (lambda (old new)
13499 (symlink old (string-append out "/bin/" new)))
13500 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
13501 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
13502 #t)))))
13503 (propagated-inputs
13504 `(("python-pygments" ,python-pygments)
13505 ("python-requests" ,python-requests)
13506 ("python-babel" ,python-babel) ; optional, for internationalization
13507 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
13508 ("python-greenlet" ,python-greenlet)
13509 ("python-urwid" ,python-urwid) ; for bpython-urwid only
13510 ("python-six" ,python-six)))
13511 (native-inputs
13512 `(("python-sphinx" ,python-sphinx)
13513 ("python-mock" ,python-mock)))
13514 (home-page "https://bpython-interpreter.org/")
13515 (synopsis "Fancy interface to the Python interpreter")
13516 (description "Bpython is a fancy interface to the Python
13517 interpreter. bpython's main features are
13518
13519 @enumerate
13520 @item in-line syntax highlighting,
13521 @item readline-like autocomplete with suggestions displayed as you type,
13522 @item expected parameter list for any Python function,
13523 @item \"rewind\" function to pop the last line of code from memory and
13524 re-evaluate,
13525 @item send the code you've entered off to a pastebin,
13526 @item save the code you've entered to a file, and
13527 @item auto-indentation.
13528 @end enumerate")
13529 (license license:expat)))
13530
13531 (define-public bpython2
13532 (let ((base (package-with-python2
13533 (strip-python2-variant bpython))))
13534 (package (inherit base)
13535 (name "bpython2")
13536 (arguments
13537 `(#:python ,python-2
13538 #:phases
13539 (modify-phases %standard-phases
13540 (add-after 'unpack 'remove-failing-test
13541 (lambda _
13542 ;; Remove failing test. FIXME: make it pass
13543 (delete-file "bpython/test/test_args.py")
13544 ;; Disable failing test-cases (renaming inhibits they are
13545 ;; discovered)
13546 (substitute* "bpython/test/test_curtsies_repl.py"
13547 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
13548 (string-append a "xxx_off_" b))
13549 (("^(\\s*def )(test_complex\\W)" _ a b)
13550 (string-append a "xxx_off_" b)))
13551 #t))
13552 (add-before 'build 'rename-scripts
13553 ;; rename the scripts to bypthon2, bpdb2, etc.
13554 (lambda _
13555 (substitute* "setup.py"
13556 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
13557 (string-append name "2" rest "\n"))
13558 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
13559 (string-append name "2" (or sub "") rest "\n")))
13560 #t))))))))
13561
13562 (define-public python-pyinotify
13563 (package
13564 (name "python-pyinotify")
13565 (version "0.9.6")
13566 (source (origin
13567 (method url-fetch)
13568 (uri (pypi-uri "pyinotify" version))
13569 (sha256
13570 (base32
13571 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
13572 (build-system python-build-system)
13573 (arguments `(#:tests? #f)) ;no tests
13574 (home-page "https://github.com/seb-m/pyinotify")
13575 (synopsis "Python library for monitoring inotify events")
13576 (description
13577 "@code{pyinotify} provides a Python interface for monitoring
13578 file system events on Linux.")
13579 (license license:expat)))
13580
13581 (define-public python2-pyinotify
13582 (package-with-python2 python-pyinotify))
13583
13584 ;; Ada parser uses this version.
13585 (define-public python2-quex-0.67.3
13586 (package
13587 (name "python2-quex")
13588 (version "0.67.3")
13589 (source
13590 (origin
13591 (method url-fetch)
13592 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
13593 (version-major+minor version)
13594 "/quex-" version ".zip"))
13595 (sha256
13596 (base32
13597 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
13598 (build-system python-build-system)
13599 (native-inputs
13600 `(("unzip" ,unzip)))
13601 (arguments
13602 `(#:python ,python-2
13603 #:tests? #f
13604 #:phases
13605 (modify-phases %standard-phases
13606 (delete 'configure)
13607 (delete 'build)
13608 (replace 'install
13609 (lambda* (#:key outputs #:allow-other-keys)
13610 (let* ((out (assoc-ref outputs "out"))
13611 (share/quex (string-append out "/share/quex"))
13612 (bin (string-append out "/bin")))
13613 (copy-recursively "." share/quex)
13614 (mkdir-p bin)
13615 (symlink (string-append share/quex "/quex-exe.py")
13616 (string-append bin "/quex"))
13617 #t))))))
13618 (native-search-paths
13619 (list (search-path-specification
13620 (variable "QUEX_PATH")
13621 (files '("share/quex")))))
13622 (home-page "http://quex.sourceforge.net/")
13623 (synopsis "Lexical analyzer generator in Python")
13624 (description "@code{quex} is a lexical analyzer generator in Python.")
13625 (license license:lgpl2.1+))) ; Non-military
13626
13627 (define-public python2-quex
13628 (package (inherit python2-quex-0.67.3)
13629 (name "python2-quex")
13630 (version "0.68.1")
13631 (source
13632 (origin
13633 (method url-fetch)
13634 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
13635 (sha256
13636 (base32
13637 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
13638 (file-name (string-append name "-" version ".tar.gz"))))))
13639
13640 (define-public python-more-itertools
13641 (package
13642 (name "python-more-itertools")
13643 (version "4.1.0")
13644 (source
13645 (origin
13646 (method url-fetch)
13647 (uri (pypi-uri "more-itertools" version))
13648 (sha256
13649 (base32
13650 "0i3ch700g5fyjp692gprlnzbysl8w0sa2vijbp3s40drvk67xkn9"))))
13651 (build-system python-build-system)
13652 (propagated-inputs
13653 `(("python-six" ,python-six-bootstrap)))
13654 (home-page "https://github.com/erikrose/more-itertools")
13655 (synopsis "More routines for operating on iterables, beyond itertools")
13656 (description "Python's built-in @code{itertools} module implements a
13657 number of iterator building blocks inspired by constructs from APL, Haskell,
13658 and SML. @code{more-itertools} includes additional building blocks for
13659 working with iterables.")
13660 (license license:expat)))
13661
13662 (define-public python2-more-itertools
13663 (package-with-python2 python-more-itertools))
13664
13665 (define-public python-latexcodec
13666 (package
13667 (name "python-latexcodec")
13668 (version "1.0.5")
13669 (source
13670 (origin
13671 (method url-fetch)
13672 (uri (pypi-uri "latexcodec" version))
13673 (sha256
13674 (base32
13675 "0zdd1gf24i83ykadx0y30n3001j43scqr2saql3vckk5c39dj1wn"))))
13676 (build-system python-build-system)
13677 (inputs
13678 `(("python-six" ,python-six)))
13679 (home-page "https://readthedocs.org/projects/latexcodec/")
13680 (synopsis "Work with LaTeX code in Python")
13681 (description "Lexer and codec to work with LaTeX code in Python.")
13682 (license license:expat)))
13683
13684 (define-public python-pybtex
13685 (package
13686 (name "python-pybtex")
13687 (version "0.21")
13688 (source
13689 (origin
13690 (method url-fetch)
13691 (uri (pypi-uri "pybtex" version))
13692 (sha256
13693 (base32
13694 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
13695 (build-system python-build-system)
13696 (native-inputs
13697 `(("python-nose" ,python-nose)))
13698 (inputs
13699 `(("python-latexcodec" ,python-latexcodec)
13700 ("python-pyyaml" ,python-pyyaml)
13701 ("python-six" ,python-six)))
13702 (arguments
13703 `(#:test-target "nosetests"))
13704 (home-page "https://pybtex.org/")
13705 (synopsis "BibTeX-compatible bibliography processor")
13706 (description "Pybtex is a BibTeX-compatible bibliography processor written
13707 in Python. You can simply type pybtex instead of bibtex.")
13708 (license license:expat)))
13709
13710 (define-public python-onetimepass
13711 (package
13712 (name "python-onetimepass")
13713 (version "1.0.1")
13714 (source
13715 (origin
13716 (method url-fetch)
13717 (uri (pypi-uri "onetimepass" version))
13718 (sha256
13719 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
13720 (build-system python-build-system)
13721 (propagated-inputs `(("python-six" ,python-six)))
13722 (home-page "https://github.com/tadeck/onetimepass/")
13723 (synopsis "One-time password library")
13724 (description "Python one-time password library for HMAC-based (HOTP) and
13725 time-based (TOTP) passwords.")
13726 (license license:expat)))
13727
13728 (define-public python-parso
13729 (package
13730 (name "python-parso")
13731 (version "0.3.1")
13732 (source
13733 (origin
13734 (method url-fetch)
13735 (uri (pypi-uri "parso" version))
13736 (sha256
13737 (base32
13738 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
13739 (native-inputs
13740 `(("python-pytest" ,python-pytest)))
13741 (build-system python-build-system)
13742 (home-page "https://github.com/davidhalter/parso")
13743 (synopsis "Python Parser")
13744 (description "Parso is a Python parser that supports error recovery and
13745 round-trip parsing for different Python versions (in multiple Python versions).
13746 Parso is also able to list multiple syntax errors in your Python file.")
13747 (license license:expat)))
13748
13749 (define-public python2-parso
13750 (package-with-python2 python-parso))
13751
13752 (define-public python-async-generator
13753 (package
13754 (name "python-async-generator")
13755 (version "1.9")
13756 (source
13757 (origin
13758 (method url-fetch)
13759 (uri (pypi-uri "async_generator" version))
13760 (sha256
13761 (base32
13762 "0wc3hidz1q85cja93k5pzybn0fprfnqyrv4qlkdqdzklc5f4dmdp"))))
13763 (build-system python-build-system)
13764 (native-inputs
13765 `(("python-pytest" ,python-pytest)))
13766 (home-page "https://github.com/python-trio/async_generator")
13767 (synopsis "Async generators and context managers for Python 3.5+")
13768 (description "@code{async_generator} back-ports Python 3.6's native async
13769 generators and Python 3.7's context managers into Python 3.5.")
13770 ;; Dual licensed.
13771 (license (list license:expat license:asl2.0))))
13772
13773 (define-public python-async-timeout
13774 (package
13775 (name "python-async-timeout")
13776 (version "2.0.1")
13777 (source
13778 (origin
13779 (method url-fetch)
13780 (uri (pypi-uri "async-timeout" version))
13781 (sha256
13782 (base32
13783 "1l3kg062m02mph6rf9rdv8r5c5n356clxa6b6mrn0i77vk9g9kq0"))))
13784 (build-system python-build-system)
13785 (home-page "https://github.com/aio-libs/async_timeout/")
13786 (synopsis "Timeout context manager for asyncio programs")
13787 (description "@code{async-timeout} provides a timeout timeout context
13788 manager compatible with @code{asyncio}.")
13789 (license license:asl2.0)))
13790
13791 (define-public python-glob2
13792 (package
13793 (name "python-glob2")
13794 (version "0.6")
13795 (source (origin
13796 (method url-fetch)
13797 (uri (string-append
13798 "https://github.com/miracle2k/python-glob2/archive/"
13799 version
13800 ".tar.gz"))
13801 (sha256
13802 (base32
13803 "0ja168f0dz4kbz4m06dm0rd3acaypk6hjx2km541pw22y9s40mag"))
13804 (file-name (string-append name "-" version ".tar.gz"))))
13805 (build-system python-build-system)
13806 (home-page "https://github.com/miracle2k/python-glob2/")
13807 (synopsis "Extended Version of the python buildin glob module")
13808 (description "This is an extended version of the Python
13809 @url{http://docs.python.org/library/glob.html, built-in glob module} which
13810 adds:
13811
13812 @itemize
13813 @item The ability to capture the text matched by glob patterns, and return
13814 those matches alongside the file names.
13815 @item A recursive @code{**} globbing syntax, akin for example to the
13816 @code{globstar} option of Bash.
13817 @item The ability to replace the file system functions used, in order to glob
13818 on virtual file systems.
13819 @item Compatible with Python 2 and Python 3 (tested with 3.3).
13820 @end itemize
13821
13822 Glob2 currently based on the glob code from Python 3.3.1.")
13823 (license license:bsd-2)))
13824
13825 (define-public python2-glob2
13826 (package-with-python2 python-glob2))
13827
13828 (define-public python-gipc
13829 (package
13830 (name "python-gipc")
13831 (version "0.6.0")
13832 (source
13833 (origin
13834 (method url-fetch)
13835 (uri (pypi-uri "gipc" version ".zip"))
13836 (sha256
13837 (base32
13838 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
13839 (build-system python-build-system)
13840 (native-inputs
13841 `(("unzip" ,unzip)))
13842 (propagated-inputs
13843 `(("python-gevent" ,python-gevent)))
13844 (home-page "http://gehrcke.de/gipc")
13845 (synopsis "Child process management in the context of gevent")
13846 (description "Usage of Python's multiprocessing package in a
13847 gevent-powered application may raise problems. With @code{gipc},
13848 process-based child processes can safely be created anywhere within a
13849 gevent-powered application.")
13850 (license license:expat)))
13851
13852 (define-public python2-gipc
13853 (package-with-python2 python-gipc))
13854
13855 (define-public python-fusepy
13856 (package
13857 (name "python-fusepy")
13858 (version "2.0.4")
13859 (source
13860 (origin
13861 (method url-fetch)
13862 (uri (pypi-uri "fusepy" version))
13863 (sha256
13864 (base32
13865 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
13866 (build-system python-build-system)
13867 (arguments
13868 `(#:phases
13869 (modify-phases %standard-phases
13870 (add-before 'build 'set-library-file-name
13871 (lambda* (#:key inputs #:allow-other-keys)
13872 (let ((fuse (assoc-ref inputs "fuse")))
13873 (substitute* "fuse.py"
13874 (("find_library\\('fuse'\\)")
13875 (string-append "'" fuse "/lib/libfuse.so'")))
13876 #t))))))
13877 (propagated-inputs
13878 `(("fuse" ,fuse)))
13879 (home-page "https://github.com/fusepy/fusepy")
13880 (synopsis "Simple ctypes bindings for FUSE")
13881 (description "Python module that provides a simple interface to FUSE and
13882 MacFUSE. The binding is created using the standard @code{ctypes} library.")
13883 (license license:isc)))
13884
13885 (define-public python2-fusepy
13886 (package-with-python2 python-fusepy))
13887
13888 (define-public python2-gdrivefs
13889 (package
13890 (name "python2-gdrivefs")
13891 (version "0.14.9")
13892 (source
13893 (origin
13894 (method url-fetch)
13895 (uri (pypi-uri "gdrivefs" version))
13896 (sha256
13897 (base32
13898 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
13899 (build-system python-build-system)
13900 (arguments
13901 `(#:python ,python-2
13902 #:phases
13903 (modify-phases %standard-phases
13904 (add-before 'build 'patch-setup-py
13905 (lambda _
13906 ;; Update requirements from dependency==version
13907 ;; to dependency>=version
13908 (substitute* "gdrivefs/resources/requirements.txt"
13909 (("==") ">="))
13910 #t)))))
13911 (native-inputs
13912 `(("python2-gipc" ,python2-gipc)
13913 ("python2-gevent" ,python2-gevent)
13914 ("python2-greenlet" ,python2-greenlet)
13915 ("python2-httplib2" ,python2-httplib2)
13916 ("python2-uritemplate" ,python2-uritemplate)
13917 ("python2-oauth2client" ,python2-oauth2client)
13918 ("python2-six" ,python2-six)))
13919 (propagated-inputs
13920 `(("python2-dateutil" ,python2-dateutil)
13921 ("python2-fusepy" ,python2-fusepy)
13922 ("python2-google-api-client" ,python2-google-api-client)))
13923 (home-page "https://github.com/dsoprea/GDriveFS")
13924 (synopsis "Mount Google Drive as a local file system")
13925 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
13926 under Python 2.7.")
13927 (license license:gpl2)))
13928
13929 (define-public pybind11
13930 (package
13931 (name "pybind11")
13932 (version "2.2.4")
13933 (source (origin
13934 (method git-fetch)
13935 (uri (git-reference
13936 (url "https://github.com/pybind/pybind11.git")
13937 (commit (string-append "v" version))))
13938 (sha256
13939 (base32
13940 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
13941 (file-name (git-file-name name version))))
13942 (build-system cmake-build-system)
13943 (native-inputs
13944 `(("python" ,python)
13945 ("python-pytest" ,python-pytest)))
13946 (arguments
13947 `(#:test-target "check"))
13948 (home-page "https://github.com/pybind/pybind11/")
13949 (synopsis "Seamless operability between C++11 and Python")
13950 (description "pybind11 is a lightweight header-only library that exposes
13951 C++ types in Python and vice versa, mainly to create Python bindings of
13952 existing C++ code. Its goals and syntax are similar to the excellent
13953 Boost.Python library by David Abrahams: to minimize boilerplate code in
13954 traditional extension modules by inferring type information using compile-time
13955 introspection.")
13956 (license license:expat)))
13957
13958 (define-public python-fasteners
13959 (package
13960 (name "python-fasteners")
13961 (version "0.14.1")
13962 (source
13963 (origin
13964 (method url-fetch)
13965 (uri (pypi-uri "fasteners" version))
13966 (sha256
13967 (base32
13968 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
13969 (build-system python-build-system)
13970 (propagated-inputs
13971 `(("python-monotonic" ,python-monotonic)
13972 ("python-six" ,python-six)
13973 ("python-testtools" ,python-testtools)))
13974 (home-page "https://github.com/harlowja/fasteners")
13975 (synopsis "Python package that provides useful locks")
13976 (description
13977 "This package provides a Python program that provides following locks:
13978
13979 @itemize
13980 @item Locking decorator
13981 @item Reader-writer locks
13982 @item Inter-process locks
13983 @item Generic helpers
13984 @end itemize\n")
13985 (license license:asl2.0)))
13986
13987 (define-public python2-fasteners
13988 (package-with-python2 python-fasteners))
13989
13990 (define-public python-requests-file
13991 (package
13992 (name "python-requests-file")
13993 (version "1.4.3")
13994 (source
13995 (origin
13996 (method url-fetch)
13997 (uri (pypi-uri "requests-file" version))
13998 (sha256
13999 (base32
14000 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14001 (build-system python-build-system)
14002 (propagated-inputs
14003 `(("python-requests" ,python-requests)
14004 ("python-six" ,python-six)))
14005 (home-page
14006 "https://github.com/dashea/requests-file")
14007 (synopsis "File transport adapter for Requests")
14008 (description
14009 "Requests-File is a transport adapter for use with the Requests Python
14010 library to allow local filesystem access via file:// URLs.")
14011 (license license:asl2.0)))
14012
14013 (define-public python2-requests-file
14014 (package-with-python2 python-requests-file))
14015
14016 (define-public python-tldextract
14017 (package
14018 (name "python-tldextract")
14019 (version "2.2.0")
14020 (source
14021 (origin
14022 (method url-fetch)
14023 (uri (pypi-uri "tldextract" version))
14024 (sha256
14025 (base32
14026 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14027 (build-system python-build-system)
14028 (native-inputs
14029 `(("python-pytest" ,python-pytest)
14030 ("python-responses" ,python-responses)))
14031 (propagated-inputs
14032 `(("python-idna" ,python-idna)
14033 ("python-requests" ,python-requests)
14034 ("python-requests-file" ,python-requests-file)))
14035 (home-page
14036 "https://github.com/john-kurkowski/tldextract")
14037 (synopsis
14038 "Separate the TLD from the registered domain and subdomains of a URL")
14039 (description
14040 "TLDExtract accurately separates the TLD from the registered domain and
14041 subdomains of a URL, using the Public Suffix List. By default, this includes
14042 the public ICANN TLDs and their exceptions. It can optionally support the
14043 Public Suffix List's private domains as well.")
14044 (license license:bsd-3)))
14045
14046 (define-public python2-tldextract
14047 (package-with-python2 python-tldextract))
14048
14049 (define-public python-pynamecheap
14050 (package
14051 (name "python-pynamecheap")
14052 (version "0.0.3")
14053 (source
14054 (origin
14055 (method url-fetch)
14056 (uri (pypi-uri "PyNamecheap" version))
14057 (sha256
14058 (base32
14059 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
14060 (build-system python-build-system)
14061 (propagated-inputs
14062 `(("python-requests" ,python-requests)))
14063 (home-page
14064 "https://github.com/Bemmu/PyNamecheap")
14065 (synopsis
14066 "Namecheap API client in Python")
14067 (description
14068 "PyNamecheap is a Namecheap API client in Python.")
14069 (license license:expat)))
14070
14071 (define-public python2-pynamecheap
14072 (package-with-python2 python-pynamecheap))
14073
14074 (define-public python-dns-lexicon
14075 (package
14076 (name "python-dns-lexicon")
14077 (version "2.4.0")
14078 (source
14079 (origin
14080 (method url-fetch)
14081 (uri (pypi-uri "dns-lexicon" version))
14082 (sha256
14083 (base32
14084 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
14085 (build-system python-build-system)
14086 (arguments
14087 `(#:tests? #f)) ;requires internet access
14088 (propagated-inputs
14089 `(("python-future" ,python-future)
14090 ("python-pynamecheap" ,python-pynamecheap)
14091 ("python-requests" ,python-requests)
14092 ("python-tldextract" ,python-tldextract)
14093 ("python-urllib3" ,python-urllib3)))
14094 (home-page "https://github.com/AnalogJ/lexicon")
14095 (synopsis
14096 "Manipulate DNS records on various DNS providers")
14097 (description
14098 "Lexicon provides a way to manipulate DNS records on multiple DNS
14099 providers in a standardized way. It has a CLI but it can also be used as a
14100 Python library. It was designed to be used in automation, specifically with
14101 Let's Encrypt.")
14102 (license license:expat)))
14103
14104 (define-public python2-dns-lexicon
14105 (package-with-python2 python-dns-lexicon))
14106
14107 (define-public python-commandlines
14108 (package
14109 (name "python-commandlines")
14110 (version "0.4.1")
14111 (source
14112 (origin
14113 (method url-fetch)
14114 (uri (pypi-uri "commandlines" version))
14115 (sha256
14116 (base32
14117 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
14118 (build-system python-build-system)
14119 (home-page "https://github.com/chrissimpkins/commandlines")
14120 (synopsis "Command line argument to object parsing library")
14121 (description
14122 "@code{Commandlines} is a Python library for command line application
14123 development that supports command line argument parsing, command string
14124 validation testing and application logic.")
14125 (license license:expat)))
14126
14127 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
14128 ;; python-numba. They have a very unflexible relationship.
14129 (define-public python-numba
14130 (package
14131 (name "python-numba")
14132 (version "0.39.0")
14133 (source
14134 (origin
14135 (method url-fetch)
14136 (uri (pypi-uri "numba" version))
14137 (sha256
14138 (base32
14139 "1bibvkwga1v8293i9ivl469d8bzgabn3vgr2ig7c1i68v8frsx07"))))
14140 (build-system python-build-system)
14141 (arguments
14142 `(#:modules ((guix build utils)
14143 (guix build python-build-system)
14144 (ice-9 ftw)
14145 (srfi srfi-1)
14146 (srfi srfi-26))
14147 #:phases
14148 (modify-phases %standard-phases
14149 (add-after 'unpack 'disable-proprietary-features
14150 (lambda _
14151 (setenv "NUMBA_DISABLE_HSA" "1")
14152 (setenv "NUMBA_DISABLE_CUDA" "1")
14153 #t))
14154 (add-after 'unpack 'remove-failing-tests
14155 (lambda _
14156 ;; FIXME: these tests fail for unknown reasons:
14157 ;; test_non_writable_pycache, test_non_creatable_pycache, and
14158 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
14159 (substitute* "numba/tests/test_dispatcher.py"
14160 (("def test(_non_writable_pycache)" _ m)
14161 (string-append "def guix_skip" m))
14162 (("def test(_non_creatable_pycache)" _ m)
14163 (string-append "def guix_skip" m))
14164 (("def test(_frozen)" _ m)
14165 (string-append "def guix_skip" m)))
14166
14167 ;; These tests fail because we don't run the tests from the build
14168 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
14169 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
14170 (substitute* "numba/tests/test_pycc.py"
14171 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
14172 (string-append "def guix_skip" m)))
14173 #t))
14174 (replace 'check
14175 (lambda _
14176 (let ((cwd (getcwd)))
14177 (setenv "PYTHONPATH"
14178 (string-append cwd "/build/"
14179 (find (cut string-prefix? "lib" <>)
14180 (scandir (string-append cwd "/build")))
14181 ":"
14182 (getenv "PYTHONPATH")))
14183 ;; Something is wrong with the PYTHONPATH when running the
14184 ;; tests from the build directory, as it complains about not being
14185 ;; able to import certain modules.
14186 (with-directory-excursion "/tmp"
14187 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
14188 #t)))))
14189 (propagated-inputs
14190 `(("python-llvmlite" ,python-llvmlite)
14191 ("python-numpy" ,python-numpy)
14192 ("python-singledispatch" ,python-singledispatch)))
14193 ;; Needed for tests.
14194 (inputs
14195 `(("python-jinja2" ,python-jinja2)
14196 ("python-pygments" ,python-pygments)))
14197 (home-page "https://numba.pydata.org")
14198 (synopsis "Compile Python code using LLVM")
14199 (description "Numba gives you the power to speed up your applications with
14200 high performance functions written directly in Python. With a few
14201 annotations, array-oriented and math-heavy Python code can be just-in-time
14202 compiled to native machine instructions, similar in performance to C, C++ and
14203 Fortran, without having to switch languages or Python interpreters.
14204
14205 Numba works by generating optimized machine code using the LLVM compiler
14206 infrastructure at import time, runtime, or statically (using the included pycc
14207 tool).")
14208 (license license:bsd-3)))
14209
14210 (define-public python-anndata
14211 (package
14212 (name "python-anndata")
14213 (version "0.6.9")
14214 (source
14215 (origin
14216 (method url-fetch)
14217 (uri (pypi-uri "anndata" version))
14218 (sha256
14219 (base32
14220 "1fh461xyyc7pcrjfgd013bdc2alf53r46ss3gfw3431mbb1gappi"))))
14221 (build-system python-build-system)
14222 (propagated-inputs
14223 `(("python-h5py" ,python-h5py)
14224 ("python-natsort" ,python-natsort)
14225 ("python-pandas" ,python-pandas)
14226 ("python-scipy" ,python-scipy)))
14227 (home-page "https://github.com/theislab/anndata")
14228 (synopsis "Annotated data for data analysis pipelines")
14229 (description "Anndata is a package for simple (functional) high-level APIs
14230 for data analysis pipelines. In this context, it provides an efficient,
14231 scalable way of keeping track of data together with learned annotations and
14232 reduces the code overhead typically encountered when using a mostly
14233 object-oriented library such as @code{scikit-learn}.")
14234 (license license:bsd-3)))
14235
14236 (define-public python-dill
14237 (package
14238 (name "python-dill")
14239 (version "0.2.8.2")
14240 (source
14241 (origin
14242 (method url-fetch)
14243 (uri (pypi-uri "dill" version))
14244 (sha256
14245 (base32
14246 "1cymzn9fxwdy33h21zkk4gqgzvd25110hh3zdqnvnwa3p52c4kb2"))))
14247 (build-system python-build-system)
14248 ;; FIXME: The check phase fails with "don't know how to make test".
14249 (arguments '(#:tests? #f))
14250 (home-page "https://pypi.org/project/dill")
14251 (synopsis "Serialize all of Python")
14252 (description "Dill extends Python's @code{pickle} module for serializing
14253 and de-serializing Python objects to the majority of the built-in Python
14254 types. Dill provides the user the same interface as the @code{pickle} module,
14255 and also includes some additional features. In addition to pickling Python
14256 objects, @code{dill} provides the ability to save the state of an interpreter
14257 session in a single command. Hence, it would be feasable to save a
14258 interpreter session, close the interpreter, ship the pickled file to another
14259 computer, open a new interpreter, unpickle the session and thus continue from
14260 the saved state of the original interpreter session.")
14261 (license license:bsd-3)))
14262
14263 (define-public python-multiprocess
14264 (package
14265 (name "python-multiprocess")
14266 (version "0.70.6.1")
14267 (source
14268 (origin
14269 (method url-fetch)
14270 (uri (pypi-uri "multiprocess" version))
14271 (sha256
14272 (base32
14273 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
14274 (build-system python-build-system)
14275 (propagated-inputs
14276 `(("python-dill" ,python-dill)))
14277 (home-page "https://pypi.org/project/multiprocess")
14278 (synopsis "Multiprocessing and multithreading in Python")
14279 (description
14280 "This package is a fork of the multiprocessing Python package, a package
14281 which supports the spawning of processes using the API of the standard
14282 library's @code{threading} module.")
14283 (license license:bsd-3)))
14284
14285 (define-public python-toolz
14286 (package
14287 (name "python-toolz")
14288 (version "0.9.0")
14289 (source
14290 (origin
14291 (method url-fetch)
14292 (uri (pypi-uri "toolz" version))
14293 (sha256
14294 (base32
14295 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
14296 (build-system python-build-system)
14297 ;; FIXME: tests cannot be computed: "Can't perform this operation for
14298 ;; unregistered loader type"
14299 (arguments '(#:tests? #f))
14300 (home-page "https://github.com/pytoolz/toolz/")
14301 (synopsis "List processing tools and functional utilities")
14302 (description
14303 "This package provides a set of utility functions for iterators,
14304 functions, and dictionaries.")
14305 (license license:bsd-3)))
14306
14307 (define-public python-cytoolz
14308 (package
14309 (name "python-cytoolz")
14310 (version "0.9.0.1")
14311 (source
14312 (origin
14313 (method url-fetch)
14314 (uri (pypi-uri "cytoolz" version))
14315 (sha256
14316 (base32
14317 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
14318 (build-system python-build-system)
14319 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
14320 ;; 'exceptions'"
14321 (arguments '(#:tests? #f))
14322 (propagated-inputs
14323 `(("python-toolz" ,python-toolz)))
14324 (native-inputs
14325 `(("python-cython" ,python-cython)))
14326 (home-page "https://github.com/pytoolz/cytoolz")
14327 (synopsis "High performance functional utilities")
14328 (description
14329 "The cytoolz package implements the same API as provided by toolz. The
14330 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
14331 that is accessible to other projects developed in Cython.")
14332 (license license:bsd-3)))
14333
14334 (define-public python-sortedcontainers
14335 (package
14336 (name "python-sortedcontainers")
14337 (version "2.0.4")
14338 (source
14339 (origin
14340 (method url-fetch)
14341 (uri (pypi-uri "sortedcontainers" version))
14342 (sha256
14343 (base32
14344 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
14345 (build-system python-build-system)
14346 (native-inputs
14347 `(("python-tox" ,python-tox)))
14348 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
14349 (synopsis "Sorted List, Sorted Dict, Sorted Set")
14350 (description
14351 "This package provides a sorted collections library, written in
14352 pure-Python.")
14353 (license license:asl2.0)))
14354
14355 (define-public python-cloudpickle
14356 (package
14357 (name "python-cloudpickle")
14358 (version "0.5.5")
14359 (source
14360 (origin
14361 (method url-fetch)
14362 (uri (pypi-uri "cloudpickle" version))
14363 (sha256
14364 (base32
14365 "0gdg5n025v4wqmdg65rm0n6fvp6731ip30ji0rmn2kqsyr4bb93f"))))
14366 (build-system python-build-system)
14367 ;; FIXME: there are 5 errors in 122 tests:
14368 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
14369 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
14370 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14371 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14372 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
14373 ;; TypeError: cannot serialize '_io.BufferedRandom' object
14374 (arguments '(#:tests? #f))
14375 (native-inputs
14376 `(("python-pytest" ,python-pytest)
14377 ("python-mock" ,python-mock)
14378 ("python-tornado" ,python-tornado)))
14379 (home-page "https://github.com/cloudpipe/cloudpickle")
14380 (synopsis "Extended pickling support for Python objects")
14381 (description
14382 "Cloudpickle makes it possible to serialize Python constructs not
14383 supported by the default pickle module from the Python standard library. It
14384 is especially useful for cluster computing where Python expressions are
14385 shipped over the network to execute on remote hosts, possibly close to the
14386 data.")
14387 (license license:bsd-3)))
14388
14389 (define-public python-locket
14390 (package
14391 (name "python-locket")
14392 (version "0.2.0")
14393 (source
14394 (origin
14395 (method url-fetch)
14396 (uri (pypi-uri "locket" version))
14397 (sha256
14398 (base32
14399 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
14400 (build-system python-build-system)
14401 (home-page "https://github.com/mwilliamson/locket.py")
14402 (synopsis "File-based locks for Python")
14403 (description
14404 "Locket implements a lock that can be used by multiple processes provided
14405 they use the same path.")
14406 (license license:bsd-2)))
14407
14408 (define-public python-blosc
14409 (package
14410 (name "python-blosc")
14411 (version "1.5.1")
14412 (source
14413 (origin
14414 (method url-fetch)
14415 (uri (pypi-uri "blosc" version))
14416 (sha256
14417 (base32
14418 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
14419 (build-system python-build-system)
14420 ;; FIXME: all tests pass, but then this error is printed:
14421 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
14422 (arguments '(#:tests? #f))
14423 (propagated-inputs
14424 `(("python-numpy" ,python-numpy)))
14425 (home-page "https://github.com/blosc/python-blosc")
14426 (synopsis "Python wrapper for the Blosc data compressor library")
14427 (description "Blosc is a high performance compressor optimized for binary
14428 data. It has been designed to transmit data to the processor cache faster
14429 than the traditional, non-compressed, direct memory fetch approach via a
14430 @code{memcpy()} system call.
14431
14432 Blosc works well for compressing numerical arrays that contains data with
14433 relatively low entropy, like sparse data, time series, grids with
14434 regular-spaced values, etc.
14435
14436 This Python package wraps the Blosc library.")
14437 (license license:bsd-3)))
14438
14439 (define-public python-partd
14440 (package
14441 (name "python-partd")
14442 (version "0.3.8")
14443 (source
14444 (origin
14445 (method url-fetch)
14446 (uri (pypi-uri "partd" version))
14447 (sha256
14448 (base32
14449 "03s0i5qfgkx6y24bmfgyd5hnsjznkbbfafwb2khf7k9790f1yab7"))))
14450 (build-system python-build-system)
14451 (propagated-inputs
14452 `(("python-blosc" ,python-blosc)
14453 ("python-locket" ,python-locket)
14454 ("python-numpy" ,python-numpy)
14455 ("python-pandas" ,python-pandas)
14456 ("python-pyzmq" ,python-pyzmq)
14457 ("python-toolz" ,python-toolz)))
14458 (home-page "https://github.com/dask/partd/")
14459 (synopsis "Appendable key-value storage")
14460 (description "Partd stores key-value pairs. Values are raw bytes. We
14461 append on old values. Partd excels at shuffling operations.")
14462 (license license:bsd-3)))
14463
14464 (define-public python-dask
14465 (package
14466 (name "python-dask")
14467 (version "0.19.0")
14468 (source
14469 (origin
14470 (method url-fetch)
14471 (uri (pypi-uri "dask" version))
14472 (sha256
14473 (base32
14474 "1pm1163qb6s22p8fnvj0zlfazihvs7hxjn8l2n52bzs7shw6kdz3"))))
14475 (build-system python-build-system)
14476 ;; A single test out of 5000+ fails. This test is marked as xfail when
14477 ;; pytest-xdist is used.
14478 (arguments
14479 `(#:phases
14480 (modify-phases %standard-phases
14481 (add-after 'unpack 'disable-broken-test
14482 (lambda _
14483 (substitute* "dask/tests/test_threaded.py"
14484 (("def test_interrupt\\(\\)" m)
14485 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14486 m)))
14487 #t)))))
14488 (propagated-inputs
14489 `(("python-cloudpickle" ,python-cloudpickle)
14490 ("python-numpy" ,python-numpy)
14491 ("python-pandas" ,python-pandas)
14492 ("python-partd" ,python-partd)
14493 ("python-toolz" ,python-toolz)
14494 ("python-pyyaml" ,python-pyyaml)))
14495 (native-inputs
14496 `(("python-pytest" ,python-pytest)
14497 ("python-pytest-runner" ,python-pytest-runner)))
14498 (home-page "https://github.com/dask/dask/")
14499 (synopsis "Parallel computing with task scheduling")
14500 (description
14501 "Dask is a flexible parallel computing library for analytics. It
14502 consists of two components: dynamic task scheduling optimized for computation,
14503 and large data collections like parallel arrays, dataframes, and lists that
14504 extend common interfaces like NumPy, Pandas, or Python iterators to
14505 larger-than-memory or distributed environments. These parallel collections
14506 run on top of the dynamic task schedulers. ")
14507 (license license:bsd-3)))
14508
14509 (define-public python-ilinkedlist
14510 (package
14511 (name "python-ilinkedlist")
14512 (version "0.1.0")
14513 (source
14514 (origin
14515 (method url-fetch)
14516 (uri (pypi-uri "ilinkedlist" version))
14517 (sha256
14518 (base32
14519 "063c2gm4jkgkv0nsg7mrc8y0w82ms98l4xchmbrvr68cscglhk69"))))
14520 (build-system python-build-system)
14521 (native-inputs `(("python-pytest" ,python-pytest)))
14522 (inputs `(("python" ,python)))
14523 (home-page "https://github.com/luther9/ilinkedlist-py")
14524 (synopsis "Immutable linked list library")
14525 (description
14526 "This is a implementation of immutable linked lists for Python. It
14527 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
14528 Since a linked list is treated as immutable, it is hashable, and its length
14529 can be retrieved in constant time. Some of the terminology is inspired by
14530 LISP. It is possible to create an improper list by creating a @code{Pair}
14531 with a non-list @code{cdr}.")
14532 (license license:gpl3+)))