projects/guix·blob wip-ipfs2 · refs

14526 lines · 523.6 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Nikita Karetnikov <[email protected]>
3;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <[email protected]>
4;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <[email protected]>
5;;; Copyright © 2014, 2015 Mark H Weaver <[email protected]>
6;;; Copyright © 2014, 2017 Eric Bavier <[email protected]>
7;;; Copyright © 2014, 2015 Federico Beffa <[email protected]>
8;;; Copyright © 2015 Omar Radwan <[email protected]>
9;;; Copyright © 2015 Pierre-Antoine Rault <[email protected]>
10;;; Copyright © 2015, 2016, 2017, 2018 Ricardo Wurmus <[email protected]>
11;;; Copyright © 2015, 2016 Christopher Allan Webber <[email protected]>
12;;; Copyright © 2015 Eric Dvorsak <[email protected]>
13;;; Copyright © 2015, 2016 David Thompson <[email protected]>
14;;; Copyright © 2015, 2016, 2017 Leo Famulari <[email protected]>
15;;; Copyright © 2015, 2017 Ben Woodcroft <[email protected]>
16;;; Copyright © 2015, 2016 Erik Edrosa <[email protected]>
17;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner <[email protected]>
18;;; Copyright © 2015, 2017 Kyle Meyer <[email protected]>
19;;; Copyright © 2015, 2016 Chris Marusich <[email protected]>
20;;; Copyright © 2016 Danny Milosavljevic <[email protected]>
21;;; Copyright © 2016 Lukas Gradl <[email protected]>
22;;; Copyright © 2016, 2018 Hartmut Goebel <[email protected]>
23;;; Copyright © 2016 Daniel Pimentel <[email protected]>
24;;; Copyright © 2016 Sou Bunnbu <[email protected]>
25;;; Copyright © 2016, 2017 Troy Sankey <[email protected]>
26;;; Copyright © 2016, 2017 Nils Gillmann <[email protected]>
27;;; Copyright © 2016 Dylan Jeffers <sapientech@[email protected]>
28;;; Copyright © 2016 David Craven <[email protected]>
29;;; Copyright © 2016, 2017, 2018 Marius Bakke <[email protected]>
30;;; Copyright © 2016, 2017 Stefan Reichör <[email protected]>
31;;; Copyright © 2016 Dylan Jeffers <sapientech@[email protected]>
32;;; Copyright © 2016, 2017 Alex Vong <[email protected]>
33;;; Copyright © 2016, 2017, 2018 Arun Isaac <[email protected]>
34;;; Copyright © 2016, 2017 Julien Lepiller <[email protected]>
35;;; Copyright © 2016, 2017, 2018 Tobias Geerinckx-Rice <[email protected]>
36;;; Copyright © 2016, 2017 Thomas Danckaert <[email protected]>
37;;; Copyright © 2017 Carlo Zancanaro <[email protected]>
38;;; Copyright © 2017 Frederick M. Muriithi <[email protected]>
39;;; Copyright © 2017, 2018 Adriano Peluso <[email protected]>
40;;; Copyright © 2017 Ben Sturmfels <[email protected]>
41;;; Copyright © 2017, 2018 Mathieu Othacehe <[email protected]>
42;;; Copyright © 2017 José Miguel Sánchez García <[email protected]>
43;;; Copyright © 2017 Roel Janssen <[email protected]>
44;;; Copyright © 2017, 2018 Kei Kebreau <[email protected]>
45;;; Copyright © 2017 Rutger Helling <[email protected]>
46;;; Copyright © 2017 Muriithi Frederick Muriuki <[email protected]>
47;;; Copyright © 2017 Brendan Tildesley <[email protected]>
48;;; Copyright © 2018 Ethan R. Jones <[email protected]
49;;; Copyright © 2018 Fis Trivial <[email protected]>
50;;; Copyright © 2018 Vijayalakshmi Vedantham <[email protected]>
51;;; Copyright © 2018 Mathieu Lirzin <[email protected]>
52;;; Copyright © 2018 Adam Massmann <[email protected]>
53;;; Copyright © 2016, 2018 Tomáš Čech <[email protected]>
54;;; Copyright © 2018 Nicolas Goaziou <[email protected]>
55;;; Copyright © 2018 Oleg Pykhalov <[email protected]>
56;;; Copyright © 2018 Clément Lassieur <[email protected]>
57;;; Copyright © 2018 Maxim Cournoyer <[email protected]>
58;;; Copyright © 2018 Luther Thompson <[email protected]>
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
338is used in a wide variety of application domains. Some of its key
339distinguishing features include: clear, readable syntax; strong
340introspection capabilities; intuitive object orientation; natural
341expression of procedural code; full modularity, supporting hierarchical
342packages; exception-based error handling; and very high level dynamic
343data 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},
536for 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
577that they can be invoked under their usual name---e.g., @command{python}
578instead 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
602information on running processes and system utilization (CPU, memory, disks,
603network) in Python. It is useful mainly for system monitoring, profiling and
604limiting process resources and management of running processes. It implements
605many functionalities offered by command line tools such as: ps, top, lsof,
606netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
607pidof, 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
659planar 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
686and 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
709by @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
737access to various locale display names, localized number and date formatting,
738etc. ")
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
766earlier versions of Python. The function checks the hostname in the
767certificate returned by the server to which a connection has been established,
768and 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,
808which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
809NetCDF 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
856HDF5 library from Python. The low-level interface is intended to be a
857complete wrapping of the HDF5 API, while the high-level component supports
858access to HDF5 files, datasets and groups using established Python and NumPy
859concepts.")
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
903library. netCDF version 4 has many features not found in earlier
904versions of the library and is implemented on top of HDF5. This module
905can read and write files in both the new netCDF 4 and the old netCDF 3
906format, and can create files that are readable by HDF5 clients. The
907API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
908to 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
936API 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
962It can compare versions, generate a new version that represents a bump in one of
963the version levels, and check whether any given string is a proper semantic
964version 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
999packaging Python projects, where packaging includes:
1000Python package and module definitions,
1001distribution package metadata,
1002test hooks,
1003project installation,
1004platform-specific details,
1005Python 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.
1038Supported 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
1042multiple 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
1073text interfaces more user-friendly. It includes tools to parse and format
1074numbers, file sizes, and timespans, timers for long-running operations, menus
1075to allow the user to choose from a list of options, and terminal interaction
1076helpers.")
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
1102streams of the current process and subprocesses. Output can be relayed
1103to the terminal in real time but is also available to the Python program
1104for 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
1130add 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
1157Python's logging module. The @code{ColoredFormatter} class inherits from
1158@code{logging.Formatter} and uses ANSI escape sequences to render your logging
1159messages 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
1186allows you to change how you run your code, not how you write it.
1187It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1188Coroutines ensure that the developer uses a blocking style of programming
1189that is similar to threading, but provide the benefits of non-blocking I/O.
1190The event dispatch is implicit, which means you can easily use @code{Eventlet}
1191from 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
1227functions for smoothing over the differences between the Python versions with
1228the goal of writing Python code that is compatible on both Python versions.
1229Six supports every Python version since 2.5. It is contained in only one
1230Python 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
1265builder pattern for configuration. Schedule lets you run Python functions (or
1266any other callable) periodically at pre-determined intervals using a simple,
1267human-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
1324structures designed to make working with structured (tabular,
1325multidimensional, potentially heterogeneous) and time series data both easy
1326and intuitive. It aims to be the fundamental high-level building block for
1327doing 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,
1361after 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
1384syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1385format.
1386
1387Simplejson exposes an API familiar to users of the standard library marshal
1388and pickle modules. It is the externally maintained version of the json
1389library contained in Python 2.6, but maintains compatibility with Python 2.5
1390and (currently) has significant performance advantages, even without using
1391the optional C extension for speedups. Simplejson is also supported on
1392Python 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.
1459It uses Accessibility (a11y) technologies to communicate with desktop
1460applications. dogtail scripts are written in Python and executed like any
1461other 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
1482template text; it takes an EmPy source file, processes it, and produces
1483output. This is accomplished via expansions, which are special signals to the
1484EmPy system and are set off by a special prefix (by default the at sign, @@).
1485EmPy can expand arbitrary Python expressions and statements in this way, as
1486well as a variety of special forms. Textual data not explicitly delimited in
1487this way is sent unaffected to the output, allowing Python to be used in
1488effect as a markup language. Also supported are callbacks via hooks,
1489recording and playback via diversions, and dynamic, chainable filters. The
1490system is highly configurable via command line options and embedded
1491commands.")
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
1544bug tracking system. It is meant as an aid to speed up interaction with the
1545bug 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
1566been superseded by the Python standard library and is provided only for
1567compatibility.")
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
1587backported 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()}
1648syntax.")
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)
1665files. It can be used to create po files from scratch or to modify
1666existing 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,
1696cross-platform substitute for the classic Make utility with integrated
1697functionality similar to autoconf/automake and compiler caches such as ccache.
1698In short, SCons is an easier, more reliable and faster way to build
1699software.")
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
1756matching 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,
1838code 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
1899and sensible default behaviors into your setuptools run. It will set
1900versions, process requirements files and generate AUTHORS and ChangeLog file
1901from 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
1923files.")
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
1981composable way with as little code as necessary. Its name stands for
1982\"Command Line Interface Creation Kit\". It's highly configurable but comes
1983with 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
2008the @code{.whl} extension. It is designed to contain all the files for a PEP
2009376 compatible install in a way that is very close to the on-disk format. Many
2010packages will be properly installed with only the @code{Unpack} step and the
2011unpacked archive preserves enough information to @code{Spread} (copy data and
2012scripts to their final locations) at any later time. Wheel files can be
2013installed 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
2038information in a variety of version control systems in order to discover
2039version 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
2102structures, such as those obtained from config-files, forms, external
2103services or command-line parsing, converted from JSON/YAML (or
2104something 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
2141little useful snippets of code that everybody ends up writing for their projects
2142but never seem big enough to build an independent release. Use kitchen and stop
2143cutting 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
2167useful when integrating with legacy code that doesn't support Unicode, or for
2168ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2169machine identifiers from human-readable Unicode strings that should still be
2170somewhat 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.
2228The actor model introduces some simple rules to control the sharing
2229of state and cooperation between execution units, which makes it
2230easier 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
2254environments 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
2278complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2279API, and sensible error messages. PyYAML supports standard YAML tags and
2280provides Python-specific tags that allow to represent an arbitrary Python
2281object.")
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
2339for 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
2363written 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,
2386logic-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.
2449In particular, joblib offers: transparent disk-caching of the output values
2450and lazy re-evaluation (memoize pattern), easy simple parallel computing
2451logging 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
2475formats, such as HTML, XML, and LaTeX. For input Docutils supports
2476reStructuredText.")
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
2534Sphinx documentation into your web application. It provides tools to
2535integrate 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
2577for Python projects or other documents consisting of multiple reStructuredText
2578sources.")
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
2672from 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
2718Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
2719and 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
2748reStructuredText external reference or timestamps. It's primary purpose is to
2749augment 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,
2783which 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
2807Language (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
2861interested 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,
2909Markdown input files, and more. Pelican uses Jinja2 for templating
2910and 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
2993programming language and the extended Cython programming language. It makes
2994writing 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
3024producing implementations of dynamic languages, emphasizing a clean separation
3025between 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]
3060libraries = openblas
3061library_dirs = ~a/lib
3062include_dirs = ~a/include
3063
3064# backslash-n to make emacs happy
3065\n[lapack]
3066lapack_libs = lapack
3067library_dirs = ~a/lib
3068include_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
3100with Python. It contains among other things: a powerful N-dimensional array
3101object, sophisticated (broadcasting) functions, tools for integrating C/C++
3102and Fortran code, useful linear algebra, Fourier transform, and random number
3103capabilities.")
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]
3134libraries = openblas,lapack
3135library_dirs = ~a/lib:~a/lib
3136include_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
3144with Python. It contains among other things: a powerful N-dimensional array
3145object, sophisticated (broadcasting) functions, tools for integrating C/C++
3146and Fortran code, useful linear algebra, Fourier transform, and random number
3147capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3148that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3149Numeric.")
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
3167objects.")
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,
3223color 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
3268Models, is a program for performing both single-SNP and SNP-set genome-wide
3269association 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
3407library, 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
3450executing simple grammars, vs. the traditional lex/yacc approach, or the use
3451of regular expressions. The pyparsing module provides a library of classes
3452that 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,
3514expressions that operate on arrays are accelerated and use less memory than
3515doing the same calculation in Python. In addition, its multi-threaded
3516capabilities can make use of all your cores, which may accelerate
3517computations, most specially if they are not memory-bounded (e.g. those using
3518transcendental 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
3545common to want to be able to want to be able to cycle over one or more artist
3546styles; but the plotting logic can quickly become involved.
3547To 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
3580convert 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]~%
3656basedirlist = ~a,~a~%
3657 [rc_options]~%
3658backend = 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
3666quality figures in a variety of hardcopy formats and interactive environments
3667across platforms. Matplotlib can be used in Python scripts, the python and
3668ipython shell, web application servers, and six graphical user interface
3669toolkits.")
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
3782can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3783those files. It can also efficiently manipulate ranges of integers using set
3784operators 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
3837low-level interface to R from Python, a proposed high-level interface,
3838including wrappers to graphical libraries, as well as R-like structures and
3839functions.")
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]
3894libraries = openblas
3895library_dirs = ~a/lib
3896include_dirs = ~a/include
3897
3898# backslash-n to make emacs happy
3899\n[atlas]
3900library_dirs = ~a/lib
3901atlas_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
3946the SciPy stack. It provides many user-friendly and efficient numerical
3947routines 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
3973socket-like interface that supports connections to any TCP
3974service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3975The original version was developed by Dan Haim, this is a
3976branch created by Mario Vilas to address some open issues,
3977as 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
3998Python 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
4023where 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
4054dictionaries. A multivalue dictionary is a dictionary that can store
4055multiple values for the same key. An ordered multivalue dictionary is a
4056multivalue 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
4080the PEP 8 style guide. It uses the pycodestyle utility to determine
4081what parts of the code needs to be formatted. @code{autopep8} is
4082capable of fixing most of the formatting issues that can be reported
4083by 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
4108gettext support, themed icons, and scrollkeeper-based documentation into
4109Python'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)
4140services 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
4162Storage or Compound Document, Microsoft Office). It is an improved version of
4163the 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
4213Python interpreter. This library provides extensive file format support, an
4214efficient internal representation, and fairly powerful image processing
4215capabilities. The core image library is designed for fast access to data
4216stored in a few basic pixel formats. It should provide a solid foundation for
4217a 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
4262using the PLY parsing library. It parses C code into an AST and can serve as
4263a 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
4309support 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
4396Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4397graphics library with support for multiple backends including image buffers,
4398PNG, 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
4419for the average programmer, and to popularize decorators usage giving examples
4420of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4421etc. 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
4448submission and control. This package is an implementation of the DRMAA 1.0
4449Python 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
4477memoizing 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
4507cluster directly from Python. You can directly map Python functions onto the
4508cluster 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
4553consisting of serveral processes. honcho starts all listed processes.
4554The output of all running processes is collected by honcho and
4555displayed.")
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;
4602controlling them; and responding to expected patterns in their output.
4603Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4604child 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
4626them 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
4675common 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
4699functions, akin to Python’s built-in generic functions like @code{len()},
4700@code{iter()} and so on. However, instead of using specially-named methods,
4701these generic functions use simple lookup tables, akin to those used by
4702e.g. @code{pickle.dump()} and other generic functions found in the Python
4703standard 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
4728outside IPython/Jupyter should depend on it.
4729
4730This package shouldn't exist. It contains some common utilities shared by
4731Jupyter and IPython projects during The Big Split. As soon as possible, those
4732packages will remove their dependency on this, and this package will go
4733away.")
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
4765type checking, dynamically calculated default values, and ‘on change’
4766callbacks. The package also includes a mechanism to use traitlets for
4767configuration, loading values from files or from command line arguments. This
4768is a distinct layer on top of traitlets, so you can use traitlets in your code
4769without 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
4824of the Jupyter protocol. It also provides client and kernel management APIs
4825for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4826installing @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:
4999Powerful interactive shells, a browser-based notebook, support for interactive
5000data visualization, embeddable interpreters and tools for parallel
5001computing.")
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
5035features 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}
5063toolkit. 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
5114parsing (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
5151implementation 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
5186libxml2 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
5222screen-scraping projects. It offers Pythonic idioms for navigating,
5223searching, and modifying a parse tree, providing a toolkit for
5224dissecting a document and extracting what you need. It automatically
5225converts 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
5252interfaces 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
5279of 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
5325Python.")
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
5371providing a clean and modern domain specific specification language (DSL) in
5372Python 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
5410SVG, 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
5434graphics in Python. It is built on top of matplotlib and tightly integrated
5435with the PyData stack, including support for numpy and pandas data structures
5436and 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
5470Python's float/complex types and math/cmath modules, but also does much
5471more 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
5494multiprecision 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
5530full-featured computer algebra system (CAS) while keeping the code as simple
5531as 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
5565provides convenient short API for print out of values, tracebacks, and
5566falling 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
5592library for Python programs. It is useful to implement low-level X clients.
5593It 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
56152.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
5660comma separated values. The API of the @code{csv} module in Python 2
5661is drastically different from the @code{csv} module in Python 3.
5662This is due, for the most part, to the difference between str in
5663Python 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
5694function} from Python 3.3's @code{shutil}.
5695Unlike the original version it is written in pure Python rather than C,
5696so 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
5728applications.")
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
5784PEP 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
5831complexity 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
5998plugins 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.4")
6008 (source
6009 (origin
6010 (method url-fetch)
6011 (uri (pypi-uri "mistune" version))
6012 (sha256
6013 (base32
6014 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
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
6022Python.")
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 "3.0.1")
6032 (source
6033 (origin
6034 (method url-fetch)
6035 (uri (pypi-uri "Markdown" version))
6036 (sha256
6037 (base32
6038 "0z6v8649sr434d5r5zmrhydka7v7f9yas4bwcgkcs0650jdhybnh"))))
6039 (build-system python-build-system)
6040 (native-inputs
6041 `(("python-nose" ,python-nose)
6042 ("python-pyyaml" ,python-pyyaml)))
6043 (home-page "https://python-markdown.github.io/")
6044 (synopsis "Python implementation of Markdown")
6045 (description
6046 "This package provides a Python implementation of John Gruber's
6047Markdown. The library features international input, various Markdown
6048extensions, and several HTML output formats. A command line wrapper
6049markdown_py is also provided to convert Markdown files to HTML.")
6050 (license license:bsd-3)))
6051
6052(define-public python2-markdown
6053 (package-with-python2 python-markdown))
6054
6055(define-public python-ptyprocess
6056 (package
6057 (name "python-ptyprocess")
6058 (version "0.5.2")
6059 (source
6060 (origin
6061 (method url-fetch)
6062 (uri (pypi-uri "ptyprocess" version))
6063 (sha256
6064 (base32
6065 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6066 (build-system python-build-system)
6067 (native-inputs
6068 `(("python-nose" ,python-nose)))
6069 (arguments
6070 `(#:phases
6071 (modify-phases %standard-phases
6072 (replace 'check
6073 (lambda _
6074 (zero? (system* "nosetests")))))))
6075 (home-page "https://github.com/pexpect/ptyprocess")
6076 (synopsis "Run a subprocess in a pseudo terminal")
6077 (description
6078 "This package provides a Python library used to launch a subprocess in a
6079pseudo terminal (pty), and interact with both the process and its pty.")
6080 (license license:isc)))
6081
6082(define-public python2-ptyprocess
6083 (package-with-python2 python-ptyprocess))
6084
6085(define-public python-cram
6086 (package
6087 (name "python-cram")
6088 (version "0.7")
6089 (home-page "https://bitheap.org/cram/")
6090 (source (origin
6091 (method url-fetch)
6092 (uri (list (string-append home-page "cram-"
6093 version ".tar.gz")
6094 (pypi-uri "cram" version)))
6095 (sha256
6096 (base32
6097 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6098 (arguments
6099 '(#:phases
6100 (modify-phases %standard-phases
6101 (add-after 'unpack 'patch-source
6102 (lambda _
6103 (substitute* (find-files "cram" ".*\\.py$")
6104 ;; Replace default shell path.
6105 (("/bin/sh") (which "sh")))
6106 (substitute* (find-files "tests" ".*\\.t$")
6107 (("md5") "md5sum")
6108 (("/bin/bash") (which "bash"))
6109 (("/bin/sh") (which "sh")))
6110 (substitute* "cram/_test.py"
6111 ;; This hack works around a bug triggered by substituting
6112 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6113 ;; "cram -h", which breaks the output at 80 characters. This
6114 ;; causes the line showing the default shell to break into two
6115 ;; lines, but the test expects a single line...
6116 (("env\\['COLUMNS'\\] = '80'")
6117 "env['COLUMNS'] = '160'"))
6118 #t))
6119 (delete 'check)
6120 (add-after 'install 'check
6121 ;; The test phase uses the built library and executable.
6122 ;; It's easier to run it after install since the build
6123 ;; directory contains version-specific PATH.
6124 (lambda* (#:key inputs outputs #:allow-other-keys)
6125 (add-installed-pythonpath inputs outputs)
6126 (setenv "PATH" (string-append (getenv "PATH") ":"
6127 (assoc-ref outputs "out") "/bin"))
6128 (zero? (system* "make" "test")))))))
6129 (build-system python-build-system)
6130 (native-inputs
6131 `(("python-coverage" ,python-coverage)
6132 ("which" ,which)))
6133 (synopsis "Simple testing framework for command line applications")
6134 (description
6135 "Cram is a functional testing framework for command line applications.
6136Cram tests look like snippets of interactive shell sessions. Cram runs each
6137command and compares the command output in the test with the command’s actual
6138output.")
6139 (license license:gpl2+)))
6140
6141(define-public python2-cram
6142 (package-with-python2 python-cram))
6143
6144(define-public python-straight-plugin
6145 (package
6146 (name "python-straight-plugin")
6147 (version "1.4.1")
6148 (source
6149 (origin
6150 (method url-fetch)
6151 (uri (pypi-uri "straight.plugin" version))
6152 (sha256
6153 (base32
6154 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6155 (build-system python-build-system)
6156 (home-page "https://github.com/ironfroggy/straight.plugin")
6157 (synopsis "Simple namespaced plugin facility")
6158 (description "Straight Plugin provides a type of plugin you can create from
6159almost any existing Python modules, and an easy way for outside developers to
6160add functionality and customization to your projects with their own plugins.")
6161 (license license:expat)))
6162
6163(define-public python2-straight-plugin
6164 (package-with-python2 python-straight-plugin))
6165
6166(define-public python-fonttools
6167 (package
6168 (name "python-fonttools")
6169 (version "3.15.1")
6170 (source (origin
6171 (method url-fetch)
6172 (uri (pypi-uri "fonttools" version ".zip"))
6173 (sha256
6174 (base32
6175 "1hhj97izwliy0vybmza72d90l5d4mcn50y8akq7kyccfl82vdx4d"))))
6176 (build-system python-build-system)
6177 (arguments
6178 '(#:test-target "check"
6179 #:phases
6180 (modify-phases %standard-phases
6181 (add-after 'unpack 'patch-setuppy
6182 ;; Remove the undocumented "extra_path" argument, which adds an
6183 ;; intervening directories between site-packages and the package
6184 ;; directory.
6185 (lambda _
6186 (substitute* "setup.py"
6187 (("^[ \t]*extra_path *= *'FontTools',") ""))
6188 #t)))))
6189 (native-inputs
6190 `(("unzip" ,unzip)))
6191 (home-page "https://github.com/behdad/fonttools")
6192 (synopsis "Tools to manipulate font files")
6193 (description
6194 "FontTools/TTX is a library to manipulate font files from Python. It
6195supports reading and writing of TrueType/OpenType fonts, reading and writing
6196of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6197also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6198from an XML-based format.")
6199 (license (license:non-copyleft
6200 "file://LICENSE.txt"
6201 "See LICENSE.txt in the distribution."))))
6202
6203(define-public python2-fonttools
6204 (package-with-python2 python-fonttools))
6205
6206(define-public python-ly
6207 (package
6208 (name "python-ly")
6209 (version "0.9.5")
6210 (source
6211 (origin
6212 (method url-fetch)
6213 (uri (pypi-uri name version))
6214 (sha256
6215 (base32
6216 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6217 (build-system python-build-system)
6218 (arguments
6219 ;; FIXME: Some tests need network access.
6220 '(#:tests? #f))
6221 (synopsis "Tool and library for manipulating LilyPond files")
6222 (description "This package provides a Python library to parse, manipulate
6223or create documents in LilyPond format. A command line program ly is also
6224provided that can be used to do various manipulations with LilyPond files.")
6225 (home-page "https://pypi.python.org/pypi/python-ly")
6226 (license license:gpl2+)))
6227
6228(define-public python-appdirs
6229 (package
6230 (name "python-appdirs")
6231 (version "1.4.3")
6232 (source
6233 (origin
6234 (method url-fetch)
6235 (uri (pypi-uri "appdirs" version))
6236 (sha256
6237 (base32
6238 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6239 (build-system python-build-system)
6240 (home-page "https://github.com/ActiveState/appdirs")
6241 (synopsis
6242 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6243 (description
6244 "This module provides a portable way of finding out where user data
6245should be stored on various operating systems.")
6246 (license license:expat)))
6247
6248(define-public python2-appdirs
6249 (package-with-python2 python-appdirs))
6250
6251(define-public python-llfuse
6252 (package
6253 (name "python-llfuse")
6254 (version "1.3.3")
6255 (source (origin
6256 (method url-fetch)
6257 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6258 (sha256
6259 (base32
6260 "1rqww632y2zz71xmr6ch7yq80kvza9mhqr2z773k0d8l1lwzl575"))))
6261 (build-system python-build-system)
6262 (inputs
6263 `(("fuse" ,fuse)
6264 ("attr" ,attr)))
6265 (native-inputs
6266 `(("pkg-config" ,pkg-config)))
6267 (synopsis "Python bindings for FUSE")
6268 (description
6269 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6270 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6271 (license license:lgpl2.0+)
6272 (properties `((python2-variant . ,(delay python2-llfuse))))))
6273
6274(define-public python2-llfuse
6275 (package (inherit (package-with-python2
6276 (strip-python2-variant python-llfuse)))
6277 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6278
6279;; For attic-0.16
6280(define-public python-llfuse-0.41
6281 (package (inherit python-llfuse)
6282 (version "0.41.1")
6283 (source (origin
6284 (method url-fetch)
6285 (uri (string-append
6286 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6287 "llfuse-" version ".tar.bz2"))
6288 (sha256
6289 (base32
6290 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6291 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6292 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6293 (license (list license:expat license:lgpl2.0+))))
6294
6295(define-public python-msgpack
6296 (package
6297 (name "python-msgpack")
6298 (version "0.5.6")
6299 (source (origin
6300 (method url-fetch)
6301 (uri (pypi-uri "msgpack" version))
6302 (sha256
6303 (base32
6304 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6305 (build-system python-build-system)
6306 (arguments
6307 `(#:modules ((guix build utils)
6308 (guix build python-build-system)
6309 (ice-9 ftw)
6310 (srfi srfi-1)
6311 (srfi srfi-26))
6312 #:phases
6313 (modify-phases %standard-phases
6314 (replace 'check
6315 (lambda _
6316 (let ((cwd (getcwd)))
6317 (setenv "PYTHONPATH"
6318 (string-append cwd "/build/"
6319 (find (cut string-prefix? "lib" <>)
6320 (scandir (string-append cwd "/build")))
6321 ":"
6322 (getenv "PYTHONPATH")))
6323 (invoke "pytest" "-v" "test")))))))
6324 (native-inputs
6325 `(("python-pytest" ,python-pytest)))
6326 (synopsis "MessagePack (de)serializer")
6327 (description "MessagePack is a fast, compact binary serialization format,
6328suitable for similar data to JSON. This package provides CPython bindings for
6329reading and writing MessagePack data.")
6330 (home-page "https://pypi.python.org/pypi/msgpack/")
6331 (license license:asl2.0)))
6332
6333;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6334;; release 0.5. Some packages like borg still call it by the old name for now.
6335;; <https://bugs.gnu.org/30662>
6336(define-public python-msgpack-transitional
6337 (package
6338 (inherit python-msgpack)
6339 (name "python-msgpack-transitional")
6340 (arguments
6341 (substitute-keyword-arguments (package-arguments python-msgpack)
6342 ((#:phases phases)
6343 `(modify-phases ,phases
6344 (add-after 'unpack 'configure-transitional
6345 (lambda _
6346 ;; Keep using the old name.
6347 (substitute* "setup.py"
6348 (("TRANSITIONAL = False")
6349 "TRANSITIONAL = 1"))
6350 #t))))))))
6351
6352(define-public python2-msgpack
6353 (package-with-python2 python-msgpack))
6354
6355(define-public python-netaddr
6356 (package
6357 (name "python-netaddr")
6358 (version "0.7.19")
6359 (source
6360 (origin
6361 (method url-fetch)
6362 (uri (pypi-uri "netaddr" version))
6363 (sha256
6364 (base32
6365 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6366 (build-system python-build-system)
6367 (arguments `(#:tests? #f)) ;; No tests.
6368 (home-page "https://github.com/drkjam/netaddr/")
6369 (synopsis "Pythonic manipulation of network addresses")
6370 (description
6371 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6372and MAC network addresses.")
6373 (license license:bsd-3)))
6374
6375(define-public python2-netaddr
6376 (package-with-python2 python-netaddr))
6377
6378(define-public python-wrapt
6379 (package
6380 (name "python-wrapt")
6381 (version "1.10.11")
6382 (source
6383 (origin
6384 (method url-fetch)
6385 (uri (pypi-uri "wrapt" version))
6386 (sha256
6387 (base32
6388 "1ip3dwib39xhp79kblskgvz3fjzcwxgx3fs3ahdixhpjg7a61mfl"))))
6389 (build-system python-build-system)
6390 (arguments
6391 ;; Tests are not included in the tarball, they are only available in the
6392 ;; git repository.
6393 `(#:tests? #f))
6394 (home-page "https://github.com/GrahamDumpleton/wrapt")
6395 (synopsis "Module for decorators, wrappers and monkey patching")
6396 (description
6397 "The aim of the wrapt module is to provide a transparent object proxy for
6398 Python, which can be used as the basis for the construction of function
6399 wrappers and decorator functions.")
6400 (license license:bsd-2)))
6401
6402(define-public python2-wrapt
6403 (package-with-python2 python-wrapt))
6404
6405(define-public python-xlrd
6406 (package
6407 (name "python-xlrd")
6408 (version "1.0.0")
6409 (source (origin
6410 (method url-fetch)
6411 (uri (pypi-uri "xlrd" version))
6412 (sha256
6413 (base32
6414 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6415 (build-system python-build-system)
6416 (arguments
6417 `(#:phases
6418 (modify-phases %standard-phases
6419 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6420 ;; run tests instead for now.
6421 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
6422 (native-inputs `(("python-nose" ,python-nose)))
6423 (home-page "http://www.python-excel.org/")
6424 (synopsis "Library for extracting data from Excel files")
6425 (description "This packages provides a library to extract data from
6426spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6427@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6428Unicode-aware. It is not intended as an end-user tool.")
6429 (license license:bsd-3)))
6430
6431(define-public python2-xlrd
6432 (package-with-python2 python-xlrd))
6433
6434(define-public python-prettytable
6435 (package
6436 (name "python-prettytable")
6437 (version "0.7.2")
6438 (source
6439 (origin
6440 (method url-fetch)
6441 (uri (string-append
6442 "https://pypi.python.org/packages/source/P/PrettyTable/"
6443 "prettytable-" version ".tar.bz2"))
6444 (sha256
6445 (base32
6446 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6447 (build-system python-build-system)
6448 (home-page "http://code.google.com/p/prettytable/")
6449 (synopsis "Display tabular data in an ASCII table format")
6450 (description
6451 "A library designed to represent tabular data in visually appealing ASCII
6452tables. PrettyTable allows for selection of which columns are to be printed,
6453independent alignment of columns (left or right justified or centred) and
6454printing of sub-tables by specifying a row range.")
6455 (license license:bsd-3)))
6456
6457(define-public python2-prettytable
6458 (package-with-python2 python-prettytable))
6459
6460(define-public python-tables
6461 (package
6462 (name "python-tables")
6463 (version "3.4.4")
6464 (source
6465 (origin
6466 (method url-fetch)
6467 (uri (pypi-uri "tables" version))
6468 (sha256
6469 (base32
6470 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
6471 (modules '((guix build utils)))
6472 (snippet
6473 '(begin
6474 ;; Remove pre-compiled .pyc files from source.
6475 (for-each delete-file-recursively
6476 (find-files "." "__pycache__" #:directories? #t))
6477 (for-each delete-file (find-files "." "\\.pyc$"))
6478 #t))))
6479 (build-system python-build-system)
6480 (arguments
6481 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6482 ;; or "check", so we must override the build and check phases.
6483 #:phases
6484 (modify-phases %standard-phases
6485 (add-after 'unpack 'use-gcc
6486 (lambda _
6487 (substitute* "setup.py"
6488 (("compiler = new_compiler\\(\\)" line)
6489 (string-append line
6490 "\ncompiler.set_executables(compiler='gcc',"
6491 "compiler_so='gcc',"
6492 "linker_exe='gcc',"
6493 "linker_so='gcc -shared')")))
6494 #t))
6495 (replace 'build
6496 (lambda* (#:key inputs #:allow-other-keys)
6497 (zero? (system* "python" "setup.py" "build"
6498 (string-append "--hdf5="
6499 (assoc-ref inputs "hdf5"))))))
6500 (replace 'check
6501 (lambda* (#:key inputs #:allow-other-keys)
6502 (zero? (system* "python" "setup.py" "check"
6503 (string-append "--hdf5="
6504 (assoc-ref inputs "hdf5")))))))))
6505 (propagated-inputs
6506 `(("python-numexpr" ,python-numexpr)
6507 ("python-numpy" ,python-numpy)))
6508 (native-inputs
6509 `(("python-cython" ,python-cython)
6510 ("pkg-config" ,pkg-config)))
6511 (inputs
6512 `(("hdf5" ,hdf5)
6513 ("bzip2" ,bzip2)
6514 ("zlib" ,zlib)))
6515 (home-page "http://www.pytables.org/")
6516 (synopsis "Hierarchical datasets for Python")
6517 (description "PyTables is a package for managing hierarchical datasets and
6518designed to efficiently cope with extremely large amounts of data.")
6519 (license license:bsd-3)))
6520
6521(define-public python2-tables
6522 (package-with-python2 python-tables))
6523
6524(define-public python-pyasn1
6525 (package
6526 (name "python-pyasn1")
6527 (version "0.4.3")
6528 (source
6529 (origin
6530 (method url-fetch)
6531 (uri (pypi-uri "pyasn1" version))
6532 (sha256
6533 (base32
6534 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
6535 (build-system python-build-system)
6536 (home-page "http://pyasn1.sourceforge.net/")
6537 (synopsis "ASN.1 types and codecs")
6538 (description
6539 "This is an implementation of ASN.1 types and codecs in Python. It is
6540suitable for a wide range of protocols based on the ASN.1 specification.")
6541 (license license:bsd-2)))
6542
6543(define-public python2-pyasn1
6544 (package-with-python2 python-pyasn1))
6545
6546(define-public python-pyasn1-modules
6547 (package
6548 (name "python-pyasn1-modules")
6549 (version "0.2.2")
6550 (source
6551 (origin
6552 (method url-fetch)
6553 (uri (pypi-uri "pyasn1-modules" version))
6554 (sha256
6555 (base32
6556 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
6557 (build-system python-build-system)
6558 (propagated-inputs
6559 `(("python-pyasn1" ,python-pyasn1)))
6560 (home-page "https://sourceforge.net/projects/pyasn1/")
6561 (synopsis "ASN.1 codec implementations")
6562 (description
6563 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6564implementations of ASN.1-based codecs and protocols.")
6565 (license license:bsd-3)))
6566
6567(define-public python2-pyasn1-modules
6568 (package-with-python2 python-pyasn1-modules))
6569
6570(define-public python-ipaddress
6571 (package
6572 (name "python-ipaddress")
6573 (version "1.0.19")
6574 (source (origin
6575 (method url-fetch)
6576 (uri (pypi-uri "ipaddress" version))
6577 (sha256
6578 (base32
6579 "10agaa1cys1bk1ycpl2w8lky9vjx8h1xh1z29mg0niqx0638c390"))))
6580 (build-system python-build-system)
6581 (home-page "https://github.com/phihag/ipaddress")
6582 (synopsis "IP address manipulation library")
6583 (description
6584 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6585 in Python. This library is used to create, poke at, and manipulate IPv4 and
6586 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6587 module to older versions of Python.")
6588 (license license:psfl)))
6589
6590(define-public python2-ipaddress
6591 (package-with-python2 python-ipaddress))
6592
6593(define-public python2-ipaddr
6594 (package
6595 (name "python2-ipaddr")
6596 (version "2.1.11")
6597 (source
6598 (origin
6599 (method url-fetch)
6600 (uri (pypi-uri "ipaddr" version))
6601 (sha256
6602 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6603 (build-system python-build-system)
6604 (arguments
6605 `(#:python ,python-2 ;version 2 only
6606 #:phases
6607 (modify-phases %standard-phases
6608 (replace 'check
6609 (lambda* _
6610 (zero? (system* "python" "ipaddr_test.py")))))))
6611 (home-page "https://github.com/google/ipaddr-py")
6612 (synopsis "IP address manipulation library")
6613 (description
6614 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6615IPv6 addresses and networks.
6616
6617For new implementations you may prefer to use the standard module
6618@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6619versions of Python.")
6620 (license license:asl2.0)))
6621
6622(define-public python-idna
6623 (package
6624 (name "python-idna")
6625 (version "2.6")
6626 (source
6627 (origin
6628 (method url-fetch)
6629 (uri (pypi-uri "idna" version))
6630 (sha256
6631 (base32
6632 "13qaab6d0s15gknz8v3zbcfmbj6v86hn9pjxgkdf62ch13imssic"))))
6633 (build-system python-build-system)
6634 (home-page "https://github.com/kjd/idna")
6635 (synopsis "Internationalized domain names in applications")
6636 (description
6637 "This is a library to support the Internationalised Domain Names in
6638Applications (IDNA) protocol as specified in RFC 5891. This version of the
6639protocol is often referred to as “IDNA2008” and can produce different results
6640from the earlier standard from 2003. The library is also intended to act as a
6641suitable drop-in replacement for the “encodings.idna” module that comes with
6642the Python standard library but currently only supports the older 2003
6643specification.")
6644 (license license:bsd-4)))
6645
6646(define-public python2-idna
6647 (package-with-python2 python-idna))
6648
6649(define-public python-idna-ssl
6650 (package
6651 (name "python-idna-ssl")
6652 (version "1.0.1")
6653 (source
6654 (origin
6655 (method url-fetch)
6656 (uri (pypi-uri "idna-ssl" version))
6657 (sha256
6658 (base32
6659 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
6660 (build-system python-build-system)
6661 (arguments
6662 `(#:tests? #f)) ;circular dependency with python-aiohttp
6663 (home-page "https://github.com/aio-libs/idna-ssl")
6664 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
6665 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
6666domains support.")
6667 (license license:expat)))
6668
6669(define-public python-pretend
6670 (package
6671 (name "python-pretend")
6672 (version "1.0.9")
6673 (source
6674 (origin
6675 (method url-fetch)
6676 (uri (string-append "https://pypi.python.org/packages/source/p/"
6677 "pretend/pretend-" version ".tar.gz"))
6678 (sha256
6679 (base32
6680 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
6681 (build-system python-build-system)
6682 (home-page "https://github.com/alex/pretend")
6683 (synopsis "Library for stubbing in Python")
6684 (description
6685 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6686technique for writing tests. You may hear the term mixed up with mocks,
6687fakes, or doubles. Basically, a stub is an object that returns pre-canned
6688responses, rather than doing any computation.")
6689 (license license:bsd-3)))
6690
6691(define-public python2-pretend
6692 (package-with-python2 python-pretend))
6693
6694(define-public python-pip
6695 (package
6696 (name "python-pip")
6697 (version "9.0.1")
6698 (source
6699 (origin
6700 (method url-fetch)
6701 (uri (pypi-uri "pip" version))
6702 (sha256
6703 (base32
6704 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
6705 (build-system python-build-system)
6706 (arguments
6707 '(#:tests? #f)) ; there are no tests in the pypi archive.
6708 (home-page "https://pip.pypa.io/")
6709 (synopsis "Package manager for Python software")
6710 (description
6711 "Pip is a package manager for Python software, that finds packages on the
6712Python Package Index (PyPI).")
6713 (license license:expat)))
6714
6715(define-public python2-pip
6716 (package-with-python2 python-pip))
6717
6718(define-public python-tlsh
6719 (package
6720 (name "python-tlsh")
6721 (version "3.4.5")
6722 (home-page "https://github.com/trendmicro/tlsh")
6723 (source (origin
6724 (method url-fetch)
6725 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6726 version ".tar.gz"))
6727 (sha256
6728 (base32
6729 "1x1vahd4zg5kpyr9h9hs3fvh460p25rjy4cclwdnbbw8x3vc30q3"))
6730 (file-name (string-append name "-" version ".tar.gz"))))
6731 (build-system cmake-build-system)
6732 (arguments
6733 '(#:out-of-source? #f
6734 #:phases (modify-phases %standard-phases
6735 (replace
6736 'install
6737 (lambda* (#:key outputs #:allow-other-keys)
6738 ;; Build and install the Python bindings. The underlying
6739 ;; C++ library is apparently not meant to be installed.
6740 (let ((out (assoc-ref outputs "out")))
6741 (with-directory-excursion "py_ext"
6742 (and (system* "python" "setup.py" "build")
6743 (system* "python" "setup.py" "install"
6744 (string-append "--prefix=" out))))))))))
6745 (inputs `(("python" ,python-wrapper))) ;for the bindings
6746 (synopsis "Fuzzy matching library for Python")
6747 (description
6748 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6749Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6750value which can be used for similarity comparisons. Similar objects have
6751similar hash values, which allows for the detection of similar objects by
6752comparing their hash values. The byte stream should have a sufficient amount
6753of complexity; for example, a byte stream of identical bytes will not generate
6754a hash value.")
6755 (license license:asl2.0)))
6756
6757(define-public python2-tlsh
6758 (package
6759 (inherit python-tlsh)
6760 (name "python2-tlsh")
6761 (inputs `(("python" ,python-2)))))
6762
6763(define-public python-termcolor
6764 (package
6765 (name "python-termcolor")
6766 (version "1.1.0")
6767 (source
6768 (origin
6769 (method url-fetch)
6770 (uri (pypi-uri "termcolor" version))
6771 (sha256
6772 (base32
6773 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6774 (build-system python-build-system)
6775 (arguments
6776 ;; There are no tests.
6777 `(#:tests? #f))
6778 (home-page "https://pypi.python.org/pypi/termcolor")
6779 (synopsis "ANSII Color formatting for terminal output")
6780 (description
6781 "This package provides ANSII Color formatting for output in terminals.")
6782 (license license:expat)))
6783
6784(define-public python2-termcolor
6785 (package-with-python2 python-termcolor))
6786
6787(define-public python-libarchive-c
6788 (package
6789 (name "python-libarchive-c")
6790 (version "2.8")
6791 (source (origin
6792 (method url-fetch)
6793 (uri (pypi-uri "libarchive-c" version))
6794 (sha256
6795 (base32
6796 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
6797 (build-system python-build-system)
6798 (arguments
6799 '(#:phases (modify-phases %standard-phases
6800 (add-before
6801 'build 'reference-libarchive
6802 (lambda* (#:key inputs #:allow-other-keys)
6803 ;; Retain the absolute file name of libarchive.so.
6804 (let ((libarchive (assoc-ref inputs "libarchive")))
6805 (substitute* "libarchive/ffi.py"
6806 (("find_library\\('archive'\\)")
6807 (string-append "'" libarchive
6808 "/lib/libarchive.so'"))))))
6809 (replace 'check
6810 (lambda _ (invoke "pytest" "-vv"))))))
6811 (native-inputs
6812 `(("python-mock" ,python-mock)
6813 ("python-pytest" ,python-pytest)))
6814 (inputs
6815 `(("libarchive" ,libarchive)))
6816 (home-page "https://github.com/Changaco/python-libarchive-c")
6817 (synopsis "Python interface to libarchive")
6818 (description
6819 "This package provides Python bindings to libarchive, a C library to
6820access possibly compressed archives in many different formats. It uses
6821Python's @code{ctypes} foreign function interface (FFI).")
6822 (license license:lgpl2.0+)))
6823
6824(define-public python2-libarchive-c
6825 (package-with-python2 python-libarchive-c))
6826
6827(define-public python-file
6828 (package
6829 (inherit file)
6830 (name "python-file")
6831 (build-system python-build-system)
6832 (arguments
6833 '(#:tests? #f ;no tests
6834 #:configure-flags '("--single-version-externally-managed" "--root=/")
6835 #:phases (modify-phases %standard-phases
6836 (add-before 'build 'change-directory
6837 (lambda _
6838 (chdir "python")
6839 #t))
6840 (add-before 'build 'set-library-file-name
6841 (lambda* (#:key inputs #:allow-other-keys)
6842 (let ((file (assoc-ref inputs "file")))
6843 (substitute* "magic.py"
6844 (("find_library\\('magic'\\)")
6845 (string-append "'" file "/lib/libmagic.so'")))
6846 #t))))))
6847 (inputs `(("file" ,file)))
6848 (self-native-input? #f)
6849 (synopsis "Python bindings to the libmagic file type guesser. Note that
6850this module and the python-magic module both provide a \"magic.py\" file;
6851these two modules, which are different and were developed separately, both
6852serve the same purpose: provide Python bindings for libmagic.")))
6853
6854(define-public python2-file
6855 (package-with-python2 python-file))
6856
6857(define-public python-debian
6858 (package
6859 (name "python-debian")
6860 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
6861 (version "0.1.28")
6862 (source
6863 (origin
6864 (method url-fetch)
6865 (uri (pypi-uri name version))
6866 (sha256
6867 (base32
6868 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
6869 (build-system python-build-system)
6870 (propagated-inputs
6871 `(("python-six" ,python-six)))
6872 (synopsis "Debian package related modules")
6873 (description
6874 ;; XXX: Use @enumerate instead of @itemize to work around
6875 ;; <http://bugs.gnu.org/21772>.
6876 "This package provides Python modules that abstract many formats of
6877Debian-related files, such as:
6878
6879@enumerate
6880@item Debtags information;
6881@item @file{debian/changelog} files;
6882@item packages files, pdiffs;
6883@item control files of single or multiple RFC822-style paragraphs---e.g.
6884 @file{debian/control}, @file{.changes}, @file{.dsc};
6885@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6886 contained files and meta-information.
6887@end enumerate\n")
6888
6889 ;; Modules are either GPLv2+ or GPLv3+.
6890 (license license:gpl3+)))
6891
6892(define-public python2-debian
6893 (package-with-python2 python-debian))
6894
6895(define-public python-nbformat
6896 (package
6897 (name "python-nbformat")
6898 (version "4.4.0")
6899 (source
6900 (origin
6901 (method url-fetch)
6902 (uri (pypi-uri "nbformat" version))
6903 (sha256
6904 (base32
6905 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
6906 (build-system python-build-system)
6907 (arguments `(#:tests? #f)) ; no test target
6908 (propagated-inputs
6909 `(("python-ipython-genutils" ,python-ipython-genutils)
6910 ("python-jsonschema" ,python-jsonschema)
6911 ("python-jupyter-core" ,python-jupyter-core)
6912 ("python-traitlets" ,python-traitlets)))
6913 (home-page "http://jupyter.org")
6914 (synopsis "Jupyter Notebook format")
6915 (description "This package provides the reference implementation of the
6916Jupyter Notebook format and Python APIs for working with notebooks.")
6917 (license license:bsd-3)))
6918
6919(define-public python2-nbformat
6920 (package-with-python2 python-nbformat))
6921
6922(define-public python-bleach
6923 (package
6924 (name "python-bleach")
6925 (version "1.4.3")
6926 (source
6927 (origin
6928 (method url-fetch)
6929 (uri (pypi-uri "bleach" version))
6930 (sha256
6931 (base32
6932 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6933 (build-system python-build-system)
6934 (propagated-inputs
6935 `(("python-html5lib" ,python-html5lib-0.9)
6936 ("python-six" ,python-six)))
6937 (native-inputs
6938 `(("python-nose" ,python-nose)))
6939 (home-page "https://github.com/jsocol/bleach")
6940 (synopsis "Whitelist-based HTML-sanitizing tool")
6941 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6942 (license license:asl2.0)))
6943
6944(define-public python2-bleach
6945 (package-with-python2 python-bleach))
6946
6947(define-public python-entrypoints
6948 (package
6949 (name "python-entrypoints")
6950 (version "0.2.3")
6951 (source
6952 (origin
6953 (method url-fetch)
6954 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
6955 version ".tar.gz"))
6956 (file-name (string-append name "-" version ".tar.gz"))
6957 (sha256
6958 (base32
6959 "1pdvgfr5bxyvnfvxbsd3zi0dh3il71pc4k6rinx6zpps91b84a56"))))
6960 (build-system python-build-system)
6961 ;; The package does not come with a setup.py file, so we have to generate
6962 ;; one ourselves.
6963 (arguments
6964 `(#:tests? #f
6965 #:phases
6966 (modify-phases %standard-phases
6967 (add-after 'unpack 'create-setup.py
6968 (lambda _
6969 (call-with-output-file "setup.py"
6970 (lambda (port)
6971 (format port "\
6972from setuptools import setup
6973setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6974" ,version))))))))
6975 (home-page "https://github.com/takluyver/entrypoints")
6976 (synopsis "Discover and load entry points from installed Python packages")
6977 (description "Entry points are a way for Python packages to advertise
6978objects with some common interface. The most common examples are
6979@code{console_scripts} entry points, which define shell commands by
6980identifying a Python function to run. The @code{entrypoints} module contains
6981functions to find and load entry points.")
6982 (license license:expat)))
6983
6984(define-public python2-entrypoints
6985 (package-with-python2 python-entrypoints))
6986
6987(define-public python-nbconvert
6988 (package
6989 (name "python-nbconvert")
6990 (version "5.0.0b1")
6991 (source
6992 (origin
6993 (method url-fetch)
6994 (uri (pypi-uri "nbconvert" version))
6995 (sha256
6996 (base32
6997 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6998 (build-system python-build-system)
6999 (arguments
7000 `(;; The "bdist_egg" target is disabled by default, causing the installation
7001 ;; to fail.
7002 #:configure-flags (list "bdist_egg")
7003 ;; FIXME: 5 failures, 40 errors.
7004 #:tests? #f))
7005 ;; #:phases
7006 ;; (modify-phases %standard-phases
7007 ;; (replace 'check
7008 ;; (lambda _
7009 ;; (zero? (system* "py.test" "-v")))))
7010 (native-inputs
7011 `(("python-pytest" ,python-pytest)))
7012 (propagated-inputs
7013 `(("python-bleach" ,python-bleach)
7014 ("python-entrypoints" ,python-entrypoints)
7015 ("python-jinja2" ,python-jinja2)
7016 ("python-jupyter-core" ,python-jupyter-core)
7017 ("python-mistune" ,python-mistune)
7018 ("python-nbformat" ,python-nbformat)
7019 ("python-pygments" ,python-pygments)
7020 ("python-traitlets" ,python-traitlets)))
7021 (home-page "http://jupyter.org")
7022 (synopsis "Converting Jupyter Notebooks")
7023 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7024notebooks to various other formats via Jinja templates. It allows you to
7025convert an @code{.ipynb} notebook file into various static formats including:
7026
7027@enumerate
7028@item HTML
7029@item LaTeX
7030@item PDF
7031@item Reveal JS
7032@item Markdown (md)
7033@item ReStructured Text (rst)
7034@item executable script
7035@end enumerate\n")
7036 (license license:bsd-3)))
7037
7038(define-public python2-nbconvert
7039 (package-with-python2 python-nbconvert))
7040
7041(define-public python-notebook
7042 (package
7043 (name "python-notebook")
7044 (version "4.2.3")
7045 (source (origin
7046 (method url-fetch)
7047 (uri (pypi-uri "notebook" version))
7048 (sha256
7049 (base32
7050 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
7051 (build-system python-build-system)
7052 (arguments
7053 `(#:phases
7054 (modify-phases %standard-phases
7055 (replace 'check
7056 (lambda _
7057 ;; HOME must be set for tests
7058 (setenv "HOME" "/tmp")
7059 (zero? (system* "nosetests")))))))
7060 (propagated-inputs
7061 `(("python-jupyter-core" ,python-jupyter-core)
7062 ("python-nbformat" ,python-nbformat)
7063 ("python-nbconvert" ,python-nbconvert)
7064 ("python-ipython" ,python-ipython)))
7065 (native-inputs
7066 `(("python-nose" ,python-nose)
7067 ("python-sphinx" ,python-sphinx)
7068 ("python-requests" ,python-requests)))
7069 (home-page "http://jupyter.org/")
7070 (synopsis "Web-based notebook environment for interactive computing")
7071 (description
7072 "The Jupyter HTML notebook is a web-based notebook environment for
7073interactive computing.")
7074 (properties `((python2-variant . ,(delay python2-notebook))))
7075 (license license:bsd-3)))
7076
7077(define-public python2-notebook
7078 (let ((base (package-with-python2
7079 (strip-python2-variant python-notebook))))
7080 (package (inherit base)
7081 (native-inputs
7082 `(("python2-mock" ,python2-mock)
7083 ,@(package-native-inputs base)))
7084 (arguments
7085 (substitute-keyword-arguments (package-arguments base)
7086 ((#:phases phases)
7087 `(modify-phases ,phases
7088 (add-before 'check 'disable-test-case
7089 ;; The test requires network access to localhost. Curiously it
7090 ;; fails with Python 2 only. Simply make the test-case return
7091 ;; immediately.
7092 (lambda _
7093 (substitute*
7094 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7095 (("formats = self.nbconvert_api") "return #")))))))))))
7096
7097(define-public python-widgetsnbextension
7098 (package
7099 (name "python-widgetsnbextension")
7100 (version "1.2.6")
7101 (source
7102 (origin
7103 (method url-fetch)
7104 (uri (pypi-uri "widgetsnbextension" version))
7105 (sha256
7106 (base32
7107 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
7108 (build-system python-build-system)
7109 (propagated-inputs
7110 `(("python-notebook" ,python-notebook)))
7111 (native-inputs
7112 `(("python-certifi" ,python-certifi)
7113 ("python-nose" ,python-nose)))
7114 (home-page "https://ipython.org")
7115 (synopsis "IPython HTML widgets for Jupyter")
7116 (description "This package provides interactive HTML widgets for Jupyter
7117notebooks.")
7118 (license license:bsd-3)))
7119
7120(define-public python2-widgetsnbextension
7121 (package-with-python2 python-widgetsnbextension))
7122
7123(define-public python-ipywidgets
7124 (package
7125 (name "python-ipywidgets")
7126 (version "5.2.2")
7127 (source
7128 (origin
7129 (method url-fetch)
7130 (uri (pypi-uri "ipywidgets" version))
7131 (sha256
7132 (base32
7133 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7134 (build-system python-build-system)
7135 ;; FIXME: it's not clear how to run the tests.
7136 (arguments `(#:tests? #f))
7137 (propagated-inputs
7138 `(("python-ipykernel" ,python-ipykernel)
7139 ("python-ipython" ,python-ipython)
7140 ("python-traitlets" ,python-traitlets)
7141 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7142 (home-page "https://ipython.org")
7143 (synopsis "IPython HTML widgets for Jupyter")
7144 (description "Ipywidgets are interactive HTML widgets for Jupyter
7145notebooks and the IPython kernel. Notebooks come alive when interactive
7146widgets are used. Users gain control of their data and can visualize changes
7147in the data.")
7148 (license license:bsd-3)))
7149
7150(define-public python2-ipywidgets
7151 (package-with-python2 python-ipywidgets))
7152
7153(define-public python-jupyter-console
7154 (package
7155 (name "python-jupyter-console")
7156 (version "5.2.0")
7157 (source
7158 (origin
7159 (method url-fetch)
7160 (uri (pypi-uri "jupyter_console" version))
7161 (sha256
7162 (base32
7163 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7164 (build-system python-build-system)
7165 ;; FIXME: it's not clear how to run the tests.
7166 (arguments `(#:tests? #f))
7167 (propagated-inputs
7168 `(("python-ipykernel" ,python-ipykernel)
7169 ("python-ipython" ,python-ipython)
7170 ("python-jupyter-client" ,python-jupyter-client)
7171 ("python-prompt-toolkit" ,python-prompt-toolkit)
7172 ("python-pygments" ,python-pygments)))
7173 (home-page "https://jupyter.org")
7174 (synopsis "Jupyter terminal console")
7175 (description "This package provides a terminal-based console frontend for
7176Jupyter kernels. It also allows for console-based interaction with non-Python
7177Jupyter kernels such as IJulia and IRKernel.")
7178 (license license:bsd-3)))
7179
7180(define-public python2-jupyter-console
7181 (package-with-python2 python-jupyter-console))
7182
7183;; The python-ipython and python-jupyter-console require each other. To get
7184;; the functionality in both packages working, strip down the
7185;; python-jupyter-console package when using it as an input to python-ipython.
7186(define python-jupyter-console-minimal
7187 (package
7188 (inherit python-jupyter-console)
7189 (name "python-jupyter-console-minimal")
7190 (arguments
7191 (substitute-keyword-arguments
7192 (package-arguments python-jupyter-console)
7193 ((#:phases phases)
7194 `(modify-phases ,phases
7195 (add-after 'install 'delete-bin
7196 (lambda* (#:key outputs #:allow-other-keys)
7197 ;; Delete the bin files, to avoid conflicts in profiles
7198 ;; where python-ipython and python-jupyter-console are
7199 ;; both present.
7200 (delete-file-recursively
7201 (string-append
7202 (assoc-ref outputs "out") "/bin"))))))))
7203 ;; Remove the python-ipython propagated input, to avoid the cycle
7204 (propagated-inputs
7205 (alist-delete
7206 "python-ipython"
7207 (package-propagated-inputs python-jupyter-console)))))
7208
7209(define-public jupyter
7210 (package
7211 (name "jupyter")
7212 (version "1.0.0")
7213 (source
7214 (origin
7215 (method url-fetch)
7216 (uri (pypi-uri "jupyter" version))
7217 (sha256
7218 (base32
7219 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7220 (build-system python-build-system)
7221 ;; FIXME: it's not clear how to run the tests.
7222 (arguments `(#:tests? #f))
7223 (propagated-inputs
7224 `(("python-ipykernel" ,python-ipykernel)
7225 ("python-ipywidgets" ,python-ipywidgets)
7226 ("python-jupyter-console" ,python-jupyter-console)
7227 ("python-nbconvert" ,python-nbconvert)
7228 ("python-notebook" ,python-notebook)))
7229
7230 (native-search-paths
7231 (list (search-path-specification
7232 (variable "JUPYTER_PATH")
7233 (files '("share/jupyter")))))
7234
7235 (home-page "http://jupyter.org")
7236 (synopsis "Web application for interactive documents")
7237 (description
7238 "The Jupyter Notebook is a web application that allows you to create and
7239share documents that contain live code, equations, visualizations and
7240explanatory text. Uses include: data cleaning and transformation, numerical
7241simulation, statistical modeling, machine learning and much more.")
7242 (license license:bsd-3)))
7243
7244(define-public python-chardet
7245 (package
7246 (name "python-chardet")
7247 (version "3.0.4")
7248 (source
7249 (origin
7250 (method url-fetch)
7251 (uri (pypi-uri "chardet" version))
7252 (sha256
7253 (base32
7254 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7255 (native-inputs
7256 `(("python-hypothesis" ,python-hypothesis)
7257 ("python-pytest" ,python-pytest)
7258 ("python-pytest-runner" ,python-pytest-runner)))
7259 (build-system python-build-system)
7260 (home-page "https://github.com/chardet/chardet")
7261 (synopsis "Universal encoding detector for Python 2 and 3")
7262 (description
7263 "This package provides @code{chardet}, a Python module that can
7264automatically detect a wide range of file encodings.")
7265 (license license:lgpl2.1+)))
7266
7267(define-public python2-chardet
7268 (package-with-python2 python-chardet))
7269
7270(define-public python-docopt
7271 (package
7272 (name "python-docopt")
7273 (version "0.6.2")
7274 (source
7275 (origin
7276 (method url-fetch)
7277 ;; The release on PyPI does not include tests.
7278 (uri (string-append
7279 "https://github.com/docopt/docopt/archive/"
7280 version ".tar.gz"))
7281 (file-name (string-append name "-" version ".tar.gz"))
7282 (sha256
7283 (base32
7284 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7285 (build-system python-build-system)
7286 (native-inputs
7287 `(("python-pytest" ,python-pytest)))
7288 (arguments
7289 `(#:phases
7290 (modify-phases %standard-phases
7291 (replace 'check
7292 (lambda _ (zero? (system* "py.test")))))))
7293 (home-page "http://docopt.org")
7294 (synopsis "Command-line interface description language for Python")
7295 (description "This library allows the user to define a command-line
7296interface from a program's help message rather than specifying it
7297programatically with command-line parsers like @code{getopt} and
7298@code{argparse}.")
7299 (license license:expat)))
7300
7301(define-public python2-docopt
7302 (package-with-python2 python-docopt))
7303
7304(define-public python-pythondialog
7305 (package
7306 (name "python-pythondialog")
7307 (version "3.4.0")
7308 (source
7309 (origin
7310 (method url-fetch)
7311 (uri (pypi-uri "pythondialog" version))
7312 (sha256
7313 (base32
7314 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7315 (build-system python-build-system)
7316 (arguments
7317 `(#:phases
7318 (modify-phases %standard-phases
7319 (add-after 'unpack 'patch-path
7320 (lambda* (#:key inputs #:allow-other-keys)
7321 (let* ((dialog (assoc-ref inputs "dialog")))
7322 ;; Since this library really wants to grovel the search path, we
7323 ;; must hardcode dialog's store path into it.
7324 (substitute* "dialog.py"
7325 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7326 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7327 #t))))
7328 #:tests? #f)) ; no test suite
7329 (propagated-inputs
7330 `(("dialog" ,dialog)))
7331 (home-page "http://pythondialog.sourceforge.net/")
7332 (synopsis "Python interface to the UNIX dialog utility")
7333 (description "A Python wrapper for the dialog utility. Its purpose is to
7334provide an easy to use, pythonic and comprehensive Python interface to dialog.
7335This allows one to make simple text-mode user interfaces on Unix-like systems")
7336 (license license:lgpl2.1)
7337 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7338
7339(define-public python2-pythondialog
7340 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7341 (package
7342 (inherit base)
7343 (version (package-version python-pythondialog))
7344 (source (origin
7345 (method url-fetch)
7346 (uri (pypi-uri "python2-pythondialog" version))
7347 (sha256
7348 (base32
7349 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7350
7351(define-public python-configobj
7352 (package
7353 (name "python-configobj")
7354 (version "5.0.6")
7355 (source (origin
7356 (method url-fetch)
7357 (uri (string-append
7358 "https://pypi.python.org/packages/source/c/configobj/"
7359 "configobj-" version ".tar.gz"))
7360 (sha256
7361 (base32
7362 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7363 ;; Patch setup.py so it looks for python-setuptools, which is
7364 ;; required to parse the keyword 'install_requires' in setup.py.
7365 (patches (search-patches "python-configobj-setuptools.patch"))))
7366 (build-system python-build-system)
7367 (propagated-inputs
7368 `(("python-six" ,python-six)))
7369 (synopsis "Config file reading, writing and validation")
7370 (description "ConfigObj is a simple but powerful config file reader and
7371writer: an ini file round tripper. Its main feature is that it is very easy to
7372use, with a straightforward programmer’s interface and a simple syntax for
7373config files.")
7374 (home-page "https://github.com/DiffSK/configobj")
7375 (license license:bsd-3)))
7376
7377(define-public python2-configobj
7378 (package-with-python2 python-configobj))
7379
7380(define-public python-configargparse
7381 (package
7382 (name "python-configargparse")
7383 (version "0.12.0")
7384 (source (origin
7385 (method url-fetch)
7386 (uri (pypi-uri "ConfigArgParse" version))
7387 (sha256
7388 (base32
7389 "0fgkiqh6r3rbkdq3k8c48m85g52k96686rw3a6jg4lcncrkpvk98"))))
7390 (build-system python-build-system)
7391 (native-inputs
7392 `(("python-pyyaml" ,python-pyyaml)))
7393 (arguments
7394 `(#:phases
7395 (modify-phases %standard-phases
7396 (replace 'check
7397 (lambda _
7398 ;; Bypass setuptools-shim because one test relies on "setup.py"
7399 ;; being the first argument passed to the python call.
7400 ;;
7401 ;; NOTE: Many tests do not run because they rely on Python's
7402 ;; built-in test.test_argparse, but we remove the unit tests from
7403 ;; our Python installation.
7404 (zero? (system* "python" "setup.py" "test")))))))
7405 (synopsis "Replacement for argparse")
7406 (description "A drop-in replacement for argparse that allows options to also
7407be set via config files and/or environment variables.")
7408 (home-page "https://github.com/bw2/ConfigArgParse")
7409 (license license:expat)))
7410
7411(define-public python2-configargparse
7412 (package-with-python2 python-configargparse))
7413
7414(define-public python-argparse-manpage
7415 (package
7416 (name "python-argparse-manpage")
7417 (version "1.1")
7418 (source
7419 (origin
7420 (method url-fetch)
7421 (uri (pypi-uri "argparse-manpage" version))
7422 (sha256
7423 (base32
7424 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
7425 (build-system python-build-system)
7426 (home-page "https://github.com/praiskup/argparse-manpage")
7427 (synopsis "Build manual page from Python's ArgumentParser object")
7428 (description
7429 "This package provides tools to build manual pages from Python's
7430@code{ArgumentParser} object.")
7431 (license license:asl2.0)))
7432
7433(define-public python-contextlib2
7434 (package
7435 (name "python-contextlib2")
7436 (version "0.4.0")
7437 (source
7438 (origin
7439 (method url-fetch)
7440 (uri (pypi-uri "contextlib2" version))
7441 (sha256
7442 (base32
7443 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7444 (build-system python-build-system)
7445 (arguments
7446 `(#:phases
7447 (modify-phases %standard-phases
7448 (replace 'check
7449 (lambda _ (zero?
7450 (system*
7451 "python" "test_contextlib2.py" "-v")))))))
7452 (home-page "http://contextlib2.readthedocs.org/")
7453 (synopsis "Tools for decorators and context managers")
7454 (description "This module is primarily a backport of the Python
74553.2 contextlib to earlier Python versions. Like contextlib, it
7456provides utilities for common tasks involving decorators and context
7457managers. It also contains additional features that are not part of
7458the standard library.")
7459 (license license:psfl)))
7460
7461(define-public python2-contextlib2
7462 (package-with-python2 python-contextlib2))
7463
7464(define-public python-texttable
7465 (package
7466 (name "python-texttable")
7467 (version "0.8.7")
7468 (source
7469 (origin
7470 (method url-fetch)
7471 (uri (pypi-uri "texttable" version))
7472 (sha256
7473 (base32
7474 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
7475 (build-system python-build-system)
7476 (arguments '(#:tests? #f)) ; no tests
7477 (home-page "https://github.com/foutaise/texttable/")
7478 (synopsis "Python module for creating simple ASCII tables")
7479 (description "Texttable is a Python module for creating simple ASCII
7480tables.")
7481 (license license:lgpl2.1+)))
7482
7483(define-public python2-texttable
7484 (package-with-python2 python-texttable))
7485
7486(define-public python-atomicwrites
7487 (package
7488 (name "python-atomicwrites")
7489 (version "1.1.5")
7490 (source (origin
7491 (method url-fetch)
7492 (uri (pypi-uri "atomicwrites" version))
7493 (sha256
7494 (base32
7495 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
7496 (build-system python-build-system)
7497 (synopsis "Atomic file writes in Python")
7498 (description "Library for atomic file writes using platform dependent tools
7499for atomic file system operations.")
7500 (home-page "https://github.com/untitaker/python-atomicwrites")
7501 (license license:expat)))
7502
7503(define-public python2-atomicwrites
7504 (package-with-python2 python-atomicwrites))
7505
7506(define-public python-click-threading
7507 (package
7508 (name "python-click-threading")
7509 (version "0.4.4")
7510 (source (origin
7511 (method url-fetch)
7512 (uri (pypi-uri "click-threading" version))
7513 (sha256
7514 (base32
7515 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
7516 (build-system python-build-system)
7517 (propagated-inputs
7518 `(("python-click" ,python-click)))
7519 (synopsis "Utilities for multithreading in Click")
7520 (description "This package provides utilities for multithreading in Click
7521applications.")
7522 (home-page "https://github.com/click-contrib/click-threading")
7523 (license license:expat)))
7524
7525(define-public python-click-log
7526 (package
7527 (name "python-click-log")
7528 (version "0.3.2")
7529 (source (origin
7530 (method url-fetch)
7531 (uri (pypi-uri "click-log" version))
7532 (sha256
7533 (base32
7534 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
7535 (build-system python-build-system)
7536 (propagated-inputs
7537 `(("python-click" ,python-click)))
7538 (synopsis "Logging for click applications")
7539 (description "This package provides a Python library for logging Click
7540applications.")
7541 (home-page "https://github.com/click-contrib/click-log")
7542 (license license:expat)))
7543
7544(define-public python-apipkg
7545 (package
7546 (name "python-apipkg")
7547 (version "1.4")
7548 (source (origin
7549 (method url-fetch)
7550 (uri (pypi-uri "apipkg" version))
7551 (sha256
7552 (base32
7553 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7554 (build-system python-build-system)
7555 (native-inputs
7556 `(("python-pytest" ,python-pytest)))
7557 (synopsis "Namespace control and lazy-import mechanism")
7558 (description "With apipkg you can control the exported namespace of a Python
7559package and greatly reduce the number of imports for your users. It is a small
7560pure Python module that works on virtually all Python versions.")
7561 (home-page "https://github.com/pytest-dev/apipkg")
7562 (license license:expat)))
7563
7564(define-public python2-apipkg
7565 (package-with-python2 python-apipkg))
7566
7567(define-public python-execnet
7568 (package
7569 (name "python-execnet")
7570 (version "1.4.1")
7571 (source (origin
7572 (method url-fetch)
7573 (uri (pypi-uri "execnet" version))
7574 (sha256
7575 (base32
7576 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7577 (build-system python-build-system)
7578 (arguments
7579 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7580 ;; The two test failures are caused by the lack of an `ssh` executable.
7581 ;; The test suite can be run with pytest after the 'install' phase.
7582 #:tests? #f))
7583 (native-inputs
7584 `(("python-pytest" ,python-pytest)
7585 ("python-setuptools-scm" ,python-setuptools-scm)))
7586 (propagated-inputs
7587 `(("python-apipkg" ,python-apipkg)))
7588 (synopsis "Rapid multi-Python deployment")
7589 (description "Execnet provides a share-nothing model with
7590channel-send/receive communication for distributing execution across many
7591Python interpreters across version, platform and network barriers. It has a
7592minimal and fast API targeting the following uses:
7593@enumerate
7594@item distribute tasks to (many) local or remote CPUs
7595@item write and deploy hybrid multi-process applications
7596@item write scripts to administer multiple environments
7597@end enumerate")
7598 (home-page "http://codespeak.net/execnet/")
7599 (license license:expat)))
7600
7601(define-public python2-execnet
7602 (package-with-python2 python-execnet))
7603
7604(define-public python-icalendar
7605 (package
7606 (name "python-icalendar")
7607 (version "4.0.2")
7608 (source (origin
7609 (method url-fetch)
7610 (uri (pypi-uri "icalendar" version))
7611 (sha256
7612 (base32
7613 "13003kw2vbas1ha146vv3x2rdg9k7w38rdzxj63vi1i67jgjldl0"))))
7614 (build-system python-build-system)
7615 (propagated-inputs
7616 `(("python-dateutil" ,python-dateutil)
7617 ("python-pytz" ,python-pytz)))
7618 (synopsis "Python library for parsing iCalendar files")
7619 (description "The icalendar package is a parser/generator of iCalendar
7620files for use with Python.")
7621 (home-page "https://github.com/collective/icalendar")
7622 (license license:bsd-2)))
7623
7624(define-public python-sphinxcontrib-newsfeed
7625 (package
7626 (name "python-sphinxcontrib-newsfeed")
7627 (version "0.1.4")
7628 (source (origin
7629 (method url-fetch)
7630 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7631 (sha256
7632 (base32
7633 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7634 (arguments '(#:tests? #f)) ; No tests.
7635 (build-system python-build-system)
7636 (propagated-inputs
7637 `(("python-sphinx" ,python-sphinx)))
7638 (synopsis "News Feed extension for Sphinx")
7639 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7640Blog, News or Announcements section to a Sphinx website.")
7641 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7642 (license license:bsd-2)))
7643
7644(define-public python-args
7645 (package
7646 (name "python-args")
7647 (version "0.1.0")
7648 (source (origin
7649 (method url-fetch)
7650 (uri (pypi-uri "args" version))
7651 (sha256
7652 (base32
7653 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7654 (build-system python-build-system)
7655 (home-page "https://github.com/kennethreitz/args")
7656 (synopsis "Command-line argument parser")
7657 (description
7658 "This library provides a Python module to parse command-line arguments.")
7659 (license license:bsd-3)))
7660
7661(define-public python2-args
7662 (package-with-python2 python-args))
7663
7664(define-public python-clint
7665 (package
7666 (name "python-clint")
7667 (version "0.5.1")
7668 (source (origin
7669 (method url-fetch)
7670 (uri (pypi-uri "clint" version))
7671 (sha256
7672 (base32
7673 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7674 (build-system python-build-system)
7675 (arguments
7676 '(#:phases
7677 (modify-phases %standard-phases
7678 (replace 'check
7679 (lambda _
7680 (zero? (system* "py.test" "-v")))))))
7681 (native-inputs
7682 `(("python-pytest" ,python-pytest)))
7683 (propagated-inputs
7684 `(("python-args" ,python-args)))
7685 (home-page "https://github.com/kennethreitz/clint")
7686 (synopsis "Command-line interface tools")
7687 (description
7688 "Clint is a Python module filled with a set of tools for developing
7689command-line applications, including tools for colored and indented
7690output, progress bar display, and pipes.")
7691 (license license:isc)))
7692
7693(define-public python2-clint
7694 (package-with-python2 python-clint))
7695
7696(define-public python-astor
7697 (package
7698 (name "python-astor")
7699 (version "0.5")
7700 (source (origin
7701 (method url-fetch)
7702 (uri (pypi-uri "astor" version))
7703 (sha256
7704 (base32
7705 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7706 (build-system python-build-system)
7707 (home-page "https://github.com/berkerpeksag/astor")
7708 (synopsis "Read and write Python ASTs")
7709 (description
7710 "Astor is designed to allow easy manipulation of Python source via the
7711Abstract Syntax Tree.")
7712 (license license:bsd-3)))
7713
7714(define-public python2-astor
7715 (package-with-python2 python-astor))
7716
7717(define-public python-rply
7718 (package
7719 (name "python-rply")
7720 (version "0.7.5")
7721 (source (origin
7722 (method url-fetch)
7723 (uri (pypi-uri "rply" version))
7724 (sha256
7725 (base32
7726 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
7727 (build-system python-build-system)
7728 (propagated-inputs
7729 `(("python-appdirs" ,python-appdirs)))
7730 (home-page "https://github.com/alex/rply")
7731 (synopsis "Parser generator for Python")
7732 (description
7733 "This package provides a pure Python based parser generator, that also
7734works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7735with a new public API, and RPython support.")
7736 (license license:bsd-3)))
7737
7738(define-public python2-rply
7739 (package-with-python2 python-rply))
7740
7741(define-public python-hy
7742 (package
7743 (name "python-hy")
7744 (version "0.13.0")
7745 (source (origin
7746 (method url-fetch)
7747 (uri (pypi-uri "hy" version))
7748 (sha256
7749 (base32
7750 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
7751 (build-system python-build-system)
7752 (arguments
7753 '(#:phases
7754 (modify-phases %standard-phases
7755 (replace 'check
7756 (lambda _
7757 ;; Tests require write access to HOME.
7758 (setenv "HOME" "/tmp")
7759 (zero? (system* "nosetests")))))))
7760 (native-inputs
7761 `(("python-coverage" ,python-coverage)
7762 ("python-nose" ,python-nose)))
7763 (propagated-inputs
7764 `(("python-astor" ,python-astor)
7765 ("python-clint" ,python-clint)
7766 ("python-rply" ,python-rply)))
7767 (home-page "http://hylang.org/")
7768 (synopsis "Lisp frontend to Python")
7769 (description
7770 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7771its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7772Python at your fingertips, in Lisp form.")
7773 (license license:expat)))
7774
7775(define-public python2-hy
7776 (package-with-python2 python-hy))
7777
7778(define-public python2-functools32
7779 (package
7780 (name "python2-functools32")
7781 (version "3.2.3-2")
7782 (source
7783 (origin
7784 (method url-fetch)
7785 (uri (pypi-uri "functools32" version))
7786 (sha256
7787 (base32
7788 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7789 (build-system python-build-system)
7790 (arguments
7791 `(#:python ,python-2
7792 #:tests? #f)) ; no test target
7793 (home-page "https://github.com/MiCHiLU/python-functools32")
7794 (synopsis
7795 "Backport of the functools module from Python 3.2.3")
7796 (description
7797 "This package is a backport of the @code{functools} module from Python
77983.2.3 for use with older versions of Python and PyPy.")
7799 (license license:expat)))
7800
7801(define-public python2-subprocess32
7802 (package
7803 (name "python2-subprocess32")
7804 (version "3.2.7")
7805 (source (origin
7806 (method url-fetch)
7807 (uri (pypi-uri "subprocess32" version))
7808 (sha256
7809 (base32
7810 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
7811 (patches
7812 (search-patches "python2-subprocess32-disable-input-test.patch"))))
7813 (build-system python-build-system)
7814 (arguments
7815 `(#:python ,python-2
7816 ;; The test suite fails with Python > 2.7.13:
7817 ;; import test.support
7818 ;; ImportError: No module named support
7819 #:tests? #f
7820 #:phases
7821 (modify-phases %standard-phases
7822 (add-after 'unpack 'patch-/bin/sh
7823 (lambda _
7824 (substitute* '("subprocess32.py"
7825 "test_subprocess32.py")
7826 (("/bin/sh") (which "sh")))
7827 #t)))))
7828 (home-page "https://github.com/google/python-subprocess32")
7829 (synopsis "Backport of the subprocess module from Python 3.2")
7830 (description
7831 "This is a backport of the @code{subprocess} standard library module
7832from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
7833new features. On POSIX systems it is guaranteed to be reliable when used
7834in threaded applications. It includes timeout support from Python 3.3 but
7835otherwise matches 3.2’s API.")
7836 (license license:psfl)))
7837
7838(define-public python2-futures
7839 (package
7840 (name "python2-futures")
7841 (version "3.0.5")
7842 (source
7843 (origin
7844 (method url-fetch)
7845 (uri (pypi-uri "futures" version))
7846 (sha256
7847 (base32
7848 "1pw1z4329xvlabdpwqa6b7v2fxf7hl64m4cgr22ckbym8m8m4hh5"))))
7849 (build-system python-build-system)
7850 (arguments `(#:python ,python-2))
7851 (home-page "https://github.com/agronholm/pythonfutures")
7852 (synopsis
7853 "Backport of the concurrent.futures package from Python 3.2")
7854 (description
7855 "The concurrent.futures module provides a high-level interface for
7856asynchronously executing callables. This package backports the
7857concurrent.futures package from Python 3.2")
7858 (license license:bsd-3)))
7859
7860(define-public python-promise
7861 (package
7862 (name "python-promise")
7863 (version "0.4.2")
7864 (source
7865 (origin
7866 (method url-fetch)
7867 (uri (pypi-uri "promise" version))
7868 (sha256
7869 (base32
7870 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7871 (build-system python-build-system)
7872 ;; Tests wants python-futures, which is a python2 only program, and
7873 ;; can't be found by python-promise at test time.
7874 (arguments `(#:tests? #f))
7875 (home-page "https://github.com/syrusakbary/promise")
7876 (synopsis "Promises/A+ implementation for Python")
7877 (description
7878 "Promises/A+ implementation for Python")
7879 (properties `((python2-variant . ,(delay python2-promise))))
7880 (license license:expat)))
7881
7882(define-public python2-promise
7883 (let ((promise (package-with-python2
7884 (strip-python2-variant python-promise))))
7885 (package (inherit promise)
7886 (arguments (substitute-keyword-arguments (package-arguments promise)
7887 ((#:tests? _) #t)))
7888 (native-inputs
7889 `(("python2-futures" ,python2-futures)
7890 ("python2-pytest" ,python2-pytest)
7891 ,@(package-native-inputs promise))))))
7892
7893(define-public python-colorama
7894 (package
7895 (name "python-colorama")
7896 (version "0.3.9")
7897 (source
7898 (origin
7899 (method url-fetch)
7900 (uri (pypi-uri "colorama" version))
7901 (sha256
7902 (base32
7903 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
7904 (build-system python-build-system)
7905 (synopsis "Colored terminal text rendering for Python")
7906 (description "Colorama is a Python library for rendering colored terminal
7907text.")
7908 (home-page "https://pypi.python.org/pypi/colorama")
7909 (license license:bsd-3)))
7910
7911(define-public python2-colorama
7912 (package-with-python2 python-colorama))
7913
7914(define-public python-rsa
7915 (package
7916 (name "python-rsa")
7917 (version "3.4.2")
7918 (source
7919 (origin
7920 (method url-fetch)
7921 (uri (pypi-uri "rsa" version))
7922 (sha256
7923 (base32
7924 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
7925 (build-system python-build-system)
7926 (propagated-inputs
7927 `(("python-pyasn1" ,python-pyasn1)))
7928 (synopsis "Pure-Python RSA implementation")
7929 (description "Python-RSA is a pure-Python RSA implementation. It supports
7930encryption and decryption, signing and verifying signatures, and key
7931generation according to PKCS#1 version 1.5. It can be used as a Python
7932library as well as on the command line.")
7933 (home-page "https://stuvel.eu/rsa")
7934 (license license:asl2.0)))
7935
7936(define-public python2-rsa
7937 (package-with-python2 python-rsa))
7938
7939(define-public python-pluggy
7940 (package
7941 (name "python-pluggy")
7942 (version "0.6.0")
7943 (source
7944 (origin
7945 (method url-fetch)
7946 (uri (pypi-uri "pluggy" version))
7947 (sha256
7948 (base32
7949 "1zqckndfn85l1cd8pndw212zg1bq9fkg1nnj32kp2mppppsyg2kz"))))
7950 (build-system python-build-system)
7951 (synopsis "Plugin and hook calling mechanism for Python")
7952 (description "Pluggy is an extraction of the plugin manager as used by
7953Pytest but stripped of Pytest specific details.")
7954 (home-page "https://pypi.python.org/pypi/pluggy")
7955 (license license:expat)))
7956
7957(define-public python2-pluggy
7958 (package-with-python2 python-pluggy))
7959
7960(define-public python-tox
7961 (package
7962 (name "python-tox")
7963 (version "2.8.1")
7964 (source
7965 (origin
7966 (method url-fetch)
7967 (uri (pypi-uri "tox" version))
7968 (sha256
7969 (base32
7970 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
7971 (build-system python-build-system)
7972 (arguments
7973 ;; FIXME: Tests require pytest-timeout, which itself requires
7974 ;; pytest>=2.8.0 for installation.
7975 '(#:tests? #f))
7976 (propagated-inputs
7977 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
7978 ("python-py" ,python-py)
7979 ("python-virtualenv" ,python-virtualenv)))
7980 (native-inputs
7981 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
7982 ("python-pytest" ,python-pytest) ; >= 2.3.5
7983 ("python-setuptools-scm" ,python-setuptools-scm)))
7984 (home-page "http://tox.testrun.org/")
7985 (synopsis "Virtualenv-based automation of test activities")
7986 (description "Tox is a generic virtualenv management and test command line
7987tool. It can be used to check that a package installs correctly with
7988different Python versions and interpreters, or run tests in each type of
7989supported environment, or act as a frontend to continuous integration
7990servers.")
7991 (license license:expat)))
7992
7993(define-public python2-tox
7994 (package-with-python2 python-tox))
7995
7996(define-public python-jmespath
7997 (package
7998 (name "python-jmespath")
7999 (version "0.9.3")
8000 (source
8001 (origin
8002 (method url-fetch)
8003 (uri (pypi-uri "jmespath" version))
8004 (sha256
8005 (base32
8006 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8007 (build-system python-build-system)
8008 (native-inputs
8009 `(("python-nose" ,python-nose)))
8010 (synopsis "JSON Matching Expressions")
8011 (description "JMESPath (pronounced “james path”) is a Python library that
8012allows one to declaratively specify how to extract elements from a JSON
8013document.")
8014 (home-page "https://github.com/jmespath/jmespath.py")
8015 (license license:expat)))
8016
8017(define-public python2-jmespath
8018 (package-with-python2 python-jmespath))
8019
8020(define-public python-botocore
8021 (package
8022 (name "python-botocore")
8023 (version "1.8.43")
8024 (source
8025 (origin
8026 (method url-fetch)
8027 (uri (pypi-uri "botocore" version))
8028 (sha256
8029 (base32
8030 "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg"))))
8031 (build-system python-build-system)
8032 (arguments
8033 ;; FIXME: Many tests are failing.
8034 '(#:tests? #f))
8035 (propagated-inputs
8036 `(("python-dateutil" ,python-dateutil)
8037 ("python-docutils" ,python-docutils)
8038 ("python-jmespath" ,python-jmespath)))
8039 (native-inputs
8040 `(("python-mock" ,python-mock)
8041 ("python-nose" ,python-nose)
8042 ("behave" ,behave)
8043 ("python-tox" ,python-tox)
8044 ("python-wheel" ,python-wheel)))
8045 (home-page "https://github.com/boto/botocore")
8046 (synopsis "Low-level interface to AWS")
8047 (description "Botocore is a Python library that provides a low-level
8048interface to the Amazon Web Services (AWS) API.")
8049 (license license:asl2.0)))
8050
8051(define-public python2-botocore
8052 (package-with-python2 python-botocore))
8053
8054(define-public python-xdo
8055 (package
8056 (name "python-xdo")
8057 (version "0.3")
8058 (source (origin
8059 (method url-fetch)
8060 (uri (string-append
8061 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8062 "python-xdo_" version ".orig.tar.gz"))
8063 (sha256
8064 (base32
8065 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8066 (build-system python-build-system)
8067 (arguments
8068 '(#:phases
8069 (modify-phases %standard-phases
8070 (add-before 'install 'patch-libxdo-path
8071 ;; Hardcode the path of dynamically loaded libxdo library.
8072 (lambda* (#:key inputs #:allow-other-keys)
8073 (let ((libxdo (string-append
8074 (assoc-ref inputs "xdotool")
8075 "/lib/libxdo.so")))
8076 (substitute* "xdo/_xdo.py"
8077 (("find_library\\(\"xdo\"\\)")
8078 (simple-format #f "\"~a\"" libxdo)))
8079 #t))))
8080 #:tests? #f)) ; no tests provided
8081 (propagated-inputs
8082 `(("python-six" ,python-six)))
8083 (inputs
8084 `(("xdotool" ,xdotool)
8085 ("libX11" ,libx11)))
8086 (home-page "https://tracker.debian.org/pkg/python-xdo")
8087 (synopsis "Python library for simulating X11 keyboard/mouse input")
8088 (description "Provides bindings to libxdo for manipulating X11 via simulated
8089input. (Note that this is mostly a legacy library; you may wish to look at
8090python-xdo for newer bindings.)")
8091 (license license:bsd-3)))
8092
8093(define-public python2-xdo
8094 (package-with-python2 python-xdo))
8095
8096(define-public python-mako
8097 (package
8098 (name "python-mako")
8099 (version "1.0.7")
8100 (source
8101 (origin
8102 (method url-fetch)
8103 (uri (pypi-uri "Mako" version))
8104 (sha256
8105 (base32
8106 "1bi5gnr8r8dva06qpyx4kgjc6spm2k1y908183nbbaylggjzs0jf"))))
8107 (build-system python-build-system)
8108 (propagated-inputs
8109 `(("python-markupsafe" ,python-markupsafe)))
8110 (native-inputs
8111 `(("python-mock" ,python-mock)
8112 ("python-nose" ,python-nose)
8113 ("python-pytest" ,python-pytest)))
8114 (home-page "http://www.makotemplates.org/")
8115 (synopsis "Templating language for Python")
8116 (description "Mako is a templating language for Python that compiles
8117templates into Python modules.")
8118 (license license:expat)))
8119
8120(define-public python2-mako
8121 (package-with-python2 python-mako))
8122
8123(define-public python-waitress
8124 (package
8125 (name "python-waitress")
8126 (version "1.1.0")
8127 (source
8128 (origin
8129 (method url-fetch)
8130 (uri (pypi-uri "waitress" version))
8131 (patches (search-patches "python-waitress-fix-tests.patch"))
8132 (sha256
8133 (base32
8134 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8135 (build-system python-build-system)
8136 (home-page "https://github.com/Pylons/waitress")
8137 (synopsis "Waitress WSGI server")
8138 (description "Waitress is meant to be a production-quality pure-Python WSGI
8139server with very acceptable performance.")
8140 (license license:zpl2.1)))
8141
8142(define-public python2-waitress
8143 (package-with-python2 python-waitress))
8144
8145(define-public python-pyquery
8146 (package
8147 (name "python-pyquery")
8148 (version "1.2.17")
8149 (source
8150 (origin
8151 (method url-fetch)
8152 (uri (pypi-uri "pyquery" version))
8153 (sha256
8154 (base32
8155 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8156 (build-system python-build-system)
8157 (native-inputs
8158 `(("python-webob" ,python-webob)
8159 ("python-webtest" ,python-webtest)))
8160 (propagated-inputs
8161 `(("python-lxml" ,python-lxml)
8162 ("python-cssselect" ,python-cssselect)))
8163 (home-page "https://github.com/gawel/pyquery")
8164 (synopsis "Make jQuery-like queries on xml documents")
8165 (description "pyquery allows you to make jQuery queries on xml documents.
8166The API is as much as possible the similar to jQuery. pyquery uses lxml for
8167fast xml and html manipulation.")
8168 (license license:bsd-3)))
8169
8170(define-public python2-pyquery
8171 (package-with-python2 python-pyquery))
8172
8173(define-public python-anyjson
8174 (package
8175 (name "python-anyjson")
8176 (version "0.3.3")
8177 (source
8178 (origin
8179 (method url-fetch)
8180 (uri (pypi-uri "anyjson" version))
8181 (sha256
8182 (base32
8183 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8184 (build-system python-build-system)
8185 (arguments
8186 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8187 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8188 ;; whatever) so this transformation needs to be done before the tests
8189 ;; can be run. Maybe we could add a build step to transform beforehand
8190 ;; but it could be annoying/difficult.
8191 ;; We can enable tests for the Python 2 version, though, and do below.
8192 #:tests? #f))
8193 (home-page "https://bitbucket.org/runeh/anyjson/")
8194 (synopsis
8195 "Wraps best available JSON implementation in a common interface")
8196 (description
8197 "Anyjson loads whichever is the fastest JSON module installed
8198and provides a uniform API regardless of which JSON implementation is used.")
8199 (license license:bsd-3)
8200 (properties `((python2-variant . ,(delay python2-anyjson))))))
8201
8202(define-public python2-anyjson
8203 (let ((anyjson (package-with-python2
8204 (strip-python2-variant python-anyjson))))
8205 (package
8206 (inherit anyjson)
8207 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8208 #:tests? #t
8209 ,@(package-arguments anyjson)))
8210 (native-inputs `(("python2-nose" ,python2-nose))))))
8211
8212(define-public python-amqp
8213 (package
8214 (name "python-amqp")
8215 (version "1.4.9")
8216 (source
8217 (origin
8218 (method url-fetch)
8219 (uri (pypi-uri "amqp" version))
8220 (sha256
8221 (base32
8222 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
8223 (build-system python-build-system)
8224 (native-inputs
8225 `(("python-nose" ,python-nose)
8226 ("python-mock" ,python-mock)))
8227 (home-page "https://github.com/celery/py-amqp")
8228 (synopsis
8229 "Low-level AMQP client for Python (fork of amqplib)")
8230 (description
8231 "This is a fork of amqplib which was originally written by Barry Pederson.
8232It is maintained by the Celery project, and used by kombu as a pure python
8233alternative when librabbitmq is not available.")
8234 (license license:lgpl2.1+)
8235 (properties `((python2-variant . ,(delay python2-amqp))))))
8236
8237(define-public python2-amqp
8238 (let ((amqp (package-with-python2
8239 (strip-python2-variant python-amqp))))
8240 (package
8241 (inherit amqp)
8242 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8243 ;; unmaintained. Weirdly, does not do this on the python 3
8244 ;; version?
8245 #:tests? #f
8246 ,@(package-arguments amqp))))))
8247
8248(define-public python-txamqp
8249 (package
8250 (name "python-txamqp")
8251 (version "0.8.2")
8252 (source
8253 (origin
8254 (method url-fetch)
8255 (uri (pypi-uri "txAMQP" version))
8256 (sha256
8257 (base32
8258 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8259 (build-system python-build-system)
8260 (propagated-inputs
8261 `(("python-six" ,python-six)
8262 ("python-twisted" ,python-twisted)))
8263 (home-page "https://github.com/txamqp/txamqp")
8264 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8265 (description
8266 "This package provides a Python library for communicating with AMQP peers
8267and brokers using the asynchronous networking framework Twisted. It contains
8268all the necessary code to connect, send and receive messages to/from an
8269AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8270also includes support for using Thrift RPC over AMQP in Twisted
8271applications.")
8272 (license license:asl2.0)))
8273
8274(define-public python2-txamqp
8275 (package-with-python2 python-txamqp))
8276
8277(define-public python-kombu
8278 (package
8279 (name "python-kombu")
8280 (version "3.0.37")
8281 (source
8282 (origin
8283 (method url-fetch)
8284 (uri (pypi-uri "kombu" version))
8285 (sha256
8286 (base32
8287 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
8288 (build-system python-build-system)
8289 (native-inputs
8290 `(("python-mock" ,python-mock)
8291 ("python-nose" ,python-nose)))
8292 (propagated-inputs
8293 `(("python-anyjson" ,python-anyjson)
8294 ("python-amqp" ,python-amqp)
8295 ("python-redis" ,python-redis)))
8296 (home-page "http://kombu.readthedocs.org")
8297 (synopsis "Message passing library for Python")
8298 (description "The aim of Kombu is to make messaging in Python as easy as
8299possible by providing an idiomatic high-level interface for the AMQ protocol,
8300and also provide proven and tested solutions to common messaging problems.
8301AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8302message orientation, queuing, routing, reliability and security, for which the
8303RabbitMQ messaging server is the most popular implementation.")
8304 (license license:bsd-3)
8305 (properties `((python2-variant . ,(delay python2-kombu))))))
8306
8307(define-public python2-kombu
8308 (let ((kombu (package-with-python2
8309 (strip-python2-variant python-kombu))))
8310 (package
8311 (inherit kombu)
8312 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8313 ;; It works fine on the python3 variant.
8314 #:tests? #f
8315 ,@(package-arguments kombu)))
8316 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8317 ,@(package-native-inputs kombu))))))
8318
8319(define-public python-billiard
8320 (package
8321 (name "python-billiard")
8322 (version "3.3.0.23")
8323 (source
8324 (origin
8325 (method url-fetch)
8326 (uri (pypi-uri "billiard" version))
8327 (sha256
8328 (base32
8329 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
8330 (build-system python-build-system)
8331 (native-inputs
8332 `(("python-nose" ,python-nose)))
8333 (home-page "https://github.com/celery/billiard")
8334 (synopsis
8335 "Python multiprocessing fork with improvements and bugfixes")
8336 (description
8337 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8338multiprocessing package itself is a renamed and updated version of R Oudkerk's
8339pyprocessing package. This standalone variant is intended to be compatible with
8340Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8341 (license license:bsd-3)
8342 (properties `((python2-variant . ,(delay python2-billiard))))))
8343
8344(define-public python2-billiard
8345 (let ((billiard (package-with-python2
8346 (strip-python2-variant python-billiard))))
8347 (package
8348 (inherit billiard)
8349 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8350 ("python2-mock" ,python2-mock)
8351 ,@(package-native-inputs billiard))))))
8352
8353(define-public python-celery
8354 (package
8355 (name "python-celery")
8356 (version "3.1.24")
8357 (source
8358 (origin
8359 (method url-fetch)
8360 (uri (pypi-uri "celery" version))
8361 (sha256
8362 (base32
8363 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
8364 (build-system python-build-system)
8365 (arguments
8366 `(#:phases
8367 (modify-phases %standard-phases
8368 ;; These tests break with Python 3.5:
8369 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
8370 (replace 'check
8371 (lambda _
8372 (zero?
8373 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
8374 (native-inputs
8375 `(("python-nose" ,python-nose)))
8376 (propagated-inputs
8377 `(("python-pytz" ,python-pytz)
8378 ("python-billiard" ,python-billiard)
8379 ("python-kombu" ,python-kombu)))
8380 (home-page "http://celeryproject.org")
8381 (synopsis "Distributed Task Queue")
8382 (description "Celery is an asynchronous task queue/job queue based on
8383distributed message passing. It is focused on real-time operation, but
8384supports scheduling as well. The execution units, called tasks, are executed
8385concurrently on a single or more worker servers using multiprocessing,
8386Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8387synchronously (wait until ready).")
8388 (license license:bsd-3)
8389 (properties `((python2-variant . ,(delay python2-celery))))))
8390
8391(define-public python2-celery
8392 (let ((celery (package-with-python2
8393 (strip-python2-variant python-celery))))
8394 (package
8395 (inherit celery)
8396 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8397 ("python2-mock" ,python2-mock)
8398 ,@(package-native-inputs celery))))))
8399
8400(define-public python-translitcodec
8401 (package
8402 (name "python-translitcodec")
8403 (version "0.4.0")
8404 (source
8405 (origin
8406 (method url-fetch)
8407 (uri (pypi-uri "translitcodec" version))
8408 (sha256
8409 (base32
8410 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8411 (build-system python-build-system)
8412 (arguments
8413 `(#:tests? #f)) ; no tests provided
8414 (home-page
8415 "https://github.com/claudep/translitcodec")
8416 (synopsis
8417 "Unicode to 8-bit charset transliteration codec")
8418 (description
8419 "This package contains codecs for transliterating ISO 10646 texts into
8420best-effort representations using smaller coded character sets (ASCII,
8421ISO 8859, etc.).")
8422 (license license:expat)))
8423
8424(define-public python2-translitcodec
8425 (package-with-python2 python-translitcodec))
8426
8427(define-public python-editor
8428 (package
8429 (name "python-editor")
8430 (version "0.5")
8431 (source
8432 (origin
8433 (method url-fetch)
8434 (uri (pypi-uri "python-editor" version))
8435 (sha256
8436 (base32
8437 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8438 (build-system python-build-system)
8439 (home-page
8440 "https://github.com/fmoo/python-editor")
8441 (synopsis
8442 "Programmatically open an editor, capture the result")
8443 (description
8444 "python-editor is a library that provides the editor module for
8445programmatically interfacing with your system's $EDITOR.")
8446 (license license:asl2.0)))
8447
8448(define-public python2-editor
8449 (package-with-python2 python-editor))
8450
8451(define-public python-sphinxcontrib-programoutput
8452 (package
8453 (name "python-sphinxcontrib-programoutput")
8454 (version "0.10")
8455 (source (origin
8456 (method url-fetch)
8457 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8458 (sha256
8459 (base32
8460 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
8461 (build-system python-build-system)
8462 (arguments
8463 ;; FIXME: Many tests are failing and the upstream is gone.
8464 '(#:tests? #f))
8465 (propagated-inputs
8466 `(("python-sphinx" ,python-sphinx)))
8467 (synopsis "Sphinx extension to include program output")
8468 (description "A Sphinx extension to literally insert the output of arbitrary
8469commands into documents, helping you to keep your command examples up to date.")
8470 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8471 (license license:bsd-2)))
8472
8473(define-public python2-sphinxcontrib-programoutput
8474 (package-with-python2 python-sphinxcontrib-programoutput))
8475
8476(define-public python-sphinx-repoze-autointerface
8477 (package
8478 (name "python-sphinx-repoze-autointerface")
8479 (version "0.8")
8480 (source (origin
8481 (method url-fetch)
8482 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8483 (sha256
8484 (base32
8485 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8486 (build-system python-build-system)
8487 (arguments '(#:tests? #f)) ; No tests.
8488 (propagated-inputs
8489 `(("python-sphinx" ,python-sphinx)
8490 ("python-zope-interface" ,python-zope-interface)))
8491 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8492 (description "This package defines an extension for the Sphinx documentation
8493system. The extension allows generation of API documentation by
8494introspection of @code{zope.interface} instances in code.")
8495 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8496 (license license:repoze)))
8497
8498(define-public python2-sphinx-repoze-autointerface
8499 (package-with-python2 python-sphinx-repoze-autointerface))
8500
8501(define-public python-vobject
8502 (package
8503 (name "python-vobject")
8504 (version "0.9.5")
8505 (source (origin
8506 (method url-fetch)
8507 (uri (pypi-uri "vobject" version))
8508 (sha256
8509 (base32
8510 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
8511 (build-system python-build-system)
8512 (arguments
8513 '(;; The test suite relies on some non-portable Windows interfaces.
8514 #:tests? #f))
8515 (propagated-inputs
8516 `(("python-dateutil" ,python-dateutil)
8517 ("python-pyicu" ,python-pyicu)))
8518 (synopsis "Parse and generate vCard and vCalendar files")
8519 (description "Vobject is intended to be a full featured Python package for
8520parsing and generating vCard and vCalendar files. Currently, iCalendar files
8521are supported and well tested. vCard 3.0 files are supported, and all data
8522should be imported, but only a few components are understood in a sophisticated
8523way.")
8524 (home-page "http://eventable.github.io/vobject/")
8525 (license license:asl2.0)))
8526
8527(define-public python2-vobject
8528 (package-with-python2 python-vobject))
8529
8530(define-public python-munkres
8531 (package
8532 (name "python-munkres")
8533 (version "1.0.8")
8534 (source (origin
8535 (method url-fetch)
8536 (uri (pypi-uri "munkres" version))
8537 (sha256
8538 (base32
8539 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
8540 (build-system python-build-system)
8541 (arguments
8542 '(#:tests? #f)) ; no test suite
8543 (home-page "http://software.clapper.org/munkres/")
8544 (synopsis "Implementation of the Munkres algorithm")
8545 (description "The Munkres module provides an implementation of the Munkres
8546algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8547useful for solving the Assignment Problem.")
8548 (license license:bsd-3)))
8549
8550(define-public python2-munkres
8551 (package-with-python2 python-munkres))
8552
8553(define-public python-whoosh
8554 (package
8555 (name "python-whoosh")
8556 (version "2.7.4")
8557 (source
8558 (origin
8559 (method url-fetch)
8560 (uri (pypi-uri "Whoosh" version))
8561 (sha256
8562 (base32
8563 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8564 (build-system python-build-system)
8565 (native-inputs
8566 `(("python-pytest" ,python-pytest)))
8567 (home-page "https://bitbucket.org/mchaput/whoosh")
8568 (synopsis "Full text indexing, search, and spell checking library")
8569 (description
8570 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8571checking library.")
8572 (license license:bsd-2)))
8573
8574(define-public python2-whoosh
8575 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8576 (package (inherit whoosh)
8577 (propagated-inputs
8578 `(("python2-backport-ssl-match-hostname"
8579 ,python2-backport-ssl-match-hostname)
8580 ,@(package-propagated-inputs whoosh))))))
8581
8582(define-public python-pathlib
8583 (package
8584 (name "python-pathlib")
8585 (version "1.0.1")
8586 (source (origin
8587 (method url-fetch)
8588 (uri (pypi-uri "pathlib" version))
8589 (sha256
8590 (base32
8591 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8592 (build-system python-build-system)
8593 ;; The tests depend on the internal "test" module, which does not provide
8594 ;; a stable interface.
8595 (arguments `(#:tests? #f))
8596 (home-page "https://pathlib.readthedocs.org/")
8597 (synopsis "Object-oriented file system paths")
8598 (description "Pathlib offers a set of classes to handle file system paths.
8599It offers the following advantages over using string objects:
8600
8601@enumerate
8602@item No more cumbersome use of os and os.path functions. Everything can
8603be done easily through operators, attribute accesses, and method calls.
8604@item Embodies the semantics of different path types. For example,
8605comparing Windows paths ignores casing.
8606@item Well-defined semantics, eliminating any inconsistencies or
8607ambiguities (forward vs. backward slashes, etc.).
8608@end enumerate
8609
8610Note: In Python 3.4, pathlib is now part of the standard library. For other
8611Python versions please consider python-pathlib2 instead, which tracks the
8612standard library module. This module (python-pathlib) isn't maintained
8613anymore.")
8614 (license license:expat)))
8615
8616(define-public python2-pathlib
8617 (package-with-python2 python-pathlib))
8618
8619(define-public python2-pathlib2
8620 (package
8621 (name "python2-pathlib2")
8622 (version "2.3.2")
8623 (source (origin
8624 (method url-fetch)
8625 (uri (pypi-uri "pathlib2" version))
8626 (sha256
8627 (base32
8628 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
8629 (build-system python-build-system)
8630 ;; We only need the the Python 2 variant, since for Python 3 our minimum
8631 ;; version is 3.4 which already includes this package as part of the
8632 ;; standard library.
8633 (arguments
8634 `(#:python ,python-2))
8635 (propagated-inputs
8636 `(("python2-scandir" ,python2-scandir)
8637 ("python2-six" ,python2-six)))
8638 (home-page "https://pypi.python.org/pypi/pathlib2/")
8639 (synopsis "Object-oriented file system paths - backport of standard
8640pathlib module")
8641 (description "The goal of pathlib2 is to provide a backport of standard
8642pathlib module which tracks the standard library module, so all the newest
8643features of the standard pathlib can be used also on older Python versions.
8644
8645Pathlib offers a set of classes to handle file system paths. It offers the
8646following advantages over using string objects:
8647
8648@enumerate
8649@item No more cumbersome use of os and os.path functions. Everything can
8650be done easily through operators, attribute accesses, and method calls.
8651@item Embodies the semantics of different path types. For example,
8652comparing Windows paths ignores casing.
8653@item Well-defined semantics, eliminating any inconsistencies or
8654ambiguities (forward vs. backward slashes, etc.).
8655@end enumerate")
8656 (license license:expat)))
8657
8658(define-public python-jellyfish
8659 (package
8660 (name "python-jellyfish")
8661 (version "0.5.6")
8662 (source (origin
8663 (method url-fetch)
8664 (uri (pypi-uri "jellyfish" version))
8665 (sha256
8666 (base32
8667 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
8668 (build-system python-build-system)
8669 (native-inputs
8670 `(("python-pytest" ,python-pytest)))
8671 (home-page "https://github.com/jamesturk/jellyfish")
8672 (synopsis "Approximate and phonetic matching of strings")
8673 (description "Jellyfish uses a variety of string comparison and phonetic
8674encoding algorithms to do fuzzy string matching.")
8675 (license license:bsd-2)
8676 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8677
8678(define-public python2-jellyfish
8679 (let ((jellyfish (package-with-python2
8680 (strip-python2-variant python-jellyfish))))
8681 (package (inherit jellyfish)
8682 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
8683 ,@(package-native-inputs jellyfish))))))
8684
8685(define-public python2-unicodecsv
8686 (package
8687 (name "python2-unicodecsv")
8688 (version "0.14.1")
8689 (source (origin
8690 (method url-fetch)
8691 ;; The test suite is not included in the PyPi release.
8692 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8693 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8694 "archive/" version ".tar.gz"))
8695 (file-name (string-append name "-" version ".tar.gz"))
8696 (sha256
8697 (base32
8698 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8699 (build-system python-build-system)
8700 (arguments
8701 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8702 #:python ,python-2))
8703 (native-inputs
8704 `(("python2-unittest2" ,python2-unittest2)))
8705 (home-page "https://github.com/jdunck/python-unicodecsv")
8706 (synopsis "Unicode CSV module for Python 2")
8707 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8708module, adding support for Unicode strings.")
8709 (license license:bsd-2)))
8710
8711(define-public python-rarfile
8712 (package
8713 (name "python-rarfile")
8714 (version "2.8")
8715 (source (origin
8716 (method url-fetch)
8717 (uri (pypi-uri "rarfile" version))
8718 (sha256
8719 (base32
8720 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
8721 (build-system python-build-system)
8722 (arguments
8723 '(#:phases
8724 (modify-phases %standard-phases
8725 (replace 'check
8726 ;; Many tests fail, but the installation proceeds.
8727 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
8728 (native-inputs
8729 `(("which" ,which))) ; required for tests
8730 (propagated-inputs
8731 `(("libarchive" ,libarchive)))
8732 (home-page "https://github.com/markokr/rarfile")
8733 (synopsis "RAR archive reader for Python")
8734 (description "This is Python module for RAR archive reading. The interface
8735is made as zipfile like as possible.")
8736 (license license:isc)))
8737
8738(define-public python2-rarfile
8739 (package-with-python2 python-rarfile))
8740
8741(define-public python-magic
8742 (package
8743 (name "python-magic")
8744 (version "0.4.15")
8745 (source
8746 (origin
8747 (method url-fetch)
8748 (uri (pypi-uri "python-magic" version))
8749 (sha256
8750 (base32
8751 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
8752 (file-name (string-append name "-" version "-checkout"))))
8753 (build-system python-build-system)
8754 (arguments
8755 ;; The tests are unreliable, so don't run them. The tests fail
8756 ;; under Python3 because they were written for Python2 and
8757 ;; contain import statements that do not work in Python3. One of
8758 ;; the tests fails under Python2 because its assertions are
8759 ;; overly stringent; it relies on comparing output strings which
8760 ;; are brittle and can change depending on the version of
8761 ;; libmagic being used and the system on which the test is
8762 ;; running. In my case, under GuixSD 0.10.0, only one test
8763 ;; failed, and it seems to have failed only because the version
8764 ;; of libmagic that is packaged in Guix outputs a slightly
8765 ;; different (but not wrong) string than the one that the test
8766 ;; expected.
8767 '(#:tests? #f
8768 #:phases (modify-phases %standard-phases
8769 ;; Replace a specific method call with a hard-coded
8770 ;; path to the necessary libmagic.so file in the
8771 ;; store. If we don't do this, then the method call
8772 ;; will fail to find the libmagic.so file, which in
8773 ;; turn will cause any application using
8774 ;; python-magic to fail.
8775 (add-before 'build 'hard-code-path-to-libmagic
8776 (lambda* (#:key inputs #:allow-other-keys)
8777 (let ((file (assoc-ref inputs "file")))
8778 (substitute* "magic.py"
8779 (("ctypes.util.find_library\\('magic'\\)")
8780 (string-append "'" file "/lib/libmagic.so'")))
8781 #t)))
8782 (add-before 'install 'disable-egg-compression
8783 (lambda _
8784 (let ((port (open-file "setup.cfg" "a")))
8785 (display "\n[easy_install]\nzip_ok = 0\n"
8786 port)
8787 (close-port port)
8788 #t))))))
8789 (inputs
8790 ;; python-magic needs to be able to find libmagic.so.
8791 `(("file" ,file)))
8792 (home-page
8793 "https://github.com/ahupp/python-magic")
8794 (synopsis
8795 "File type identification using libmagic")
8796 (description
8797 "This module uses ctypes to access the libmagic file type
8798identification library. It makes use of the local magic database and
8799supports both textual and MIME-type output. Note that this module and
8800the python-file module both provide a \"magic.py\" file; these two
8801modules, which are different and were developed separately, both serve
8802the same purpose: to provide Python bindings for libmagic.")
8803 (license license:expat)))
8804
8805(define-public python2-magic
8806 (package-with-python2 python-magic))
8807
8808(define-public python2-s3cmd
8809 (package
8810 (name "python2-s3cmd")
8811 (version "1.6.1")
8812 (source
8813 (origin
8814 (method url-fetch)
8815 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
8816 "s3cmd-" version ".tar.gz"))
8817 (sha256
8818 (base32
8819 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8820 (build-system python-build-system)
8821 (arguments
8822 ;; s3cmd is written for python2 only and contains no tests.
8823 `(#:python ,python-2
8824 #:tests? #f))
8825 (propagated-inputs
8826 `(("python2-dateutil" ,python2-dateutil)
8827 ;; The python-file package also provides a magic.py module.
8828 ;; This is an unfortunate state of affairs; however, s3cmd
8829 ;; fails to install if it cannot find specifically the
8830 ;; python-magic package. Thus we include it, instead of using
8831 ;; python-file. Ironically, s3cmd sometimes works better
8832 ;; without libmagic bindings at all:
8833 ;; https://github.com/s3tools/s3cmd/issues/198
8834 ("python2-magic" ,python2-magic)))
8835 (home-page "http://s3tools.org/s3cmd")
8836 (synopsis "Command line tool for S3-compatible storage services")
8837 (description
8838 "S3cmd is a command line tool for uploading, retrieving and managing data
8839in storage services that are compatible with the Amazon Simple Storage
8840Service (S3) protocol, including S3 itself. It supports rsync-like backup,
8841GnuPG encryption, and more. It also supports management of Amazon's
8842CloudFront content delivery network.")
8843 (license license:gpl2+)))
8844
8845(define-public python-pkgconfig
8846 (package
8847 (name "python-pkgconfig")
8848 (version "1.3.1")
8849 (source
8850 (origin
8851 (method url-fetch)
8852 (uri (pypi-uri "pkgconfig" version))
8853 (sha256
8854 (base32
8855 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
8856 (build-system python-build-system)
8857 (native-inputs
8858 `(("python-nose" ,python-nose)))
8859 (inputs
8860 `(("pkg-config" ,pkg-config)))
8861 (arguments
8862 `(#:phases
8863 (modify-phases %standard-phases
8864 (add-before 'build 'patch
8865 ;; Hard-code the path to pkg-config.
8866 (lambda _
8867 (substitute* "pkgconfig/pkgconfig.py"
8868 (("cmd = 'pkg-config")
8869 (string-append "cmd = '" (which "pkg-config"))))
8870 #t))
8871 (replace 'check
8872 (lambda _
8873 (invoke "nosetests" "test.py"))))))
8874 (home-page "https://github.com/matze/pkgconfig")
8875 (synopsis "Python interface for pkg-config")
8876 (description "This module provides a Python interface to pkg-config. It
8877can be used to find all pkg-config packages, check if a package exists,
8878check if a package meets certain version requirements, query CFLAGS and
8879LDFLAGS and parse the output to build extensions with setup.py.")
8880 (license license:expat)))
8881
8882(define-public python2-pkgconfig
8883 (package-with-python2 python-pkgconfig))
8884
8885(define-public python-bz2file
8886 (package
8887 (name "python-bz2file")
8888 (version "0.98")
8889 (source
8890 (origin
8891 (method url-fetch)
8892 (uri (pypi-uri "bz2file" version))
8893 (sha256
8894 (base32
8895 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
8896 (build-system python-build-system)
8897 (arguments
8898 `(#:tests? #f)) ; Tests use deprecated python modules.
8899 (home-page "https://github.com/nvawda/bz2file")
8900 (synopsis "Read and write bzip2-compressed files")
8901 (description
8902 "Bz2file is a Python library for reading and writing bzip2-compressed
8903files. It contains a drop-in replacement for the I/O interface in the
8904standard library's @code{bz2} module, including features from the latest
8905development version of CPython that are not available in older releases.")
8906 (license license:asl2.0)
8907 (properties `((python2-variant . ,(delay python2-bz2file))))))
8908
8909(define-public python2-bz2file
8910 (let ((base (package-with-python2
8911 (strip-python2-variant python-bz2file))))
8912 (package
8913 (inherit base)
8914 (arguments
8915 `(#:python ,python-2
8916 #:phases
8917 (modify-phases %standard-phases
8918 ;; 'python setup.py test' does not work as of 0.98.
8919 ;; There is only the one test file, so we run it directly.
8920 (replace 'check
8921 (lambda _ (zero? (system* "python"
8922 "test_bz2file.py"))))))))))
8923
8924(define-public python-future
8925 (package
8926 (name "python-future")
8927 (version "0.16.0")
8928 (source
8929 (origin
8930 (method url-fetch)
8931 (uri (pypi-uri "future" version))
8932 (sha256
8933 (base32
8934 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
8935 (build-system python-build-system)
8936 ;; Many tests connect to the network or are otherwise flawed.
8937 ;; https://github.com/PythonCharmers/python-future/issues/210
8938 (arguments
8939 `(#:tests? #f))
8940 (home-page "http://python-future.org")
8941 (synopsis "Single-source support for Python 3 and 2")
8942 (description
8943 "@code{python-future} is the missing compatibility layer between Python 2 and
8944Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
8945to support both Python 2 and Python 3 with minimal overhead.")
8946 (license license:expat)))
8947
8948(define-public python2-future
8949 (package-with-python2 python-future))
8950
8951(define-public python-cysignals
8952 (package
8953 (name "python-cysignals")
8954 (version "1.1.0")
8955 (source
8956 (origin
8957 (method url-fetch)
8958 (uri (pypi-uri "cysignals" version ".tar.bz2"))
8959 (sha256
8960 (base32
8961 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
8962 (build-system python-build-system)
8963 (native-inputs
8964 `(("python-cython" ,python-cython)
8965 ("python-sphinx" ,python-sphinx)))
8966 (inputs
8967 `(("pari-gp" ,pari-gp)))
8968 (arguments
8969 `(#:modules ((guix build python-build-system)
8970 ((guix build gnu-build-system) #:prefix gnu:)
8971 (guix build utils))
8972 ;; FIXME: Tests are executed after installation and currently fail
8973 ;; when not installing into standard locations; the author is working
8974 ;; on a fix.
8975 #:tests? #f
8976 #:phases
8977 (modify-phases %standard-phases
8978 (add-before
8979 'build 'configure
8980 (assoc-ref gnu:%standard-phases 'configure)))))
8981 (home-page
8982 "https://github.com/sagemath/cysignals")
8983 (synopsis
8984 "Handling of interrupts and signals for Cython")
8985 (description
8986 "The cysignals package provides mechanisms to handle interrupts (and
8987other signals and errors) in Cython code, using two related approaches,
8988for mixed Cython/Python code or external C libraries and pure Cython code,
8989respectively.")
8990 (license license:lgpl3+)))
8991
8992(define-public python2-cysignals
8993 (package-with-python2 python-cysignals))
8994
8995(define-public python2-shedskin
8996 (package
8997 (name "python2-shedskin")
8998 (version "0.9.4")
8999 (source
9000 (origin
9001 (method url-fetch)
9002 (uri (string-append "https://github.com/shedskin/shedskin/"
9003 "releases/download/v" version
9004 "/shedskin-" version ".tgz"))
9005 (sha256
9006 (base32
9007 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9008 (build-system python-build-system)
9009 (arguments
9010 `(#:python ,python-2
9011 #:phases (modify-phases %standard-phases
9012 (add-after 'unpack 'fix-resulting-include-libs
9013 (lambda* (#:key inputs #:allow-other-keys)
9014 (let ((libgc (assoc-ref inputs "libgc"))
9015 (pcre (assoc-ref inputs "pcre")))
9016 (substitute* "shedskin/makefile.py"
9017 (("variable == 'CCFLAGS':[ ]*")
9018 (string-append "variable == 'CCFLAGS':\n"
9019 " line += ' -I " pcre "/include"
9020 " -I " libgc "/include'"))
9021 (("variable == 'LFLAGS':[ ]*")
9022 (string-append "variable == 'LFLAGS':\n"
9023 " line += ' -L" pcre "/lib"
9024 " -L " libgc "/lib'")))
9025 #t))))))
9026 (inputs `(("pcre" ,pcre)
9027 ("libgc" ,libgc)))
9028 (home-page "https://shedskin.github.io/")
9029 (synopsis "Experimental Python-2 to C++ Compiler")
9030 (description (string-append "This is an experimental compiler for a subset of
9031Python. It generates C++ code and a Makefile."))
9032 (license (list license:gpl3 license:bsd-3 license:expat))))
9033
9034(define-public python2-rope
9035 (package
9036 (name "python2-rope")
9037 (version "0.10.3")
9038 (source
9039 (origin
9040 (method url-fetch)
9041 (uri (pypi-uri "rope" version))
9042 (sha256
9043 (base32
9044 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
9045 (arguments
9046 ;; Rope is currently python-2 only.
9047 ;; https://github.com/python-rope/rope/issues/57
9048 `(#:python ,python-2))
9049 (build-system python-build-system)
9050 (native-inputs
9051 `(("python2-unittest2" ,python2-unittest2)))
9052 (home-page "https://github.com/python-rope/rope")
9053 (synopsis "Refactoring library for Python")
9054 (description "Rope is a refactoring library for Python. It facilitates
9055the renaming, moving and extracting of attributes, functions, modules, fields
9056and parameters in Python 2 source code. These refactorings can also be applied
9057to occurrences in strings and comments.")
9058 (license license:gpl2)))
9059
9060(define-public python-py3status
9061 (package
9062 (name "python-py3status")
9063 (version "3.7")
9064 (source
9065 (origin
9066 (method url-fetch)
9067 (uri (pypi-uri "py3status" version))
9068 (sha256
9069 (base32
9070 "0shxcfz4wcczj0mhwp4w0dvwd2fdd9bgprq8slim1519iiqzgwhq"))))
9071 (build-system python-build-system)
9072 (inputs
9073 `(("file" ,file)))
9074 (arguments
9075 '(#:phases
9076 (modify-phases %standard-phases
9077 ;; 'file' is used for detection of configuration file encoding
9078 ;; let's make link the dependency to particular input
9079 (add-before 'build 'patch-file-path
9080 (lambda* (#:key inputs #:allow-other-keys)
9081 (let ((file-path (assoc-ref inputs "file")))
9082 (substitute* "py3status/parse_config.py"
9083 (("\\['file', '-b'")
9084 (string-append "['" file-path "/bin/file', '-b'")))
9085 #t))))
9086 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9087 (home-page "https://github.com/ultrabug/py3status")
9088 (synopsis "Extensible i3status wrapper written in Python")
9089 (description "py3status is an i3status wrapper which extends i3status
9090functionality in a modular way, allowing you to extend your panel with your
9091own code, responding to click events and updating clock every second.")
9092 (license license:bsd-3)))
9093
9094(define-public python-tblib
9095 (package
9096 (name "python-tblib")
9097 (version "1.3.2")
9098 (source (origin
9099 (method url-fetch)
9100 (uri (pypi-uri "tblib" version))
9101 (sha256 (base32
9102 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9103 (build-system python-build-system)
9104 (arguments
9105 `(#:phases
9106 (modify-phases %standard-phases
9107 (replace 'check
9108 (lambda _
9109 ;; Upstream runs tests after installation and the package itself
9110 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9111 ;; found.
9112 (setenv "PYTHONPATH"
9113 (string-append (getcwd) "/build/lib:"
9114 (getenv "PYTHONPATH")))
9115 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
9116 (native-inputs
9117 `(("python-pytest" ,python-pytest)
9118 ("python-six" ,python-six)))
9119 (home-page "https://github.com/ionelmc/python-tblib")
9120 (synopsis "Traceback serialization library")
9121 (description
9122 "Traceback serialization allows you to:
9123
9124@enumerate
9125@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9126different processes. This allows better error handling when running code over
9127multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9128
9129@item Parse traceback strings and raise with the parsed tracebacks.
9130@end enumerate\n")
9131 (license license:bsd-3)))
9132
9133(define-public python2-tblib
9134 (package-with-python2 python-tblib))
9135
9136(define-public python-greenlet
9137 (package
9138 (name "python-greenlet")
9139 (version "0.4.11")
9140 (source (origin
9141 (method url-fetch)
9142 (uri (pypi-uri "greenlet" version))
9143 (sha256
9144 (base32
9145 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
9146 (build-system python-build-system)
9147 (home-page "https://greenlet.readthedocs.io/")
9148 (synopsis "Lightweight in-process concurrent programming")
9149 (description
9150 "Greenlet package is a spin-off of Stackless, a version of CPython
9151that supports micro-threads called \"tasklets\". Tasklets run
9152pseudo-concurrently (typically in a single or a few OS-level threads) and
9153are synchronized with data exchanges on \"channels\".")
9154 (license (list license:psfl license:expat))))
9155
9156(define-public python2-greenlet
9157 (package-with-python2 python-greenlet))
9158
9159(define-public python-gevent
9160 (package
9161 (name "python-gevent")
9162 (version "1.2.2")
9163 (source (origin
9164 (method url-fetch)
9165 (uri (pypi-uri "gevent" version))
9166 (sha256
9167 (base32
9168 "0bbbjvi423y9k9xagrcsimnayaqymg6f2dj76m9z3mjpkjpci4a7"))
9169 (modules '((guix build utils)))
9170 (snippet
9171 '(begin
9172 ;; unbunding libev and c-ares
9173 (delete-file-recursively "deps")
9174 #t))))
9175 (build-system python-build-system)
9176 (arguments
9177 `(#:modules ((ice-9 ftw)
9178 (srfi srfi-26)
9179 (guix build utils)
9180 (guix build python-build-system))
9181 #:phases (modify-phases %standard-phases
9182 (add-after 'unpack 'unpack-libev
9183 (lambda* (#:key inputs #:allow-other-keys)
9184 (mkdir-p "deps/libev")
9185 ;; FIXME: gevent requires building libev, even though
9186 ;; it only links against the proper one.
9187 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
9188 "--strip-components=1" "-C" "deps/libev")))
9189 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9190 (lambda _
9191 (substitute* "src/gevent/subprocess.py"
9192 (("/bin/sh") (which "sh")))
9193 (for-each (lambda (file)
9194 (substitute* file
9195 (("/bin/sh") (which "sh"))
9196 (("/bin/true") (which "true"))))
9197 (find-files "src/greentest" "\\.py$"))
9198 #t))
9199 (add-before 'build 'do-not-use-bundled-sources
9200 (lambda _
9201 (setenv "CONFIG_SHELL" (which "bash"))
9202 (setenv "LIBEV_EMBED" "false")
9203 (setenv "CARES_EMBED" "false")
9204 (setenv "EMBED" "false")
9205 #t))
9206 (replace 'check
9207 (lambda _
9208 ;; Make sure the build directory is on PYTHONPATH.
9209 (setenv "PYTHONPATH"
9210 (string-append
9211 (getenv "PYTHONPATH") ":"
9212 (getcwd) "/build/"
9213 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9214 (with-directory-excursion "src/greentest"
9215 ;; XXX: Many tests require network access. Instead we only
9216 ;; run known-good tests. Unfortunately we cannot use
9217 ;; recursion here since this directory also contains
9218 ;; Python-version-specific subfolders.
9219 (apply invoke "python" "testrunner.py" "--config"
9220 "known_failures.py"
9221 (scandir "." (cut regexp-exec
9222 (make-regexp "test_+(subprocess|core)")
9223 <>)))))))))
9224 (propagated-inputs
9225 `(("python-greenlet" ,python-greenlet)))
9226 (native-inputs
9227 `(("libev-source" ,(package-source libev))
9228 ("python-six" ,python-six)))
9229 (inputs
9230 `(("c-ares" ,c-ares)
9231 ("libev" ,libev)))
9232 (home-page "http://www.gevent.org/")
9233 (synopsis "Coroutine-based network library")
9234 (description
9235 "gevent is a coroutine-based Python networking library that uses greenlet
9236to provide a high-level synchronous API on top of the libev event loop.")
9237 (license license:expat)))
9238
9239(define-public python2-gevent
9240 (package-with-python2 python-gevent))
9241
9242(define-public python-fastimport
9243 (package
9244 (name "python-fastimport")
9245 (version "0.9.6")
9246 (source
9247 (origin
9248 (method url-fetch)
9249 (uri (pypi-uri "fastimport" version))
9250 (sha256
9251 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9252 (build-system python-build-system)
9253 (home-page "https://github.com/jelmer/python-fastimport")
9254 (synopsis "VCS fastimport parser and generator in Python")
9255 (description "This package provides a parser for and generator of the Git
9256@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9257format.")
9258 (license license:gpl2+)))
9259
9260(define-public python2-fastimport
9261 (package-with-python2 python-fastimport))
9262
9263(define-public python-twisted
9264 (package
9265 (name "python-twisted")
9266 (version "17.1.0")
9267 (source (origin
9268 (method url-fetch)
9269 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9270 (sha256
9271 (base32
9272 "1p245mg15hkxp7hy5cyq2fgvlgjkb4cg0gwkwd148nzy1bbi3wnv"))))
9273 (build-system python-build-system)
9274 (arguments
9275 '(#:tests? #f)) ; FIXME: Some tests are failing.
9276 ;; #:phases
9277 ;; (modify-phases %standard-phases
9278 ;; (replace 'check
9279 ;; (lambda _
9280 ;; (zero? (system* "./bin/trial" "twisted")))))
9281 (propagated-inputs
9282 `(("python-zope-interface" ,python-zope-interface)
9283 ("python-incremental" ,python-incremental)
9284 ("python-constantly" ,python-constantly)
9285 ("python-automat" ,python-automat)))
9286 (home-page "https://twistedmatrix.com/")
9287 (synopsis "Asynchronous networking framework written in Python")
9288 (description
9289 "Twisted is an extensible framework for Python programming, with special
9290focus on event-based network programming and multiprotocol integration.")
9291 (license license:expat)))
9292
9293(define-public python2-twisted
9294 (package-with-python2 python-twisted))
9295
9296(define-public python-pika
9297 (package
9298 (name "python-pika")
9299 (version "0.10.0")
9300 (source
9301 (origin
9302 (method url-fetch)
9303 (uri (pypi-uri "pika" version))
9304 (sha256
9305 (base32
9306 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
9307 (build-system python-build-system)
9308 (native-inputs
9309 `(("python-pyev" ,python-pyev)
9310 ("python-tornado" ,python-tornado)
9311 ("python-twisted" ,python-twisted)))
9312 (home-page "https://pika.readthedocs.org")
9313 (synopsis "Pure Python AMQP Client Library")
9314 (description
9315 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9316Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9317network support library.")
9318 (license license:bsd-3)))
9319
9320(define-public python2-pika
9321 (package-with-python2 python-pika))
9322
9323(define-public python-ply
9324 (package
9325 (name "python-ply")
9326 (version "3.10")
9327 (source
9328 (origin
9329 (method url-fetch)
9330 (uri (pypi-uri "ply" version))
9331 (sha256
9332 (base32
9333 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9334 (build-system python-build-system)
9335 (home-page "http://www.dabeaz.com/ply/")
9336 (synopsis "Python Lex & Yacc")
9337 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9338It uses LR parsing and does extensive error checking.")
9339 (license license:bsd-3)))
9340
9341(define-public python2-ply
9342 (package-with-python2 python-ply))
9343
9344(define-public python-tabulate
9345 (package
9346 (name "python-tabulate")
9347 (version "0.7.7")
9348 (source (origin
9349 (method url-fetch)
9350 (uri (pypi-uri "tabulate" version))
9351 (sha256
9352 (base32
9353 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
9354 (build-system python-build-system)
9355 (arguments
9356 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
9357 ;; and the latest release is not tagged in the upstream repository.
9358 '(#:tests? #f))
9359 (home-page "https://bitbucket.org/astanin/python-tabulate")
9360 (synopsis "Pretty-print tabular data")
9361 (description
9362 "Tabulate is a library and command-line utility to pretty-print tabular
9363data in Python.")
9364 (license license:expat)))
9365
9366(define-public python2-tabulate
9367 (package-with-python2 python-tabulate))
9368
9369(define-public python-kazoo
9370 (package
9371 (name "python-kazoo")
9372 (version "2.4.0")
9373 (source
9374 (origin
9375 (method url-fetch)
9376 (uri (pypi-uri "kazoo" version))
9377 (sha256
9378 (base32
9379 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
9380 (build-system python-build-system)
9381 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9382 (propagated-inputs
9383 `(("python-six" ,python-six)))
9384 (home-page "https://kazoo.readthedocs.org")
9385 (synopsis "High-level Zookeeper client library")
9386 (description
9387 "Kazoo is a Python client library for the Apache Zookeeper distributed
9388application service. It is designed to be easy to use and to avoid common
9389programming errors.")
9390 (license license:asl2.0)))
9391
9392(define-public python2-kazoo
9393 (package-with-python2 python-kazoo))
9394
9395(define-public python-pykafka
9396 (package
9397 (name "python-pykafka")
9398 (version "2.4.0")
9399 (source (origin
9400 (method url-fetch)
9401 (uri (string-append
9402 "https://pypi.python.org/packages/8b/3e/"
9403 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
9404 "pykafka-" version ".tar.gz"))
9405 (sha256
9406 (base32
9407 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9408 (build-system python-build-system)
9409 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9410 (propagated-inputs
9411 `(("python-gevent" ,python-gevent)
9412 ("python-kazoo" ,python-kazoo)
9413 ("python-tabulate" ,python-tabulate)))
9414 (inputs
9415 `(("librdkafka" ,librdkafka)))
9416 (home-page "https://pykafka.readthedocs.io/")
9417 (synopsis "Apache Kafka client for Python")
9418 (description
9419 "PyKafka is a client for the Apache Kafka distributed messaging system.
9420It includes Python implementations of Kafka producers and consumers, which
9421are optionally backed by a C extension built on librdkafka.")
9422 (license license:asl2.0)))
9423
9424(define-public python2-pykafka
9425 (package-with-python2 python-pykafka))
9426
9427(define-public python-wcwidth
9428 (package
9429 (name "python-wcwidth")
9430 (version "0.1.7")
9431 (source
9432 (origin
9433 (method url-fetch)
9434 (uri (pypi-uri "wcwidth" version))
9435 (sha256
9436 (base32
9437 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
9438 (build-system python-build-system)
9439 (home-page "https://github.com/jquast/wcwidth")
9440 (synopsis "Measure number of terminal column cells of wide-character codes")
9441 (description "Wcwidth measures the number of terminal column cells of
9442wide-character codes. It is useful for those implementing a terminal emulator,
9443or programs that carefully produce output to be interpreted by one. It is a
9444Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9445specified in POSIX.1-2001 and POSIX.1-2008.")
9446 (license license:expat)))
9447
9448(define-public python2-wcwidth
9449 (package-with-python2 python-wcwidth))
9450
9451(define-public python2-jsonrpclib
9452 (package
9453 (name "python2-jsonrpclib")
9454 (version "0.1.7")
9455 (source (origin
9456 (method url-fetch)
9457 (uri (string-append
9458 "https://pypi.python.org/packages/source/j/jsonrpclib/"
9459 "jsonrpclib-" version ".tar.gz"))
9460 (sha256
9461 (base32
9462 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9463 (build-system python-build-system)
9464 (arguments
9465 `(#:tests? #f
9466 #:python ,python-2))
9467 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9468 (synopsis "Implementation of JSON-RPC specification for Python")
9469 (description
9470 "This library is an implementation of the JSON-RPC specification.
9471It supports both the original 1.0 specification, as well as the
9472new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9473etc.")
9474 (license license:asl2.0)))
9475
9476(define-public python-chai
9477 (package
9478 (name "python-chai")
9479 (version "1.1.2")
9480 (source (origin
9481 (method url-fetch)
9482 (uri (pypi-uri "chai" version))
9483 (sha256
9484 (base32
9485 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
9486 (build-system python-build-system)
9487 (home-page "https://github.com/agoragames/chai")
9488 (synopsis "Mocking framework for Python")
9489 (description
9490 "Chai provides an api for mocking, stubbing and spying your python
9491objects, patterned after the Mocha library for Ruby.")
9492 (license license:bsd-3)))
9493
9494(define-public python2-chai
9495 (package-with-python2 python-chai))
9496
9497(define-public python-inflection
9498 (package
9499 (name "python-inflection")
9500 (version "0.3.1")
9501 (source
9502 (origin (method url-fetch)
9503 (uri (pypi-uri "inflection" version))
9504 (sha256
9505 (base32
9506 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9507 (build-system python-build-system)
9508 (native-inputs
9509 `(("python-pytest" ,python-pytest)))
9510 (home-page "https://github.com/jpvanhal/inflection")
9511 (synopsis "Python string transformation library")
9512 (description
9513 "Inflection is a string transformation library. It singularizes
9514and pluralizes English words, and transforms strings from CamelCase to
9515underscored string.")
9516 (license license:expat)))
9517
9518(define-public python2-inflection
9519 (package-with-python2 python-inflection))
9520
9521(define-public python-pylev
9522 (package
9523 (name "python-pylev")
9524 (version "1.3.0")
9525 (source (origin
9526 (method url-fetch)
9527 (uri (pypi-uri "pylev" version))
9528 (sha256
9529 (base32
9530 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9531 (build-system python-build-system)
9532 (home-page "https://github.com/toastdriven/pylev")
9533 (synopsis "Levenshtein distance implementation in Python")
9534 (description "Pure Python Levenshtein implementation, based off the
9535Wikipedia code samples at
9536@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9537 (license license:bsd-3)))
9538
9539(define-public python2-pylev
9540 (package-with-python2 python-pylev))
9541
9542(define-public python-cleo
9543 (package
9544 (name "python-cleo")
9545 (version "0.6.1")
9546 (source (origin
9547 (method url-fetch)
9548 (uri (pypi-uri "cleo" version))
9549 (sha256
9550 (base32
9551 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
9552 (build-system python-build-system)
9553 (native-inputs
9554 `(;; For testing
9555 ("python-mock" ,python-mock)
9556 ("python-pytest-mock" ,python-pytest-mock)
9557 ("python-pytest" ,python-pytest)))
9558 (propagated-inputs
9559 `(("python-backpack" ,python-backpack)
9560 ("python-pastel" ,python-pastel)
9561 ("python-pylev" ,python-pylev)))
9562 (home-page "https://github.com/sdispater/cleo")
9563 (synopsis "Command-line arguments library for Python")
9564 (description
9565 "Cleo allows you to create command-line commands with signature in
9566docstring and colored output.")
9567 (license license:expat)))
9568
9569(define-public python2-cleo
9570 (package-with-python2 python-cleo))
9571
9572(define-public python-lazy-object-proxy
9573 (package
9574 (name "python-lazy-object-proxy")
9575 (version "1.3.1")
9576 (source (origin
9577 (method url-fetch)
9578 (uri (pypi-uri "lazy-object-proxy" version))
9579 (sha256
9580 (base32
9581 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
9582 (build-system python-build-system)
9583 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9584 (synopsis "Lazy object proxy for python")
9585 (description
9586 "Lazy object proxy is an object that wraps a callable but defers the call
9587until the object is actually required, and caches the result of said call.")
9588 (license license:bsd-2)))
9589
9590(define-public python2-lazy-object-proxy
9591 (package-with-python2 python-lazy-object-proxy))
9592
9593(define-public python-dnspython
9594 (package
9595 (name "python-dnspython")
9596 (version "1.15.0")
9597 (source (origin
9598 (method url-fetch)
9599 (uri (string-append "http://www.dnspython.org/kits/"
9600 version "/dnspython-" version ".tar.gz"))
9601 (sha256
9602 (base32
9603 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
9604 (build-system python-build-system)
9605 (arguments '(#:tests? #f)) ; XXX: requires internet access
9606 (home-page "http://www.dnspython.org")
9607 (synopsis "DNS toolkit for Python")
9608 (description
9609 "dnspython is a DNS toolkit for Python. It supports almost all record
9610types. It can be used for queries, zone transfers, and dynamic updates.
9611It supports TSIG authenticated messages and EDNS0.")
9612 (license license:expat)))
9613
9614(define-public python2-dnspython
9615 (package-with-python2 python-dnspython))
9616
9617(define-public python-email-validator
9618 (package
9619 (name "python-email-validator")
9620 (version "1.0.2")
9621 (source
9622 (origin (method url-fetch)
9623 (uri (pypi-uri "email_validator" version))
9624 (sha256
9625 (base32
9626 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
9627 (build-system python-build-system)
9628 (arguments
9629 '(#:phases
9630 (modify-phases %standard-phases
9631 (add-before 'build 'use-dnspython
9632 (lambda _
9633 (substitute* "setup.py"
9634 (("dnspython3") "dnspython"))
9635 #t)))))
9636 (propagated-inputs
9637 `(("python-dnspython" ,python-dnspython)
9638 ("python-idna" ,python-idna)))
9639 (home-page "https://github.com/JoshData/python-email-validator")
9640 (synopsis "Email address validation library for Python")
9641 (description
9642 "This library validates email address syntax and deliverability.")
9643 (license license:cc0)))
9644
9645(define-public python2-email-validator
9646 (package-with-python2 python-email-validator))
9647
9648(define-public python-ukpostcodeparser
9649 (package
9650 (name "python-ukpostcodeparser")
9651 (version "1.0.3")
9652 (source (origin
9653 (method url-fetch)
9654 (uri (pypi-uri "UkPostcodeParser" version))
9655 (sha256
9656 (base32
9657 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9658 (build-system python-build-system)
9659 (home-page "https://github.com/hamstah/ukpostcodeparser")
9660 (synopsis "UK Postcode parser for Python")
9661 (description
9662 "This library provides the @code{parse_uk_postcode} function for
9663parsing UK postcodes.")
9664 (license license:expat)))
9665
9666(define-public python2-ukpostcodeparser
9667 (package-with-python2 python-ukpostcodeparser))
9668
9669(define-public python-faker
9670 (package
9671 (name "python-faker")
9672 (version "0.7.9")
9673 (source (origin
9674 (method url-fetch)
9675 (uri (pypi-uri "Faker" version))
9676 (sha256
9677 (base32
9678 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
9679 (patches
9680 (search-patches "python-faker-fix-build-32bit.patch"))
9681 (modules '((guix build utils)))
9682 (snippet
9683 '(begin
9684 (for-each delete-file (find-files "." "\\.pyc$"))
9685 #t))))
9686 (build-system python-build-system)
9687 (arguments
9688 '(#:phases
9689 (modify-phases %standard-phases
9690 (replace 'check
9691 (lambda _
9692 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
9693 (native-inputs
9694 `(;; For testing
9695 ("python-email-validator" ,python-email-validator)
9696 ("python-mock" ,python-mock)
9697 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
9698 (propagated-inputs
9699 `(("python-dateutil" ,python-dateutil)
9700 ("python-six" ,python-six)))
9701 (home-page "https://github.com/joke2k/faker")
9702 (synopsis "Python package that generates fake data")
9703 (description
9704 "Faker is a Python package that generates fake data such as names,
9705addresses, and phone numbers.")
9706 (license license:expat)
9707 (properties `((python2-variant . ,(delay python2-faker))))))
9708
9709(define-public python2-faker
9710 (let ((base (package-with-python2 (strip-python2-variant
9711 python-faker))))
9712 (package
9713 (inherit base)
9714 (propagated-inputs
9715 `(("python2-ipaddress" ,python2-ipaddress)
9716 ,@(package-propagated-inputs base))))))
9717
9718(define-public python-pyaml
9719 (package
9720 (name "python-pyaml")
9721 (version "17.7.2")
9722 (source (origin
9723 (method url-fetch)
9724 (uri (pypi-uri "pyaml" version))
9725 (sha256
9726 (base32
9727 "132grrw0ajq4nrappi3ldbkb952k7yn9b6c7csi2rmvzm1g6ppp2"))))
9728 (build-system python-build-system)
9729 (native-inputs
9730 `(("python-unidecode" ,python-unidecode)))
9731 (propagated-inputs
9732 `(("python-pyyaml" ,python-pyyaml)))
9733 (home-page "https://github.com/mk-fg/pretty-yaml")
9734 (synopsis "YAML pretty-print library for Python")
9735 (description
9736 "pyaml is a PyYAML based python module to produce pretty and readable
9737YAML-serialized data.")
9738 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
9739
9740(define-public python2-pyaml
9741 (package-with-python2 python-pyaml))
9742
9743(define-public python-backpack
9744 (package
9745 (name "python-backpack")
9746 (version "0.1")
9747 (source
9748 (origin
9749 (method url-fetch)
9750 (uri (pypi-uri "backpack" version))
9751 (sha256
9752 (base32
9753 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
9754 (build-system python-build-system)
9755 (native-inputs
9756 `(("python-pytest" ,python-pytest)
9757 ("python-nose" ,python-nose)))
9758 (propagated-inputs
9759 `(("python-simplejson" ,python-simplejson)))
9760 (home-page "https://github.com/sdispater/backpack")
9761 (synopsis "Utilities for working with Python collections")
9762 (description "Backpack provides some useful utilities for working with
9763collections of data.")
9764 (license license:expat)))
9765
9766(define-public python2-backpack
9767 (package-with-python2 python-backpack))
9768
9769(define-public python-prompt-toolkit
9770 (package
9771 (name "python-prompt-toolkit")
9772 (version "1.0.15")
9773 (source
9774 (origin
9775 (method url-fetch)
9776 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9777 (sha256
9778 (base32
9779 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))
9780 (build-system python-build-system)
9781 (arguments
9782 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
9783 (propagated-inputs
9784 `(("python-wcwidth" ,python-wcwidth)
9785 ("python-six" ,python-six)
9786 ("python-pygments" ,python-pygments)))
9787 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
9788 (synopsis "Library for building command line interfaces in Python")
9789 (description
9790 "Prompt-Toolkit is a library for building interactive command line
9791interfaces in Python. It's like GNU Readline but it also features syntax
9792highlighting while typing, out-of-the-box multi-line input editing, advanced
9793code completion, incremental search, support for Chinese double-width
9794characters, mouse support, and auto suggestions.")
9795 (license license:bsd-3)))
9796
9797(define-public python2-prompt-toolkit
9798 (package-with-python2 python-prompt-toolkit))
9799
9800(define-public python-jedi
9801 (package
9802 (name "python-jedi")
9803 (version "0.12.1")
9804 (source
9805 (origin
9806 (method url-fetch)
9807 (uri (pypi-uri "jedi" version))
9808 (sha256
9809 (base32
9810 "1h8ypnjisn57kiv1zqrkj1im6sbfnhxllqaa8znh39qkd47ys2dl"))))
9811 (build-system python-build-system)
9812 (arguments
9813 `(#:phases
9814 (modify-phases %standard-phases
9815 (replace 'check (lambda _
9816 (invoke "py.test" "-vv"))))))
9817 (native-inputs
9818 `(("python-pytest" ,python-pytest)
9819 ("python-docopt" ,python-docopt)))
9820 (propagated-inputs
9821 `(("python-parso" ,python-parso)))
9822 (home-page "https://github.com/davidhalter/jedi")
9823 (synopsis "Autocompletion and static analysis library for Python")
9824 (description
9825 "Jedi is a static analysis tool for Python that can be used in Integrated
9826Development Environments (@dfn{IDE}s) and text editors. It understands Python
9827on a deeper level than many other static analysis frameworks for Python.
9828
9829Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
9830well.")
9831 (license license:expat)))
9832
9833(define-public python2-jedi
9834 (package-with-python2 python-jedi))
9835
9836(define-public ptpython
9837 (package
9838 (name "ptpython")
9839 (version "0.34")
9840 (source (origin
9841 (method url-fetch)
9842 (uri (pypi-uri "ptpython" version))
9843 (sha256
9844 (base32
9845 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
9846 (build-system python-build-system)
9847 (arguments
9848 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
9849 (propagated-inputs
9850 `(("python-docopt" ,python-docopt)
9851 ("python-jedi" ,python-jedi)
9852 ("python-prompt-toolkit" ,python-prompt-toolkit)
9853 ("python-pygments" ,python-pygments)))
9854 (home-page "https://github.com/jonathanslenders/ptpython")
9855 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
9856 (description
9857 "ptpython is a Python read-eval-print loop with IDE-like features.
9858It supports syntax highlighting, multiline editing, autocompletion, mouse,
9859color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
9860etc.")
9861 (license license:bsd-3)
9862 (properties `((python2-variant . ,(delay ptpython-2))))))
9863
9864(define-public ptpython-2
9865 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
9866 (package
9867 (inherit base)
9868 (name "ptpython2"))))
9869
9870(define-public python-stem
9871 (package
9872 (name "python-stem")
9873 (version "1.6.0")
9874 (source
9875 (origin
9876 (method url-fetch)
9877 (uri (pypi-uri "stem" version))
9878 (sha256
9879 (base32
9880 "1va9p3ij7lxg6ixfsvaql06dn11l3fgpxmss1dhlvafm7sqizznp"))))
9881 (build-system python-build-system)
9882 (arguments
9883 `(#:phases
9884 (modify-phases %standard-phases
9885 (add-before 'check 'fix-test-environment
9886 (lambda _
9887 ;; Fixes: FileNotFoundError: [Errno 2] No such file or directory:
9888 ;; '/tmp/guix-build-python-stem-1.6.0.drv-0/stem-1.6.0/.gitignore'.
9889 (with-output-to-file ".gitignore"
9890 (lambda _ (format #t "%")))
9891 #t))
9892 (replace 'check
9893 (lambda _
9894 (invoke "./run_tests.py" "--unit")
9895 #t)))))
9896 (native-inputs
9897 `(("python-mock" ,python-mock)
9898 ("python-pep8" ,python-pep8)
9899 ("python-pyflakes" ,python-pyflakes)))
9900 (home-page "https://stem.torproject.org/")
9901 (synopsis
9902 "Python controller library that allows applications to interact with Tor")
9903 (description
9904 "Stem is a Python controller library for Tor. With it you can use Tor's
9905control protocol to script against the Tor process and read descriptor data
9906relays publish about themselves.")
9907 (license license:lgpl3)))
9908
9909(define-public python2-stem
9910 (package-with-python2 python-stem))
9911
9912(define-public python-pyserial
9913 (package
9914 (name "python-pyserial")
9915 (version "3.1.1")
9916 (source
9917 (origin
9918 (method url-fetch)
9919 (uri (pypi-uri "pyserial" version))
9920 (sha256
9921 (base32
9922 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
9923 (build-system python-build-system)
9924 (arguments
9925 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
9926 ;; #:phases
9927 ;; (modify-phases %standard-phases
9928 ;; (replace 'check
9929 ;; (lambda _
9930 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
9931 (home-page
9932 "https://github.com/pyserial/pyserial")
9933 (synopsis "Python Serial Port Bindings")
9934 (description "@code{pyserial} provide serial port bindings for Python. It
9935supports different byte sizes, stop bits, parity and flow control with RTS/CTS
9936and/or Xon/Xoff. The port is accessed in RAW mode.")
9937 (license license:bsd-3)))
9938
9939(define-public python2-pyserial
9940 (package-with-python2 python-pyserial))
9941
9942(define-public python-kivy
9943 (package
9944 (name "python-kivy")
9945 (version "1.10.0")
9946 (source
9947 (origin
9948 (method url-fetch)
9949 (uri (pypi-uri "Kivy" version))
9950 (file-name (string-append name "-" version ".tar.gz"))
9951 (sha256
9952 (base32
9953 "1394zh6kvf7k5d8vlzxcsfcailr3q59xwg9b1n7qaf25bvyq1h98"))))
9954 (build-system python-build-system)
9955 (arguments
9956 `(#:tests? #f ; Tests require many optional packages
9957 #:phases
9958 (modify-phases %standard-phases
9959 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
9960 (lambda* (#:key inputs #:allow-other-keys)
9961 (setenv "KIVY_SDL2_PATH"
9962 (string-append (assoc-ref inputs "sdl-union")
9963 "/include/SDL2"))
9964 #t)))))
9965 (native-inputs
9966 `(("git" ,git)
9967 ("pkg-config" ,pkg-config)
9968 ("python-cython" ,python-cython)))
9969 (inputs
9970 `(("gstreamer" ,gstreamer)
9971 ("mesa" ,mesa)
9972 ("sdl-union"
9973 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
9974 (home-page "http://kivy.org")
9975 (synopsis
9976 "Multitouch application framework")
9977 (description
9978 "A software library for rapid development of
9979hardware-accelerated multitouch applications.")
9980 (license license:expat)))
9981
9982(define-public python2-kivy
9983 (package-with-python2 python-kivy))
9984
9985(define-public python-kivy-next
9986 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
9987 (revision "1"))
9988 (package (inherit python-kivy)
9989 (name "python-kivy-next")
9990 (version (string-append "1.9.1-" revision "."
9991 (string-take commit 7)))
9992 (source
9993 (origin
9994 (method git-fetch)
9995 (uri (git-reference
9996 (url "https://github.com/kivy/kivy")
9997 (commit commit)))
9998 (file-name (string-append name "-" version "-checkout"))
9999 (sha256
10000 (base32
10001 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
10002
10003(define-public python2-kivy-next
10004 (package-with-python2 python-kivy-next))
10005
10006(define-public python-binaryornot
10007 (package
10008 (name "python-binaryornot")
10009 (version "0.4.4")
10010 (source (origin
10011 (method url-fetch)
10012 (uri (pypi-uri "binaryornot" version))
10013 (sha256
10014 (base32
10015 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10016 (build-system python-build-system)
10017 (propagated-inputs
10018 `(("python-chardet" ,python-chardet)
10019 ("python-hypothesis" ,python-hypothesis)))
10020 (home-page "https://github.com/audreyr/binaryornot")
10021 (synopsis "Package to check if a file is binary or text")
10022 (description "Ultra-lightweight pure Python package to check if a file is
10023binary or text.")
10024 (license license:bsd-3)
10025 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10026
10027(define-public python2-binaryornot
10028 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10029 (package (inherit base)
10030 (propagated-inputs
10031 `(("python2-enum34" ,python2-enum34)
10032 ,@(package-propagated-inputs base))))))
10033
10034(define-public python-nltk
10035 (package
10036 (name "python-nltk")
10037 (version "3.2.1")
10038 (source (origin
10039 (method url-fetch)
10040 (uri (pypi-uri "nltk" version))
10041 (sha256
10042 (base32
10043 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10044 (build-system python-build-system)
10045 (arguments
10046 '(;; The tests require some extra resources to be downloaded.
10047 ;; TODO Try packaging these resources.
10048 #:tests? #f))
10049 (home-page "http://nltk.org/")
10050 (synopsis "Natural Language Toolkit")
10051 (description "It provides interfaces to over 50 corpora and lexical
10052resources such as WordNet, along with a suite of text processing libraries
10053for classification, tokenization, stemming, tagging, parsing, and semantic
10054reasoning, wrappers for natural language processing libraries.")
10055 (license license:asl2.0)))
10056
10057(define-public python2-nltk
10058 (package-with-python2 python-nltk))
10059
10060(define-public python-pymongo
10061 (package
10062 (name "python-pymongo")
10063 (version "3.7.2")
10064 (source (origin
10065 (method url-fetch)
10066 (uri (pypi-uri "pymongo" version))
10067 (sha256
10068 (base32
10069 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10070 (build-system python-build-system)
10071 (propagated-inputs
10072 `(("python-certifi" ,python-certifi)))
10073 (home-page "https://github.com/mongodb/mongo-python-driver")
10074 (synopsis "Python driver for MongoDB")
10075 (description "Python driver for MongoDB.")
10076 (license license:asl2.0)))
10077
10078(define-public python2-pymongo
10079 (package-with-python2 python-pymongo))
10080
10081(define-public python-sh
10082 (package
10083 (name "python-sh")
10084 (version "1.11")
10085 (source (origin
10086 (method url-fetch)
10087 (uri (pypi-uri "sh" version))
10088 (sha256
10089 (base32
10090 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
10091 (build-system python-build-system)
10092 (arguments
10093 `(#:tests? #f)) ; no tests
10094 (home-page "https://github.com/amoffat/sh")
10095 (synopsis "Python subprocess interface")
10096 (description "Abstracts process invocation by providing a function
10097interface for programs.")
10098 (license license:expat)))
10099
10100(define-public python2-sh
10101 (package-with-python2 python-sh))
10102
10103(define-public python-consul
10104 (package
10105 (name "python-consul")
10106 (version "0.6.1")
10107 (source
10108 (origin
10109 (method url-fetch)
10110 (uri (pypi-uri "python-consul" version))
10111 (sha256
10112 (base32
10113 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10114 (build-system python-build-system)
10115 (arguments
10116 '(#:tests? #f)) ; The tests are not distributed
10117 (propagated-inputs
10118 `(("python-requests" ,python-requests)
10119 ("python-six" ,python-six)))
10120 (home-page "https://github.com/cablehead/python-consul")
10121 (synopsis "Python client for Consul")
10122 (description
10123 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10124discovery, monitoring and configuration.")
10125 (license license:expat)))
10126
10127(define-public python2-consul
10128 (package-with-python2 python-consul))
10129
10130(define-public python-schematics
10131 (package
10132 (name "python-schematics")
10133 (version "1.1.1")
10134 (source
10135 (origin
10136 (method url-fetch)
10137 (uri (string-append
10138 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
10139 (file-name (string-append name "-" version ".tar.gz"))
10140 (sha256
10141 (base32
10142 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
10143 (build-system python-build-system)
10144 (propagated-inputs
10145 `(("python-six" ,python-six)))
10146 (arguments
10147 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
10148 ; version requirements (eg python-coveralls)
10149 (home-page "https://github.com/schematics/schematics")
10150 (synopsis "Python Data Structures for Humans")
10151 (description "Python Data Structures for Humans.")
10152 (license license:bsd-3)))
10153
10154(define-public python2-schematics
10155 (package-with-python2 python-schematics))
10156
10157(define-public python-odfpy
10158 (package
10159 (name "python-odfpy")
10160 (version "1.3.3")
10161 (source (origin
10162 (method url-fetch)
10163 (uri (pypi-uri "odfpy" version))
10164 (sha256
10165 (base32
10166 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10167 (arguments
10168 `(#:modules ((srfi srfi-1)
10169 (guix build python-build-system)
10170 (guix build utils))
10171 #:phases
10172 (modify-phases %standard-phases
10173 (replace 'check
10174 ;; The test runner invokes python2 and python3 for test*.py.
10175 ;; To avoid having both in inputs, we replicate it here.
10176 (lambda _
10177 (every (lambda (test-file)
10178 (zero? (system* "python" test-file)))
10179 (find-files "tests" "^test.*\\.py$")))))))
10180 (build-system python-build-system)
10181 (home-page "https://github.com/eea/odfpy")
10182 (synopsis "Python API and tools to manipulate OpenDocument files")
10183 (description "Collection of libraries and utility programs written in
10184Python to manipulate OpenDocument 1.2 files.")
10185 (license
10186 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10187 ;; number of files with other licenses.
10188 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10189
10190(define-public python2-odfpy
10191 (package-with-python2 python-odfpy))
10192
10193(define-public python-natsort
10194 (package
10195 (name "python-natsort")
10196 (version "5.0.2")
10197 (source (origin
10198 (method url-fetch)
10199 (uri (pypi-uri "natsort" version))
10200 (sha256
10201 (base32
10202 "0bh6j0l8iapjnsgg3bs6q075cnzjl6zw1vlgqyv3qrygm2cxypkn"))))
10203 (build-system python-build-system)
10204 (arguments
10205 `(#:phases
10206 (modify-phases %standard-phases
10207 (add-before 'check 'set-cachedir
10208 ;; Tests require write access to $HOME by default
10209 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
10210 (native-inputs
10211 `(("python-hypothesis" ,python-hypothesis)
10212 ("python-pytest-cache" ,python-pytest-cache)
10213 ("python-pytest-cov" ,python-pytest-cov)
10214 ("python-pytest-flakes" ,python-pytest-flakes)
10215 ("python-pytest-pep8" ,python-pytest-pep8)))
10216 (propagated-inputs ; TODO: Add python-fastnumbers.
10217 `(("python-pyicu" ,python-pyicu)))
10218 (home-page "https://github.com/SethMMorton/natsort")
10219 (synopsis "Natural sorting for python and shell")
10220 (description
10221 "Natsort lets you apply natural sorting on lists instead of
10222lexicographical. If you use the built-in @code{sorted} method in python
10223on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
10224returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
10225function @code{natsorted} that identifies numbers and sorts them separately
10226from strings. It can also sort version numbers, real numbers, mixed types
10227and more, and comes with a shell command @command{natsort} that exposes this
10228functionality in the command line.")
10229 (license license:expat)
10230 (properties `((python2-variant . ,(delay python2-natsort))))))
10231
10232(define-public python2-natsort
10233 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10234 (package (inherit base)
10235 (native-inputs
10236 `(("python2-pathlib" ,python2-pathlib)
10237 ("python2-mock" ,python2-mock)
10238 ("python2-enum34" ,python2-enum34)
10239 ,@(package-native-inputs base))))))
10240
10241(define-public python-glances
10242 (package
10243 (name "python-glances")
10244 (version "3.0.2")
10245 (source
10246 (origin
10247 (method url-fetch)
10248 (uri (pypi-uri "Glances" version))
10249 (sha256
10250 (base32
10251 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10252 (build-system python-build-system)
10253 (propagated-inputs
10254 `(("python-psutil" ,python-psutil)))
10255 (home-page
10256 "https://github.com/nicolargo/glances")
10257 (synopsis
10258 "A cross-platform curses-based monitoring tool")
10259 (description
10260 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10261Glances uses the PsUtil library to get information from your system. It monitors
10262CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10263 (license license:lgpl3+)))
10264
10265(define-public python2-glances
10266 (package-with-python2 python-glances))
10267
10268(define-public python-graphql-core
10269 (package
10270 (name "python-graphql-core")
10271 (version "0.5.3")
10272 (source
10273 (origin
10274 (method url-fetch)
10275 (uri (pypi-uri "graphql-core" version))
10276 (sha256
10277 (base32
10278 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10279 (build-system python-build-system)
10280 (arguments
10281 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10282 #:phases
10283 (modify-phases %standard-phases
10284 (add-after 'unpack 'patch-hardcoded-version
10285 (lambda _ (substitute*
10286 "setup.py"
10287 (("'gevent==1.1rc1'") "'gevent'"))
10288 #t)))))
10289 (native-inputs
10290 `(("python-gevent" ,python-gevent)
10291 ("python-mock" ,python-mock)
10292 ("python-pytest-mock" ,python-pytest-mock)))
10293 (propagated-inputs
10294 `(("python-promise" ,python-promise)
10295 ("python-six" ,python-six)))
10296 (home-page "https://github.com/graphql-python/graphql-core")
10297 (synopsis "GraphQL implementation for Python")
10298 (description
10299 "GraphQL implementation for Python. GraphQL is a data query language and
10300runtime designed and used to request and deliver data to mobile and web apps.
10301This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10302to Python.")
10303 (license license:expat)))
10304
10305(define-public python2-graphql-core
10306 (package-with-python2 python-graphql-core))
10307
10308(define-public python-graphql-relay
10309 (package
10310 (name "python-graphql-relay")
10311 (version "0.4.5")
10312 (source
10313 (origin
10314 (method url-fetch)
10315 (uri (pypi-uri "graphql-relay" version))
10316 (sha256
10317 (base32
10318 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10319 (build-system python-build-system)
10320 (arguments
10321 '(#:tests? #f)) ; The tests are not distributed
10322 (propagated-inputs
10323 `(("python-graphql-core" ,python-graphql-core)
10324 ("python-promise" ,python-promise)
10325 ("python-six" ,python-six)))
10326 (home-page "https://github.com/graphql-python/graphql-relay-py")
10327 (synopsis "Relay implementation for Python")
10328 (description
10329 "This is a library to allow the easy creation of Relay-compliant servers
10330using the GraphQL Python reference implementation of a GraphQL server. It
10331should be noted that the code is a exact port of the original
10332@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10333from Facebook.")
10334 (license license:expat)))
10335
10336(define-public python2-graphql-relay
10337 (package-with-python2 python-graphql-relay))
10338
10339(define-public python-graphene
10340 (package
10341 (name "python-graphene")
10342 (version "0.10.2")
10343 (source
10344 (origin
10345 (method url-fetch)
10346 (uri (pypi-uri "graphene" version))
10347 (sha256
10348 (base32
10349 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10350 (build-system python-build-system)
10351 (propagated-inputs
10352 `(("python-graphql-core" ,python-graphql-core)
10353 ("python-graphql-relay" ,python-graphql-relay)
10354 ("python-iso8601" ,python-iso8601)
10355 ("python-promise" ,python-promise)
10356 ("python-six" ,python-six)))
10357 (arguments
10358 `(#:tests? #f)) ; no tests/ in the PyPI tarball
10359 (home-page "http://graphene-python.org/")
10360 (synopsis "GraphQL Framework for Python")
10361 (description
10362 "Graphene is a Python library for building GraphQL schemas/types.
10363A GraphQL schema describes your data model, and provides a GraphQL server
10364with an associated set of resolve methods that know how to fetch data.")
10365 (properties `((python2-variant . ,(delay python2-graphene))))
10366 (license license:expat)))
10367
10368(define-public python2-graphene
10369 (let ((base (package-with-python2
10370 (strip-python2-variant python-graphene))))
10371 (package (inherit base)
10372 (native-inputs
10373 `(("python2-sqlalchemy" ,python2-sqlalchemy)
10374 ,@(package-native-inputs base))))))
10375
10376(define-public python-nautilus
10377 (package
10378 (name "python-nautilus")
10379 (version "0.4.9")
10380 (source
10381 (origin
10382 (method url-fetch)
10383 (uri (pypi-uri "nautilus" version))
10384 (sha256
10385 (base32
10386 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
10387 (build-system python-build-system)
10388 (arguments `(#:tests? #f)) ; fails to import test modules
10389 (propagated-inputs
10390 `(("python-bcrypt" ,python-bcrypt)
10391 ("python-click" ,python-click)
10392 ("python-consul" ,python-consul)
10393 ("python-graphene" ,python-graphene)
10394 ("python-jinja2" ,python-jinja2)
10395 ("python-peewee" ,python-peewee)
10396 ("python-pika" ,python-pika)
10397 ("python-tornado" ,python-tornado)
10398 ("python-wtforms" ,python-wtforms)))
10399 (native-inputs
10400 `(("python-nose2" ,python-nose2)))
10401 (home-page "https://github.com/AlecAivazis/nautilus")
10402 (synopsis "Library for creating microservice applications")
10403 (description
10404 "Nautilus is a framework for flux based microservices that looks to
10405provide extendible implementations of common aspects of a cloud so that you can
10406focus on building massively scalable web applications.")
10407 (license license:expat)))
10408
10409(define-public python-snowballstemmer
10410 (package
10411 (name "python-snowballstemmer")
10412 (version "1.2.1")
10413 (source (origin
10414 (method url-fetch)
10415 (uri (pypi-uri "snowballstemmer" version))
10416 (sha256
10417 (base32
10418 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
10419 (build-system python-build-system)
10420 (arguments
10421 `(;; No tests exist
10422 #:tests? #f))
10423 (home-page "https://github.com/shibukawa/snowball_py")
10424 (synopsis "Snowball stemming library collection for Python")
10425 (description "This package provides 16 word stemmer algorithms generated
10426from Snowball algorithms. It includes the 15 original ones plus the Poerter
10427English stemmer.")
10428 (license license:bsd-3)))
10429
10430(define-public python2-snowballstemmer
10431 (package-with-python2 python-snowballstemmer))
10432
10433(define-public python-sphinx-cloud-sptheme
10434 (package
10435 (name "python-sphinx-cloud-sptheme")
10436 (version "1.8.0")
10437 (source (origin
10438 (method url-fetch)
10439 (uri (pypi-uri "cloud_sptheme" version))
10440 (sha256
10441 (base32
10442 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
10443 (build-system python-build-system)
10444 ;; FIXME: The 'pypi' release archive does not contain tests.
10445 (arguments '(#:tests? #f))
10446 (native-inputs
10447 `(("python-sphinx" ,python-sphinx)))
10448 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
10449 (synopsis "'Cloud' theme for Sphinx documenter")
10450 (description "This package contains the \"Cloud\" theme for Sphinx and some
10451related extensions.")
10452 (license license:bsd-3)))
10453
10454(define-public python2-sphinx-cloud-sptheme
10455 (package-with-python2 python-sphinx-cloud-sptheme))
10456
10457(define-public python-sphinx-alabaster-theme
10458 (package
10459 (name "python-sphinx-alabaster-theme")
10460 (version "0.7.9")
10461 (source (origin
10462 (method url-fetch)
10463 (uri (pypi-uri "alabaster" version))
10464 (sha256
10465 (base32
10466 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
10467 (build-system python-build-system)
10468 (propagated-inputs
10469 `(("python-pygments" ,python-pygments)))
10470 (home-page "https://alabaster.readthedocs.io/")
10471 (synopsis "Configurable sidebar-enabled Sphinx theme")
10472 (description "Alabaster is a visually (c)lean, responsive, configurable
10473theme for the Sphinx documentation system. It's the default theme of Sphinx.")
10474 (license license:bsd-3)))
10475
10476(define-public python2-sphinx-alabaster-theme
10477 (package-with-python2 python-sphinx-alabaster-theme))
10478
10479(define-public python-setproctitle
10480(package
10481 (name "python-setproctitle")
10482 (version "1.1.10")
10483 (source
10484 (origin
10485 (method url-fetch)
10486 (uri (pypi-uri "setproctitle" version))
10487 (sha256
10488 (base32
10489 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
10490 (build-system python-build-system)
10491 (arguments
10492 '(#:phases
10493 (modify-phases %standard-phases
10494 (add-before 'check 'patch-Makefile
10495 ;; Stricly this is only required for the python2 variant.
10496 ;; But adding a phase in an inherited package seems to be
10497 ;; cumbersum. So we patch even for python3.
10498 (lambda _
10499 (let ((nose (assoc-ref %build-inputs "python2-nose")))
10500 (when nose
10501 (substitute* "Makefile"
10502 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
10503 (string-append nose "/bin/nosetests "))))
10504 #t)))
10505 (replace 'check
10506 (lambda _
10507 (setenv "PYTHON" (or (which "python3") (which "python")))
10508 (setenv "PYCONFIG" (or (which "python3-config")
10509 (which "python-config")))
10510 (setenv "CC" "gcc")
10511 ;; No need to extend PYTHONPATH to find the built package, since
10512 ;; the Makefile will build anyway
10513 (invoke "make" "check"))))))
10514 (native-inputs
10515 `(("procps" ,procps))) ; required for tests
10516 (home-page
10517 "https://github.com/dvarrazzo/py-setproctitle")
10518 (synopsis
10519 "Setproctitle implementation for Python to customize the process title")
10520 (description "The library allows a process to change its title (as displayed
10521by system tools such as ps and top).
10522
10523Changing the title is mostly useful in multi-process systems, for
10524example when a master process is forked: changing the children's title
10525allows to identify the task each process is busy with. The technique
10526is used by PostgreSQL and the OpenSSH Server for example.")
10527 (license license:bsd-3)
10528 (properties `((python2-variant . ,(delay python2-setproctitle))))))
10529
10530(define-public python2-setproctitle
10531 (let ((base (package-with-python2
10532 (strip-python2-variant python-setproctitle))))
10533 (package
10534 (inherit base)
10535 (native-inputs `(("python2-nose" ,python2-nose)
10536 ,@(package-native-inputs base))))))
10537
10538(define-public python-validictory
10539 (package
10540 (name "python-validictory")
10541 (version "1.0.1")
10542 (source
10543 (origin
10544 (method url-fetch)
10545 (uri (pypi-uri "validictory" version))
10546 (sha256
10547 (base32
10548 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
10549 (build-system python-build-system)
10550 (arguments
10551 '(#:phases
10552 (modify-phases %standard-phases
10553 (add-after 'unpack 'bootstrap
10554 ;; Move the tests out of the package directory to avoid
10555 ;; packaging them.
10556 (lambda* _
10557 (rename-file "validictory/tests" "tests")
10558 (delete-file "tests/__init__.py")))
10559 (replace 'check
10560 (lambda _
10561 ;; Extend PYTHONPATH so the built package will be found.
10562 (setenv "PYTHONPATH"
10563 (string-append (getcwd) "/build/lib:"
10564 (getenv "PYTHONPATH")))
10565 (zero? (system* "py.test" "-vv" )))))))
10566 (native-inputs
10567 `(("python-pytest" ,python-pytest)))
10568 (home-page
10569 "https://github.com/jamesturk/validictory")
10570 (synopsis "General purpose Python data validator")
10571 (description "It allows validation of arbitrary Python data structures.
10572
10573The schema format is based on the JSON Schema
10574proposal (http://json-schema.org), so combined with json the library is also
10575useful as a validator for JSON data.")
10576 (license license:expat)))
10577
10578(define-public python2-validictory
10579 (package-with-python2 python-validictory))
10580
10581(define-public python-pyev
10582 (package
10583 (name "python-pyev")
10584 (version "0.9.0")
10585 (source
10586 (origin
10587 (method url-fetch)
10588 (uri (pypi-uri "pyev" version))
10589 (sha256
10590 (base32
10591 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
10592 (build-system python-build-system)
10593 (arguments
10594 `(#:tests? #f ; no test suite
10595 #:phases
10596 (modify-phases %standard-phases
10597 (add-after 'unpack 'patch
10598 (lambda* (#:key inputs #:allow-other-keys)
10599 (let ((libev (string-append (assoc-ref inputs "libev")
10600 "/lib/libev.so.4")))
10601 (substitute* "setup.py"
10602 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
10603 (string-append "libev_dll_name = \"" libev "\"")))))))))
10604 (inputs
10605 `(("libev" ,libev)))
10606 (home-page "http://pythonhosted.org/pyev/")
10607 (synopsis "Python libev interface")
10608 (description "Pyev provides a Python interface to libev.")
10609 (license license:gpl3)))
10610
10611(define-public python2-pyev
10612 (package-with-python2 python-pyev))
10613
10614(define-public python-imagesize
10615 (package
10616 (name "python-imagesize")
10617 (version "0.7.1")
10618 (source
10619 (origin
10620 (method url-fetch)
10621 (uri (pypi-uri "imagesize" version))
10622 (sha256
10623 (base32
10624 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
10625 (build-system python-build-system)
10626 (arguments
10627 '(;; Test files are not distributed on PyPi:
10628 ;; https://github.com/shibukawa/imagesize_py/issues/7
10629 #:tests? #f))
10630 (home-page "https://github.com/shibukawa/imagesize_py")
10631 (synopsis "Gets image size of files in variaous formats in Python")
10632 (description
10633 "This package allows determination of image size from
10634PNG, JPEG, JPEG2000 and GIF files in pure Python.")
10635 (license license:expat)))
10636
10637(define-public python2-imagesize
10638 (package-with-python2 python-imagesize))
10639
10640(define-public python-termstyle
10641 (package
10642 (name "python-termstyle")
10643 (version "0.1.11")
10644 (source
10645 (origin
10646 (method url-fetch)
10647 (uri (pypi-uri "termstyle" version))
10648 (sha256
10649 (base32
10650 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
10651 (build-system python-build-system)
10652 (arguments
10653 '(#:phases
10654 (modify-phases %standard-phases
10655 (replace 'check
10656 (lambda _
10657 (zero? (system* "python" "test3.py")))))))
10658 (home-page "https://github.com/gfxmonk/termstyle")
10659 (synopsis "Console text coloring for Python")
10660 (description "This package provides console text coloring for Python.")
10661 (license license:bsd-3)))
10662
10663(define-public python-argcomplete
10664 (package
10665 (name "python-argcomplete")
10666 (version "1.7.0")
10667 (source
10668 (origin
10669 (method url-fetch)
10670 (uri (pypi-uri "argcomplete" version))
10671 (sha256
10672 (base32
10673 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
10674 (build-system python-build-system)
10675 (native-inputs
10676 `(("python-pexpect" ,python-pexpect)
10677 ("tcsh" ,tcsh)
10678 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
10679 (home-page "https://github.com/kislyuk/argcomplete")
10680 (synopsis "Shell tab completion for Python argparse")
10681 (description "argcomplete provides extensible command line tab completion
10682of arguments and options for Python scripts using @code{argparse}. It's
10683particularly useful for programs with many options or sub-parsers that can
10684dynamically suggest completions; for example, when browsing resources over the
10685network.")
10686 (license license:asl2.0)))
10687
10688(define-public python2-argcomplete
10689 (package-with-python2 python-argcomplete))
10690
10691(define-public python-xopen
10692 (package
10693 (name "python-xopen")
10694 (version "0.3.3")
10695 (source
10696 (origin
10697 (method url-fetch)
10698 (uri (pypi-uri "xopen" version))
10699 (sha256
10700 (base32
10701 "1a0wbil552wsmklwd89ssmgz3pjd86qa9i7jh8wqb9wslc8a2qjr"))
10702 (file-name (string-append name "-" version ".tar.gz"))))
10703 (build-system python-build-system)
10704 (home-page "https://github.com/marcelm/xopen/")
10705 (synopsis "Open compressed files transparently")
10706 (description "This module provides an @code{xopen} function that works like
10707Python's built-in @code{open} function, but can also deal with compressed files.
10708Supported compression formats are gzip, bzip2 and, xz, and are automatically
10709recognized by their file extensions. The focus is on being as efficient as
10710possible on all supported Python versions.")
10711 (license license:expat)))
10712
10713(define-public python2-xopen
10714 (let ((base (package-with-python2
10715 (strip-python2-variant python-xopen))))
10716 (package
10717 (inherit base)
10718 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
10719 ,@(package-propagated-inputs base))))))
10720
10721(define-public python2-cheetah
10722 (package
10723 (name "python2-cheetah")
10724 (version "2.4.4")
10725 (source
10726 (origin
10727 (method url-fetch)
10728 (uri (pypi-uri "Cheetah" version))
10729 (sha256
10730 (base32
10731 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
10732 (build-system python-build-system)
10733 (arguments
10734 `(#:python ,python-2))
10735 (propagated-inputs
10736 `(("python2-markdown" ,python2-markdown)))
10737 (home-page "https://pythonhosted.org/Cheetah/")
10738 (synopsis "Template engine")
10739 (description "Cheetah is a text-based template engine and Python code
10740generator.
10741
10742Cheetah can be used as a standalone templating utility or referenced as
10743a library from other Python applications. It has many potential uses,
10744but web developers looking for a viable alternative to ASP, JSP, PHP and
10745PSP are expected to be its principle user group.
10746
10747Features:
10748@enumerate
10749@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
10750 text-based format.
10751@item Cleanly separates content, graphic design, and program code.
10752@item Blends the power and flexibility of Python with a simple template language
10753 that non-programmers can understand.
10754@item Gives template writers full access to any Python data structure, module,
10755 function, object, or method in their templates.
10756@item Makes code reuse easy by providing an object-orientated interface to
10757 templates that is accessible from Python code or other Cheetah templates.
10758 One template can subclass another and selectively reimplement sections of it.
10759@item Provides a simple, yet powerful, caching mechanism that can dramatically
10760 improve the performance of a dynamic website.
10761@item Compiles templates into optimized, yet readable, Python code.
10762@end enumerate")
10763 (license (license:x11-style "file://LICENSE"))))
10764
10765(define-public python-dulwich
10766 (package
10767 (name "python-dulwich")
10768 (version "0.18.6")
10769 (source
10770 (origin
10771 (method url-fetch)
10772 (uri (list (string-append "https://www.dulwich.io/releases/"
10773 "dulwich-" version ".tar.gz")
10774 (pypi-uri "dulwich" version)))
10775 (sha256
10776 (base32
10777 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
10778 (build-system python-build-system)
10779 (arguments
10780 `(#:phases
10781 (modify-phases %standard-phases
10782 (add-before 'check 'fix-tests
10783 (lambda* (#:key inputs #:allow-other-keys)
10784 ;; The tests use Popen with a custom environment which doesn't
10785 ;; include PATH.
10786 (substitute* "dulwich/tests/compat/utils.py"
10787 (("'git'") (string-append "'"
10788 (which "git")
10789 "'")))
10790 (substitute* '("dulwich/tests/test_repository.py"
10791 "dulwich/tests/test_hooks.py")
10792 (("#!/bin/sh") (string-append "#!" (which "sh"))))
10793 (setenv "TEST_RUNNER" "unittest")
10794 (setenv "PYTHONHASHSEED" "random")
10795 #t)))))
10796 (propagated-inputs
10797 `(("python-fastimport" ,python-fastimport)))
10798 (native-inputs
10799 `(("python-mock" ,python-mock)
10800 ("python-geventhttpclient" ,python-geventhttpclient)
10801 ("git" ,git)))
10802 (home-page "https://www.dulwich.io/")
10803 (synopsis "Git implementation in Python")
10804 (description "Dulwich is an implementation of the Git file formats and
10805protocols written in pure Python.")
10806 ;; Can be used with either license.
10807 (license (list license:asl2.0 license:gpl2+))))
10808
10809(define-public python2-dulwich
10810 (package-with-python2 python-dulwich))
10811
10812(define-public python-pbkdf2
10813 (package
10814 (name "python-pbkdf2")
10815 (version "1.3")
10816 (source
10817 (origin
10818 (method url-fetch)
10819 (uri (pypi-uri "pbkdf2" version))
10820 (sha256
10821 (base32
10822 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
10823 (build-system python-build-system)
10824 (arguments
10825 '(#:phases
10826 (modify-phases %standard-phases
10827 (replace 'check
10828 (lambda _
10829 (setenv "PYTHONPATH"
10830 (string-append (getcwd) "/build/lib:"
10831 (getenv "PYTHONPATH")))
10832 (zero? (system* "python" "test/test_pbkdf2.py")))))))
10833 (propagated-inputs
10834 `(("python-pycrypto" ,python-pycrypto))) ; optional
10835 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
10836 (synopsis "Password-based key derivation")
10837 (description "This module implements the password-based key derivation
10838function, PBKDF2, specified in RSA PKCS#5 v2.0.
10839
10840PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
10841is part of the RSA Public Key Cryptography Standards series. The provided
10842implementation takes a password or a passphrase and a salt value (and
10843optionally a iteration count, a digest module, and a MAC module) and provides
10844a file-like object from which an arbitrarly-sized key can be read.")
10845 (license license:expat)))
10846
10847(define-public python2-pbkdf2
10848 (package-with-python2 python-pbkdf2))
10849
10850(define-public python-qrcode
10851 (package
10852 (name "python-qrcode")
10853 (version "6.0")
10854 (source
10855 (origin
10856 (method url-fetch)
10857 (uri (pypi-uri "qrcode" version))
10858 (sha256
10859 (base32
10860 "1gz1g2n9kqwqkak78aavr354z1v3yyiksk7q6xp5hi1zr6s0syq3"))))
10861 (build-system python-build-system)
10862 (arguments
10863 ;; FIXME: Tests require packaging 'pymaging'.
10864 '(#:tests? #f))
10865 (propagated-inputs
10866 `(("python-lxml" ,python-lxml) ; for SVG output
10867 ("python-pillow" ,python-pillow) ; for PNG output
10868 ("python-six" ,python-six)))
10869 (inputs
10870 `(;; The setup.cfg file needs to be used, and support for this requires
10871 ;; at least version 30.3.0 of setuptools
10872 ("python-setuptools" ,python-setuptools)))
10873 (home-page "https://github.com/lincolnloop/python-qrcode")
10874 (synopsis "QR Code image generator")
10875 (description "This package provides a pure Python QR Code generator
10876module. It uses the Python Imaging Library (PIL) to allow for the generation
10877of QR Codes.
10878
10879In addition this package provides a command line tool to generate QR codes and
10880either write these QR codes to a file or do the output as ascii art at the
10881console.")
10882 (license license:bsd-3)))
10883
10884(define-public python2-qrcode
10885 (package-with-python2 python-qrcode))
10886
10887(define-public python-rst2ansi
10888 (package
10889 (name "python-rst2ansi")
10890 (version "0.1.5")
10891 (source
10892 (origin
10893 (method url-fetch)
10894 (uri (pypi-uri "rst2ansi" version))
10895 (sha256
10896 (base32
10897 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
10898 (build-system python-build-system)
10899 (propagated-inputs
10900 `(("python-docutils" ,python-docutils)))
10901 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
10902 (synopsis "Convert RST to ANSI-decorated console output")
10903 (description
10904 "Python module dedicated to rendering RST (reStructuredText) documents
10905to ansi-escaped strings suitable for display in a terminal.")
10906 (license license:expat)))
10907
10908(define-public python-ansi2html
10909 (package
10910 (name "python-ansi2html")
10911 (version "1.2.0")
10912 (source
10913 (origin
10914 (method url-fetch)
10915 (uri (pypi-uri "ansi2html" version))
10916 (sha256
10917 (base32
10918 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
10919 (build-system python-build-system)
10920 (native-inputs
10921 `(("python-mock" ,python-mock)
10922 ("python-nose" ,python-nose)))
10923 (propagated-inputs
10924 `(("python-six" ,python-six)))
10925 (home-page "https://github.com/ralphbean/ansi2html")
10926 (synopsis "Convert ANSI-decorated console output to HTML")
10927 (description
10928 "@command{ansi2html} is a Python library and command line utility for
10929convering text with ANSI color codes to HTML or LaTeX.")
10930 (license license:gpl3+)))
10931
10932(define-public python2-ansi2html
10933 (package-with-python2 python-ansi2html))
10934
10935(define-public python-ddt
10936 (package
10937 (name "python-ddt")
10938 (version "1.1.3")
10939 (source
10940 (origin
10941 (method url-fetch)
10942 (uri (pypi-uri "ddt" version))
10943 (sha256
10944 (base32
10945 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
10946 (build-system python-build-system)
10947 (native-inputs
10948 `(("python-mock" ,python-mock)
10949 ("python-nose" ,python-nose)))
10950 (propagated-inputs
10951 `(("python-six" ,python-six)
10952 ("python-pyyaml" ,python-pyyaml)))
10953 (home-page "https://github.com/txels/ddt")
10954 (synopsis "Data-Driven Tests")
10955 (description
10956 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
10957running it with different test data, and make it appear as multiple test
10958cases.")
10959 (license license:expat)))
10960
10961(define-public python2-ddt
10962 (package-with-python2 python-ddt))
10963
10964(define-public python-pycountry
10965 (package
10966 (name "python-pycountry")
10967 (version "18.5.26")
10968 (source
10969 (origin
10970 (method url-fetch)
10971 (uri (pypi-uri "pycountry" version))
10972 (sha256
10973 (base32
10974 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
10975 (build-system python-build-system)
10976 (home-page "https://bitbucket.org/flyingcircus/pycountry")
10977 (synopsis "ISO databases for languages, countries, currencies, etc.")
10978 (description
10979 "@code{pycountry} provides the ISO databases for the standards:
10980@enumerate
10981@item 639-3 (Languages)
10982@item 3166 (Countries)
10983@item 3166-3 (Deleted Countries)
10984@item 3166-2 (Subdivisions of countries)
10985@item 4217 (Currencies)
10986@item 15924 (Scripts)
10987@end enumerate
10988It includes a copy from Debian’s pkg-isocodes and makes the data accessible
10989through a Python API.")
10990 (license license:lgpl2.1+)))
10991
10992(define-public python2-pycountry
10993 (package-with-python2 python-pycountry))
10994
10995(define-public python-pycosat
10996 (package
10997 (name "python-pycosat")
10998 (version "0.6.1")
10999 (source
11000 (origin
11001 (method url-fetch)
11002 (uri (pypi-uri "pycosat" version))
11003 (sha256
11004 (base32
11005 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11006 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11007 (build-system python-build-system)
11008 (home-page "https://github.com/ContinuumIO/pycosat")
11009 (synopsis "Bindings to picosat (a SAT solver)")
11010 (description
11011 "This package provides efficient Python bindings to @code{picosat} on
11012the C level. When importing pycosat, the @code{picosat} solver becomes part
11013of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11014Problem} (SAT) solver.")
11015 (license license:expat)))
11016
11017(define-public python2-pycosat
11018 (package-with-python2 python-pycosat))
11019
11020(define-public python2-ruamel.ordereddict
11021 (package
11022 (name "python2-ruamel.ordereddict")
11023 (version "0.4.9")
11024 (source
11025 (origin
11026 (method url-fetch)
11027 (uri (pypi-uri "ruamel.ordereddict" version))
11028 (sha256
11029 (base32
11030 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11031 (build-system python-build-system)
11032 (arguments
11033 `(#:python ,python-2
11034 #:phases
11035 (modify-phases %standard-phases
11036 (delete 'check)
11037 (add-after 'install 'check
11038 (lambda* (#:key inputs outputs #:allow-other-keys)
11039 (add-installed-pythonpath inputs outputs)
11040 (zero? (system* "python" "test/testordereddict.py")))))))
11041 (home-page "https://bitbucket.org/ruamel/ordereddict")
11042 (synopsis "Version of dict that keeps keys in insertion order")
11043 (description
11044 "This is an implementation of an ordered dictionary with @dfn{Key
11045Insertion Order} (KIO: updates of values do not affect the position of the
11046key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11047removed and put at the back). The standard library module @code{OrderedDict},
11048implemented later, implements a subset of @code{ordereddict} functionality.
11049Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11050Order} (KSO, no sorting function can be specified, but a transform can be
11051specified to apply on the key before comparison (e.g. @code{string.lower})).")
11052 (license license:expat)))
11053
11054(define-public python-pypeg2
11055 (package
11056 (name "python-pypeg2")
11057 (version "2.15.2")
11058 (source
11059 (origin
11060 (method url-fetch)
11061 (uri (pypi-uri "pyPEG2" version))
11062 (sha256
11063 (base32
11064 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11065 (build-system python-build-system)
11066 (propagated-inputs `(("python-lxml" ,python-lxml)))
11067 (arguments
11068 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11069 '(#:tests? #f))
11070 (home-page "https://fdik.org/pyPEG/")
11071 (synopsis "Parsering Expression Grammars in Python")
11072 (description "PyPEG is an intrinsic parser interpreter framework for
11073Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11074parse many formal languages.")
11075 (license license:gpl2)))
11076
11077(define-public python-incremental
11078 (package
11079 (name "python-incremental")
11080 (version "17.5.0")
11081 (source
11082 (origin
11083 (method url-fetch)
11084 (uri (pypi-uri "incremental" version))
11085 (sha256
11086 (base32
11087 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11088 (build-system python-build-system)
11089 (home-page "https://github.com/hawkowl/incremental")
11090 (synopsis "Library for versioning Python projects")
11091 (description "Incremental is a small library that versions your Python
11092projects.")
11093 (license license:expat)))
11094
11095(define-public python2-incremental
11096 (package-with-python2 python-incremental))
11097
11098(define-public python-automat
11099 (package
11100 (name "python-automat")
11101 (version "0.6.0")
11102 (source (origin
11103 (method url-fetch)
11104 (uri (pypi-uri "Automat" version))
11105 (sha256
11106 (base32
11107 "1a7nsrljysfmdqmpn2apfa1gg6rfah4y9sizvns8gb08rx7d07rw"))))
11108 (build-system python-build-system)
11109 ;; We disable the tests because they require python-twisted, while
11110 ;; python-twisted depends on python-automat. Twisted is optional, but the
11111 ;; tests fail if it is not available. Also see
11112 ;; <https://github.com/glyph/automat/issues/71>.
11113 (arguments '(#:tests? #f))
11114 (native-inputs
11115 `(("python-m2r" ,python-m2r)
11116 ("python-setuptools-scm" ,python-setuptools-scm)
11117 ("python-graphviz" ,python-graphviz)))
11118 (propagated-inputs
11119 `(("python-six" ,python-six)
11120 ("python-attrs" ,python-attrs)))
11121 (home-page "https://github.com/glyph/Automat")
11122 (synopsis "Self-service finite-state machines")
11123 (description "Automat is a library for concise, idiomatic Python
11124expression of finite-state automata (particularly deterministic finite-state
11125transducers).")
11126 (license license:expat)))
11127
11128(define-public python2-automat
11129 (package-with-python2 python-automat))
11130
11131(define-public python-m2r
11132 (package
11133 (name "python-m2r")
11134 (version "0.1.12")
11135 (source (origin
11136 (method url-fetch)
11137 (uri (pypi-uri "m2r" version))
11138 (sha256
11139 (base32
11140 "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd"))))
11141 (build-system python-build-system)
11142 (propagated-inputs
11143 `(("python-docutils" ,python-docutils)
11144 ("python-mistune" ,python-mistune)))
11145 (native-inputs
11146 `(("python-pygments" ,python-pygments)
11147 ("python-mock" ,python-mock)))
11148 (home-page "https://github.com/miyakogi/m2r")
11149 (synopsis "Markdown to reStructuredText converter")
11150 (description "M2R converts a markdown file including reST markups to valid
11151reST format.")
11152 (license license:expat)))
11153
11154(define-public python2-m2r
11155 (package-with-python2 python-m2r))
11156
11157(define-public python-constantly
11158 (package
11159 (name "python-constantly")
11160 (version "15.1.0")
11161 (source (origin
11162 (method url-fetch)
11163 (uri (pypi-uri "constantly" version))
11164 (sha256
11165 (base32
11166 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11167 (build-system python-build-system)
11168 (home-page "https://github.com/twisted/constantly")
11169 (synopsis "Symbolic constants in Python")
11170 (description "Constantly is a Python library that provides symbolic
11171constant support. It includes collections and constants with text, numeric,
11172and bit flag values.")
11173 (license license:expat)))
11174
11175(define-public python2-constantly
11176 (package-with-python2 python-constantly))
11177
11178(define-public python-attrs
11179 (package
11180 (name "python-attrs")
11181 (version "17.4.0")
11182 (source (origin
11183 (method url-fetch)
11184 (uri (pypi-uri "attrs" version))
11185 (sha256
11186 (base32
11187 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
11188 (build-system python-build-system)
11189 (native-inputs
11190 `(("python-coverage" ,python-coverage)
11191 ("python-hypothesis" ,python-hypothesis)
11192 ("python-pytest" ,python-pytest)
11193 ("python-six" ,python-six)
11194 ("python-sphinx" ,python-sphinx)
11195 ("python-zope-interface" ,python-zope-interface)))
11196 (home-page "https://github.com/python-attrs/attrs/")
11197 (synopsis "Attributes without boilerplate")
11198 (description "@code{attrs} is a Python package with class decorators that
11199ease the chores of implementing the most common attribute-related object
11200protocols.")
11201 (license license:expat)))
11202
11203(define-public python2-attrs
11204 (package-with-python2 python-attrs))
11205
11206(define-public python-attrs-bootstrap
11207 (package
11208 (inherit python-attrs)
11209 (name "python-attrs-bootstrap")
11210 (native-inputs `())
11211 (arguments `(#:tests? #f))))
11212
11213(define-public python2-attrs-bootstrap
11214 (package-with-python2 python-attrs-bootstrap))
11215
11216(define-public python2-cliapp
11217 (package
11218 (name "python2-cliapp")
11219 (version "1.20170823")
11220 (source
11221 (origin
11222 (method url-fetch)
11223 (uri (string-append
11224 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11225 version ".tar.gz"))
11226 (sha256
11227 (base32
11228 "1i9gik0xrj6jmi95s5w988jl1y265baz5xm5pbqdyvsh8h9ln6yq"))))
11229 (build-system python-build-system)
11230 (arguments
11231 `(#:python ,python-2
11232 #:phases
11233 (modify-phases %standard-phases
11234 ;; check phase needs to be run before the build phase. If not,
11235 ;; coverage-test-runner looks for tests for the built source files,
11236 ;; and fails.
11237 (delete 'check)
11238 (add-before 'build 'check
11239 (lambda _
11240 ;; Disable python3 tests
11241 (substitute* "check"
11242 (("python3") "# python3"))
11243 (zero? (system* "./check")))))))
11244 (native-inputs
11245 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11246 ("python2-pep8" ,python2-pep8)))
11247 (propagated-inputs
11248 `(("python2-pyaml" ,python2-pyaml)))
11249 (home-page "https://liw.fi/cliapp/")
11250 (synopsis "Python framework for command line programs")
11251 (description "@code{python2-cliapp} is a python framework for
11252command line programs. It contains the typical stuff such programs
11253need to do, such as parsing the command line for options, and
11254iterating over input files.")
11255 (license license:gpl2+)))
11256
11257(define-public python2-ttystatus
11258 (package
11259 (name "python2-ttystatus")
11260 (version "0.35")
11261 (source
11262 (origin
11263 (method url-fetch)
11264 (uri (string-append
11265 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
11266 version ".tar.gz"))
11267 (sha256
11268 (base32
11269 "0vivqbw7ddhsq1zj3g9cvvv4f0phl0pis2smsnwcr2szz2fk3hl6"))))
11270 (build-system python-build-system)
11271 (native-inputs
11272 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11273 ("python2-pep8" ,python2-pep8)))
11274 (arguments
11275 `(#:python ,python-2
11276 #:phases
11277 (modify-phases %standard-phases
11278 ;; check phase needs to be run before the build phase. If not,
11279 ;; coverage-test-runner looks for tests for the built source files,
11280 ;; and fails.
11281 (delete 'check)
11282 (add-before 'build 'check
11283 (lambda _
11284 (zero? (system* "make" "check")))))))
11285 (home-page "https://liw.fi/ttystatus/")
11286 (synopsis "Python library for showing progress reporting and
11287status updates on terminals")
11288 (description "@code{python2-ttystatus} is a python library for
11289showing progress reporting and status updates on terminals, for
11290command line programs. Output is automatically adapted to the width
11291of the terminal: truncated if it does not fit, and resized if the
11292terminal size changes.")
11293 (license license:gpl3+)))
11294
11295(define-public python2-tracing
11296 (package
11297 (name "python2-tracing")
11298 (version "0.10")
11299 (source
11300 (origin
11301 (method url-fetch)
11302 (uri (string-append
11303 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
11304 version ".tar.gz"))
11305 (sha256
11306 (base32
11307 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
11308 (build-system python-build-system)
11309 (arguments
11310 `(#:python ,python-2))
11311 (home-page "https://liw.fi/tracing/")
11312 (synopsis "Python debug logging helper")
11313 (description "@code{python2-tracing} is a python library for
11314logging debug messages. It provides a way to turn debugging messages
11315on and off, based on the filename they occur in. It is much faster
11316than using @code{logging.Filter} to accomplish the same thing, which
11317matters when code is run in production mode. The actual logging still
11318happens using the @code{logging} library.")
11319 (license license:gpl3+)))
11320
11321(define-public python2-larch
11322 (package
11323 (name "python2-larch")
11324 (version "1.20151025")
11325 (source
11326 (origin
11327 (method url-fetch)
11328 (uri (string-append
11329 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
11330 version ".tar.gz"))
11331 (patches (search-patches
11332 "python2-larch-coverage-4.0a6-compatibility.patch"))
11333 (sha256
11334 (base32
11335 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
11336 (build-system python-build-system)
11337 (arguments
11338 `(#:python ,python-2
11339 #:phases
11340 (modify-phases %standard-phases
11341 ;; check phase needs to be run before the build phase. If not,
11342 ;; coverage-test-runner looks for tests for the built source files,
11343 ;; and fails.
11344 (delete 'check)
11345 (add-before 'build 'check
11346 (lambda _
11347 (zero? (system* "make" "check")))))))
11348 (native-inputs
11349 `(("cmdtest" ,cmdtest)
11350 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
11351 (propagated-inputs
11352 `(("python2-tracing" ,python2-tracing)))
11353 (home-page "https://liw.fi/larch/")
11354 (synopsis "Python copy-on-write B-tree library")
11355 (description "@code{python2-larch} is an implementation of
11356particular kind of B-tree, based on research by Ohad Rodeh. See
11357@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
11358on the data structure.
11359
11360The distinctive feature of this B-tree is that a node is never
11361(conceptually) modified. Instead, all updates are done by
11362copy-on-write. This makes it easy to clone a tree, and modify only the
11363clone, while other processes access the original tree.")
11364 (license license:gpl3+)))
11365
11366(define-public python-astroid
11367 (package
11368 (name "python-astroid")
11369 (version "1.5.3")
11370 (source
11371 (origin
11372 (method url-fetch)
11373 (uri (string-append
11374 "https://github.com/PyCQA/astroid/archive/astroid-"
11375 version ".tar.gz"))
11376 (sha256
11377 (base32
11378 "0isn5p7f9n48hmksgbrj7dkm9dyglnayzn5jngk37qywg8a74ngn"))))
11379 (build-system python-build-system)
11380 (propagated-inputs
11381 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
11382 ("python-six" ,python-six)
11383 ("python-wrapt" ,python-wrapt)))
11384 (arguments
11385 `(#:phases
11386 (modify-phases %standard-phases
11387 (replace 'check
11388 (lambda _
11389 (zero? (system* "python" "-m" "unittest" "discover"
11390 "-p" "unittest*.py")))))))
11391 (home-page "https://github.com/PyCQA/astroid")
11392 (synopsis "Common base representation of python source code for pylint and
11393other projects")
11394 (description "@code{python-astroid} provides a common base representation
11395of python source code for projects such as pychecker, pyreverse, pylint, etc.
11396
11397It provides a compatible representation which comes from the _ast module. It
11398rebuilds the tree generated by the builtin _ast module by recursively walking
11399down the AST and building an extended ast. The new node classes have
11400additional methods and attributes for different usages. They include some
11401support for static inference and local name scopes. Furthermore, astroid
11402builds partial trees by inspecting living objects.")
11403 (license license:lgpl2.1+)
11404 (properties `((python2-variant . ,(delay python2-astroid))))))
11405
11406(define-public python2-astroid
11407 (let ((base (package-with-python2
11408 (strip-python2-variant python-astroid))))
11409 (package (inherit base)
11410 (propagated-inputs
11411 `(("python2-backports-functools-lru-cache"
11412 ,python2-backports-functools-lru-cache)
11413 ("python2-enum34" ,python2-enum34)
11414 ("python2-singledispatch" ,python2-singledispatch)
11415 ,@(package-propagated-inputs base))))))
11416
11417(define-public python-isort
11418 (package
11419 (name "python-isort")
11420 (version "4.2.5")
11421 (source
11422 (origin
11423 (method url-fetch)
11424 (uri (string-append
11425 "https://github.com/timothycrosley/isort/archive/"
11426 version ".tar.gz"))
11427 (file-name (string-append name "-" version ".tar.gz"))
11428 (sha256
11429 (base32
11430 "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh"))))
11431 (build-system python-build-system)
11432 (native-inputs
11433 `(("python-mock" ,python-mock)
11434 ("python-pytest" ,python-pytest)))
11435 (home-page "https://github.com/timothycrosley/isort")
11436 (synopsis "Python utility/library to sort python imports")
11437 (description "@code{python-isort} is a python utility/library to sort
11438imports alphabetically, and automatically separated into sections. It
11439provides a command line utility, a python library and plugins for various
11440editors.")
11441 (license license:expat)))
11442
11443(define-public python2-isort
11444 (package-with-python2 python-isort))
11445
11446(define-public python2-backports-functools-lru-cache
11447 (package
11448 (name "python2-backports-functools-lru-cache")
11449 (version "1.5")
11450 (source
11451 (origin
11452 (method url-fetch)
11453 ;; only the pypi tarballs contain the necessary metadata
11454 (uri (pypi-uri "backports.functools_lru_cache" version))
11455 (sha256
11456 (base32
11457 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
11458 (build-system python-build-system)
11459 (native-inputs
11460 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
11461 (arguments
11462 `(#:python ,python-2))
11463 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
11464 (synopsis "Backport of functools.lru_cache from Python 3.3")
11465 (description "@code{python2-backports-functools-lru-cache} is a backport
11466of @code{functools.lru_cache} from python 3.3.")
11467 (license license:expat)))
11468
11469(define-public python-configparser
11470 (package
11471 (name "python-configparser")
11472 (version "3.5.0")
11473 (source
11474 (origin
11475 (method url-fetch)
11476 (uri (string-append
11477 "https://bitbucket.org/ambv/configparser/get/"
11478 version ".tar.bz2"))
11479 (file-name (string-append name "-" version ".tar.gz"))
11480 (sha256
11481 (base32
11482 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
11483 (build-system python-build-system)
11484 (home-page "http://docs.python.org/py3k/library/configparser.html")
11485 (synopsis "Backport of configparser from python 3.5")
11486 (description "@code{python-configparser} is a backport of
11487@code{configparser} from Python 3.5 so that it can be used directly
11488in other versions.")
11489 (license license:expat)))
11490
11491(define-public python2-configparser
11492 (package-with-python2 python-configparser))
11493
11494(define-public python-mando
11495 (package
11496 (name "python-mando")
11497 (version "0.6.4")
11498 (source (origin
11499 (method url-fetch)
11500 (uri (pypi-uri "mando" version))
11501 (sha256
11502 (base32
11503 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
11504 (build-system python-build-system)
11505 (propagated-inputs
11506 `(("python-rst2ansi" ,python-rst2ansi)
11507 ("python-six" ,python-six)))
11508 (native-inputs
11509 `(("python-pytest" ,python-pytest)))
11510 (home-page "https://mando.readthedocs.org/")
11511 (synopsis
11512 "Wrapper around argparse, allowing creation of complete CLI applications")
11513 (description
11514 "This package is a wrapper around argparse, allowing you to write complete CLI
11515applications in seconds while maintaining all the flexibility.")
11516 (license license:expat)))
11517
11518(define-public python2-mando
11519 (package-with-python2 python-mando))
11520
11521(define-public python-fudge
11522 (package
11523 (name "python-fudge")
11524 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
11525 ;; package, which is currently the only use of this package.
11526 (version "0.9.6")
11527 (source
11528 (origin
11529 (method url-fetch)
11530 (uri (pypi-uri "fudge" version))
11531 (sha256
11532 (base32
11533 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
11534 (build-system python-build-system)
11535 (arguments
11536 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
11537 (home-page "https://github.com/fudge-py/fudge")
11538 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
11539 (description
11540 "Fudge is a Python module for using fake objects (mocks and stubs) to
11541test real ones.
11542
11543In readable Python code, you declare the methods available on your fake object
11544and how they should be called. Then you inject that into your application and
11545start testing. This declarative approach means you don’t have to record and
11546playback actions and you don’t have to inspect your fakes after running code.
11547If the fake object was used incorrectly then you’ll see an informative
11548exception message with a traceback that points to the culprit.")
11549 (license license:expat)))
11550
11551(define-public python2-fudge
11552 (package-with-python2 python-fudge))
11553
11554(define-public python-mwclient
11555 (package
11556 (name "python-mwclient")
11557 (version "0.8.4")
11558 (source
11559 (origin
11560 (method url-fetch)
11561 ;; The PyPI version wouldn't contain tests.
11562 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
11563 "v" version ".tar.gz"))
11564 (file-name (string-append name "-" version ".tar.gz"))
11565 (sha256
11566 (base32
11567 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
11568 (build-system python-build-system)
11569 (propagated-inputs
11570 `(("python-requests" ,python-requests)
11571 ("python-requests-oauthlib"
11572 ,python-requests-oauthlib)
11573 ("python-six" ,python-six)))
11574 (native-inputs
11575 `(("python-mock" ,python-mock)
11576 ("python-pytest" ,python-pytest)
11577 ("python-pytest-pep8" ,python-pytest-pep8)
11578 ("python-pytest-cache" ,python-pytest-cache)
11579 ("python-pytest-cov" ,python-pytest-cov)
11580 ("python-responses" ,python-responses)))
11581 (home-page "https://github.com/btongminh/mwclient")
11582 (synopsis "MediaWiki API client")
11583 (description "This package provides a MediaWiki API client.")
11584 (license license:expat)))
11585
11586(define-public python2-mwclient
11587 (package-with-python2 python-mwclient))
11588
11589(define-public python-utils
11590 (package
11591 (name "python-utils")
11592 (version "2.1.0")
11593 (source (origin
11594 (method url-fetch)
11595 (uri (pypi-uri "python-utils" version))
11596 (sha256
11597 (base32
11598 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
11599 (build-system python-build-system)
11600 (native-inputs
11601 `(("pytest-runner" ,python-pytest-runner)
11602 ("pytest" ,python-pytest)
11603 ("six" ,python-six)))
11604 (home-page "https://github.com/WoLpH/python-utils")
11605 (synopsis "Convenient utilities not included with the standard Python install")
11606 (description
11607 "Python Utils is a collection of small Python functions and classes which
11608make common patterns shorter and easier.")
11609 (license license:bsd-2)))
11610
11611(define-public python2-utils
11612 (package-with-python2 python-utils))
11613
11614(define-public python-sphinx-me
11615 (package
11616 (name "python-sphinx-me")
11617 (version "0.3")
11618 (source
11619 (origin
11620 (method url-fetch)
11621 (uri (pypi-uri "sphinx-me" version))
11622 (sha256
11623 (base32
11624 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
11625 (build-system python-build-system)
11626 (home-page "https://github.com/stephenmcd/sphinx-me")
11627 (synopsis "Create a Sphinx documentation shell")
11628 (description
11629 "Create a Sphinx documentation shell for your project and include the
11630README file as the documentation index. It handles extracting the required
11631meta data such as the project name, author and version from your project for
11632use in your Sphinx docs.")
11633 (license license:bsd-2)))
11634
11635(define-public python2-sphinx-me
11636 (package-with-python2 python-sphinx-me))
11637
11638(define-public python-diff-match-patch
11639 (package
11640 (name "python-diff-match-patch")
11641 (version "20121119")
11642 (source
11643 (origin
11644 (method url-fetch)
11645 (uri (pypi-uri "diff-match-patch" version))
11646 (sha256
11647 (base32
11648 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
11649 (build-system python-build-system)
11650 (home-page "https://code.google.com/p/google-diff-match-patch")
11651 (synopsis "Synchronize plain text")
11652 (description "Diff Match and Patch libraries offer robust algorithms to
11653perform the operations required for synchronizing plain text.")
11654 (license license:asl2.0)))
11655
11656(define-public python2-diff-match-patch
11657 (package-with-python2 python-diff-match-patch))
11658
11659(define-public python-dirsync
11660 (package
11661 (name "python-dirsync")
11662 (version "2.2.3")
11663 (source
11664 (origin
11665 (method url-fetch)
11666 (uri (pypi-uri "dirsync" version))
11667 (sha256
11668 (base32
11669 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
11670 (build-system python-build-system)
11671 (propagated-inputs
11672 `(("six" ,python-six)))
11673 (home-page "https://bitbucket.org/tkhyn/dirsync")
11674 (synopsis "Advanced directory tree synchronisation tool")
11675 (description "Advanced directory tree synchronisation tool.")
11676 (license license:expat)))
11677
11678(define-public python2-dirsync
11679 (package-with-python2 python-dirsync))
11680
11681(define-public python-levenshtein
11682 (package
11683 (name "python-levenshtein")
11684 (version "0.12.0")
11685 (source
11686 (origin
11687 (method url-fetch)
11688 (uri (pypi-uri "python-Levenshtein" version))
11689 (sha256
11690 (base32
11691 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
11692 (build-system python-build-system)
11693 (home-page "https://github.com/ztane/python-Levenshtein")
11694 (synopsis "Fast computation of Levenshtein distance and string similarity")
11695 (description
11696 "The Levenshtein Python C extension module contains functions for fast computation of
11697@enumerate
11698@item Levenshtein (edit) distance, and edit operations
11699@item string similarity
11700@item approximate median strings, and generally string averaging
11701@item string sequence and set similarity
11702@end enumerate
11703It supports both normal and Unicode strings.")
11704 (license license:gpl2+)))
11705
11706(define-public python2-levenshtein
11707 (package-with-python2 python-levenshtein))
11708
11709(define-public python-scandir
11710 (package
11711 (name "python-scandir")
11712 (version "1.7")
11713 (source
11714 (origin
11715 (method url-fetch)
11716 (uri (pypi-uri "scandir" version))
11717 (sha256
11718 (base32 "0gbnhjzg42rj87ljv9kb648rfxph69ly3c8r9841dxy4d7l5pmdj"))))
11719 (build-system python-build-system)
11720 (arguments
11721 `(#:phases (modify-phases %standard-phases
11722 (replace 'check
11723 (lambda _
11724 (invoke "python" "test/run_tests.py"))))))
11725 (home-page "https://github.com/benhoyt/scandir")
11726 (synopsis "Directory iteration function")
11727 (description
11728 "Directory iteration function like os.listdir(), except that instead of
11729returning a list of bare filenames, it yields DirEntry objects that include
11730file type and stat information along with the name. Using scandir() increases
11731the speed of os.walk() by 2-20 times (depending on the platform and file
11732system) by avoiding unnecessary calls to os.stat() in most cases.
11733
11734This package is part of the Python standard library since version 3.5.")
11735 (license license:bsd-3)))
11736
11737(define-public python2-scandir
11738 (package-with-python2 python-scandir))
11739
11740(define-public python2-stemming
11741 (package
11742 (name "python2-stemming")
11743 (version "1.0.1")
11744 (source
11745 (origin
11746 (method url-fetch)
11747 (uri (pypi-uri "stemming" version))
11748 (sha256
11749 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
11750 (build-system python-build-system)
11751 (arguments
11752 `(#:python ,python-2))
11753 (home-page "https://bitbucket.org/mchaput/stemming/overview")
11754 (synopsis "Python implementations of various stemming algorithms")
11755 (description
11756 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
11757stemming algorithms for English. These implementations are straightforward and
11758efficient, unlike some Python versions of the same algorithms available on the
11759Web. This package is an extraction of the stemming code included in the Whoosh
11760search engine.")
11761 (license license:public-domain)))
11762
11763(define-public python-factory-boy
11764 (package
11765 (name "python-factory-boy")
11766 (version "2.8.1")
11767 (source
11768 (origin
11769 (method url-fetch)
11770 (uri (pypi-uri "factory_boy" version))
11771 (sha256
11772 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
11773 (build-system python-build-system)
11774 (arguments
11775 ;; Tests are not included in the tarball.
11776 `(#:tests? #f))
11777 (propagated-inputs
11778 `(("faker" ,python-faker)))
11779 (home-page "https://github.com/benhoyt/scandir")
11780 (synopsis "Versatile test fixtures replacement")
11781 (description
11782 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
11783
11784As a fixtures replacement tool, it aims to replace static, hard to maintain
11785fixtures with easy-to-use factories for complex object.
11786
11787Instead of building an exhaustive test setup with every possible combination
11788of corner cases, factory_boy allows you to use objects customized for the
11789current test, while only declaring the test-specific fields")
11790 (license license:expat)))
11791
11792(define-public python2-factory-boy
11793 (package-with-python2 python-factory-boy))
11794
11795(define-public python-translate-toolkit
11796 (package
11797 (name "python-translate-toolkit")
11798 (version "2.1.0")
11799 (source
11800 (origin
11801 (method url-fetch)
11802 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
11803 (sha256
11804 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
11805 (build-system python-build-system)
11806 (native-inputs
11807 `(("python-pytest" ,python-pytest)
11808 ("python-sphinx" ,python-sphinx)))
11809 (propagated-inputs
11810 `(("python-babel" ,python-babel)
11811 ("python-beautifulsoup4" ,python-beautifulsoup4)
11812 ("python-chardet" ,python-chardet)
11813 ("python-diff-match-patch" ,python-diff-match-patch)
11814 ("python-levenshtein" ,python-levenshtein)
11815 ("python-lxml" ,python-lxml)
11816 ("python-six" ,python-six)
11817 ("python-vobject" ,python-vobject)
11818 ("python-pyyaml" ,python-pyyaml)))
11819 (arguments
11820 ;; TODO: tests are not run, because they end with
11821 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
11822 ;; 'parse_funcs'
11823 ;; during test setup.
11824 `(#:tests? #f))
11825 (home-page "http://toolkit.translatehouse.org")
11826 (synopsis "Tools and API for translation and localization engineering")
11827 (description
11828 "Tools and API for translation and localization engineering. It contains
11829several utilities, as well as an API for building localization tools.")
11830 (license license:gpl2+)))
11831
11832(define-public python2-translate-toolkit
11833 (package-with-python2 python-translate-toolkit))
11834
11835(define-public python-packaging
11836 (package
11837 (name "python-packaging")
11838 (version "16.8")
11839 (source
11840 (origin
11841 (method url-fetch)
11842 (uri (pypi-uri "packaging" version))
11843 (sha256
11844 (base32
11845 "17k1xbjshackwvbsnxqixbph8rbqhz4bf4g3al5xyzhavxgq6l2x"))))
11846 (build-system python-build-system)
11847 (native-inputs
11848 `(("python-pretend" ,python-pretend)
11849 ("python-pytest" ,python-pytest)))
11850 (propagated-inputs
11851 `(("python-pyparsing" ,python-pyparsing)
11852 ("python-six" ,python-six)))
11853 (home-page "https://github.com/pypa/packaging")
11854 (synopsis "Core utilities for Python packages")
11855 (description "Packaging is a Python module for dealing with Python packages.
11856It offers an interface for working with package versions, names, and dependency
11857information.")
11858 ;; From 'LICENSE': This software is made available under the terms of
11859 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
11860 ;; Contributions to this software is made under the terms of *both* these
11861 ;; licenses.
11862 (license (list license:asl2.0 license:bsd-2))))
11863
11864(define-public python2-packaging
11865 (package-with-python2 python-packaging))
11866
11867(define-public python-relatorio
11868 (package
11869 (name "python-relatorio")
11870 (version "0.8.0")
11871 (source
11872 (origin
11873 (method url-fetch)
11874 (uri (pypi-uri "relatorio" version))
11875 (sha256
11876 (base32
11877 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
11878 (build-system python-build-system)
11879 (propagated-inputs
11880 `(("python-lxml" ,python-lxml)
11881 ("python-genshi" ,python-genshi)))
11882 (native-inputs
11883 `(("python-magic" ,python-magic)))
11884 (home-page "https://relatorio.tryton.org/")
11885 (synopsis "Templating library able to output ODT and PDF files")
11886 (description "Relatorio is a templating library which provides a way to
11887easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
11888for more filetypes can be easily added by creating plugins for them.")
11889 (license license:gpl3+)))
11890
11891(define-public python2-relatorio
11892 (package-with-python2 python-relatorio))
11893
11894(define-public python-radon
11895 (package
11896 (name "python-radon")
11897 (version "2.2.0")
11898 (source
11899 (origin
11900 (method url-fetch)
11901 (uri (pypi-uri "radon" version))
11902 (sha256
11903 (base32
11904 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
11905 (build-system python-build-system)
11906 (arguments
11907 `(#:phases (modify-phases %standard-phases
11908 (replace 'check
11909 (lambda _
11910 (invoke "python" "radon/tests/run.py"))))))
11911 (propagated-inputs
11912 `(("python-colorama" ,python-colorama)
11913 ("python-flake8-polyfill" ,python-flake8-polyfill)
11914 ("python-mando" ,python-mando)))
11915 (native-inputs
11916 `(("python-pytest" ,python-pytest)
11917 ("python-pytest-mock" ,python-pytest-mock)))
11918 (home-page "https://radon.readthedocs.org/")
11919 (synopsis "Code Metrics in Python")
11920 (description "Radon is a Python tool which computes various code metrics.
11921Supported metrics are:
11922@itemize @bullet
11923@item raw metrics: SLOC, comment lines, blank lines, &c.
11924@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
11925@item Halstead metrics (all of them)
11926@item the Maintainability Index (a Visual Studio metric)
11927@end itemize")
11928 (license license:expat)))
11929
11930(define-public python2-radon
11931 (package-with-python2 python-radon))
11932
11933(define-public python-sure
11934 (package
11935 (name "python-sure")
11936 (version "1.4.11")
11937 (source
11938 (origin
11939 (method url-fetch)
11940 (uri (pypi-uri "sure" version))
11941 (sha256
11942 (base32
11943 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
11944 (build-system python-build-system)
11945 (propagated-inputs
11946 `(("python-mock" ,python-mock)
11947 ("python-six" ,python-six)))
11948 (native-inputs
11949 `(("python-nose" ,python-nose)))
11950 (home-page "https://github.com/gabrielfalcao/sure")
11951 (synopsis "Automated testing library in python for python")
11952 (description
11953 "Sure is a python library that leverages a DSL for writing assertions.
11954Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
11955 (license license:gpl3+)))
11956
11957(define-public python2-sure
11958 (package-with-python2 python-sure))
11959
11960(define-public python2-couleur
11961 ;; This package does not seem to support python3 at all, hence,
11962 ;; only the python2 variant definition is provided.
11963 (package
11964 (name "python2-couleur")
11965 (version "0.6.2")
11966 (source
11967 (origin
11968 (method url-fetch)
11969 (uri (pypi-uri "couleur" version))
11970 (sha256
11971 (base32
11972 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
11973 (build-system python-build-system)
11974 (arguments
11975 `(#:python ,python-2))
11976 (home-page "https://github.com/gabrielfalcao/couleur")
11977 (synopsis
11978 "ANSI terminal tool for python, colored shell and other handy fancy features")
11979 (description
11980 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
11981terminal such as coloured output in the shell, overwriting output, indentation, etc.")
11982 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
11983 ;; https://github.com/gabrielfalcao/couleur/issues/11
11984 (license license:lgpl3+)))
11985
11986(define-public python-misaka
11987 (package
11988 (name "python-misaka")
11989 (version "2.1.0")
11990 (source
11991 (origin
11992 (method url-fetch)
11993 (uri (pypi-uri "misaka" version))
11994 (sha256
11995 (base32
11996 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
11997 (build-system python-build-system)
11998 (arguments
11999 `(;; Line 37 of setup.py calls self.run_command('develop')
12000 ;; in the 'check' phase. This command seems to be trying
12001 ;; to write to
12002 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12003 ;; for which it does not have the permission to write.
12004 #:tests? #f))
12005 (propagated-inputs
12006 `(("python-cffi" ,python-cffi)))
12007 (home-page "https://github.com/FSX/misaka")
12008 (synopsis "Python binding for Hoedown")
12009 (description
12010 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12011library written in C. It features a fast HTML renderer and functionality to make custom
12012renderers (e.g. man pages or LaTeX).")
12013 (license license:expat)))
12014
12015(define-public python2-misaka
12016 (package-with-python2 python-misaka))
12017
12018(define-public python2-steadymark
12019 ;; This is forced into being a python2 only variant
12020 ;; due to its dependence on couleur that has no support
12021 ;; for python3
12022 (package
12023 (name "python2-steadymark")
12024 (version "0.7.3")
12025 (source
12026 (origin
12027 (method url-fetch)
12028 (uri (pypi-uri "steadymark" version))
12029 (sha256
12030 (base32
12031 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12032 (build-system python-build-system)
12033 (native-inputs
12034 `(("python-couleur" ,python2-couleur)
12035 ("python-sure" ,python2-sure)
12036 ("python-misaka" ,python2-misaka)))
12037 (arguments
12038 `(#:python ,python-2
12039 #:phases
12040 (modify-phases %standard-phases
12041 (add-before 'build 'patch-setup-py
12042 (lambda _
12043 ;; Update requirements from dependency==version
12044 ;; to dependency>=version
12045 (substitute* "setup.py"
12046 (("==") ">="))
12047 #t)))))
12048 (home-page "https://github.com/gabrielfalcao/steadymark")
12049 (synopsis "Markdown-based test runner for python")
12050 (description
12051 "@code{Steadymark} allows documentation to be written in github-flavoured
12052markdown. The documentation may contain snippets of code surrounded by python
12053code blocks and @code{Steadymark} will find these snippets and run them, making
12054sure that there are no old malfunctional examples in the documentation examples.")
12055 (license license:expat)))
12056
12057(define-public python-jsonpointer
12058 (package
12059 (name "python-jsonpointer")
12060 (version "1.10")
12061 (source
12062 (origin
12063 (method url-fetch)
12064 (uri (pypi-uri "jsonpointer" version))
12065 (sha256
12066 (base32
12067 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12068 (build-system python-build-system)
12069 (home-page "https://github.com/stefankoegl/python-json-pointer")
12070 (synopsis "Identify specific nodes in a JSON document")
12071 (description "@code{jsonpointer} allows you to access specific nodes
12072by path in a JSON document (see RFC 6901).")
12073 (license license:bsd-3)))
12074
12075(define-public python2-jsonpointer
12076 (package-with-python2 python-jsonpointer))
12077
12078(define-public python-jsonpatch
12079 (package
12080 (name "python-jsonpatch")
12081 (version "1.16")
12082 (source
12083 (origin
12084 (method url-fetch)
12085 ;; pypi version lacks tests.js
12086 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12087 "archive/v" version ".tar.gz"))
12088 (file-name (string-append name "-" version ".tar.gz"))
12089 (sha256
12090 (base32
12091 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12092 (build-system python-build-system)
12093 (native-inputs
12094 `(("python-jsonpointer" ,python-jsonpointer)))
12095 (home-page "https://github.com/stefankoegl/python-json-patch")
12096 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12097 (description "@code{jsonpatch} is a library and program that allows
12098applying JSON Patches according to RFC 6902.")
12099 (license license:bsd-3)))
12100
12101(define-public python2-jsonpatch
12102 (package-with-python2 python-jsonpatch))
12103
12104(define-public python-jsonpatch-0.4
12105 (package (inherit python-jsonpatch)
12106 (name "python-jsonpatch")
12107 (version "0.4")
12108 (source
12109 (origin
12110 (method url-fetch)
12111 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12112 "archive/v" version ".tar.gz"))
12113 (file-name (string-append name "-" version ".tar.gz"))
12114 (sha256
12115 (base32
12116 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12117
12118(define-public python2-jsonpatch-0.4
12119 (package-with-python2 python-jsonpatch-0.4))
12120
12121(define-public python-rfc3986
12122 (package
12123 (name "python-rfc3986")
12124 (version "1.1.0")
12125 (source (origin
12126 (method url-fetch)
12127 (uri (pypi-uri "rfc3986" version))
12128 (sha256
12129 (base32
12130 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12131 (build-system python-build-system)
12132 (arguments
12133 `(#:modules ((guix build utils)
12134 (guix build python-build-system)
12135 (ice-9 ftw)
12136 (srfi srfi-1)
12137 (srfi srfi-26))
12138 #:phases
12139 (modify-phases %standard-phases
12140 (replace 'check
12141 (lambda _
12142 (let ((cwd (getcwd)))
12143 (setenv "PYTHONPATH"
12144 (string-append cwd "/build/"
12145 (find (cut string-prefix? "lib" <>)
12146 (scandir (string-append cwd "/build")))
12147 ":"
12148 (getenv "PYTHONPATH")))
12149 (invoke "pytest" "-v")))))))
12150 (native-inputs
12151 `(("python-pytest" ,python-pytest)))
12152 (home-page "https://rfc3986.readthedocs.io/")
12153 (synopsis "Parse and validate URI references")
12154 (description
12155 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12156validation and authority parsing. This module also supports RFC@tie{}6874
12157which adds support for zone identifiers to IPv6 addresses.")
12158 (license license:asl2.0)))
12159
12160(define-public python2-rfc3986
12161 (package-with-python2 python-rfc3986))
12162
12163(define-public python-rfc3987
12164 (package
12165 (name "python-rfc3987")
12166 (version "1.3.7")
12167 (source
12168 (origin
12169 (method url-fetch)
12170 (uri (pypi-uri "rfc3987" version))
12171 (sha256
12172 (base32
12173 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12174 (build-system python-build-system)
12175 (home-page "https://pypi.python.org/pypi/rfc3987")
12176 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12177 (description "@code{rfc3987} provides routines for parsing and
12178validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12179 (license license:gpl3+)))
12180
12181(define-public python2-rfc3987
12182 (package-with-python2 python-rfc3987))
12183
12184(define-public python-validate-email
12185 (package
12186 (name "python-validate-email")
12187 (version "1.3")
12188 (source
12189 (origin
12190 (method url-fetch)
12191 (uri (pypi-uri "validate_email" version))
12192 (sha256
12193 (base32
12194 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12195 (build-system python-build-system)
12196 (home-page "https://github.com/syrusakbary/validate_email")
12197 (synopsis "Verifies if an email address is valid and really exists")
12198 (description "@code{validate_email} can be used to verify if an email
12199address is valid and really exists.")
12200 (license license:lgpl3+)))
12201
12202(define-public python2-validate-email
12203 (package-with-python2 python-validate-email))
12204
12205(define-public python-flex
12206 (package
12207 (name "python-flex")
12208 (version "6.10.0")
12209 (source
12210 (origin
12211 (method url-fetch)
12212 (uri (pypi-uri "flex" version))
12213 (sha256
12214 (base32
12215 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
12216 (build-system python-build-system)
12217 (propagated-inputs
12218 `(("python-click" ,python-click)
12219 ("python-iso8601" ,python-iso8601)
12220 ("python-jsonpointer" ,python-jsonpointer)
12221 ("python-pyyaml" ,python-pyyaml)
12222 ("python-requests" ,python-requests)
12223 ("python-rfc3987" ,python-rfc3987)
12224 ("python-six" ,python-six)
12225 ("python-validate-email" ,python-validate-email)))
12226 (home-page "https://github.com/pipermerriam/flex")
12227 (synopsis "Validates Swagger schemata")
12228 (description "@code{flex} can be used to validate Swagger schemata.")
12229 (license license:bsd-3)))
12230
12231(define-public python2-flex
12232 (package-with-python2 python-flex))
12233
12234(define-public python-marshmallow
12235 (package
12236 (name "python-marshmallow")
12237 (version "3.0.0b14")
12238 (source
12239 (origin
12240 (method url-fetch)
12241 (uri (pypi-uri "marshmallow" version))
12242 (sha256
12243 (base32
12244 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
12245 (build-system python-build-system)
12246 (propagated-inputs
12247 `(("python-dateutil" ,python-dateutil)
12248 ("python-simplejson" ,python-simplejson)))
12249 (native-inputs
12250 `(("python-pytest" ,python-pytest)
12251 ("python-pytz" ,python-pytz)))
12252 (home-page "https://github.com/marshmallow-code/marshmallow")
12253 (synopsis "Convert complex datatypes to and from native
12254Python datatypes.")
12255 (description "@code{marshmallow} provides a library for converting
12256complex datatypes to and from native Python datatypes.")
12257 (license license:expat)))
12258
12259(define-public python2-marshmallow
12260 (package-with-python2 python-marshmallow))
12261
12262(define-public python-apispec
12263 (package
12264 (name "python-apispec")
12265 (version "0.25.3")
12266 (source
12267 (origin
12268 (method url-fetch)
12269 (uri (pypi-uri "apispec" version))
12270 (sha256
12271 (base32
12272 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
12273 (build-system python-build-system)
12274 (propagated-inputs
12275 `(("python-pyyaml" ,python-pyyaml)))
12276 (native-inputs
12277 `(("python-pytest" ,python-pytest)
12278 ("python-flask" ,python-flask)
12279 ("python-marshmallow" ,python-marshmallow)
12280 ("python-tornado" ,python-tornado)
12281 ("python-bottle" ,python-bottle)
12282 ("python-mock" ,python-mock)))
12283 (home-page "https://github.com/marshmallow-code/apispec")
12284 (synopsis "Swagger 2.0 API specification generator")
12285 (description "@code{python-apispec} is a pluggable API specification
12286generator. Currently supports the OpenAPI specification (f.k.a.
12287Swagger 2.0).")
12288 (license license:expat)))
12289
12290(define-public python2-apispec
12291 (package-with-python2 python-apispec))
12292
12293(define-public python-flasgger
12294 (package
12295 (name "python-flasgger")
12296 (version "0.6.3")
12297 (source
12298 (origin
12299 (method url-fetch)
12300 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
12301 version ".tar.gz"))
12302 (file-name (string-append name "-" version ".tar.gz"))
12303 (sha256
12304 (base32
12305 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
12306 (build-system python-build-system)
12307 (arguments
12308 `(#:phases
12309 (modify-phases %standard-phases
12310 (replace 'check
12311 (lambda* (#:key inputs outputs #:allow-other-keys)
12312 (substitute* "Makefile"
12313 (("flake8 flasgger --ignore=F403")
12314 "flake8 flasgger --ignore=E731,F403"))
12315 (setenv "PYTHONPATH" (string-append (getcwd)
12316 ":"
12317 (getenv "PYTHONPATH")))
12318 (zero? (system* "py.test")))))))
12319 (propagated-inputs
12320 `(("python-flask" ,python-flask)
12321 ("python-pyyaml" ,python-pyyaml)
12322 ("python-jsonschema" ,python-jsonschema)
12323 ("python-mistune" ,python-mistune)
12324 ("python-six" ,python-six)))
12325 (native-inputs
12326 `(("python-decorator" ,python-decorator)
12327 ("python-flake8" ,python-flake8)
12328 ("python-flask-restful" ,python-flask-restful)
12329 ("python-flex" ,python-flex)
12330 ("python-pytest" ,python-pytest)
12331 ("python-pytest-cov" ,python-pytest-cov)
12332 ("python-marshmallow" ,python-marshmallow)
12333 ("python-apispec" ,python-apispec)))
12334 (home-page "https://github.com/rochacbruno/flasgger/")
12335 (synopsis "Extract Swagger specs from your Flask project")
12336 (description "@code{python-flasgger} allows extracting Swagger specs
12337from your Flask project. It is a fork of Flask-Swagger.")
12338 (license license:expat)))
12339
12340(define-public python2-flasgger
12341 (package-with-python2 python-flasgger))
12342
12343(define-public python-swagger-spec-validator
12344 (package
12345 (name "python-swagger-spec-validator")
12346 (version "2.1.0")
12347 (source
12348 (origin
12349 (method url-fetch)
12350 (uri (pypi-uri "swagger-spec-validator" version))
12351 (sha256
12352 (base32
12353 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
12354 (build-system python-build-system)
12355 (propagated-inputs
12356 `(("python-jsonschema" ,python-jsonschema)
12357 ("python-six" ,python-six)))
12358 (home-page
12359 "https://github.com/Yelp/swagger_spec_validator")
12360 (synopsis "Validation of Swagger specifications")
12361 (description "@code{swagger_spec_validator} provides a library for
12362validating Swagger API specifications.")
12363 (license license:asl2.0)))
12364
12365(define-public python2-swagger-spec-validator
12366 (package-with-python2 python-swagger-spec-validator))
12367
12368(define-public python-apache-libcloud
12369 (package
12370 (name "python-apache-libcloud")
12371 (version "2.0.0")
12372 (source
12373 (origin
12374 (method url-fetch)
12375 (uri (pypi-uri "apache-libcloud" version))
12376 (sha256
12377 (base32
12378 "1a71z02ckcxld72k4qgmdnkjan52c4wczncs3p2mp5yafh7dsan7"))))
12379 (build-system python-build-system)
12380 (arguments
12381 `(#:phases
12382 (modify-phases %standard-phases
12383 (add-after 'unpack 'patch-ssh
12384 (lambda* (#:key inputs #:allow-other-keys)
12385 (substitute* "libcloud/compute/ssh.py"
12386 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
12387 "/bin/ssh" "'")))
12388 #t))
12389 (add-after 'unpack 'patch-tests
12390 (lambda _
12391 (substitute* "./libcloud/test/test_file_fixtures.py"
12392 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
12393 (("def _ascii") "def _raw_data(self, method, url, body, headers):
12394 return (httplib.OK,
12395 \"1234abcd\",
12396 {\"test\": \"value\"},
12397 httplib.responses[httplib.OK])
12398 def _ascii"))
12399 (substitute* "libcloud/test/compute/test_ssh_client.py"
12400 (("class ShellOutSSHClientTests")
12401 "@unittest.skip(\"Guix container doesn't have ssh service\")
12402class ShellOutSSHClientTests")
12403 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
12404 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
12405 (("'.xF0', '.x90', '.x8D', '.x88'")
12406 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
12407 #t)))))
12408 (inputs
12409 `(("openssh" ,openssh)))
12410 (propagated-inputs
12411 `(("python-paramiko" ,python-paramiko)
12412 ("python-requests" ,python-requests)))
12413 (native-inputs
12414 `(("python-lockfile" ,python-lockfile)
12415 ("python-mock" ,python-mock)
12416 ("python-requests-mock" ,python-requests-mock)))
12417 (home-page "https://libcloud.apache.org/")
12418 (synopsis "Unified Cloud API")
12419 (description "@code{libcloud} is a Python library for interacting with
12420many of the popular cloud service providers using a unified API.")
12421 (license license:asl2.0)))
12422
12423(define-public python2-apache-libcloud
12424 (package-with-python2 python-apache-libcloud))
12425
12426(define-public python-smmap2
12427 (package
12428 (name "python-smmap2")
12429 (version "2.0.3")
12430 (source
12431 (origin
12432 (method url-fetch)
12433 (uri (pypi-uri "smmap2" version))
12434 (sha256
12435 (base32
12436 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
12437 (build-system python-build-system)
12438 (native-inputs
12439 `(("python-nosexcover" ,python-nosexcover)))
12440 (home-page "https://github.com/Byron/smmap")
12441 (synopsis "Python sliding window memory map manager")
12442 (description "@code{smmap2} is a pure Python implementation of a sliding
12443window memory map manager.")
12444 (license license:bsd-3)))
12445
12446(define-public python2-smmap2
12447 (package-with-python2 python-smmap2))
12448
12449(define-public python-regex
12450 (package
12451 (name "python-regex")
12452 (version "2017.06.07")
12453 (source (origin
12454 (method url-fetch)
12455 (uri (pypi-uri "regex" version))
12456 (sha256
12457 (base32
12458 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
12459 (build-system python-build-system)
12460 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
12461 (synopsis "Alternative regular expression module")
12462 (description "This regular expression implementation is backwards-
12463compatible with the standard @code{re} module, but offers additional
12464functionality like full case-folding for case-insensitive matches in Unicode.")
12465 (license license:psfl)))
12466
12467(define-public python2-regex
12468 (package-with-python2 python-regex))
12469
12470(define-public python2-pyopengl
12471 (package
12472 (name "python2-pyopengl")
12473 (version "3.1.0")
12474 (source
12475 (origin
12476 (method url-fetch)
12477 (uri (pypi-uri "PyOpenGL" version))
12478 (sha256
12479 (base32
12480 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
12481 (arguments
12482 `(#:python ,python-2))
12483 (build-system python-build-system)
12484 (home-page "http://pyopengl.sourceforge.net")
12485 (synopsis "Standard OpenGL bindings for Python")
12486 (description
12487 "PyOpenGL is the most common cross platform Python binding to OpenGL and
12488related APIs. The binding is created using the standard @code{ctypes}
12489library.")
12490 (license license:bsd-3)))
12491
12492(define-public python2-pyopengl-accelerate
12493 (package
12494 (inherit python2-pyopengl)
12495 (name "python2-pyopengl-accelerate")
12496 (version "3.1.0")
12497 (source
12498 (origin
12499 (method url-fetch)
12500 (uri (pypi-uri "PyOpenGL-accelerate" version))
12501 (sha256
12502 (base32
12503 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
12504 (synopsis "Acceleration code for PyOpenGL")
12505 (description
12506 "This is the Cython-coded accelerator module for PyOpenGL.")))
12507
12508(define-public python-rencode
12509 (package
12510 (name "python-rencode")
12511 (version "1.0.5")
12512 (source
12513 (origin
12514 (method url-fetch)
12515 (uri (pypi-uri "rencode" version))
12516 (sha256
12517 (base32
12518 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
12519 (build-system python-build-system)
12520 (arguments
12521 `(#:phases
12522 (modify-phases %standard-phases
12523 (add-before 'check 'delete-bogus-test
12524 ;; This test requires /home/aresch/Downloads, which is not provided by
12525 ;; the build environment.
12526 (lambda _
12527 (delete-file "rencode/t.py")
12528 #t)))))
12529 (native-inputs `(("pkg-config" ,pkg-config)
12530 ("python-cython" ,python-cython)))
12531 (home-page "https://github.com/aresch/rencode")
12532 (synopsis "Serialization of heterogeneous data structures")
12533 (description
12534 "The @code{rencode} module is a data structure serialization library,
12535similar to @code{bencode} from the BitTorrent project. For complex,
12536heterogeneous data structures with many small elements, r-encoding stake up
12537significantly less space than b-encodings. This version of rencode is a
12538complete rewrite in Cython to attempt to increase the performance over the
12539pure Python module.")
12540 (license license:bsd-3)))
12541
12542(define-public python2-rencode
12543 (package-with-python2 python-rencode))
12544
12545(define-public python-xenon
12546 (package
12547 (name "python-xenon")
12548 (version "0.5.4")
12549 (source
12550 (origin
12551 (method url-fetch)
12552 (uri (pypi-uri "xenon" version))
12553 (sha256
12554 (base32
12555 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
12556 (build-system python-build-system)
12557 (native-inputs
12558 `(("python-pyyaml" ,python-pyyaml)
12559 ("python-radon" ,python-radon)
12560 ("python-requests" ,python-requests)
12561 ("python-flake8" ,python-flake8)
12562 ("python-tox" ,python-tox)))
12563 (arguments
12564 `(#:phases
12565 (modify-phases %standard-phases
12566 (add-before 'build 'patch-test-requirements
12567 (lambda _
12568 ;; Remove httpretty dependency for tests.
12569 (substitute* "setup.py"
12570 (("httpretty") ""))
12571 #t)))))
12572 (home-page "https://xenon.readthedocs.org/")
12573 (synopsis "Monitor code metrics for Python on your CI server")
12574 (description
12575 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
12576Ideally, @code{xenon} is run every time code is committed. Through command
12577line options, various thresholds can be set for the complexity of code. It
12578will fail (i.e. it will exit with a non-zero exit code) when any of these
12579requirements is not met.")
12580 (license license:expat)))
12581
12582(define-public python2-xenon
12583 (package-with-python2 python-xenon))
12584
12585(define-public python-pysocks
12586 (package
12587 (name "python-pysocks")
12588 (version "1.6.7")
12589 (source
12590 (origin
12591 (method url-fetch)
12592 (uri (pypi-uri "PySocks" version))
12593 (sha256
12594 (base32
12595 "1krkiss578zqwcg4c8iqz1hwscwhsvy2djp3xyvps5gsgvr2j0yh"))))
12596 (build-system python-build-system)
12597 (arguments `(#:tests? #f))
12598 (home-page "https://github.com/Anorov/PySocks")
12599 (synopsis "SOCKS client module")
12600 (description "@code{pysocks} is an updated and semi-actively maintained
12601version of @code{SocksiPy} with bug fixes and extra features.")
12602 (license license:bsd-3)))
12603
12604(define-public python2-pysocks
12605 (package-with-python2 python-pysocks))
12606
12607(define-public python-pydiff
12608 (package
12609 (name "python-pydiff")
12610 (version "0.2")
12611 (source
12612 (origin
12613 (method url-fetch)
12614 (uri (pypi-uri "pydiff" version))
12615 (sha256
12616 (base32
12617 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
12618 (build-system python-build-system)
12619 (home-page "https://github.com/myint/pydiff")
12620 (synopsis "Library to diff two Python files at the bytecode level")
12621 (description
12622 "@code{pydiff} makes it easy to look for actual code changes while
12623ignoring formatting changes.")
12624 (license license:expat)))
12625
12626(define-public python2-pydiff
12627 (package-with-python2 python-pydiff))
12628
12629(define-public python-tqdm
12630 (package
12631 (name "python-tqdm")
12632 (version "4.19.6")
12633 (source
12634 (origin
12635 (method url-fetch)
12636 (uri (pypi-uri "tqdm" version))
12637 (sha256
12638 (base32
12639 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
12640 (build-system python-build-system)
12641 (native-inputs
12642 `(("python-flake8" ,python-flake8)
12643 ("python-nose" ,python-nose)
12644 ("python-coverage" ,python-coverage)))
12645 (home-page "https://github.com/tqdm/tqdm")
12646 (synopsis "Fast, extensible progress meter")
12647 (description
12648 "Make loops show a progress bar on the console by just wrapping any
12649iterable with @code{|tqdm(iterable)|}. Offers many options to define
12650design and layout.")
12651 (license (list license:mpl2.0 license:expat))))
12652
12653(define-public python2-tqdm
12654 (package-with-python2 python-tqdm))
12655
12656(define-public python-pkginfo
12657 (package
12658 (name "python-pkginfo")
12659 (version "1.4.2")
12660 (source
12661 (origin
12662 (method url-fetch)
12663 (uri (pypi-uri "pkginfo" version))
12664 (sha256
12665 (base32
12666 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
12667 (build-system python-build-system)
12668 (arguments
12669 ;; The tests are broken upstream.
12670 '(#:tests? #f))
12671 (home-page
12672 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
12673 (synopsis
12674 "Query metadatdata from sdists, bdists, and installed packages")
12675 (description
12676 "API to query the distutils metadata written in @file{PKG-INFO} inside a
12677source distriubtion (an sdist) or a binary distribution (e.g., created by
12678running bdist_egg). It can also query the EGG-INFO directory of an installed
12679distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
12680created by running @code{python setup.py develop}).")
12681 (license license:expat)))
12682
12683(define-public python2-pkginfo
12684 (package-with-python2 python-pkginfo))
12685
12686(define-public python-twine
12687 (package
12688 (name "python-twine")
12689 (version "1.9.1")
12690 (source
12691 (origin
12692 (method url-fetch)
12693 (uri (pypi-uri "twine" version))
12694 (sha256
12695 (base32
12696 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
12697 (build-system python-build-system)
12698 (propagated-inputs
12699 `(("python-tqdm" ,python-tqdm)
12700 ("python-pkginfo" ,python-pkginfo)
12701 ("python-requests" ,python-requests)
12702 ("python-requests-toolbelt" ,python-requests-toolbelt)))
12703 (home-page "https://github.com/pypa/twine")
12704 (synopsis "Collection of utilities for interacting with PyPI")
12705 (description
12706 "@code{twine} currently supports registering projects and uploading
12707distributions. It authenticates the user over HTTPS, allows them to pre-sign
12708their files and supports any packaging format (including wheels).")
12709 (license license:asl2.0)))
12710
12711(define-public python2-twine
12712 (package-with-python2 python-twine))
12713
12714(define-public python-linecache2
12715 (package
12716 (name "python-linecache2")
12717 (version "1.0.0")
12718 (source
12719 (origin
12720 (method url-fetch)
12721 (uri (pypi-uri "linecache2" version))
12722 (sha256
12723 (base32
12724 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
12725 (build-system python-build-system)
12726 (arguments
12727 `(;; The tests depend on unittest2, and our version is a bit too old.
12728 #:tests? #f))
12729 (native-inputs
12730 `(("python-pbr" ,python-pbr-minimal)))
12731 (home-page
12732 "https://github.com/testing-cabal/linecache2")
12733 (synopsis "Backports of the linecache module")
12734 (description
12735 "The linecache module allows one to get any line from any file, while
12736attempting to optimize internally, using a cache, the common case where many
12737lines are read from a single file.")
12738 (license license:psfl)))
12739
12740(define-public python2-linecache2
12741 (package-with-python2 python-linecache2))
12742
12743(define-public python-traceback2
12744 (package
12745 (name "python-traceback2")
12746 (version "1.4.0")
12747 (source
12748 (origin
12749 (method url-fetch)
12750 (uri (pypi-uri "traceback2" version))
12751 (sha256
12752 (base32
12753 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
12754 (build-system python-build-system)
12755 (arguments
12756 `(;; python-traceback2 and python-unittest2 depend on one another.
12757 #:tests? #f))
12758 (native-inputs
12759 `(("python-pbr" ,python-pbr-minimal)))
12760 (propagated-inputs
12761 `(("python-linecache2" ,python-linecache2)))
12762 (home-page
12763 "https://github.com/testing-cabal/traceback2")
12764 (synopsis "Backports of the traceback module")
12765 (description
12766 "This module provides a standard interface to extract, format and print
12767stack traces of Python programs. It exactly mimics the behavior of the Python
12768interpreter when it prints a stack trace.")
12769 (license license:psfl)))
12770
12771(define-public python2-traceback2
12772 (package-with-python2 python-traceback2))
12773
12774(define-public python-ratelimiter
12775 (package
12776 (name "python-ratelimiter")
12777 (version "1.2.0")
12778 (source
12779 (origin
12780 (method url-fetch)
12781 (uri (pypi-uri "ratelimiter" version))
12782 (sha256
12783 (base32
12784 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
12785 (build-system python-build-system)
12786 (arguments
12787 '(#:tests? #f)) ; There are no tests in the pypi archive.
12788 (home-page "https://github.com/RazerM/ratelimiter")
12789 (synopsis "Simple rate limiting object")
12790 (description
12791 "The @code{ratelimiter} module ensures that an operation will not be
12792executed more than a given number of times during a given period.")
12793 (license license:asl2.0)))
12794
12795(define-public python2-ratelimiter
12796 (package-with-python2 python-ratelimiter))
12797
12798(define-public python-dukpy
12799 (package
12800 (name "python-dukpy")
12801 (version "0.3")
12802 (source
12803 (origin
12804 (method url-fetch)
12805 (uri (string-append "https://github.com/kovidgoyal/dukpy/archive/v"
12806 version ".tar.gz"))
12807 (file-name (string-append name "-" version ".tar.gz"))
12808 (sha256
12809 (base32
12810 "0pj39rfwlzivqm5hkrsza7gssg6ggpxlq5ivc8f3h7x5pfgc6y6c"))))
12811 (build-system python-build-system)
12812 (home-page "https://github.com/kovidgoyal/dukpy")
12813 (synopsis "Run JavaScript in python")
12814 (description
12815 "dukpy is a JavaScript runtime environment for Python using the duktape
12816embeddable JavaScript engine.")
12817 ;; Dukpy is licensed under MIT like the embedded duktape library,
12818 ;; with 'errors.c' as GPL3.
12819 (license (list license:expat license:gpl3))))
12820
12821(define-public python2-dukpy
12822 (package-with-python2 python-dukpy))
12823
12824(define-public python-jsonrpclib-pelix
12825 (package
12826 (name "python-jsonrpclib-pelix")
12827 (version "0.3.1")
12828 (source
12829 (origin
12830 (method url-fetch)
12831 (uri (pypi-uri "jsonrpclib-pelix" version))
12832 (sha256
12833 (base32
12834 "1qs95vxplxwspbrqy8bvc195s58iy43qkf75yrjfql2sim8b25sl"))))
12835 (build-system python-build-system)
12836 (home-page "https://github.com/tcalmant/jsonrpclib/")
12837 (synopsis "JSON-RPC 2.0 client library for Python")
12838 (description
12839 "This library implements the JSON-RPC v2.0
12840specification (backwards-compatible) as a client library for Python. This
12841version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
12842services.")
12843 (license license:asl2.0)))
12844
12845(define-public python2-jsonrpclib-pelix
12846 (package-with-python2 python-jsonrpclib-pelix))
12847
12848(define-public python-setuptools-scm-git-archive
12849 (package
12850 (name "python-setuptools-scm-git-archive")
12851 (version "1.0")
12852 (source
12853 (origin
12854 (method url-fetch)
12855 (uri (pypi-uri "setuptools_scm_git_archive" version))
12856 (sha256
12857 (base32
12858 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
12859 (build-system python-build-system)
12860 (native-inputs
12861 `(("python-pytest" ,python-pytest)))
12862 (propagated-inputs
12863 `(("python-setuptools-scm" ,python-setuptools-scm)))
12864 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
12865 (synopsis "Setuptools_scm plugin for git archives")
12866 (description
12867 "The setuptools_scm_git_archive package is a plugin to
12868setuptools_scm, which supports obtaining versions from git archives that
12869belong to tagged versions.")
12870 (license license:expat)))
12871
12872(define-public python2-setuptools-scm-git-archive
12873 (package-with-python2 python-setuptools-scm-git-archive))
12874
12875(define-public python-pyclipper
12876 (package
12877 (name "python-pyclipper")
12878 (version "1.0.6")
12879 (source
12880 (origin
12881 (method url-fetch)
12882 (uri (pypi-uri "pyclipper" version ".zip"))
12883 (sha256
12884 (base32
12885 "1zpmwv3bya3j984y5cf9x9d5108kf6mxldcba68wiq0frv5qrssw"))))
12886 (build-system python-build-system)
12887 (arguments
12888 `(#:tests? #f)); 8 Tests fail, 37 succeed
12889 (propagated-inputs
12890 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
12891 (native-inputs
12892 `(("unzip" ,unzip)))
12893 (home-page "https://github.com/greginvm/pyclipper")
12894 (synopsis "Wrapper for Angus Johnson's Clipper library")
12895 (description
12896 "Pyclipper is a Cython wrapper for the C++ translation of the
12897 Angus Johnson's polygon clipping Clipper library (ver. 6.2.1).")
12898 (license license:expat)))
12899
12900(define-public python2-pyclipper
12901 (package-with-python2 python-pyclipper))
12902
12903(define-public python2-booleanoperations
12904 (package
12905 (name "python2-booleanoperations")
12906 (version "0.7.1")
12907 (source
12908 (origin
12909 (method url-fetch)
12910 (uri (pypi-uri "booleanOperations" version ".zip"))
12911 (sha256
12912 (base32
12913 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
12914 (build-system python-build-system)
12915 (arguments
12916 `(#:python ,python-2))
12917 (native-inputs
12918 `(("unzip" ,unzip)
12919 ("python2-pytest" ,python2-pytest)
12920 ("python2-pytest-runner" ,python2-pytest-runner)))
12921 (propagated-inputs
12922 `(("python-fonttools" ,python2-fonttools)
12923 ("python-pyclipper" ,python2-pyclipper)
12924 ("python-ufolib" ,python2-ufolib)))
12925 (home-page "https://github.com/typemytype/booleanOperations")
12926 (synopsis "Boolean operations on paths")
12927 (description
12928 "BooleanOperations provides a Python library that enables
12929boolean operations on paths.")
12930 (license license:expat)))
12931
12932(define-public python-tempdir
12933 (package
12934 (name "python-tempdir")
12935 (version "0.7.1")
12936 (source
12937 (origin
12938 (method url-fetch)
12939 (uri (pypi-uri "tempdir" version))
12940 (sha256
12941 (base32
12942 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
12943 (build-system python-build-system)
12944 (home-page "https://pypi.org/project/tempdir/")
12945 (arguments
12946 ;; the package has no tests
12947 '(#:tests? #f))
12948 (synopsis "Python library for managing temporary directories")
12949 (description
12950 "This library manages temporary directories that are automatically
12951deleted with all their contents when they are no longer needed. It is
12952particularly convenient for use in tests.")
12953 (license license:expat)))
12954
12955(define-public python2-tempdir
12956 (package-with-python2 python-tempdir))
12957
12958(define-public python-activepapers
12959 (package
12960 (name "python-activepapers")
12961 (version "0.2.2")
12962 (source
12963 (origin
12964 (method url-fetch)
12965 (uri (pypi-uri "ActivePapers.Py" version))
12966 (sha256
12967 (base32
12968 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
12969 (build-system python-build-system)
12970 (arguments
12971 `(#:modules ((ice-9 ftw)
12972 (srfi srfi-1)
12973 (guix build utils)
12974 (guix build python-build-system))
12975
12976 #:phases
12977 (modify-phases %standard-phases
12978 (add-after 'unpack 'delete-python2-code
12979 (lambda _
12980 (for-each delete-file
12981 '("lib/activepapers/builtins2.py"
12982 "lib/activepapers/standardlib2.py"
12983 "lib/activepapers/utility2.py"))))
12984 (replace 'check
12985 (lambda _
12986 ;; Deactivate the test cases that download files
12987 (setenv "NO_NETWORK_ACCESS" "1")
12988 ;; For some strange reason, some tests fail if nosetests runs all
12989 ;; test modules in a single execution. They pass if each test
12990 ;; module is run individually.
12991 (for-each (lambda (filename)
12992 (invoke "nosetests"
12993 (string-append "tests/" filename)))
12994 (scandir "tests"
12995 (lambda (filename)
12996 (string-suffix? ".py" filename)))))))))
12997 (native-inputs
12998 `(("python-tempdir" ,python-tempdir)
12999 ("python-nose" ,python-nose)))
13000 (propagated-inputs
13001 `(("python-h5py" ,python-h5py)))
13002 (home-page "http://www.activepapers.org/")
13003 (synopsis "Executable papers for scientific computing")
13004 (description
13005 "ActivePapers is a tool for working with executable papers, which
13006combine data, code, and documentation in single-file packages,
13007suitable for publication as supplementary material or on repositories
13008such as figshare or Zenodo.")
13009 (properties `((python2-variant . ,(delay python2-activepapers))))
13010 (license license:bsd-3)))
13011
13012(define-public python2-activepapers
13013 (let ((base (package-with-python2
13014 (strip-python2-variant python-activepapers))))
13015 (package
13016 (inherit base)
13017 (arguments
13018 (substitute-keyword-arguments (package-arguments base)
13019 ((#:phases phases)
13020 `(modify-phases ,phases
13021 (delete 'delete-python2-code)
13022 (add-after 'unpack 'delete-python3-code
13023 (lambda _
13024 (for-each delete-file
13025 '("lib/activepapers/builtins3.py"
13026 "lib/activepapers/standardlib3.py"
13027 "lib/activepapers/utility3.py")))))))))))
13028
13029(define-public python-semver
13030 (package
13031 (name "python-semver")
13032 (version "2.7.9")
13033 (source
13034 (origin
13035 (method url-fetch)
13036 (uri (pypi-uri "semver" version))
13037 (sha256
13038 (base32
13039 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13040 (build-system python-build-system)
13041 (arguments
13042 `(#:phases
13043 (modify-phases %standard-phases
13044 (add-after 'unpack 'patch-test-requirements
13045 (lambda _
13046 (substitute* "setup.py"
13047 ;; Our Python is new enough.
13048 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13049 #t)))))
13050 (native-inputs
13051 `(("python-tox" ,python-tox)
13052 ("python-virtualenv" ,python-virtualenv)))
13053 (home-page "https://github.com/k-bx/python-semver")
13054 (synopsis "Python helper for Semantic Versioning")
13055 (description "This package provides a Python library for
13056@url{Semantic Versioning, http://semver.org/}.")
13057 (license license:bsd-3)))
13058
13059(define-public python2-semver
13060 (package-with-python2 python-semver))
13061
13062(define-public python2-pyro
13063 (package
13064 (name "python2-pyro")
13065 (version "3.16")
13066 (source
13067 (origin
13068 (method url-fetch)
13069 (uri (pypi-uri "Pyro" version))
13070 (file-name (string-append "Pyro-" version ".tar.gz"))
13071 (sha256
13072 (base32
13073 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13074 (build-system python-build-system)
13075 (arguments
13076 ;; Pyro is not compatible with Python 3
13077 `(#:python ,python-2
13078 ;; Pyro has no test cases for automatic execution
13079 #:tests? #f))
13080 (home-page "http://pythonhosted.org/Pyro/")
13081 (synopsis "Distributed object manager for Python")
13082 (description "Pyro is a Distributed Object Technology system
13083written in Python that is designed to be easy to use. It resembles
13084Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13085which is a system and language independent Distributed Object Technology
13086and has much more to offer than Pyro or RMI. Pyro 3.x is no
13087longer maintained. New projects should use Pyro4 instead, which
13088is the new Pyro version that is actively developed.")
13089 (license license:expat)))
13090
13091(define-public python2-scientific
13092 (package
13093 (name "python2-scientific")
13094 (version "2.9.4")
13095 (source
13096 (origin
13097 (method url-fetch)
13098 (uri (string-append "https://bitbucket.org/khinsen/"
13099 "scientificpython/downloads/ScientificPython-"
13100 version ".tar.gz"))
13101 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13102 (sha256
13103 (base32
13104 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13105 (build-system python-build-system)
13106 (inputs
13107 `(("netcdf" ,netcdf)))
13108 (propagated-inputs
13109 `(("python-numpy" ,python2-numpy-1.8)
13110 ("python-pyro" ,python2-pyro)))
13111 (arguments
13112 ;; ScientificPython is not compatible with Python 3
13113 `(#:python ,python-2
13114 #:tests? #f ; No test suite
13115 #:phases
13116 (modify-phases %standard-phases
13117 (replace 'build
13118 (lambda* (#:key inputs #:allow-other-keys)
13119 (zero? (system* "python" "setup.py" "build"
13120 (string-append "--netcdf_prefix="
13121 (assoc-ref inputs "netcdf")))))))))
13122 (home-page "https://bitbucket.org/khinsen/scientificpython")
13123 (synopsis "Python modules for scientific computing")
13124 (description "ScientificPython is a collection of Python modules that are
13125useful for scientific computing. Most modules are rather general (Geometry,
13126physical units, automatic derivatives, ...) whereas others are more
13127domain-specific (e.g. netCDF and PDB support). The library is currently
13128not actively maintained and works only with Python 2 and NumPy < 1.9.")
13129 (license license:cecill-c)))
13130
13131(define-public python2-mmtk
13132 (package
13133 (name "python2-mmtk")
13134 (version "2.7.11")
13135 (source
13136 (origin
13137 (method url-fetch)
13138 (uri (string-append "https://bitbucket.org/khinsen/"
13139 "mmtk/downloads/MMTK-" version ".tar.gz"))
13140 (file-name (string-append "MMTK-" version ".tar.gz"))
13141 (sha256
13142 (base32
13143 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
13144 (build-system python-build-system)
13145 (native-inputs
13146 `(("netcdf" ,netcdf)))
13147 (propagated-inputs
13148 `(("python-scientific" ,python2-scientific)
13149 ("python-tkinter" ,python-2 "tk")))
13150 (arguments
13151 `(#:python ,python-2
13152 #:tests? #f
13153 #:phases
13154 (modify-phases %standard-phases
13155 (add-before 'build 'includes-from-scientific
13156 (lambda* (#:key inputs #:allow-other-keys)
13157 (mkdir-p "Include/Scientific")
13158 (copy-recursively
13159 (string-append
13160 (assoc-ref inputs "python-scientific")
13161 "/include/python2.7/Scientific")
13162 "Include/Scientific"))))))
13163 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
13164 (synopsis "Python library for molecular simulation")
13165 (description "MMTK is a library for molecular simulations with an emphasis
13166on biomolecules. It provides widely used methods such as Molecular Dynamics
13167and normal mode analysis, but also basic routines for implementing new methods
13168for simulation and analysis. The library is currently not actively maintained
13169and works only with Python 2 and NumPy < 1.9.")
13170 (license license:cecill-c)))
13171
13172(define-public python-phonenumbers
13173 (package
13174 (name "python-phonenumbers")
13175 (version "8.9.1")
13176 (source
13177 (origin
13178 (method url-fetch)
13179 (uri (pypi-uri "phonenumbers" version))
13180 (sha256
13181 (base32
13182 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
13183 (build-system python-build-system)
13184 (home-page
13185 "https://github.com/daviddrysdale/python-phonenumbers")
13186 (synopsis
13187 "Python library for dealing with international phone numbers")
13188 (description
13189 "This package provides a Python port of Google's libphonenumber library.")
13190 (license license:asl2.0)))
13191
13192(define-public python2-phonenumbers
13193 (package-with-python2 python-phonenumbers))
13194
13195(define-public python-send2trash
13196 (package
13197 (name "python-send2trash")
13198 (version "1.4.2")
13199 (source
13200 (origin (method url-fetch)
13201 ;; Source tarball on PyPI doesn't include tests.
13202 (uri (string-append "https://github.com/hsoft/send2trash/archive/"
13203 version ".tar.gz"))
13204 (file-name (string-append name "-" version ".tar.gz"))
13205 (sha256
13206 (base32
13207 "0ffyhwjyx61slkdy38iwjc4gmj7fj9gs2q58f075gwvq630pzm9z"))))
13208 (build-system python-build-system)
13209 (arguments
13210 '(#:phases
13211 (modify-phases %standard-phases
13212 (add-before 'check 'pre-check
13213 (lambda _
13214 (mkdir-p "/tmp/foo")
13215 (setenv "HOME" "/tmp/foo")
13216 #t)))))
13217 (home-page "https://github.com/hsoft/send2trash")
13218 (synopsis "Send files to the user's @file{~/Trash} directory")
13219 (description "This package provides a Python library to send files to the
13220user's @file{~/Trash} directory.")
13221 (license license:bsd-3)))
13222
13223(define-public python2-send2trash
13224 (package
13225 (inherit (package-with-python2 python-send2trash))
13226 (arguments
13227 (substitute-keyword-arguments (package-arguments python-send2trash)
13228 ((#:phases phases)
13229 `(modify-phases ,phases
13230 (add-before 'check 'setenv
13231 (lambda _
13232 (setenv "PYTHONPATH"
13233 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13234 #t))))))
13235 (properties `((python2-variant . ,(delay python-send2trash))))))
13236
13237(define-public python-yapf
13238 (package
13239 (name "python-yapf")
13240 (version "0.21.0")
13241 (source
13242 (origin
13243 (method url-fetch)
13244 (uri (pypi-uri "yapf" version))
13245 (sha256
13246 (base32
13247 "144gc7d6b1415vh02409rnb8qd5kxi6mxlr7y64d5cizgxbf72kx"))))
13248 (build-system python-build-system)
13249 (home-page "https://github.com/google/yapf")
13250 (synopsis "Formatter for Python code")
13251 (description "YAPF is a formatter for Python code. It's based off of
13252@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
13253takes the code and reformats it to the best formatting that conforms to the
13254style guide, even if the original code didn't violate the style guide.")
13255 (license license:asl2.0)))
13256
13257(define-public python2-yapf
13258 (package-with-python2 python-yapf))
13259
13260(define-public python-gyp
13261 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
13262 (revision "0"))
13263 (package
13264 (name "python-gyp")
13265 ;; Google does not release versions,
13266 ;; based on second most recent commit date.
13267 (version (git-version "0.0.0" revision commit))
13268 (source
13269 (origin
13270 ;; Google does not release tarballs,
13271 ;; git checkout is needed.
13272 (method git-fetch)
13273 (uri (git-reference
13274 (url "https://chromium.googlesource.com/external/gyp")
13275 (commit commit)))
13276 (file-name (git-file-name name version))
13277 (sha256
13278 (base32
13279 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
13280 (build-system python-build-system)
13281 (home-page "https://gyp.gsrc.io/")
13282 (synopsis "GYP is a Meta-Build system")
13283 (description
13284 "GYP builds build systems for large, cross platform applications.
13285It can be used to generate XCode projects, Visual Studio projects, Ninja build
13286files, and Makefiles.")
13287 (license license:bsd-3))))
13288
13289(define-public python2-gyp
13290 (package-with-python2 python-gyp))
13291
13292(define-public python-whatever
13293 (package
13294 (name "python-whatever")
13295 (version "0.5")
13296 (source
13297 (origin
13298 (method url-fetch)
13299 (uri (string-append "https://github.com/Suor/whatever/archive/" version
13300 ".tar.gz"))
13301 (sha256
13302 (base32
13303 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
13304 (file-name (string-append name "-" version ".tar.gz"))))
13305 (build-system python-build-system)
13306 (arguments
13307 `(#:phases
13308 (modify-phases %standard-phases
13309 (replace 'check
13310 (lambda _
13311 (invoke "py.test"))))))
13312 (native-inputs
13313 `(("python-pytest" ,python-pytest)))
13314 (home-page "http://github.com/Suor/whatever")
13315 (synopsis "Make anonymous functions by partial application of operators")
13316 (description "@code{whatever} provides an easy way to make anonymous
13317functions by partial application of operators.")
13318 (license license:bsd-3)))
13319
13320(define-public python2-whatever
13321 (package-with-python2 python-whatever))
13322
13323(define-public python-funcy
13324 (package
13325 (name "python-funcy")
13326 (version "1.10")
13327 (source
13328 (origin
13329 (method url-fetch)
13330 (uri (string-append "https://github.com/Suor/funcy/archive/" version
13331 ".tar.gz"))
13332 (sha256
13333 (base32
13334 "1fanxivsip29vgarw6dn39xym3q4pbxcpa11plpp548lvxajpahz"))
13335 (file-name (string-append name "-" version ".tar.gz"))))
13336 (build-system python-build-system)
13337 (arguments
13338 `(#:phases
13339 (modify-phases %standard-phases
13340 (replace 'check
13341 (lambda _
13342 (invoke "py.test"))))))
13343 (native-inputs
13344 `(("python-pytest" ,python-pytest)
13345 ("python-whatever" ,python-whatever)))
13346 (home-page "http://github.com/Suor/funcy")
13347 (synopsis "Functional tools")
13348 (description "@code{funcy} is a library that provides functional tools.
13349Examples are:
13350@enumerate
13351@item merge - Merges collections of the same type
13352@item walk - Type-preserving map
13353@item select - Selects a part of a collection
13354@item take - Takes the first n items of a collection
13355@item first - Takes the first item of a collection
13356@item remove - Predicated-removes items of a collection
13357@item concat - Concatenates two collections
13358@item flatten - Flattens a collection with subcollections
13359@item distinct - Returns only distinct items
13360@item split - Predicated-splits a collection
13361@item split_at - Splits a collection at a given item
13362@item group_by - Groups items by group
13363@item pairwise - Pairs off adjacent items
13364@item partial - Partially-applies a function
13365@item curry - Curries a function
13366@item compose - Composes functions
13367@item complement - Complements a predicate
13368@item all_fn - \"all\" with predicate
13369@end enumerate")
13370 (license license:bsd-3)))
13371
13372(define-public python2-funcy
13373 (package-with-python2 python-funcy))
13374
13375(define-public python-isoweek
13376 (package
13377 (name "python-isoweek")
13378 (version "1.3.3")
13379 (source
13380 (origin
13381 (method url-fetch)
13382 (uri (pypi-uri "isoweek" version))
13383 (sha256
13384 (base32
13385 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
13386 (build-system python-build-system)
13387 (home-page "https://github.com/gisle/isoweek")
13388 (synopsis "Objects representing a week")
13389 (description "The @code{isoweek} module provide the class Week that
13390implements the week definition of ISO 8601. This standard also defines
13391a notation for identifying weeks; yyyyWww (where the W is a literal).
13392Week instances stringify to this form.")
13393 (license license:bsd-3)))
13394
13395(define-public python2-isoweek
13396 (package-with-python2 python-isoweek))
13397
13398(define-public python-tokenize-rt
13399 (package
13400 (name "python-tokenize-rt")
13401 (version "2.0.1")
13402 (source
13403 (origin
13404 (method url-fetch)
13405 (uri (pypi-uri "tokenize-rt" version))
13406 (sha256
13407 (base32
13408 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
13409 (build-system python-build-system)
13410 (home-page "https://github.com/asottile/tokenize-rt")
13411 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
13412 (description
13413 "This Python library is a wrapper around @code{tokenize} from the Python
13414standard library. It provides two additional tokens @code{ESCAPED_NL} and
13415@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
13416and @code{tokens_to_src} to roundtrip.")
13417 (license license:expat)))
13418
13419(define-public python-future-fstrings
13420 (package
13421 (name "python-future-fstrings")
13422 (version "0.4.1")
13423 (source
13424 (origin
13425 (method url-fetch)
13426 (uri (pypi-uri "future_fstrings" version))
13427 (sha256
13428 (base32
13429 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
13430 (build-system python-build-system)
13431 (propagated-inputs
13432 `(("python-tokenize-rt" ,python-tokenize-rt)))
13433 (home-page "https://github.com/asottile/future-fstrings")
13434 (synopsis "Backport of fstrings to Python < 3.6")
13435 (description
13436 "This package provides a UTF-8 compatible encoding
13437@code{future_fstrings}, which performs source manipulation. It decodes the
13438source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
13439@code{f} strings.")
13440 (license license:expat)))
13441
13442(define-public python-typing
13443 (package
13444 (name "python-typing")
13445 (version "3.6.6")
13446 (source
13447 (origin
13448 (method url-fetch)
13449 (uri (pypi-uri "typing" version))
13450 (sha256
13451 (base32
13452 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
13453 (build-system python-build-system)
13454 (home-page "https://docs.python.org/3/library/typing.html")
13455 (synopsis "Type hints for Python")
13456 (description "This is a backport of the standard library @code{typing}
13457module to Python versions older than 3.5. Typing defines a standard notation
13458for Python function and variable type annotations. The notation can be used
13459for documenting code in a concise, standard format, and it has been designed
13460to also be used by static and runtime type checkers, static analyzers, IDEs
13461and other tools.")
13462 (license license:psfl)))
13463
13464(define-public python2-typing
13465 (package-with-python2 python-typing))
13466
13467(define-public bpython
13468 (package
13469 (name "bpython")
13470 (version "0.17.1")
13471 (source
13472 (origin
13473 (method url-fetch)
13474 (uri (pypi-uri "bpython" version))
13475 (sha256
13476 (base32
13477 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
13478 (build-system python-build-system)
13479 (arguments
13480 `(#:phases
13481 (modify-phases %standard-phases
13482 (add-after 'unpack 'remove-failing-test
13483 (lambda _
13484 ;; Remove failing test. FIXME: make it pass
13485 (delete-file "bpython/test/test_args.py")
13486 #t))
13487 (add-after 'wrap 'add-aliases
13488 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
13489 (lambda* (#:key outputs #:allow-other-keys)
13490 (let ((out (assoc-ref outputs "out")))
13491 (for-each
13492 (lambda (old new)
13493 (symlink old (string-append out "/bin/" new)))
13494 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
13495 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
13496 #t)))))
13497 (propagated-inputs
13498 `(("python-pygments" ,python-pygments)
13499 ("python-requests" ,python-requests)
13500 ("python-babel" ,python-babel) ; optional, for internationalization
13501 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
13502 ("python-greenlet" ,python-greenlet)
13503 ("python-urwid" ,python-urwid) ; for bpython-urwid only
13504 ("python-six" ,python-six)))
13505 (native-inputs
13506 `(("python-sphinx" ,python-sphinx)
13507 ("python-mock" ,python-mock)))
13508 (home-page "https://bpython-interpreter.org/")
13509 (synopsis "Fancy interface to the Python interpreter")
13510 (description "Bpython is a fancy interface to the Python
13511interpreter. bpython's main features are
13512
13513@enumerate
13514@item in-line syntax highlighting,
13515@item readline-like autocomplete with suggestions displayed as you type,
13516@item expected parameter list for any Python function,
13517@item \"rewind\" function to pop the last line of code from memory and
13518 re-evaluate,
13519@item send the code you've entered off to a pastebin,
13520@item save the code you've entered to a file, and
13521@item auto-indentation.
13522@end enumerate")
13523 (license license:expat)))
13524
13525(define-public bpython2
13526 (let ((base (package-with-python2
13527 (strip-python2-variant bpython))))
13528 (package (inherit base)
13529 (name "bpython2")
13530 (arguments
13531 `(#:python ,python-2
13532 #:phases
13533 (modify-phases %standard-phases
13534 (add-after 'unpack 'remove-failing-test
13535 (lambda _
13536 ;; Remove failing test. FIXME: make it pass
13537 (delete-file "bpython/test/test_args.py")
13538 ;; Disable failing test-cases (renaming inhibits they are
13539 ;; discovered)
13540 (substitute* "bpython/test/test_curtsies_repl.py"
13541 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
13542 (string-append a "xxx_off_" b))
13543 (("^(\\s*def )(test_complex\\W)" _ a b)
13544 (string-append a "xxx_off_" b)))
13545 #t))
13546 (add-before 'build 'rename-scripts
13547 ;; rename the scripts to bypthon2, bpdb2, etc.
13548 (lambda _
13549 (substitute* "setup.py"
13550 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
13551 (string-append name "2" rest "\n"))
13552 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
13553 (string-append name "2" (or sub "") rest "\n")))
13554 #t))))))))
13555
13556(define-public python-pyinotify
13557 (package
13558 (name "python-pyinotify")
13559 (version "0.9.6")
13560 (source (origin
13561 (method url-fetch)
13562 (uri (pypi-uri "pyinotify" version))
13563 (sha256
13564 (base32
13565 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
13566 (build-system python-build-system)
13567 (arguments `(#:tests? #f)) ;no tests
13568 (home-page "https://github.com/seb-m/pyinotify")
13569 (synopsis "Python library for monitoring inotify events")
13570 (description
13571 "@code{pyinotify} provides a Python interface for monitoring
13572file system events on Linux.")
13573 (license license:expat)))
13574
13575(define-public python2-pyinotify
13576 (package-with-python2 python-pyinotify))
13577
13578;; Ada parser uses this version.
13579(define-public python2-quex-0.67.3
13580 (package
13581 (name "python2-quex")
13582 (version "0.67.3")
13583 (source
13584 (origin
13585 (method url-fetch)
13586 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
13587 (version-major+minor version)
13588 "/quex-" version ".zip"))
13589 (sha256
13590 (base32
13591 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
13592 (build-system python-build-system)
13593 (native-inputs
13594 `(("unzip" ,unzip)))
13595 (arguments
13596 `(#:python ,python-2
13597 #:tests? #f
13598 #:phases
13599 (modify-phases %standard-phases
13600 (delete 'configure)
13601 (delete 'build)
13602 (replace 'install
13603 (lambda* (#:key outputs #:allow-other-keys)
13604 (let* ((out (assoc-ref outputs "out"))
13605 (share/quex (string-append out "/share/quex"))
13606 (bin (string-append out "/bin")))
13607 (copy-recursively "." share/quex)
13608 (mkdir-p bin)
13609 (symlink (string-append share/quex "/quex-exe.py")
13610 (string-append bin "/quex"))
13611 #t))))))
13612 (native-search-paths
13613 (list (search-path-specification
13614 (variable "QUEX_PATH")
13615 (files '("share/quex")))))
13616 (home-page "http://quex.sourceforge.net/")
13617 (synopsis "Lexical analyzer generator in Python")
13618 (description "@code{quex} is a lexical analyzer generator in Python.")
13619 (license license:lgpl2.1+))) ; Non-military
13620
13621(define-public python2-quex
13622 (package (inherit python2-quex-0.67.3)
13623 (name "python2-quex")
13624 (version "0.68.1")
13625 (source
13626 (origin
13627 (method url-fetch)
13628 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
13629 (sha256
13630 (base32
13631 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
13632 (file-name (string-append name "-" version ".tar.gz"))))))
13633
13634(define-public python-more-itertools
13635 (package
13636 (name "python-more-itertools")
13637 (version "4.1.0")
13638 (source
13639 (origin
13640 (method url-fetch)
13641 (uri (pypi-uri "more-itertools" version))
13642 (sha256
13643 (base32
13644 "0i3ch700g5fyjp692gprlnzbysl8w0sa2vijbp3s40drvk67xkn9"))))
13645 (build-system python-build-system)
13646 (propagated-inputs
13647 `(("python-six" ,python-six-bootstrap)))
13648 (home-page "https://github.com/erikrose/more-itertools")
13649 (synopsis "More routines for operating on iterables, beyond itertools")
13650 (description "Python's built-in @code{itertools} module implements a
13651number of iterator building blocks inspired by constructs from APL, Haskell,
13652and SML. @code{more-itertools} includes additional building blocks for
13653working with iterables.")
13654 (license license:expat)))
13655
13656(define-public python2-more-itertools
13657 (package-with-python2 python-more-itertools))
13658
13659(define-public python-latexcodec
13660 (package
13661 (name "python-latexcodec")
13662 (version "1.0.5")
13663 (source
13664 (origin
13665 (method url-fetch)
13666 (uri (pypi-uri "latexcodec" version))
13667 (sha256
13668 (base32
13669 "0zdd1gf24i83ykadx0y30n3001j43scqr2saql3vckk5c39dj1wn"))))
13670 (build-system python-build-system)
13671 (inputs
13672 `(("python-six" ,python-six)))
13673 (home-page "https://readthedocs.org/projects/latexcodec/")
13674 (synopsis "Work with LaTeX code in Python")
13675 (description "Lexer and codec to work with LaTeX code in Python.")
13676 (license license:expat)))
13677
13678(define-public python-pybtex
13679 (package
13680 (name "python-pybtex")
13681 (version "0.21")
13682 (source
13683 (origin
13684 (method url-fetch)
13685 (uri (pypi-uri "pybtex" version))
13686 (sha256
13687 (base32
13688 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
13689 (build-system python-build-system)
13690 (native-inputs
13691 `(("python-nose" ,python-nose)))
13692 (inputs
13693 `(("python-latexcodec" ,python-latexcodec)
13694 ("python-pyyaml" ,python-pyyaml)
13695 ("python-six" ,python-six)))
13696 (arguments
13697 `(#:test-target "nosetests"))
13698 (home-page "https://pybtex.org/")
13699 (synopsis "BibTeX-compatible bibliography processor")
13700 (description "Pybtex is a BibTeX-compatible bibliography processor written
13701in Python. You can simply type pybtex instead of bibtex.")
13702 (license license:expat)))
13703
13704(define-public python-onetimepass
13705 (package
13706 (name "python-onetimepass")
13707 (version "1.0.1")
13708 (source
13709 (origin
13710 (method url-fetch)
13711 (uri (pypi-uri "onetimepass" version))
13712 (sha256
13713 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
13714 (build-system python-build-system)
13715 (propagated-inputs `(("python-six" ,python-six)))
13716 (home-page "https://github.com/tadeck/onetimepass/")
13717 (synopsis "One-time password library")
13718 (description "Python one-time password library for HMAC-based (HOTP) and
13719time-based (TOTP) passwords.")
13720 (license license:expat)))
13721
13722(define-public python-parso
13723 (package
13724 (name "python-parso")
13725 (version "0.3.1")
13726 (source
13727 (origin
13728 (method url-fetch)
13729 (uri (pypi-uri "parso" version))
13730 (sha256
13731 (base32
13732 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
13733 (native-inputs
13734 `(("python-pytest" ,python-pytest)))
13735 (build-system python-build-system)
13736 (home-page "https://github.com/davidhalter/parso")
13737 (synopsis "Python Parser")
13738 (description "Parso is a Python parser that supports error recovery and
13739round-trip parsing for different Python versions (in multiple Python versions).
13740Parso is also able to list multiple syntax errors in your Python file.")
13741 (license license:expat)))
13742
13743(define-public python2-parso
13744 (package-with-python2 python-parso))
13745
13746(define-public python-async-generator
13747 (package
13748 (name "python-async-generator")
13749 (version "1.9")
13750 (source
13751 (origin
13752 (method url-fetch)
13753 (uri (pypi-uri "async_generator" version))
13754 (sha256
13755 (base32
13756 "0wc3hidz1q85cja93k5pzybn0fprfnqyrv4qlkdqdzklc5f4dmdp"))))
13757 (build-system python-build-system)
13758 (native-inputs
13759 `(("python-pytest" ,python-pytest)))
13760 (home-page "https://github.com/python-trio/async_generator")
13761 (synopsis "Async generators and context managers for Python 3.5+")
13762 (description "@code{async_generator} back-ports Python 3.6's native async
13763generators and Python 3.7's context managers into Python 3.5.")
13764 ;; Dual licensed.
13765 (license (list license:expat license:asl2.0))))
13766
13767(define-public python-async-timeout
13768 (package
13769 (name "python-async-timeout")
13770 (version "2.0.1")
13771 (source
13772 (origin
13773 (method url-fetch)
13774 (uri (pypi-uri "async-timeout" version))
13775 (sha256
13776 (base32
13777 "1l3kg062m02mph6rf9rdv8r5c5n356clxa6b6mrn0i77vk9g9kq0"))))
13778 (build-system python-build-system)
13779 (home-page "https://github.com/aio-libs/async_timeout/")
13780 (synopsis "Timeout context manager for asyncio programs")
13781 (description "@code{async-timeout} provides a timeout timeout context
13782manager compatible with @code{asyncio}.")
13783 (license license:asl2.0)))
13784
13785(define-public python-glob2
13786 (package
13787 (name "python-glob2")
13788 (version "0.6")
13789 (source (origin
13790 (method url-fetch)
13791 (uri (string-append
13792 "https://github.com/miracle2k/python-glob2/archive/"
13793 version
13794 ".tar.gz"))
13795 (sha256
13796 (base32
13797 "0ja168f0dz4kbz4m06dm0rd3acaypk6hjx2km541pw22y9s40mag"))
13798 (file-name (string-append name "-" version ".tar.gz"))))
13799 (build-system python-build-system)
13800 (home-page "https://github.com/miracle2k/python-glob2/")
13801 (synopsis "Extended Version of the python buildin glob module")
13802 (description "This is an extended version of the Python
13803@url{http://docs.python.org/library/glob.html, built-in glob module} which
13804adds:
13805
13806@itemize
13807@item The ability to capture the text matched by glob patterns, and return
13808those matches alongside the file names.
13809@item A recursive @code{**} globbing syntax, akin for example to the
13810@code{globstar} option of Bash.
13811@item The ability to replace the file system functions used, in order to glob
13812on virtual file systems.
13813@item Compatible with Python 2 and Python 3 (tested with 3.3).
13814@end itemize
13815
13816Glob2 currently based on the glob code from Python 3.3.1.")
13817 (license license:bsd-2)))
13818
13819(define-public python2-glob2
13820 (package-with-python2 python-glob2))
13821
13822(define-public python-gipc
13823 (package
13824 (name "python-gipc")
13825 (version "0.6.0")
13826 (source
13827 (origin
13828 (method url-fetch)
13829 (uri (pypi-uri "gipc" version ".zip"))
13830 (sha256
13831 (base32
13832 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
13833 (build-system python-build-system)
13834 (native-inputs
13835 `(("unzip" ,unzip)))
13836 (propagated-inputs
13837 `(("python-gevent" ,python-gevent)))
13838 (home-page "http://gehrcke.de/gipc")
13839 (synopsis "Child process management in the context of gevent")
13840 (description "Usage of Python's multiprocessing package in a
13841gevent-powered application may raise problems. With @code{gipc},
13842process-based child processes can safely be created anywhere within a
13843gevent-powered application.")
13844 (license license:expat)))
13845
13846(define-public python2-gipc
13847 (package-with-python2 python-gipc))
13848
13849(define-public python-fusepy
13850 (package
13851 (name "python-fusepy")
13852 (version "2.0.4")
13853 (source
13854 (origin
13855 (method url-fetch)
13856 (uri (pypi-uri "fusepy" version))
13857 (sha256
13858 (base32
13859 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
13860 (build-system python-build-system)
13861 (arguments
13862 `(#:phases
13863 (modify-phases %standard-phases
13864 (add-before 'build 'set-library-file-name
13865 (lambda* (#:key inputs #:allow-other-keys)
13866 (let ((fuse (assoc-ref inputs "fuse")))
13867 (substitute* "fuse.py"
13868 (("find_library\\('fuse'\\)")
13869 (string-append "'" fuse "/lib/libfuse.so'")))
13870 #t))))))
13871 (propagated-inputs
13872 `(("fuse" ,fuse)))
13873 (home-page "https://github.com/fusepy/fusepy")
13874 (synopsis "Simple ctypes bindings for FUSE")
13875 (description "Python module that provides a simple interface to FUSE and
13876MacFUSE. The binding is created using the standard @code{ctypes} library.")
13877 (license license:isc)))
13878
13879(define-public python2-fusepy
13880 (package-with-python2 python-fusepy))
13881
13882(define-public python2-gdrivefs
13883 (package
13884 (name "python2-gdrivefs")
13885 (version "0.14.9")
13886 (source
13887 (origin
13888 (method url-fetch)
13889 (uri (pypi-uri "gdrivefs" version))
13890 (sha256
13891 (base32
13892 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
13893 (build-system python-build-system)
13894 (arguments
13895 `(#:python ,python-2
13896 #:phases
13897 (modify-phases %standard-phases
13898 (add-before 'build 'patch-setup-py
13899 (lambda _
13900 ;; Update requirements from dependency==version
13901 ;; to dependency>=version
13902 (substitute* "gdrivefs/resources/requirements.txt"
13903 (("==") ">="))
13904 #t)))))
13905 (native-inputs
13906 `(("python2-gipc" ,python2-gipc)
13907 ("python2-gevent" ,python2-gevent)
13908 ("python2-greenlet" ,python2-greenlet)
13909 ("python2-httplib2" ,python2-httplib2)
13910 ("python2-uritemplate" ,python2-uritemplate)
13911 ("python2-oauth2client" ,python2-oauth2client)
13912 ("python2-six" ,python2-six)))
13913 (propagated-inputs
13914 `(("python2-dateutil" ,python2-dateutil)
13915 ("python2-fusepy" ,python2-fusepy)
13916 ("python2-google-api-client" ,python2-google-api-client)))
13917 (home-page "https://github.com/dsoprea/GDriveFS")
13918 (synopsis "Mount Google Drive as a local file system")
13919 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
13920under Python 2.7.")
13921 (license license:gpl2)))
13922
13923(define-public pybind11
13924 (package
13925 (name "pybind11")
13926 (version "2.2.4")
13927 (source (origin
13928 (method git-fetch)
13929 (uri (git-reference
13930 (url "https://github.com/pybind/pybind11.git")
13931 (commit (string-append "v" version))))
13932 (sha256
13933 (base32
13934 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
13935 (file-name (git-file-name name version))))
13936 (build-system cmake-build-system)
13937 (native-inputs
13938 `(("python" ,python)
13939 ("python-pytest" ,python-pytest)))
13940 (arguments
13941 `(#:test-target "check"))
13942 (home-page "https://github.com/pybind/pybind11/")
13943 (synopsis "Seamless operability between C++11 and Python")
13944 (description "pybind11 is a lightweight header-only library that exposes
13945C++ types in Python and vice versa, mainly to create Python bindings of
13946existing C++ code. Its goals and syntax are similar to the excellent
13947Boost.Python library by David Abrahams: to minimize boilerplate code in
13948traditional extension modules by inferring type information using compile-time
13949introspection.")
13950 (license license:expat)))
13951
13952(define-public python-fasteners
13953 (package
13954 (name "python-fasteners")
13955 (version "0.14.1")
13956 (source
13957 (origin
13958 (method url-fetch)
13959 (uri (pypi-uri "fasteners" version))
13960 (sha256
13961 (base32
13962 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
13963 (build-system python-build-system)
13964 (propagated-inputs
13965 `(("python-monotonic" ,python-monotonic)
13966 ("python-six" ,python-six)
13967 ("python-testtools" ,python-testtools)))
13968 (home-page "https://github.com/harlowja/fasteners")
13969 (synopsis "Python package that provides useful locks")
13970 (description
13971 "This package provides a Python program that provides following locks:
13972
13973@itemize
13974@item Locking decorator
13975@item Reader-writer locks
13976@item Inter-process locks
13977@item Generic helpers
13978@end itemize\n")
13979 (license license:asl2.0)))
13980
13981(define-public python2-fasteners
13982 (package-with-python2 python-fasteners))
13983
13984(define-public python-requests-file
13985 (package
13986 (name "python-requests-file")
13987 (version "1.4.3")
13988 (source
13989 (origin
13990 (method url-fetch)
13991 (uri (pypi-uri "requests-file" version))
13992 (sha256
13993 (base32
13994 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
13995 (build-system python-build-system)
13996 (propagated-inputs
13997 `(("python-requests" ,python-requests)
13998 ("python-six" ,python-six)))
13999 (home-page
14000 "https://github.com/dashea/requests-file")
14001 (synopsis "File transport adapter for Requests")
14002 (description
14003 "Requests-File is a transport adapter for use with the Requests Python
14004library to allow local filesystem access via file:// URLs.")
14005 (license license:asl2.0)))
14006
14007(define-public python2-requests-file
14008 (package-with-python2 python-requests-file))
14009
14010(define-public python-tldextract
14011 (package
14012 (name "python-tldextract")
14013 (version "2.2.0")
14014 (source
14015 (origin
14016 (method url-fetch)
14017 (uri (pypi-uri "tldextract" version))
14018 (sha256
14019 (base32
14020 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14021 (build-system python-build-system)
14022 (native-inputs
14023 `(("python-pytest" ,python-pytest)
14024 ("python-responses" ,python-responses)))
14025 (propagated-inputs
14026 `(("python-idna" ,python-idna)
14027 ("python-requests" ,python-requests)
14028 ("python-requests-file" ,python-requests-file)))
14029 (home-page
14030 "https://github.com/john-kurkowski/tldextract")
14031 (synopsis
14032 "Separate the TLD from the registered domain and subdomains of a URL")
14033 (description
14034 "TLDExtract accurately separates the TLD from the registered domain and
14035subdomains of a URL, using the Public Suffix List. By default, this includes
14036the public ICANN TLDs and their exceptions. It can optionally support the
14037Public Suffix List's private domains as well.")
14038 (license license:bsd-3)))
14039
14040(define-public python2-tldextract
14041 (package-with-python2 python-tldextract))
14042
14043(define-public python-pynamecheap
14044 (package
14045 (name "python-pynamecheap")
14046 (version "0.0.3")
14047 (source
14048 (origin
14049 (method url-fetch)
14050 (uri (pypi-uri "PyNamecheap" version))
14051 (sha256
14052 (base32
14053 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
14054 (build-system python-build-system)
14055 (propagated-inputs
14056 `(("python-requests" ,python-requests)))
14057 (home-page
14058 "https://github.com/Bemmu/PyNamecheap")
14059 (synopsis
14060 "Namecheap API client in Python")
14061 (description
14062 "PyNamecheap is a Namecheap API client in Python.")
14063 (license license:expat)))
14064
14065(define-public python2-pynamecheap
14066 (package-with-python2 python-pynamecheap))
14067
14068(define-public python-dns-lexicon
14069 (package
14070 (name "python-dns-lexicon")
14071 (version "2.4.0")
14072 (source
14073 (origin
14074 (method url-fetch)
14075 (uri (pypi-uri "dns-lexicon" version))
14076 (sha256
14077 (base32
14078 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
14079 (build-system python-build-system)
14080 (arguments
14081 `(#:tests? #f)) ;requires internet access
14082 (propagated-inputs
14083 `(("python-future" ,python-future)
14084 ("python-pynamecheap" ,python-pynamecheap)
14085 ("python-requests" ,python-requests)
14086 ("python-tldextract" ,python-tldextract)
14087 ("python-urllib3" ,python-urllib3)))
14088 (home-page "https://github.com/AnalogJ/lexicon")
14089 (synopsis
14090 "Manipulate DNS records on various DNS providers")
14091 (description
14092 "Lexicon provides a way to manipulate DNS records on multiple DNS
14093providers in a standardized way. It has a CLI but it can also be used as a
14094Python library. It was designed to be used in automation, specifically with
14095Let's Encrypt.")
14096 (license license:expat)))
14097
14098(define-public python2-dns-lexicon
14099 (package-with-python2 python-dns-lexicon))
14100
14101(define-public python-commandlines
14102 (package
14103 (name "python-commandlines")
14104 (version "0.4.1")
14105 (source
14106 (origin
14107 (method url-fetch)
14108 (uri (pypi-uri "commandlines" version))
14109 (sha256
14110 (base32
14111 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
14112 (build-system python-build-system)
14113 (home-page "https://github.com/chrissimpkins/commandlines")
14114 (synopsis "Command line argument to object parsing library")
14115 (description
14116 "@code{Commandlines} is a Python library for command line application
14117development that supports command line argument parsing, command string
14118validation testing and application logic.")
14119 (license license:expat)))
14120
14121;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
14122;; python-numba. They have a very unflexible relationship.
14123(define-public python-numba
14124 (package
14125 (name "python-numba")
14126 (version "0.39.0")
14127 (source
14128 (origin
14129 (method url-fetch)
14130 (uri (pypi-uri "numba" version))
14131 (sha256
14132 (base32
14133 "1bibvkwga1v8293i9ivl469d8bzgabn3vgr2ig7c1i68v8frsx07"))))
14134 (build-system python-build-system)
14135 (arguments
14136 `(#:modules ((guix build utils)
14137 (guix build python-build-system)
14138 (ice-9 ftw)
14139 (srfi srfi-1)
14140 (srfi srfi-26))
14141 #:phases
14142 (modify-phases %standard-phases
14143 (add-after 'unpack 'disable-proprietary-features
14144 (lambda _
14145 (setenv "NUMBA_DISABLE_HSA" "1")
14146 (setenv "NUMBA_DISABLE_CUDA" "1")
14147 #t))
14148 (add-after 'unpack 'remove-failing-tests
14149 (lambda _
14150 ;; FIXME: these tests fail for unknown reasons:
14151 ;; test_non_writable_pycache, test_non_creatable_pycache, and
14152 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
14153 (substitute* "numba/tests/test_dispatcher.py"
14154 (("def test(_non_writable_pycache)" _ m)
14155 (string-append "def guix_skip" m))
14156 (("def test(_non_creatable_pycache)" _ m)
14157 (string-append "def guix_skip" m))
14158 (("def test(_frozen)" _ m)
14159 (string-append "def guix_skip" m)))
14160
14161 ;; These tests fail because we don't run the tests from the build
14162 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
14163 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
14164 (substitute* "numba/tests/test_pycc.py"
14165 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
14166 (string-append "def guix_skip" m)))
14167 #t))
14168 (replace 'check
14169 (lambda _
14170 (let ((cwd (getcwd)))
14171 (setenv "PYTHONPATH"
14172 (string-append cwd "/build/"
14173 (find (cut string-prefix? "lib" <>)
14174 (scandir (string-append cwd "/build")))
14175 ":"
14176 (getenv "PYTHONPATH")))
14177 ;; Something is wrong with the PYTHONPATH when running the
14178 ;; tests from the build directory, as it complains about not being
14179 ;; able to import certain modules.
14180 (with-directory-excursion "/tmp"
14181 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
14182 #t)))))
14183 (propagated-inputs
14184 `(("python-llvmlite" ,python-llvmlite)
14185 ("python-numpy" ,python-numpy)
14186 ("python-singledispatch" ,python-singledispatch)))
14187 ;; Needed for tests.
14188 (inputs
14189 `(("python-jinja2" ,python-jinja2)
14190 ("python-pygments" ,python-pygments)))
14191 (home-page "https://numba.pydata.org")
14192 (synopsis "Compile Python code using LLVM")
14193 (description "Numba gives you the power to speed up your applications with
14194high performance functions written directly in Python. With a few
14195annotations, array-oriented and math-heavy Python code can be just-in-time
14196compiled to native machine instructions, similar in performance to C, C++ and
14197Fortran, without having to switch languages or Python interpreters.
14198
14199Numba works by generating optimized machine code using the LLVM compiler
14200infrastructure at import time, runtime, or statically (using the included pycc
14201tool).")
14202 (license license:bsd-3)))
14203
14204(define-public python-anndata
14205 (package
14206 (name "python-anndata")
14207 (version "0.6.9")
14208 (source
14209 (origin
14210 (method url-fetch)
14211 (uri (pypi-uri "anndata" version))
14212 (sha256
14213 (base32
14214 "1fh461xyyc7pcrjfgd013bdc2alf53r46ss3gfw3431mbb1gappi"))))
14215 (build-system python-build-system)
14216 (propagated-inputs
14217 `(("python-h5py" ,python-h5py)
14218 ("python-natsort" ,python-natsort)
14219 ("python-pandas" ,python-pandas)
14220 ("python-scipy" ,python-scipy)))
14221 (home-page "https://github.com/theislab/anndata")
14222 (synopsis "Annotated data for data analysis pipelines")
14223 (description "Anndata is a package for simple (functional) high-level APIs
14224for data analysis pipelines. In this context, it provides an efficient,
14225scalable way of keeping track of data together with learned annotations and
14226reduces the code overhead typically encountered when using a mostly
14227object-oriented library such as @code{scikit-learn}.")
14228 (license license:bsd-3)))
14229
14230(define-public python-dill
14231 (package
14232 (name "python-dill")
14233 (version "0.2.8.2")
14234 (source
14235 (origin
14236 (method url-fetch)
14237 (uri (pypi-uri "dill" version))
14238 (sha256
14239 (base32
14240 "1cymzn9fxwdy33h21zkk4gqgzvd25110hh3zdqnvnwa3p52c4kb2"))))
14241 (build-system python-build-system)
14242 ;; FIXME: The check phase fails with "don't know how to make test".
14243 (arguments '(#:tests? #f))
14244 (home-page "https://pypi.org/project/dill")
14245 (synopsis "Serialize all of Python")
14246 (description "Dill extends Python's @code{pickle} module for serializing
14247and de-serializing Python objects to the majority of the built-in Python
14248types. Dill provides the user the same interface as the @code{pickle} module,
14249and also includes some additional features. In addition to pickling Python
14250objects, @code{dill} provides the ability to save the state of an interpreter
14251session in a single command. Hence, it would be feasable to save a
14252interpreter session, close the interpreter, ship the pickled file to another
14253computer, open a new interpreter, unpickle the session and thus continue from
14254the saved state of the original interpreter session.")
14255 (license license:bsd-3)))
14256
14257(define-public python-multiprocess
14258 (package
14259 (name "python-multiprocess")
14260 (version "0.70.6.1")
14261 (source
14262 (origin
14263 (method url-fetch)
14264 (uri (pypi-uri "multiprocess" version))
14265 (sha256
14266 (base32
14267 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
14268 (build-system python-build-system)
14269 (propagated-inputs
14270 `(("python-dill" ,python-dill)))
14271 (home-page "https://pypi.org/project/multiprocess")
14272 (synopsis "Multiprocessing and multithreading in Python")
14273 (description
14274 "This package is a fork of the multiprocessing Python package, a package
14275which supports the spawning of processes using the API of the standard
14276library's @code{threading} module.")
14277 (license license:bsd-3)))
14278
14279(define-public python-toolz
14280 (package
14281 (name "python-toolz")
14282 (version "0.9.0")
14283 (source
14284 (origin
14285 (method url-fetch)
14286 (uri (pypi-uri "toolz" version))
14287 (sha256
14288 (base32
14289 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
14290 (build-system python-build-system)
14291 ;; FIXME: tests cannot be computed: "Can't perform this operation for
14292 ;; unregistered loader type"
14293 (arguments '(#:tests? #f))
14294 (home-page "https://github.com/pytoolz/toolz/")
14295 (synopsis "List processing tools and functional utilities")
14296 (description
14297 "This package provides a set of utility functions for iterators,
14298functions, and dictionaries.")
14299 (license license:bsd-3)))
14300
14301(define-public python-cytoolz
14302 (package
14303 (name "python-cytoolz")
14304 (version "0.9.0.1")
14305 (source
14306 (origin
14307 (method url-fetch)
14308 (uri (pypi-uri "cytoolz" version))
14309 (sha256
14310 (base32
14311 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
14312 (build-system python-build-system)
14313 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
14314 ;; 'exceptions'"
14315 (arguments '(#:tests? #f))
14316 (propagated-inputs
14317 `(("python-toolz" ,python-toolz)))
14318 (native-inputs
14319 `(("python-cython" ,python-cython)))
14320 (home-page "https://github.com/pytoolz/cytoolz")
14321 (synopsis "High performance functional utilities")
14322 (description
14323 "The cytoolz package implements the same API as provided by toolz. The
14324main differences are that @code{cytoolz} is faster and cytoolz offers a C API
14325that is accessible to other projects developed in Cython.")
14326 (license license:bsd-3)))
14327
14328(define-public python-sortedcontainers
14329 (package
14330 (name "python-sortedcontainers")
14331 (version "2.0.4")
14332 (source
14333 (origin
14334 (method url-fetch)
14335 (uri (pypi-uri "sortedcontainers" version))
14336 (sha256
14337 (base32
14338 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
14339 (build-system python-build-system)
14340 (native-inputs
14341 `(("python-tox" ,python-tox)))
14342 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
14343 (synopsis "Sorted List, Sorted Dict, Sorted Set")
14344 (description
14345 "This package provides a sorted collections library, written in
14346pure-Python.")
14347 (license license:asl2.0)))
14348
14349(define-public python-cloudpickle
14350 (package
14351 (name "python-cloudpickle")
14352 (version "0.5.5")
14353 (source
14354 (origin
14355 (method url-fetch)
14356 (uri (pypi-uri "cloudpickle" version))
14357 (sha256
14358 (base32
14359 "0gdg5n025v4wqmdg65rm0n6fvp6731ip30ji0rmn2kqsyr4bb93f"))))
14360 (build-system python-build-system)
14361 ;; FIXME: there are 5 errors in 122 tests:
14362 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
14363 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
14364 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14365 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14366 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
14367 ;; TypeError: cannot serialize '_io.BufferedRandom' object
14368 (arguments '(#:tests? #f))
14369 (native-inputs
14370 `(("python-pytest" ,python-pytest)
14371 ("python-mock" ,python-mock)
14372 ("python-tornado" ,python-tornado)))
14373 (home-page "https://github.com/cloudpipe/cloudpickle")
14374 (synopsis "Extended pickling support for Python objects")
14375 (description
14376 "Cloudpickle makes it possible to serialize Python constructs not
14377supported by the default pickle module from the Python standard library. It
14378is especially useful for cluster computing where Python expressions are
14379shipped over the network to execute on remote hosts, possibly close to the
14380data.")
14381 (license license:bsd-3)))
14382
14383(define-public python-locket
14384 (package
14385 (name "python-locket")
14386 (version "0.2.0")
14387 (source
14388 (origin
14389 (method url-fetch)
14390 (uri (pypi-uri "locket" version))
14391 (sha256
14392 (base32
14393 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
14394 (build-system python-build-system)
14395 (home-page "https://github.com/mwilliamson/locket.py")
14396 (synopsis "File-based locks for Python")
14397 (description
14398 "Locket implements a lock that can be used by multiple processes provided
14399they use the same path.")
14400 (license license:bsd-2)))
14401
14402(define-public python-blosc
14403 (package
14404 (name "python-blosc")
14405 (version "1.5.1")
14406 (source
14407 (origin
14408 (method url-fetch)
14409 (uri (pypi-uri "blosc" version))
14410 (sha256
14411 (base32
14412 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
14413 (build-system python-build-system)
14414 ;; FIXME: all tests pass, but then this error is printed:
14415 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
14416 (arguments '(#:tests? #f))
14417 (propagated-inputs
14418 `(("python-numpy" ,python-numpy)))
14419 (home-page "https://github.com/blosc/python-blosc")
14420 (synopsis "Python wrapper for the Blosc data compressor library")
14421 (description "Blosc is a high performance compressor optimized for binary
14422data. It has been designed to transmit data to the processor cache faster
14423than the traditional, non-compressed, direct memory fetch approach via a
14424@code{memcpy()} system call.
14425
14426Blosc works well for compressing numerical arrays that contains data with
14427relatively low entropy, like sparse data, time series, grids with
14428regular-spaced values, etc.
14429
14430This Python package wraps the Blosc library.")
14431 (license license:bsd-3)))
14432
14433(define-public python-partd
14434 (package
14435 (name "python-partd")
14436 (version "0.3.8")
14437 (source
14438 (origin
14439 (method url-fetch)
14440 (uri (pypi-uri "partd" version))
14441 (sha256
14442 (base32
14443 "03s0i5qfgkx6y24bmfgyd5hnsjznkbbfafwb2khf7k9790f1yab7"))))
14444 (build-system python-build-system)
14445 (propagated-inputs
14446 `(("python-blosc" ,python-blosc)
14447 ("python-locket" ,python-locket)
14448 ("python-numpy" ,python-numpy)
14449 ("python-pandas" ,python-pandas)
14450 ("python-pyzmq" ,python-pyzmq)
14451 ("python-toolz" ,python-toolz)))
14452 (home-page "https://github.com/dask/partd/")
14453 (synopsis "Appendable key-value storage")
14454 (description "Partd stores key-value pairs. Values are raw bytes. We
14455append on old values. Partd excels at shuffling operations.")
14456 (license license:bsd-3)))
14457
14458(define-public python-dask
14459 (package
14460 (name "python-dask")
14461 (version "0.19.0")
14462 (source
14463 (origin
14464 (method url-fetch)
14465 (uri (pypi-uri "dask" version))
14466 (sha256
14467 (base32
14468 "1pm1163qb6s22p8fnvj0zlfazihvs7hxjn8l2n52bzs7shw6kdz3"))))
14469 (build-system python-build-system)
14470 ;; A single test out of 5000+ fails. This test is marked as xfail when
14471 ;; pytest-xdist is used.
14472 (arguments
14473 `(#:phases
14474 (modify-phases %standard-phases
14475 (add-after 'unpack 'disable-broken-test
14476 (lambda _
14477 (substitute* "dask/tests/test_threaded.py"
14478 (("def test_interrupt\\(\\)" m)
14479 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14480 m)))
14481 #t)))))
14482 (propagated-inputs
14483 `(("python-cloudpickle" ,python-cloudpickle)
14484 ("python-numpy" ,python-numpy)
14485 ("python-pandas" ,python-pandas)
14486 ("python-partd" ,python-partd)
14487 ("python-toolz" ,python-toolz)
14488 ("python-pyyaml" ,python-pyyaml)))
14489 (native-inputs
14490 `(("python-pytest" ,python-pytest)
14491 ("python-pytest-runner" ,python-pytest-runner)))
14492 (home-page "https://github.com/dask/dask/")
14493 (synopsis "Parallel computing with task scheduling")
14494 (description
14495 "Dask is a flexible parallel computing library for analytics. It
14496consists of two components: dynamic task scheduling optimized for computation,
14497and large data collections like parallel arrays, dataframes, and lists that
14498extend common interfaces like NumPy, Pandas, or Python iterators to
14499larger-than-memory or distributed environments. These parallel collections
14500run on top of the dynamic task schedulers. ")
14501 (license license:bsd-3)))
14502
14503(define-public python-ilinkedlist
14504 (package
14505 (name "python-ilinkedlist")
14506 (version "0.1.0")
14507 (source
14508 (origin
14509 (method url-fetch)
14510 (uri (pypi-uri "ilinkedlist" version))
14511 (sha256
14512 (base32
14513 "063c2gm4jkgkv0nsg7mrc8y0w82ms98l4xchmbrvr68cscglhk69"))))
14514 (build-system python-build-system)
14515 (native-inputs `(("python-pytest" ,python-pytest)))
14516 (inputs `(("python" ,python)))
14517 (home-page "https://github.com/luther9/ilinkedlist-py")
14518 (synopsis "Immutable linked list library")
14519 (description
14520 "This is a implementation of immutable linked lists for Python. It
14521contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
14522Since a linked list is treated as immutable, it is hashable, and its length
14523can be retrieved in constant time. Some of the terminology is inspired by
14524LISP. It is possible to create an improper list by creating a @code{Pair}
14525with a non-list @code{cdr}.")
14526 (license license:gpl3+)))