projects/guix·blob version-0.16.0 · refs

14884 lines · 536.9 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, 2018 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 #:use-module (srfi srfi-26))
148
149(define-public python-2.7
150 (package
151 (name "python2")
152 (version "2.7.15")
153 (replacement python-2/fixed)
154 (source
155 (origin
156 (method url-fetch)
157 (uri (string-append "https://www.python.org/ftp/python/"
158 version "/Python-" version ".tar.xz"))
159 (sha256
160 (base32
161 "0x2mvz9dp11wj7p5ccvmk9s0hzjk2fa1m462p395l4r6bfnb3n92"))
162 (patches (search-patches "python-2.7-search-paths.patch"
163 "python-2-deterministic-build-info.patch"
164 "python-2.7-site-prefixes.patch"
165 "python-2.7-source-date-epoch.patch"
166 "python-2.7-adjust-tests.patch"))
167 (modules '((guix build utils)))
168 ;; suboptimal to delete failing tests here, but if we delete them in the
169 ;; arguments then we need to make sure to strip out that phase when it
170 ;; gets inherited by python and python-minimal.
171 (snippet
172 '(begin
173 (for-each delete-file
174 '("Lib/test/test_compileall.py"
175 "Lib/test/test_ctypes.py" ; fails on mips64el
176 "Lib/test/test_distutils.py"
177 "Lib/test/test_import.py"
178 "Lib/test/test_shutil.py"
179 "Lib/test/test_socket.py"
180 "Lib/test/test_subprocess.py"))
181 #t))))
182 (outputs '("out"
183 "tk")) ;tkinter; adds 50 MiB to the closure
184 (build-system gnu-build-system)
185 (arguments
186 `(#:test-target "test"
187 #:configure-flags
188 (list "--enable-shared" ;allow embedding
189 "--with-system-ffi" ;build ctypes
190 "--with-ensurepip=install" ;install pip and setuptools
191 "--enable-unicode=ucs4"
192 (string-append "LDFLAGS=-Wl,-rpath="
193 (assoc-ref %outputs "out") "/lib"))
194
195 #:modules ((ice-9 ftw) (ice-9 match)
196 (guix build utils) (guix build gnu-build-system))
197 #:phases
198 (modify-phases %standard-phases
199 (add-before
200 'configure 'patch-lib-shells
201 (lambda _
202 ;; Filter for existing files, since some may not exist in all
203 ;; versions of python that are built with this recipe.
204 (substitute* (filter file-exists?
205 '("Lib/subprocess.py"
206 "Lib/popen2.py"
207 "Lib/distutils/tests/test_spawn.py"
208 "Lib/test/support/__init__.py"
209 "Lib/test/test_subprocess.py"))
210 (("/bin/sh") (which "sh")))
211 #t))
212 (add-before 'configure 'do-not-record-configure-flags
213 (lambda* (#:key configure-flags #:allow-other-keys)
214 ;; Remove configure flags from the installed '_sysconfigdata.py'
215 ;; and 'Makefile' so we don't end up keeping references to the
216 ;; build tools.
217 ;;
218 ;; Preserve at least '--with-system-ffi' since otherwise the
219 ;; thing tries to build libffi, fails, and we end up with a
220 ;; Python that lacks ctypes.
221 (substitute* "configure"
222 (("^CONFIG_ARGS=.*$")
223 (format #f "CONFIG_ARGS='~a'\n"
224 (if (member "--with-system-ffi" configure-flags)
225 "--with-system-ffi"
226 ""))))
227 #t))
228 (add-before
229 'check 'pre-check
230 (lambda _
231 ;; 'Lib/test/test_site.py' needs a valid $HOME
232 (setenv "HOME" (getcwd))
233 #t))
234 (add-after
235 'unpack 'set-source-file-times-to-1980
236 ;; XXX One of the tests uses a ZIP library to pack up some of the
237 ;; source tree, and fails with "ZIP does not support timestamps
238 ;; before 1980". Work around this by setting the file times in the
239 ;; source tree to sometime in early 1980.
240 (lambda _
241 (let ((circa-1980 (* 10 366 24 60 60)))
242 (ftw "." (lambda (file stat flag)
243 (utime file circa-1980 circa-1980)
244 #t))
245 #t)))
246 (add-after 'install 'remove-tests
247 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
248 ;; because these files are used by some libraries out there.
249 (lambda* (#:key outputs #:allow-other-keys)
250 (let ((out (assoc-ref outputs "out")))
251 (match (scandir (string-append out "/lib")
252 (lambda (name)
253 (string-prefix? "python" name)))
254 ((pythonX.Y)
255 (let ((testdir (string-append out "/lib/" pythonX.Y
256 "/test")))
257 (with-directory-excursion testdir
258 (for-each delete-file-recursively
259 (scandir testdir
260 (match-lambda
261 ((or "." "..") #f)
262 (file
263 (not
264 ;; FIXME: Add the 'support' directory
265 ;; in the next rebuild cycle, since it
266 ;; moved in 2.7.14. See also
267 ;; python2-futures below.
268 (string-prefix? "test_support."
269 file))))))
270 (call-with-output-file "__init__.py" (const #t))
271 #t)))))))
272 (add-after 'install 'move-tk-inter
273 (lambda* (#:key outputs #:allow-other-keys)
274 ;; When Tkinter support is built move it to a separate output so
275 ;; that the main output doesn't contain a reference to Tcl/Tk.
276 (let ((out (assoc-ref outputs "out"))
277 (tk (assoc-ref outputs "tk")))
278 (when tk
279 (match (find-files out "tkinter.*\\.so")
280 ((tkinter.so)
281 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
282 ;; want it under TK/lib/pythonX.Y/site-packages.
283 (let* ((len (string-length out))
284 (target (string-append
285 tk "/"
286 (string-drop
287 (dirname (dirname tkinter.so))
288 len)
289 "/site-packages")))
290 (install-file tkinter.so target)
291 (delete-file tkinter.so)))))
292 #t))))))
293 (inputs
294 `(("bzip2" ,bzip2)
295 ("gdbm" ,gdbm)
296 ("libffi" ,libffi) ; for ctypes
297 ("sqlite" ,sqlite) ; for sqlite extension
298 ("openssl" ,openssl)
299 ("readline" ,readline)
300 ("zlib" ,zlib)
301 ("tcl" ,tcl)
302 ("tk" ,tk))) ; for tkinter
303 (native-inputs
304 `(("pkg-config" ,pkg-config)))
305 (native-search-paths
306 (list (search-path-specification
307 (variable "PYTHONPATH")
308 (files '("lib/python2.7/site-packages")))))
309 (home-page "https://www.python.org")
310 (synopsis "High-level, dynamically-typed programming language")
311 (description
312 "Python is a remarkably powerful dynamic programming language that
313is used in a wide variety of application domains. Some of its key
314distinguishing features include: clear, readable syntax; strong
315introspection capabilities; intuitive object orientation; natural
316expression of procedural code; full modularity, supporting hierarchical
317packages; exception-based error handling; and very high level dynamic
318data types.")
319 (license license:psfl)))
320
321;; Current 2.x version.
322(define-public python-2 python-2.7)
323
324(define python-2/fixed
325 (package
326 (inherit python-2)
327 (source (origin
328 (inherit (package-source python-2))
329 (patches (append
330 (origin-patches (package-source python-2))
331 (search-patches "python2-CVE-2018-14647.patch"
332 "python2-CVE-2018-1000802.patch")))))))
333
334(define-public python2-called-python
335 ;; Both 2.x and 3.x used to be called "python". In commit
336 ;; a7714d42de2c3082f3609d1e63c83d703fb39cf9 (March 2018), we renamed the
337 ;; Python 2.x package to "python2".
338 (package
339 (inherit python-2)
340 (name "python")
341 (properties `((superseded . ,python-2)))))
342
343(define-public python-3.7
344 (package (inherit python-2)
345 (name "python")
346 (version "3.7.0")
347 (replacement python-3/fixed)
348 (source (origin
349 (method url-fetch)
350 (uri (string-append "https://www.python.org/ftp/python/"
351 version "/Python-" version ".tar.xz"))
352 (patches (search-patches
353 "python-fix-tests.patch"
354 "python-3-fix-tests.patch"
355 "python-3-deterministic-build-info.patch"
356 "python-3-search-paths.patch"))
357 (patch-flags '("-p0"))
358 (sha256
359 (base32
360 "0j9mic5c9lbd2b20wka7hily7szz740wy9ilfrczxap63rnrk0h3"))
361 (snippet
362 '(begin
363 (for-each delete-file
364 '(;; This test may hang and eventually run out of
365 ;; memory on some systems:
366 ;; <https://bugs.python.org/issue34587>
367 "Lib/test/test_socket.py"
368
369 ;; These tests fail on AArch64.
370 "Lib/ctypes/test/test_win32.py"
371 "Lib/test/test_fcntl.py"
372 "Lib/test/test_posix.py"))
373 #t))))
374 (arguments
375 (substitute-keyword-arguments (package-arguments python-2)
376 ((#:phases phases)
377 `(modify-phases ,phases
378 ;; Unset SOURCE_DATE_EPOCH while running the test-suite and set it
379 ;; again afterwards. See <https://bugs.python.org/issue34022>.
380 (add-before 'check 'unset-SOURCE_DATE_EPOCH
381 (lambda _ (unsetenv "SOURCE_DATE_EPOCH") #t))
382 (add-after 'check 'reset-SOURCE_DATE_EPOCH
383 (lambda _ (setenv "SOURCE_DATE_EPOCH" "1") #t))
384 ;; FIXME: Without this phase we have close to 400 files that
385 ;; differ across different builds of this package. With this phase
386 ;; there are 44 files left that differ.
387 (add-after 'remove-tests 'rebuild-bytecode
388 (lambda* (#:key outputs #:allow-other-keys)
389 (let ((out (assoc-ref outputs "out")))
390 ;; Disable hash randomization to ensure the generated .pycs
391 ;; are reproducible.
392 (setenv "PYTHONHASHSEED" "0")
393 (for-each
394 (lambda (opt)
395 (format #t "Compiling with optimization level: ~a\n"
396 (if (null? opt) "none" (car opt)))
397 (for-each (lambda (file)
398 (apply invoke
399 `(,(string-append out "/bin/python3")
400 ,@opt
401 "-m" "compileall"
402 "-f" ; force rebuild
403 ;; Don't build lib2to3, because it's Python 2 code.
404 "-x" "lib2to3/.*"
405 ,file)))
406 (find-files out "\\.py$")))
407 (list '() '("-O") '("-OO")))
408 #t)))))))
409 (native-search-paths
410 (list (search-path-specification
411 (variable "PYTHONPATH")
412 (files (list (string-append "lib/python"
413 (version-major+minor version)
414 "/site-packages"))))))))
415
416;; Current 3.x version.
417(define-public python-3 python-3.7)
418
419(define python-3/fixed
420 (package
421 (inherit python-3)
422 (source (origin
423 (inherit (package-source python-3))
424 (patches (append (origin-patches (package-source python-3))
425 (search-patches "python-CVE-2018-14647.patch")))))))
426
427;; Current major version.
428(define-public python python-3)
429
430;; Minimal variants of Python, mostly used to break the cycle between Tk and
431;; Python (Tk -> libxcb -> Python.)
432
433(define-public python2-minimal
434 (package/inherit python-2
435 (name "python2-minimal")
436 (outputs '("out"))
437
438 ;; Keep zlib, which is used by 'pip' (via the 'zipimport' module), which
439 ;; is invoked upon 'make install'. 'pip' also expects 'ctypes' and thus
440 ;; libffi.
441 (inputs `(("libffi" ,libffi)
442 ("zlib" ,zlib)))))
443
444(define-public python-minimal
445 (package/inherit python
446 (name "python-minimal")
447 (outputs '("out"))
448
449 ;; Build fails due to missing ctypes without libffi.
450 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
451 ;; zlib is required by 'zipimport', used by pip.
452 (inputs `(("libffi" ,libffi)
453 ("openssl" ,openssl)
454 ("zlib" ,zlib)))))
455
456(define-public python-debug
457 (package/inherit python
458 (name "python-debug")
459 (outputs '("out" "debug"))
460 (build-system gnu-build-system)
461 (arguments
462 (substitute-keyword-arguments (package-arguments python)
463 ((#:configure-flags flags '())
464 `(cons "--with-pydebug" ,flags))))
465 (synopsis
466 "High-level, dynamically-typed programming language (for debugging)")
467 (description
468 "This variant of Python provides an interpreter built with
469@code{--with-pydebug} to help develop and debug extensions. See
470@url{https://pythonextensionpatterns.readthedocs.io/en/latest/debugging/debug.html},
471for more information.")))
472
473(define* (wrap-python3 python
474 #:optional
475 (name (string-append (package-name python) "-wrapper")))
476 (package/inherit python
477 (name name)
478 (source #f)
479 (build-system trivial-build-system)
480 (outputs '("out"))
481 (inputs `(("bash" ,bash)))
482 (propagated-inputs `(("python" ,python)))
483 (arguments
484 `(#:modules ((guix build utils))
485 #:builder
486 (begin
487 (use-modules (guix build utils))
488 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
489 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
490 (mkdir-p bin)
491 (for-each
492 (lambda (old new)
493 (symlink (string-append python old)
494 (string-append bin "/" new)))
495 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
496 `("python" ,"pydoc" ,"idle" ,"pip"))
497 ;; python-config outputs search paths based upon its location,
498 ;; use a bash wrapper to avoid changing its outputs.
499 (let ((bash (string-append (assoc-ref %build-inputs "bash")
500 "/bin/bash"))
501 (old (string-append python "python3-config"))
502 (new (string-append bin "/python-config")))
503 (with-output-to-file new
504 (lambda ()
505 (format #t "#!~a~%" bash)
506 (format #t "exec \"~a\" \"$@\"~%" old)
507 (chmod new #o755)
508 #t)))))))
509 (synopsis "Wrapper for the Python 3 commands")
510 (description
511 "This package provides wrappers for the commands of Python@tie{}3.x such
512that they can be invoked under their usual name---e.g., @command{python}
513instead of @command{python3}.")))
514
515(define-public python-wrapper (wrap-python3 python))
516(define-public python-minimal-wrapper (wrap-python3 python-minimal))
517
518(define-public python-psutil
519 (package
520 (name "python-psutil")
521 (version "5.4.3")
522 (source
523 (origin
524 (method url-fetch)
525 (uri (pypi-uri "psutil" version))
526 (sha256
527 (base32
528 "063v69x7spyclyaxrd3gmzj3p16q5ayg97xqhwb1kyn22a9pwip2"))))
529 (build-system python-build-system)
530 (arguments
531 ;; FIXME: some tests does not return and times out.
532 '(#:tests? #f))
533 (home-page "https://www.github.com/giampaolo/psutil")
534 (synopsis "Library for retrieving information on running processes")
535 (description
536 "psutil (Python system and process utilities) is a library for retrieving
537information on running processes and system utilization (CPU, memory, disks,
538network) in Python. It is useful mainly for system monitoring, profiling and
539limiting process resources and management of running processes. It implements
540many functionalities offered by command line tools such as: ps, top, lsof,
541netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
542pidof, tty, taskset, pmap.")
543 (properties `((python2-variant . ,(delay python2-psutil))))
544 (license license:bsd-3)))
545
546(define-public python2-psutil
547 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
548 (package
549 (inherit base)
550 (propagated-inputs
551 `(("python2-enum34" ,python2-enum34) ;optional
552 ,@(package-propagated-inputs base))))))
553
554(define-public python-shapely
555 (package
556 (name "python-shapely")
557 (version "1.6.3")
558 (source
559 (origin
560 (method url-fetch)
561 (uri (pypi-uri "Shapely" version))
562 (sha256
563 (base32
564 "0svc58dzcw9gj92b4sgq35sdxkf85z0qwlzxarkzq4bp3h8jy58l"))))
565 (build-system python-build-system)
566 (native-inputs
567 `(("python-cython" ,python-cython)
568 ("python-matplotlib" ,python-matplotlib)
569 ("python-pytest" ,python-pytest)
570 ("python-pytest-cov" ,python-pytest-cov)))
571 (inputs
572 `(("geos" ,geos)))
573 (propagated-inputs
574 `(("python-numpy" ,python-numpy)))
575 (arguments
576 `(#:phases
577 (modify-phases %standard-phases
578 (add-after 'unpack 'patch-geos-path
579 (lambda* (#:key inputs #:allow-other-keys)
580 (let ((geos (assoc-ref inputs "geos"))
581 (glibc (assoc-ref inputs ,(if (%current-target-system)
582 "cross-libc" "libc"))))
583 (substitute* "shapely/geos.py"
584 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
585 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
586 geos "/lib/libgeos_c.so'])"))
587 (("free = load_dll\\('c'\\)\\.free")
588 (string-append "free = load_dll('c', fallbacks=['"
589 glibc "/lib/libc.so.6']).free"))))
590 #t)))))
591 (home-page "https://github.com/Toblerity/Shapely")
592 (synopsis "Library for the manipulation and analysis of geometric objects")
593 (description "Shapely is a Python package for manipulation and analysis of
594planar geometric objects. It is based on the @code{GEOS} library.")
595 (license license:bsd-3)))
596
597(define-public python-logwrap
598 (package
599 (name "python-logwrap")
600 (version "3.2.1")
601 (source
602 (origin
603 (method url-fetch)
604 (uri (pypi-uri "logwrap" version ".zip"))
605 (sha256
606 (base32
607 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
608 (build-system python-build-system)
609 (propagated-inputs
610 `(("python-six" ,python-six)
611 ("python-typing" ,python-typing)))
612 (native-inputs
613 `(("unzip" ,unzip)
614 ("python-cython" ,python-cython)
615 ("python-pytest" ,python-pytest)
616 ("python-pytest-cov" ,python-pytest-cov)
617 ("python-pytest-runner" ,python-pytest-runner)))
618 (home-page "https://github.com/penguinolog/logwrap")
619 (synopsis "Decorator for logging function arguments")
620 (description "This package provides a decorator to log function arguments
621and function call return values in a human-readable way.")
622 (license license:asl2.0)))
623
624(define-public python2-shapely
625 (package-with-python2 python-shapely))
626
627(define-public python-clyent
628 (package
629 (name "python-clyent")
630 (version "1.2.1")
631 (source
632 (origin
633 (method url-fetch)
634 (uri (pypi-uri "clyent" version))
635 (sha256
636 (base32
637 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
638 (build-system python-build-system)
639 (native-inputs
640 `(("python-mock" ,python-mock)))
641 (home-page "https://github.com/binstar/clyent")
642 (synopsis "Command line client library")
643 (description "Clyent is a Python command line utiliy library. It is used
644by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
645 (license license:bsd-3)))
646
647(define-public python2-clyent
648 (package-with-python2 python-clyent))
649
650(define-public python-babel
651 (package
652 (name "python-babel")
653 (version "2.6.0")
654 (source
655 (origin
656 (method url-fetch)
657 (uri (pypi-uri "Babel" version))
658 (sha256
659 (base32
660 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))
661 (build-system python-build-system)
662 (native-inputs
663 `(("python-freezegun" ,python-freezegun)
664 ("python-pytest" ,python-pytest)))
665 (propagated-inputs
666 `(("python-pytz" ,python-pytz)))
667 (arguments
668 `(#:phases (modify-phases %standard-phases
669 (replace 'check
670 (lambda _ (invoke "pytest" "-vv"))))))
671 (home-page "http://babel.pocoo.org/")
672 (synopsis
673 "Tools for internationalizing Python applications")
674 (description
675 "Babel is composed of two major parts:
676- tools to build and work with gettext message catalogs
677- a Python interface to the CLDR (Common Locale Data Repository), providing
678access to various locale display names, localized number and date formatting,
679etc. ")
680 (license license:bsd-3)))
681
682(define-public python2-babel
683 (package-with-python2 python-babel))
684
685(define-public python2-backport-ssl-match-hostname
686 (package
687 (name "python2-backport-ssl-match-hostname")
688 (version "3.5.0.1")
689 (source
690 (origin
691 (method url-fetch)
692 (uri (string-append
693 "https://pypi.python.org/packages/source/b/"
694 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
695 version ".tar.gz"))
696 (sha256
697 (base32
698 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
699 (build-system python-build-system)
700 (arguments
701 `(#:python ,python-2
702 #:tests? #f)) ; no test target
703 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
704 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
705 (description
706 "This backport brings the ssl.match_hostname() function to users of
707earlier versions of Python. The function checks the hostname in the
708certificate returned by the server to which a connection has been established,
709and verifies that it matches the intended target hostname.")
710 (license license:psfl)))
711
712(define-public python-hdf4
713 (package
714 (name "python-hdf4")
715 (version "0.9")
716 (source
717 (origin
718 (method url-fetch)
719 (uri (pypi-uri name version))
720 (sha256
721 (base32
722 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
723 (build-system python-build-system)
724 (native-inputs `(("nose" ,python-nose)))
725 (propagated-inputs `(("numpy" ,python-numpy)))
726 (inputs
727 `(("hdf4" ,hdf4)
728 ("libjpeg" ,libjpeg)
729 ("zlib" ,zlib)))
730 (arguments
731 `(#:phases
732 (modify-phases %standard-phases
733 (replace 'check
734 (lambda _
735 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
736 ;; on to import numpy. Somehow this works on their CI system.
737 ;; Let's just manage PYTHONPATH here instead.
738 (substitute* "runexamples.sh"
739 (("export PYTHONPATH=.*") ""))
740 (setenv "PYTHONPATH"
741 (string-append (getcwd) ":"
742 (getenv "PYTHONPATH")))
743 (invoke "./runexamples.sh")
744 (invoke "nosetests" "-v"))))))
745 (home-page "https://github.com/fhs/python-hdf4")
746 (synopsis "Python interface to the NCSA HDF4 library")
747 (description
748 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
749which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
750NetCDF files can also be read and modified. Python-HDF4 is a fork of
751@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
752 (license license:expat)))
753
754(define-public python2-hdf4
755 (package-with-python2 python-hdf4))
756
757(define-public python-h5py
758 (package
759 (name "python-h5py")
760 (version "2.8.0")
761 (source
762 (origin
763 (method url-fetch)
764 (uri (pypi-uri "h5py" version))
765 (sha256
766 (base32
767 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
768 (build-system python-build-system)
769 (arguments
770 `(#:tests? #f ; no test target
771 #:phases
772 (modify-phases %standard-phases
773 (add-after 'unpack 'fix-hdf5-paths
774 (lambda* (#:key inputs #:allow-other-keys)
775 (let ((prefix (assoc-ref inputs "hdf5")))
776 (substitute* "setup_build.py"
777 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
778 (string-append "['" prefix "/lib" "']"))
779 (("'/opt/local/include', '/usr/local/include'")
780 (string-append "'" prefix "/include" "'")))
781 (substitute* "setup_configure.py"
782 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
783 (string-append "['" prefix "/lib" "']")))
784 #t))))))
785 (propagated-inputs
786 `(("python-six" ,python-six)
787 ("python-numpy" ,python-numpy)))
788 (inputs
789 `(("hdf5" ,hdf5)))
790 (native-inputs
791 `(("python-cython" ,python-cython)
792 ("python-pkgconfig" ,python-pkgconfig)))
793 (home-page "http://www.h5py.org/")
794 (synopsis "Read and write HDF5 files from Python")
795 (description
796 "The h5py package provides both a high- and low-level interface to the
797HDF5 library from Python. The low-level interface is intended to be a
798complete wrapping of the HDF5 API, while the high-level component supports
799access to HDF5 files, datasets and groups using established Python and NumPy
800concepts.")
801 (license license:bsd-3)))
802
803(define-public python2-h5py
804 (package-with-python2 python-h5py))
805
806(define-public python-netcdf4
807 (package
808 (name "python-netcdf4")
809 (version "1.2.9")
810 (source
811 (origin
812 (method url-fetch)
813 (uri (pypi-uri "netCDF4" version))
814 (sha256
815 (base32
816 "1h6jq338amlbk0ilzvjyl7cck80i0bah9a5spn9in71vy2qxm7i5"))))
817 (build-system python-build-system)
818 (native-inputs
819 `(("python-cython" ,python-cython)))
820 (propagated-inputs
821 `(("python-numpy" ,python-numpy)))
822 (inputs
823 `(("netcdf" ,netcdf)
824 ("hdf4" ,hdf4)
825 ("hdf5" ,hdf5)))
826 (arguments
827 '(#:phases
828 (modify-phases %standard-phases
829 (replace 'check
830 (lambda _
831 (setenv "NO_NET" "1") ; disable opendap tests
832 (with-directory-excursion "test"
833 (setenv "PYTHONPATH" ; find and add the library we just built
834 (string-append
835 (car (find-files "../build" "lib.*"
836 #:directories? #:t
837 #:fail-on-error? #:t))
838 ":" (getenv "PYTHONPATH")))
839 (zero? (system* "python" "run_all.py"))))))))
840 (home-page
841 "https://github.com/Unidata/netcdf4-python")
842 (synopsis "Python/numpy interface to the netCDF library")
843 (description "Netcdf4-python is a Python interface to the netCDF C
844library. netCDF version 4 has many features not found in earlier
845versions of the library and is implemented on top of HDF5. This module
846can read and write files in both the new netCDF 4 and the old netCDF 3
847format, and can create files that are readable by HDF5 clients. The
848API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
849to users of that module.")
850 ;; The software is mainly ISC, but includes some files covered
851 ;; by the Expat license.
852 (license (list license:isc license:expat))))
853
854(define-public python2-netcdf4
855 (package-with-python2 python-netcdf4))
856
857(define-public python-lockfile
858 (package
859 (name "python-lockfile")
860 (version "0.12.2")
861 (source
862 (origin
863 (method url-fetch)
864 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
865 "lockfile-" version ".tar.gz"))
866 (sha256
867 (base32
868 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
869 (build-system python-build-system)
870 (arguments '(#:test-target "check"))
871 (native-inputs
872 `(("python-pbr" ,python-pbr)))
873 (home-page "https://launchpad.net/pylockfile")
874 (synopsis "Platform-independent file locking module")
875 (description
876 "The lockfile package exports a LockFile class which provides a simple
877API for locking files.")
878 (license license:expat)))
879
880(define-public python2-lockfile
881 (package-with-python2 python-lockfile))
882
883(define-public python-semantic-version
884 (package
885 (name "python-semantic-version")
886 (version "2.6.0")
887 (source
888 (origin
889 (method url-fetch)
890 (uri (pypi-uri "semantic_version" version))
891 (sha256
892 (base32
893 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
894 (build-system python-build-system)
895 (arguments
896 `(#:tests? #f)) ; PyPI tarball lacks tests
897 (home-page "https://github.com/rbarrois/python-semanticversion")
898 (synopsis "Semantic versioning module for Python")
899 (description
900 "The @code{semantic_version} class is a small library for handling
901@uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
902
903It can compare versions, generate a new version that represents a bump in one of
904the version levels, and check whether any given string is a proper semantic
905version identifier.")
906 (license license:bsd-3)))
907
908(define-public python2-semantic-version
909 (package-with-python2 python-semantic-version))
910
911(define-public python-setuptools
912 (package
913 (name "python-setuptools")
914 (version "40.0.0")
915 (source
916 (origin
917 (method url-fetch)
918 (uri (pypi-uri "setuptools" version ".zip"))
919 (sha256
920 (base32
921 "0pq116lr14gnc62v76nk0npkm6krb2mpp7p9ab369zgv4n7dnah1"))
922 (modules '((guix build utils)))
923 (snippet
924 '(begin
925 ;; Remove included binaries which are used to build self-extracting
926 ;; installers for Windows.
927 ;; TODO: Find some way to build them ourself so we can include them.
928 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
929 #t))))
930 (build-system python-build-system)
931 ;; FIXME: Tests require pytest, which itself relies on setuptools.
932 ;; One could bootstrap with an internal untested setuptools.
933 (arguments
934 `(#:tests? #f))
935 (home-page "https://pypi.python.org/pypi/setuptools")
936 (synopsis
937 "Library designed to facilitate packaging Python projects")
938 (description
939 "Setuptools is a fully-featured, stable library designed to facilitate
940packaging Python projects, where packaging includes:
941Python package and module definitions,
942distribution package metadata,
943test hooks,
944project installation,
945platform-specific details,
946Python 3 support.")
947 ;; TODO: setuptools now bundles the following libraries:
948 ;; packaging, pyparsing, six and appdirs. How to unbundle?
949 (license (list license:psfl ; setuptools itself
950 license:expat ; six, appdirs, pyparsing
951 license:asl2.0 ; packaging is dual ASL2/BSD-2
952 license:bsd-2))))
953
954(define-public python2-setuptools
955 (package-with-python2 python-setuptools))
956
957(define-public python-uniseg
958 (package
959 (name "python-uniseg")
960 (version "0.7.1")
961 (source
962 (origin
963 (method url-fetch)
964 (uri (pypi-uri "uniseg" version ".zip"))
965 (sha256
966 (base32
967 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
968 (build-system python-build-system)
969 (arguments
970 '(#:tests? #f)) ; The test suite requires network access.
971 (native-inputs
972 `(("unzip" ,unzip)))
973 (home-page
974 "https://bitbucket.org/emptypage/uniseg-python")
975 (synopsis
976 "Python library to determine Unicode text segmentations")
977 (description
978 "Uniseg is a Python package used to determine Unicode text segmentations.
979Supported segmentations include:
980@enumerate
981@item @dfn{Code point} (any value in the Unicode codespace)
982@item @dfn{Grapheme cluster} (user-perceived character made of a single or
983multiple Unicode code points, e.g. \"G\" + acute-accent)
984@item Word break
985@item Sentence break
986@item Line break
987@end enumerate")
988 (license license:expat)))
989
990(define-public python2-uniseg
991 (package-with-python2 python-uniseg))
992
993(define-public python-humanfriendly
994 (package
995 (name "python-humanfriendly")
996 (version "4.4.1")
997 (source
998 (origin
999 (method url-fetch)
1000 (uri (pypi-uri "humanfriendly" version))
1001 (sha256
1002 (base32
1003 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
1004 (build-system python-build-system)
1005 (arguments
1006 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1007 #:tests? #f))
1008 (propagated-inputs
1009 `(("python-monotonic" ,python-monotonic)))
1010 (home-page "https://humanfriendly.readthedocs.io")
1011 (synopsis "Human-friendly input and output in Python")
1012 (description
1013 "The functions and classes in @code{humanfriendly} can be used to make
1014text interfaces more user-friendly. It includes tools to parse and format
1015numbers, file sizes, and timespans, timers for long-running operations, menus
1016to allow the user to choose from a list of options, and terminal interaction
1017helpers.")
1018 (license license:expat)))
1019
1020(define-public python2-humanfriendly
1021 (package-with-python2 python-humanfriendly))
1022
1023(define-public python-capturer
1024 (package
1025 (name "python-capturer")
1026 (version "2.4")
1027 (source
1028 (origin
1029 (method url-fetch)
1030 (uri (pypi-uri "capturer" version))
1031 (sha256
1032 (base32
1033 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1034 (build-system python-build-system)
1035 (arguments
1036 `(#:tests? #f))
1037 (propagated-inputs
1038 `(("python-humanfriendly" ,python-humanfriendly)))
1039 (home-page "https://capturer.readthedocs.io")
1040 (synopsis "Capture stdout and stderr streams of the current process")
1041 (description
1042 "The capturer package makes it easy to capture the stdout and stderr
1043streams of the current process and subprocesses. Output can be relayed
1044to the terminal in real time but is also available to the Python program
1045for additional processing.")
1046 (license license:expat)))
1047
1048(define-public python2-capturer
1049 (package-with-python2 python-capturer))
1050
1051(define-public python-verboselogs
1052 (package
1053 (name "python-verboselogs")
1054 (version "1.7")
1055 (source
1056 (origin
1057 (method url-fetch)
1058 (uri (pypi-uri "verboselogs" version))
1059 (sha256
1060 (base32
1061 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1062 (build-system python-build-system)
1063 (native-inputs
1064 `(("python-mock" ,python-mock)
1065 ("python-astroid" ,python-astroid)
1066 ("python-pylint" ,python-pylint)))
1067 (home-page "https://verboselogs.readthedocs.io")
1068 (synopsis "Verbose logging level for Python's logging module")
1069 (description
1070 "The @code{verboselogs} package extends Python's @code{logging} module to
1071add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1072 (license license:expat)))
1073
1074(define-public python2-verboselogs
1075 (package-with-python2 python-verboselogs))
1076
1077(define-public python-coloredlogs
1078 (package
1079 (name "python-coloredlogs")
1080 (version "7.3")
1081 (source
1082 (origin
1083 (method url-fetch)
1084 (uri (pypi-uri "coloredlogs" version))
1085 (sha256
1086 (base32
1087 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
1088 (build-system python-build-system)
1089 (arguments
1090 `(;Tests require some updated modules
1091 #:tests? #f))
1092 (propagated-inputs
1093 `(("python-capturer" ,python-capturer)))
1094 (home-page "https://coloredlogs.readthedocs.io")
1095 (synopsis "Colored stream handler for Python's logging module")
1096 (description
1097 "The @code{coloredlogs} package enables colored terminal output for
1098Python's logging module. The @code{ColoredFormatter} class inherits from
1099@code{logging.Formatter} and uses ANSI escape sequences to render your logging
1100messages in color.")
1101 (license license:expat)))
1102
1103(define-public python2-coloredlogs
1104 (package-with-python2 python-coloredlogs))
1105
1106(define-public python-eventlet
1107 (package
1108 (name "python-eventlet")
1109 (version "0.20.1")
1110 (source
1111 (origin
1112 (method url-fetch)
1113 (uri (pypi-uri "eventlet" version))
1114 (sha256
1115 (base32
1116 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1117 (build-system python-build-system)
1118 (propagated-inputs
1119 `(("python-greenlet" ,python-greenlet)))
1120 (arguments
1121 ;; TODO: Requires unpackaged 'enum-compat'.
1122 '(#:tests? #f))
1123 (home-page "http://eventlet.net")
1124 (synopsis "Concurrent networking library for Python")
1125 (description
1126 "Eventlet is a concurrent networking library for Python that
1127allows you to change how you run your code, not how you write it.
1128It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1129Coroutines ensure that the developer uses a blocking style of programming
1130that is similar to threading, but provide the benefits of non-blocking I/O.
1131The event dispatch is implicit, which means you can easily use @code{Eventlet}
1132from the Python interpreter, or as a small part of a larger application.")
1133 (license license:expat)))
1134
1135(define-public python2-eventlet
1136 (let ((base (package-with-python2
1137 (strip-python2-variant python-eventlet))))
1138 (package (inherit base)
1139 (propagated-inputs
1140 `(("python2-enum34" ,python2-enum34)
1141 ,@(package-propagated-inputs base))))))
1142
1143(define-public python-six
1144 (package
1145 (name "python-six")
1146 (version "1.11.0")
1147 (source
1148 (origin
1149 (method url-fetch)
1150 (uri (pypi-uri "six" version))
1151 (sha256
1152 (base32
1153 "1scqzwc51c875z23phj48gircqjgnn3af8zy2izjwmnlxrxsgs3h"))))
1154 (build-system python-build-system)
1155 (arguments
1156 `(#:phases
1157 (modify-phases %standard-phases
1158 (replace 'check
1159 (lambda _
1160 (invoke "py.test" "-v"))))))
1161 (native-inputs
1162 `(("python-py" ,python-py)
1163 ("python-pytest" ,python-pytest-bootstrap)))
1164 (home-page "https://pypi.python.org/pypi/six/")
1165 (synopsis "Python 2 and 3 compatibility utilities")
1166 (description
1167 "Six is a Python 2 and 3 compatibility library. It provides utility
1168functions for smoothing over the differences between the Python versions with
1169the goal of writing Python code that is compatible on both Python versions.
1170Six supports every Python version since 2.5. It is contained in only one
1171Python file, so it can be easily copied into your project.")
1172 (license license:x11)))
1173
1174(define-public python2-six
1175 (package-with-python2 python-six))
1176
1177(define-public python-six-bootstrap
1178 (package
1179 (inherit python-six)
1180 (name "python-six-bootstrap")
1181 (native-inputs `())
1182 (arguments `(#:tests? #f))))
1183
1184(define-public python2-six-bootstrap
1185 (package-with-python2 python-six-bootstrap))
1186
1187(define-public python-schedule
1188 (package
1189 (name "python-schedule")
1190 (version "0.4.3")
1191 (source
1192 (origin
1193 (method url-fetch)
1194 (uri (pypi-uri "schedule" version))
1195 (sha256
1196 (base32
1197 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1198 (build-system python-build-system)
1199 (native-inputs
1200 `(("python-pytest" ,python-pytest)
1201 ("python-mock" ,python-mock)))
1202 (home-page "https://github.com/dbader/schedule")
1203 (synopsis "Schedule periodic function calls in Python")
1204 (description
1205 "Schedule is an in-process scheduler for periodic jobs that uses the
1206builder pattern for configuration. Schedule lets you run Python functions (or
1207any other callable) periodically at pre-determined intervals using a simple,
1208human-friendly syntax.")
1209 (license license:expat)))
1210
1211(define-public python2-schedule
1212 (package-with-python2 python-schedule))
1213
1214(define-public python-pandas
1215 (package
1216 (name "python-pandas")
1217 (version "0.23.4")
1218 (source
1219 (origin
1220 (method url-fetch)
1221 (uri (pypi-uri "pandas" version))
1222 (sha256
1223 (base32 "1x54pd7hr3y7qahx6b5bf2wzj54xvl8r3s1h4pl254pnmi3wl92v"))))
1224 (build-system python-build-system)
1225 (arguments
1226 `(#:modules ((guix build utils)
1227 (guix build python-build-system)
1228 (ice-9 ftw)
1229 (srfi srfi-26))
1230 #:phases (modify-phases %standard-phases
1231 (replace 'check
1232 (lambda _
1233 (let ((build-directory
1234 (string-append
1235 (getcwd) "/build/"
1236 (car (scandir "build"
1237 (cut string-prefix? "lib." <>))))))
1238 ;; Disable the "strict data files" option which causes
1239 ;; the build to error out if required data files are not
1240 ;; available (as is the case with PyPI archives).
1241 (substitute* "setup.cfg"
1242 (("addopts = --strict-data-files") "addopts = "))
1243 (with-directory-excursion build-directory
1244 ;; Delete tests that require "moto" which is not yet in Guix.
1245 (for-each delete-file
1246 '("pandas/tests/io/conftest.py"
1247 "pandas/tests/io/json/test_compression.py"
1248 "pandas/tests/io/parser/test_network.py"
1249 "pandas/tests/io/test_excel.py"
1250 "pandas/tests/io/test_parquet.py"))
1251 (invoke "pytest" "-vv" "pandas" "--skip-slow"
1252 "--skip-network" "-k"
1253 ;; XXX: Due to the deleted tests above.
1254 "not test_read_s3_jsonl"))))))))
1255 (propagated-inputs
1256 `(("python-numpy" ,python-numpy)
1257 ("python-pytz" ,python-pytz)
1258 ("python-dateutil" ,python-dateutil)))
1259 (native-inputs
1260 `(("python-cython" ,python-cython)
1261 ("python-beautifulsoup4" ,python-beautifulsoup4)
1262 ("python-lxml" ,python-lxml)
1263 ("python-html5lib" ,python-html5lib)
1264 ("python-nose" ,python-nose)
1265 ("python-pytest" ,python-pytest)))
1266 (home-page "https://pandas.pydata.org")
1267 (synopsis "Data structures for data analysis, time series, and statistics")
1268 (description
1269 "Pandas is a Python package providing fast, flexible, and expressive data
1270structures designed to make working with structured (tabular,
1271multidimensional, potentially heterogeneous) and time series data both easy
1272and intuitive. It aims to be the fundamental high-level building block for
1273doing practical, real world data analysis in Python.")
1274 (license license:bsd-3)))
1275
1276(define-public python2-pandas
1277 (package-with-python2 python-pandas))
1278
1279(define-public python2-mechanize
1280 (package
1281 (name "python2-mechanize")
1282 (version "0.2.5")
1283 (source
1284 (origin
1285 (method url-fetch)
1286 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1287 version ".tar.gz"))
1288 (sha256
1289 (base32
1290 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1291 (build-system python-build-system)
1292 (arguments
1293 `(#:python ,python-2 ; apparently incompatible with Python 3
1294 #:tests? #f))
1295 ;; test fails with message
1296 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1297 ;; (python-3.3.2) or
1298 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1299 ;; (python-2.7.5).
1300 ;; The source code is from March 2011 and probably not up-to-date
1301 ;; with respect to python unit tests.
1302 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1303 (synopsis
1304 "Stateful programmatic web browsing in Python")
1305 (description
1306 "Mechanize implements stateful programmatic web browsing in Python,
1307after Andy Lester’s Perl module WWW::Mechanize.")
1308 (license (license:non-copyleft
1309 "file://COPYING"
1310 "See COPYING in the distribution."))))
1311
1312
1313(define-public python-simplejson
1314 (package
1315 (name "python-simplejson")
1316 (version "3.14.0")
1317 (source
1318 (origin
1319 (method url-fetch)
1320 (uri (pypi-uri "simplejson" version))
1321 (sha256
1322 (base32
1323 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1324 (build-system python-build-system)
1325 (home-page "http://simplejson.readthedocs.org/en/latest/")
1326 (synopsis
1327 "Json library for Python")
1328 (description
1329 "JSON (JavaScript Object Notation) is a subset of JavaScript
1330syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1331format.
1332
1333Simplejson exposes an API familiar to users of the standard library marshal
1334and pickle modules. It is the externally maintained version of the json
1335library contained in Python 2.6, but maintains compatibility with Python 2.5
1336and (currently) has significant performance advantages, even without using
1337the optional C extension for speedups. Simplejson is also supported on
1338Python 3.3+.")
1339 (license license:x11)))
1340
1341(define-public python2-simplejson
1342 (package-with-python2 python-simplejson))
1343
1344
1345(define-public python-pyicu
1346 (package
1347 (name "python-pyicu")
1348 (version "1.9.8")
1349 (source
1350 (origin
1351 (method url-fetch)
1352 (uri (pypi-uri "PyICU" version))
1353 (sha256
1354 (base32
1355 "05nz4p2dpkhwj6y9kik24xbvmfxji39nl0xw0sc0nvp9fgzf6xnd"))))
1356 (build-system python-build-system)
1357 (inputs
1358 `(("icu4c" ,icu4c)))
1359 (native-inputs
1360 `(("python-pytest" ,python-pytest)
1361 ("python-six" ,python-six)))
1362 (home-page "https://github.com/ovalhub/pyicu")
1363 (synopsis "Python extension wrapping the ICU C++ API")
1364 (description
1365 "PyICU is a python extension wrapping the ICU C++ API.")
1366 (properties `((python2-variant . ,(delay python2-pyicu))))
1367 (license license:x11)))
1368
1369(define-public python2-pyicu
1370 (let ((base (package-with-python2
1371 (strip-python2-variant python-pyicu))))
1372 (package
1373 (inherit base)
1374 (arguments
1375 `(,@(package-arguments base)
1376 #:phases
1377 (modify-phases %standard-phases
1378 (add-before 'check 'delete-failing-test
1379 (λ _
1380 ;; XXX: This fails due to Unicode issues unique to Python 2,
1381 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1382 (delete-file "test/test_Script.py")
1383 #t))))))))
1384
1385(define-public python2-dogtail
1386 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1387 ;; spaces in indentation" with Python 3.
1388 (package
1389 (name "python2-dogtail")
1390 (version "0.9.9")
1391 (source (origin
1392 (method url-fetch)
1393 (uri (pypi-uri "dogtail" version))
1394 (sha256
1395 (base32
1396 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1397 (build-system python-build-system)
1398 (arguments `(#:python ,python-2
1399 #:tests? #f)) ; invalid command "test"
1400 ;; Currently no offical homepage.
1401 (home-page "https://pypi.python.org/pypi/dogtail/")
1402 (synopsis "GUI test tool and automation framework written in Python")
1403 (description
1404 "Dogtail is a GUI test tool and automation framework written in Python.
1405It uses Accessibility (a11y) technologies to communicate with desktop
1406applications. dogtail scripts are written in Python and executed like any
1407other Python program.")
1408 (license license:gpl2+)))
1409
1410(define-public python-empy
1411 (package
1412 (name "python-empy")
1413 (version "3.3")
1414 (source (origin
1415 (method url-fetch)
1416 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1417 version ".tar.gz"))
1418 (sha256
1419 (base32
1420 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1421 (build-system python-build-system)
1422 (arguments
1423 `(#:tests? #f)) ;python2 only
1424 (home-page "http://www.alcyone.com/software/empy/")
1425 (synopsis "Templating system for Python")
1426 (description
1427 "EmPy is a system for embedding Python expressions and statements in
1428template text; it takes an EmPy source file, processes it, and produces
1429output. This is accomplished via expansions, which are special signals to the
1430EmPy system and are set off by a special prefix (by default the at sign, @@).
1431EmPy can expand arbitrary Python expressions and statements in this way, as
1432well as a variety of special forms. Textual data not explicitly delimited in
1433this way is sent unaffected to the output, allowing Python to be used in
1434effect as a markup language. Also supported are callbacks via hooks,
1435recording and playback via diversions, and dynamic, chainable filters. The
1436system is highly configurable via command line options and embedded
1437commands.")
1438 (license license:lgpl2.1+)))
1439
1440(define-public python2-empy
1441 (package-with-python2 python-empy))
1442
1443(define-public python2-element-tree
1444 (package
1445 (name "python2-element-tree")
1446 (version "1.2.6")
1447 (source (origin
1448 (method url-fetch)
1449 (uri (string-append
1450 "http://effbot.org/media/downloads/elementtree-"
1451 version "-20050316.tar.gz"))
1452 (sha256
1453 (base32
1454 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1455 (build-system python-build-system)
1456 (arguments
1457 `(#:python ,python-2 ; seems to be part of Python 3
1458 #:tests? #f)) ; no 'test' sub-command
1459 (synopsis "Toolkit for XML processing in Python")
1460 (description
1461 "ElementTree is a Python library supporting lightweight XML processing.")
1462 (home-page "http://effbot.org/zone/element-index.htm")
1463 (license (license:x11-style
1464 "http://docs.python.org/2/license.html"
1465 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1466
1467(define-public python2-pybugz
1468 (package
1469 (name "python2-pybugz")
1470 (version "0.6.11")
1471 (source (origin
1472 (method url-fetch)
1473 (uri (string-append
1474 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1475 version ".tar.gz"))
1476 (sha256
1477 (base32
1478 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1479 (patches (search-patches "pybugz-stty.patch"
1480 "pybugz-encode-error.patch"))))
1481 (build-system python-build-system)
1482 (arguments
1483 `(#:python ,python-2 ; SyntaxError with Python 3
1484 #:tests? #f)) ; no 'test' sub-command
1485 (propagated-inputs
1486 `(("element-tree" ,python2-element-tree)))
1487 (synopsis "Python and command-line interface to Bugzilla")
1488 (description
1489 "PyBugz is a Python library and command-line tool to query the Bugzilla
1490bug tracking system. It is meant as an aid to speed up interaction with the
1491bug tracker.")
1492 (home-page "http://www.liquidx.net/pybugz/")
1493 (license license:gpl2)))
1494
1495(define-public python2-enum
1496 (package
1497 (name "python2-enum")
1498 (version "0.4.6")
1499 (source (origin
1500 (method url-fetch)
1501 (uri (pypi-uri "enum" version))
1502 (sha256
1503 (base32
1504 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1505 (build-system python-build-system)
1506 (arguments
1507 `(#:python ,python-2))
1508 (home-page "http://pypi.python.org/pypi/enum/")
1509 (synopsis "Robust enumerated type support in Python")
1510 (description
1511 "This provides a module for robust enumerations in Python. It has
1512been superseded by the Python standard library and is provided only for
1513compatibility.")
1514 ;; Choice of either license.
1515 (license (list license:gpl3+ license:psfl))))
1516
1517(define-public python-enum34
1518 (package
1519 (name "python-enum34")
1520 (version "1.1.6")
1521 (source
1522 (origin
1523 (method url-fetch)
1524 (uri (pypi-uri "enum34" version))
1525 (sha256
1526 (base32
1527 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1528 (build-system python-build-system)
1529 (home-page "https://pypi.python.org/pypi/enum34")
1530 (synopsis "Backported Python 3.4 Enum")
1531 (description
1532 "Enum34 is the new Python stdlib enum module available in Python 3.4
1533backported for previous versions of Python from 2.4 to 3.3.")
1534 (license license:bsd-3)))
1535
1536(define-public python2-enum34
1537 (package-with-python2 python-enum34))
1538
1539(define-public python-parse-type
1540 (package
1541 (name "python-parse-type")
1542 (version "0.4.2")
1543 (source
1544 (origin
1545 (method url-fetch)
1546 (uri (pypi-uri "parse_type" version))
1547 (sha256
1548 (base32
1549 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1550 (build-system python-build-system)
1551 (propagated-inputs
1552 `(("python-six" ,python-six)
1553 ("python-parse" ,python-parse)))
1554 (native-inputs
1555 `(("python-pytest" ,python-pytest)
1556 ("python-pytest-runner" ,python-pytest-runner)))
1557 (home-page "https://github.com/jenisys/parse_type")
1558 (synopsis "Extended parse module")
1559 (description
1560 "Parse_type extends the python parse module.")
1561 (properties
1562 `((python2-variant . ,(delay python2-parse-type))))
1563 (license license:bsd-3)))
1564
1565(define-public python2-parse-type
1566 (let ((base (package-with-python2
1567 (strip-python2-variant python-parse-type))))
1568 (package (inherit base)
1569 (propagated-inputs
1570 `(("python2-enum34" ,python2-enum34)
1571 ,@(package-propagated-inputs base))))))
1572
1573(define-public python-parse
1574 (package
1575 (name "python-parse")
1576 (version "1.8.4")
1577 (source
1578 (origin
1579 (method url-fetch)
1580 (uri (pypi-uri "parse" version))
1581 (sha256
1582 (base32
1583 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1584 (build-system python-build-system)
1585 (arguments
1586 `(#:phases
1587 (modify-phases %standard-phases
1588 (replace 'check
1589 (lambda _ (invoke "python" "test_parse.py"))))))
1590 (home-page "https://github.com/r1chardj0n3s/parse")
1591 (synopsis "Parse strings")
1592 (description
1593 "Parse strings using a specification based on the Python @code{format()}
1594syntax.")
1595 (license license:x11)))
1596
1597(define-public python-polib
1598 (package
1599 (name "python-polib")
1600 (version "1.0.8")
1601 (source (origin
1602 (method url-fetch)
1603 (uri (pypi-uri "polib" version))
1604 (sha256
1605 (base32
1606 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1607 (build-system python-build-system)
1608 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1609 (synopsis "Manipulate, create and modify gettext files")
1610 (description "Polib can manipulate any gettext format (po, pot and mo)
1611files. It can be used to create po files from scratch or to modify
1612existing ones.")
1613 (license license:expat)))
1614
1615(define-public python2-polib
1616 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1617 (package
1618 (inherit base)
1619 (arguments `(,@(package-arguments base)
1620 ;; Tests don't work with python2.
1621 #:tests? #f)))))
1622
1623(define-public scons
1624 (package
1625 (name "scons")
1626 (version "3.0.1")
1627 (source (origin
1628 (method url-fetch)
1629 (uri (string-append "mirror://sourceforge/scons/scons/" version
1630 "/scons-" version ".tar.gz"))
1631 (sha256
1632 (base32
1633 "0wzid419mlwqw9llrg8gsx4nkzhqy16m4m40r0xnh6cwscw5wir4"))))
1634 (build-system python-build-system)
1635 (arguments
1636 `(#:use-setuptools? #f ; still relies on distutils
1637 #:tests? #f)) ; no 'python setup.py test' command
1638 (home-page "http://scons.org/")
1639 (synopsis "Software construction tool written in Python")
1640 (description
1641 "SCons is a software construction tool. Think of SCons as an improved,
1642cross-platform substitute for the classic Make utility with integrated
1643functionality similar to autoconf/automake and compiler caches such as ccache.
1644In short, SCons is an easier, more reliable and faster way to build
1645software.")
1646 (license license:x11)))
1647
1648(define-public scons-python2
1649 (package
1650 (inherit (package-with-python2 scons))
1651 (name "scons-python2")))
1652
1653(define-public python-extras
1654 (package
1655 (name "python-extras")
1656 (version "1.0.0")
1657 (source
1658 (origin
1659 (method url-fetch)
1660 (uri (pypi-uri "extras" version))
1661 (sha256
1662 (base32
1663 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1664 (build-system python-build-system)
1665 (arguments
1666 ;; FIXME: Circular dependency on testtools.
1667 '(#:tests? #f))
1668 (home-page "https://github.com/testing-cabal/extras")
1669 (synopsis "Useful extensions to the Python standard library")
1670 (description
1671 "Extras is a set of extensions to the Python standard library.")
1672 (license license:expat)))
1673
1674(define-public python2-extras
1675 (package-with-python2 python-extras))
1676
1677(define-public python-mimeparse
1678 (package
1679 (name "python-mimeparse")
1680 (version "1.6.0")
1681 (source
1682 (origin
1683 (method url-fetch)
1684 (uri (string-append
1685 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1686 version ".tar.gz"))
1687 (sha256
1688 (base32
1689 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1690 (build-system python-build-system)
1691 (arguments
1692 '(#:phases
1693 (modify-phases %standard-phases
1694 (replace 'check
1695 (lambda _
1696 (invoke "./mimeparse_test.py"))))))
1697 (home-page
1698 "https://github.com/dbtsai/python-mimeparse")
1699 (synopsis "Python library for parsing MIME types")
1700 (description
1701 "Mimeparse provides basic functions for parsing MIME type names and
1702matching them against a list of media-ranges.")
1703 (license license:expat)))
1704
1705(define-public python2-mimeparse
1706 (package-with-python2 python-mimeparse))
1707
1708(define-public python-pafy
1709 (package
1710 (name "python-pafy")
1711 (version "0.5.3.1")
1712 (source
1713 (origin
1714 (method url-fetch)
1715 (uri (pypi-uri "pafy" version))
1716 (sha256
1717 (base32
1718 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1719 (build-system python-build-system)
1720 (arguments
1721 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1722 (propagated-inputs
1723 ;; Youtube-dl is a python package which is imported in the file
1724 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1725 `(("youtube-dl" ,youtube-dl)))
1726 (home-page "https://np1.github.io/pafy/")
1727 (synopsis "Retrieve YouTube content and metadata")
1728 (description
1729 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1730 (license license:lgpl3+)))
1731
1732(define-public python2-funcsigs
1733 (package
1734 (name "python2-funcsigs")
1735 (version "1.0.2")
1736 (source (origin
1737 (method url-fetch)
1738 (uri (pypi-uri "funcsigs" version))
1739 (sha256
1740 (base32
1741 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1742 (build-system python-build-system)
1743 (arguments
1744 `(#:python ,python-2))
1745 (native-inputs
1746 `(("python2-unittest2" ,python2-unittest2)))
1747 (home-page "http://funcsigs.readthedocs.org")
1748 (synopsis "Python function signatures from PEP362")
1749 (description
1750 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1751 (license license:asl2.0)))
1752
1753(define-public python2-funcsigs-bootstrap
1754 (package
1755 (inherit python2-funcsigs)
1756 (name "python2-funcsigs-bootstrap")
1757 (native-inputs `())
1758 (arguments
1759 `(#:tests? #f
1760 ,@(package-arguments python2-funcsigs)))))
1761
1762(define-public python-py
1763 (package
1764 (name "python-py")
1765 (version "1.5.4")
1766 (source
1767 (origin
1768 (method url-fetch)
1769 (uri (pypi-uri "py" version))
1770 (sha256
1771 (base32
1772 "1xxvwfn82457djf55f5n2c94699rfqnk43br8fif2r2q8gvrmm9z"))))
1773 (build-system python-build-system)
1774 (arguments
1775 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1776 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1777 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1778 ;; Is this module globally installed?"
1779 '(#:tests? #f))
1780 (native-inputs
1781 `(("python-setuptools-scm" ,python-setuptools-scm)))
1782 (home-page "https://github.com/pytest-dev/py")
1783 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1784 (description
1785 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1786code introspection, and logging.")
1787 (license license:expat)))
1788
1789(define-public python2-py
1790 (package-with-python2 python-py))
1791
1792;; Recent versions of python-fixtures and python-testrepository need
1793;; python-pbr for packaging, which itself needs these two packages for
1794;; testing.
1795;; To fix this circular dependency, we use a build of python-pbr, based on the
1796;; same source, just without any test dependencies and with tests disabled.
1797;; python-pbr-minmal is then used to package python-fixtures and
1798;; python-testrepository.
1799;; Strictly speaking we currently could remove the test-requirements from the
1800;; normal python-pbr package (and save this package) since test are disabled
1801;; there anyway. But this may change in future.
1802(define-public python-pbr-minimal
1803 (package
1804 (name "python-pbr-minimal")
1805 (version "3.0.1")
1806 (source
1807 (origin
1808 (method url-fetch)
1809 (uri (pypi-uri "pbr" version))
1810 (sha256
1811 (base32
1812 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1813 (build-system python-build-system)
1814 (arguments
1815 `(#:tests? #f))
1816 (home-page "http://docs.openstack.org/developer/pbr/")
1817 (synopsis "Minimal build of python-pbr used for bootstrapping")
1818 (description
1819 "Used only for bootstrapping python2-pbr, you should not need this.")
1820 (license license:asl2.0)))
1821
1822(define-public python2-pbr-minimal
1823 (package-with-python2 python-pbr-minimal))
1824
1825(define-public python-pbr
1826 (package
1827 (inherit python-pbr-minimal)
1828 (name "python-pbr")
1829 (arguments
1830 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1831 (propagated-inputs
1832 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1833 (native-inputs
1834 `(("python-fixtures" ,python-fixtures-bootstrap)
1835 ;; discover, coverage, hacking, subunit
1836 ("python-mock" ,python-mock)
1837 ("python-six" ,python-six)
1838 ("python-sphinx" ,python-sphinx)
1839 ("python-testrepository" ,python-testrepository-bootstrap)
1840 ("python-testresources" ,python-testresources-bootstrap)
1841 ("python-testscenarios" ,python-testscenarios-bootstrap)
1842 ("python-testtools" ,python-testtools-bootstrap)
1843 ("python-virtualenv" ,python-virtualenv)))
1844 (synopsis "Enhance the default behavior of Python’s setuptools")
1845 (description
1846 "Python Build Reasonableness (PBR) is a library that injects some useful
1847and sensible default behaviors into your setuptools run. It will set
1848versions, process requirements files and generate AUTHORS and ChangeLog file
1849from git information.
1850")))
1851
1852(define-public python2-pbr
1853 (package-with-python2 python-pbr))
1854
1855(define-public python-exif-read
1856 (package
1857 (name "python-exif-read")
1858 (version "2.1.2")
1859 (source (origin
1860 (method url-fetch)
1861 (uri (pypi-uri "ExifRead" version))
1862 (sha256
1863 (base32
1864 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1865 (build-system python-build-system)
1866 (arguments `(#:tests? #f)) ; no tests
1867 (home-page "https://github.com/ianare/exif-py")
1868 (synopsis "Python library to extract EXIF data from image files")
1869 (description
1870 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1871files.")
1872 (license license:bsd-3)))
1873
1874(define-public python2-exif-read
1875 (package-with-python2 python-exif-read))
1876
1877(define-public python-pyld
1878 (package
1879 (name "python-pyld")
1880 (version "1.0.3")
1881 (source (origin
1882 (method url-fetch)
1883 (uri (pypi-uri "PyLD" version))
1884 (sha256
1885 (base32
1886 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1887 (build-system python-build-system)
1888 (home-page "https://github.com/digitalbazaar/pyld")
1889 (synopsis "Python implementation of the JSON-LD specification")
1890 (description
1891 "PyLD is an implementation of the JSON-LD specification.")
1892 (license license:bsd-3)))
1893
1894(define-public python2-pyld
1895 (package-with-python2 python-pyld))
1896
1897(define-public python-click
1898 (package
1899 (name "python-click")
1900 (version "6.7")
1901 (source
1902 (origin
1903 (method url-fetch)
1904 (uri (pypi-uri "click" version))
1905 (sha256
1906 (base32
1907 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
1908 (build-system python-build-system)
1909 (arguments
1910 `(;; The tests are fragile, depending on a specific version of pytest:
1911 ;; <https://github.com/pallets/click/issues/823>
1912 #:tests? #f
1913 #:phases
1914 (modify-phases %standard-phases
1915 (add-after 'unpack 'fix-paths
1916 (lambda* (#:key inputs #:allow-other-keys)
1917 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1918 "cross-libc" "libc"))))
1919 (substitute* "click/_unicodefun.py"
1920 (("'locale'")
1921 (string-append "'" glibc "/bin/locale'"))))
1922 #t)))))
1923 (native-inputs
1924 `(("python-pytest" ,python-pytest)))
1925 (home-page "http://click.pocoo.org")
1926 (synopsis "Command line library for Python")
1927 (description
1928 "Click is a Python package for creating command line interfaces in a
1929composable way with as little code as necessary. Its name stands for
1930\"Command Line Interface Creation Kit\". It's highly configurable but comes
1931with sensible defaults out of the box.")
1932 (license license:bsd-3)))
1933
1934(define-public python2-click
1935 (package-with-python2 python-click))
1936
1937(define-public python-wheel
1938 (package
1939 (name "python-wheel")
1940 (version "0.30.0a0")
1941 (source
1942 (origin
1943 (method url-fetch)
1944 (uri (pypi-uri "wheel" version))
1945 (sha256
1946 (base32
1947 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
1948 (build-system python-build-system)
1949 (native-inputs
1950 `(("python-jsonschema" ,python-jsonschema)
1951 ("python-pytest-cov" ,python-pytest-cov)))
1952 (home-page "https://bitbucket.org/pypa/wheel/")
1953 (synopsis "Format for built Python packages")
1954 (description
1955 "A wheel is a ZIP-format archive with a specially formatted filename and
1956the @code{.whl} extension. It is designed to contain all the files for a PEP
1957376 compatible install in a way that is very close to the on-disk format. Many
1958packages will be properly installed with only the @code{Unpack} step and the
1959unpacked archive preserves enough information to @code{Spread} (copy data and
1960scripts to their final locations) at any later time. Wheel files can be
1961installed with a newer @code{pip} or with wheel's own command line utility.")
1962 (license license:expat)
1963 (properties `((python2-variant . ,(delay python2-wheel))))))
1964
1965(define-public python2-wheel
1966 (let ((wheel (package-with-python2
1967 (strip-python2-variant python-wheel))))
1968 (package (inherit wheel)
1969 (native-inputs `(("python2-functools32" ,python2-functools32)
1970 ,@(package-native-inputs wheel))))))
1971
1972(define-public python-vcversioner
1973 (package
1974 (name "python-vcversioner")
1975 (version "2.16.0.0")
1976 (source
1977 (origin
1978 (method url-fetch)
1979 (uri (pypi-uri "vcversioner" version))
1980 (sha256
1981 (base32
1982 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1983 (build-system python-build-system)
1984 (synopsis "Python library for version number discovery")
1985 (description "Vcversioner is a Python library that inspects tagging
1986information in a variety of version control systems in order to discover
1987version numbers.")
1988 (home-page "https://github.com/habnabit/vcversioner")
1989 (license license:isc)))
1990
1991(define-public python2-vcversioner
1992 (package-with-python2 python-vcversioner))
1993
1994(define-public python-jsonschema
1995 (package
1996 (name "python-jsonschema")
1997 (version "2.6.0")
1998 (source (origin
1999 (method url-fetch)
2000 (uri
2001 (string-append
2002 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2003 version ".tar.gz"))
2004 (sha256
2005 (base32
2006 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2007 (build-system python-build-system)
2008 (arguments
2009 '(#:phases
2010 (modify-phases %standard-phases
2011 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
2012 (native-inputs
2013 `(("python-nose" ,python-nose)
2014 ("python-vcversioner" ,python-vcversioner)))
2015 (home-page "https://github.com/Julian/jsonschema")
2016 (synopsis "Implementation of JSON Schema for Python")
2017 (description
2018 "Jsonschema is an implementation of JSON Schema for Python.")
2019 (license license:expat)
2020 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2021
2022(define-public python2-jsonschema
2023 (let ((jsonschema (package-with-python2
2024 (strip-python2-variant python-jsonschema))))
2025 (package (inherit jsonschema)
2026 (native-inputs
2027 `(("python2-mock" ,python2-mock)
2028 ,@(package-native-inputs jsonschema)))
2029 (propagated-inputs
2030 `(("python2-functools32" ,python2-functools32))))))
2031
2032(define-public python-schema
2033 (package
2034 (name "python-schema")
2035 (version "0.6.6")
2036 (source
2037 (origin
2038 (method url-fetch)
2039 (uri (pypi-uri "schema" version))
2040 (sha256
2041 (base32
2042 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2043 (build-system python-build-system)
2044 (native-inputs
2045 `(("python-pytest" ,python-pytest)))
2046 (home-page "https://github.com/keleshev/schema")
2047 (synopsis "Simple data validation library")
2048 (description
2049 "@code{python-schema} is a library for validating Python data
2050structures, such as those obtained from config-files, forms, external
2051services or command-line parsing, converted from JSON/YAML (or
2052something else) to Python data-types.")
2053 (license license:psfl)))
2054
2055(define-public python2-schema
2056 (package-with-python2 python-schema))
2057
2058(define-public python-schema-0.5
2059 (package (inherit python-schema)
2060 (version "0.5.0")
2061 (source
2062 (origin
2063 (method url-fetch)
2064 (uri (pypi-uri "schema" version))
2065 (sha256
2066 (base32
2067 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2068
2069(define-public python2-schema-0.5
2070 (package-with-python2 python-schema-0.5))
2071
2072(define-public python-kitchen
2073 (package
2074 (name "python-kitchen")
2075 (version "1.2.5")
2076 (source
2077 (origin
2078 (method url-fetch)
2079 (uri (pypi-uri "kitchen" version))
2080 (sha256
2081 (base32
2082 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2083 (build-system python-build-system)
2084 (propagated-inputs
2085 `(("python-chardet" ,python-chardet)))
2086 (home-page "https://github.com/fedora-infra/kitchen")
2087 (synopsis "Python API for snippets")
2088 (description "@code{kitchen} module provides a python API for all sorts of
2089little useful snippets of code that everybody ends up writing for their projects
2090but never seem big enough to build an independent release. Use kitchen and stop
2091cutting and pasting that code over and over.")
2092 (license (list license:lgpl2.1+
2093 ;; subprocess.py, test_subprocess.py,
2094 ;; kitchen/pycompat25/defaultdict.py:
2095 license:psfl))))
2096
2097(define-public python2-kitchen
2098 (package-with-python2 python-kitchen))
2099
2100(define-public python-unidecode
2101 (package
2102 (name "python-unidecode")
2103 (version "1.0.23")
2104 (source (origin
2105 (method url-fetch)
2106 (uri (pypi-uri "Unidecode" version))
2107 (sha256
2108 (base32
2109 "1ysjbr3nqfqj97h8zyj3v9pya413vkv7a1mzml80w37xx15kb1cb"))))
2110 (build-system python-build-system)
2111 (home-page "https://pypi.python.org/pypi/Unidecode")
2112 (synopsis "ASCII transliterations of Unicode text")
2113 (description
2114 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2115useful when integrating with legacy code that doesn't support Unicode, or for
2116ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2117machine identifiers from human-readable Unicode strings that should still be
2118somewhat intelligible.")
2119 (license license:gpl2+)))
2120
2121(define-public python2-unidecode
2122 (package-with-python2 python-unidecode))
2123
2124(define-public python-pyjwt
2125 (package
2126 (name "python-pyjwt")
2127 (version "1.5.3")
2128 (source
2129 (origin
2130 (method url-fetch)
2131 (uri (pypi-uri "PyJWT" version))
2132 (sha256
2133 (base32
2134 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2135 (modules '((guix build utils)))
2136 (snippet
2137 '(begin
2138 (for-each delete-file-recursively
2139 (find-files "." "\\.pyc$"))
2140 #t))))
2141 (build-system python-build-system)
2142 (native-inputs
2143 `(("python-pytest" ,python-pytest)
2144 ("python-pytest-cov" ,python-pytest-cov)
2145 ("python-pytest-runner" ,python-pytest-runner)))
2146 (home-page "https://github.com/progrium/pyjwt")
2147 (synopsis "JSON Web Token implementation in Python")
2148 (description
2149 "PyJWT is a JSON Web Token implementation written in Python.")
2150 (license license:expat)))
2151
2152(define-public python2-pyjwt
2153 (package-with-python2 python-pyjwt))
2154
2155(define-public python-pykka
2156 (package
2157 (name "python-pykka")
2158 (version "1.2.1")
2159 (source
2160 (origin
2161 (method url-fetch)
2162 (uri (pypi-uri "Pykka" version))
2163 (sha256
2164 (base32
2165 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2166 (build-system python-build-system)
2167 (native-inputs
2168 `(("python-mock" ,python-mock)
2169 ("python-nose" ,python-nose)
2170 ("python-gevent" ,python-gevent)
2171 ("python-eventlet" ,python-eventlet)))
2172 (home-page "https://www.pykka.org/")
2173 (synopsis "Pykka is a Python implementation of the actor model")
2174 (description
2175 "Pykka is a Python implementation of the actor model.
2176The actor model introduces some simple rules to control the sharing
2177of state and cooperation between execution units, which makes it
2178easier to build concurrent applications.")
2179 (license license:asl2.0)))
2180
2181(define-public python2-pykka
2182 (package-with-python2 python-pykka))
2183
2184(define-public python-pympler
2185 (package
2186 (name "python-pympler")
2187 (home-page "https://pythonhosted.org/Pympler/")
2188 (version "0.5")
2189 (source (origin
2190 (method url-fetch)
2191 (uri (pypi-uri "Pympler" version))
2192 (sha256
2193 (base32
2194 "03qwsbilqgvnbl3a1jmpgixbr2kq6m3fvdlzyr3wdp01bwlc85kx"))))
2195 (build-system python-build-system)
2196 (arguments
2197 `(#:phases (modify-phases %standard-phases
2198 (delete 'check)
2199 (add-after 'install 'check
2200 (lambda* (#:key inputs outputs #:allow-other-keys)
2201 (add-installed-pythonpath inputs outputs)
2202 (invoke "python" "setup.py" "test"))))))
2203 (synopsis "Measure, monitor and analyze memory behavior")
2204 (description
2205 "Pympler is a development tool to measure, monitor and analyze
2206the memory behavior of Python objects in a running Python application.
2207
2208By pympling a Python application, detailed insight in the size and the
2209lifetime of Python objects can be obtained. Undesirable or unexpected
2210runtime behavior like memory bloat and other @samp{pymples} can easily
2211be identified.
2212
2213A web profiling frontend exposes process statistics, garbage
2214visualisation and class tracker statistics.")
2215 (license license:asl2.0)))
2216
2217(define-public python2-pympler
2218 (package-with-python2 python-pympler))
2219
2220(define-public python-itsdangerous
2221 (package
2222 (name "python-itsdangerous")
2223 (version "0.24")
2224 (source
2225 (origin
2226 (method url-fetch)
2227 (uri (string-append
2228 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2229 version ".tar.gz"))
2230 (sha256
2231 (base32
2232 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2233 (build-system python-build-system)
2234 (home-page "https://github.com/mitsuhiko/itsdangerous")
2235 (synopsis "Python library for passing data to/from untrusted environments")
2236 (description
2237 "Itsdangerous provides various helpers to pass trusted data to untrusted
2238environments and back.")
2239 (license license:bsd-3)))
2240
2241(define-public python2-itsdangerous
2242 (package-with-python2 python-itsdangerous))
2243
2244(define-public python-pyyaml
2245 (package
2246 (name "python-pyyaml")
2247 (version "3.13")
2248 (source
2249 (origin
2250 (method url-fetch)
2251 (uri (pypi-uri "PyYAML" version))
2252 (sha256
2253 (base32
2254 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2255 (build-system python-build-system)
2256 (inputs
2257 `(("libyaml" ,libyaml)))
2258 (home-page "http://pyyaml.org/wiki/PyYAML")
2259 (synopsis "YAML parser and emitter for Python")
2260 (description
2261 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2262complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2263API, and sensible error messages. PyYAML supports standard YAML tags and
2264provides Python-specific tags that allow to represent an arbitrary Python
2265object.")
2266 (license license:expat)))
2267
2268(define-public python2-pyyaml
2269 (package-with-python2 python-pyyaml))
2270
2271(define-public python-virtualenv
2272 (package
2273 (name "python-virtualenv")
2274 (version "15.0.3")
2275 (source
2276 (origin
2277 (method url-fetch)
2278 (uri (pypi-uri "virtualenv" version))
2279 (sha256
2280 (base32
2281 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
2282 (build-system python-build-system)
2283 (arguments
2284 `(#:phases
2285 (modify-phases %standard-phases
2286 (replace 'check
2287 (lambda _
2288 ;; Disable failing test. See upstream bug report
2289 ;; https://github.com/pypa/virtualenv/issues/957
2290 (substitute* "tests/test_virtualenv.py"
2291 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2292 (zero? (system* "py.test")))))))
2293 (native-inputs
2294 `(("python-mock" ,python-mock)
2295 ("python-pytest" ,python-pytest)))
2296 (home-page "https://virtualenv.pypa.io/")
2297 (synopsis "Virtual Python environment builder")
2298 (description
2299 "Virtualenv is a tool to create isolated Python environments.")
2300 (license license:expat)))
2301
2302(define-public python2-virtualenv
2303 (package-with-python2 python-virtualenv))
2304
2305(define-public python-markupsafe
2306 (package
2307 (name "python-markupsafe")
2308 (version "1.0")
2309 (source
2310 (origin
2311 (method url-fetch)
2312 (uri (string-append
2313 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2314 version ".tar.gz"))
2315 (sha256
2316 (base32
2317 "0rdn1s8x9ni7ss8rfiacj7x1085lx8mh2zdwqslnw8xc3l4nkgm6"))))
2318 (build-system python-build-system)
2319 (home-page "https://github.com/mitsuhiko/markupsafe")
2320 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2321 (description
2322 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2323for Python.")
2324 (license license:bsd-3)))
2325
2326(define-public python2-markupsafe
2327 (package-with-python2 python-markupsafe))
2328
2329(define-public python-jinja2
2330 (package
2331 (name "python-jinja2")
2332 (version "2.10")
2333 (source
2334 (origin
2335 (method url-fetch)
2336 (uri (pypi-uri "Jinja2" version))
2337 (sha256
2338 (base32
2339 "190l36hfw3wb2n3n68yacjabxyb1pnxwn7vjx96cmjj002xy2jzq"))))
2340 (build-system python-build-system)
2341 (propagated-inputs
2342 `(("python-markupsafe" ,python-markupsafe)))
2343 (home-page "http://jinja.pocoo.org/")
2344 (synopsis "Python template engine")
2345 (description
2346 "Jinja2 is a small but fast and easy to use stand-alone template engine
2347written in pure Python.")
2348 (license license:bsd-3)))
2349
2350(define-public python2-jinja2
2351 (package-with-python2 python-jinja2))
2352
2353(define-public python-pystache
2354 (package
2355 (name "python-pystache")
2356 (version "0.5.4")
2357 (source (origin
2358 (method url-fetch)
2359 (uri (pypi-uri "pystache" version))
2360 (sha256
2361 (base32
2362 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2363 (build-system python-build-system)
2364 (arguments
2365 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2366 (home-page "http://defunkt.io/pystache/")
2367 (synopsis "Python logic-less template engine")
2368 (description
2369 "Pystache is a Python implementation of the framework agnostic,
2370logic-free templating system Mustache.")
2371 (license license:expat)
2372 (properties `((python2-variant . ,(delay python2-pystache))))))
2373
2374(define-public python2-pystache
2375 (package (inherit (package-with-python2
2376 (strip-python2-variant python-pystache)))
2377 (arguments
2378 `(#:python ,python-2
2379 #:phases
2380 (modify-phases %standard-phases
2381 (replace 'check
2382 (lambda _
2383 (zero? (system* "python" "test_pystache.py")))))))))
2384
2385(define-public python-joblib
2386 (package
2387 (name "python-joblib")
2388 (version "0.13.0")
2389 (source (origin
2390 (method url-fetch)
2391 (uri (pypi-uri "joblib" version))
2392 (sha256
2393 (base32
2394 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2395 (build-system python-build-system)
2396 (arguments
2397 `(#:phases
2398 (modify-phases %standard-phases
2399 (replace 'check
2400 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2401 (native-inputs
2402 `(("python-pytest" ,python-pytest)))
2403 (home-page "https://joblib.readthedocs.io/")
2404 (synopsis "Using Python functions as pipeline jobs")
2405 (description
2406 "Joblib is a set of tools to provide lightweight pipelining in Python.
2407In particular, joblib offers: transparent disk-caching of the output values
2408and lazy re-evaluation (memoize pattern), easy simple parallel computing
2409logging and tracing of the execution.")
2410 (license license:bsd-3)))
2411
2412(define-public python2-joblib
2413 (package-with-python2 python-joblib))
2414
2415(define-public python-docutils
2416 (package
2417 (name "python-docutils")
2418 (version "0.14")
2419 (source
2420 (origin
2421 (method url-fetch)
2422 (uri (pypi-uri "docutils" version))
2423 (sha256
2424 (base32
2425 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2426 (build-system python-build-system)
2427 (arguments
2428 '(#:tests? #f)) ; no setup.py test command
2429 (home-page "http://docutils.sourceforge.net/")
2430 (synopsis "Python Documentation Utilities")
2431 (description
2432 "Docutils is a modular system for processing documentation into useful
2433formats, such as HTML, XML, and LaTeX. For input Docutils supports
2434reStructuredText.")
2435 ;; Most of the source code is public domain, but some source files are
2436 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2437 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2438
2439(define-public python2-docutils
2440 (package-with-python2 python-docutils))
2441
2442(define-public python-pygments
2443 (package
2444 (name "python-pygments")
2445 (version "2.2.0")
2446 (source
2447 (origin
2448 (method url-fetch)
2449 (uri (pypi-uri "Pygments" version))
2450 (sha256
2451 (base32
2452 "1k78qdvir1yb1c634nkv6rbga8wv4289xarghmsbbvzhvr311bnv"))))
2453 (build-system python-build-system)
2454 (arguments
2455 ;; FIXME: Tests require sphinx, which depends on this.
2456 '(#:tests? #f))
2457 (home-page "http://pygments.org/")
2458 (synopsis "Syntax highlighting")
2459 (description
2460 "Pygments is a syntax highlighting package written in Python.")
2461 (license license:bsd-2)))
2462
2463(define-public python2-pygments
2464 (package-with-python2 python-pygments))
2465
2466(define-public python-sphinxcontrib-websupport
2467 (package
2468 (name "python-sphinxcontrib-websupport")
2469 (version "1.1.0")
2470 (source (origin
2471 (method url-fetch)
2472 (uri (pypi-uri "sphinxcontrib-websupport" version))
2473 (sha256
2474 (base32
2475 "1ff3ix76xi1y6m99qxhaq5161ix9swwzydilvdya07mgbcvpzr4x"))))
2476 (build-system python-build-system)
2477 (arguments
2478 ;; FIXME: Tests depend on Sphinx, which depends on this.
2479 `(#:tests? #f))
2480 (home-page "http://sphinx-doc.org/")
2481 (synopsis "Sphinx API for web applications")
2482 (description "This package provides a Python API to easily integrate
2483Sphinx documentation into your web application. It provides tools to
2484integrate Sphinx documents in web templates and to handle searches.")
2485 (license license:bsd-3)))
2486
2487(define-public python2-sphinxcontrib-websupport
2488 (package-with-python2 python-sphinxcontrib-websupport))
2489
2490(define-public python-sphinx
2491 (package
2492 (name "python-sphinx")
2493 (version "1.7.7")
2494 (source
2495 (origin
2496 (method url-fetch)
2497 (uri (pypi-uri "Sphinx" version))
2498 (sha256
2499 (base32
2500 "0pkkbfj7cl157q550gcs45am5y78ps0h7q6455d64s1zmw01jlvi"))))
2501 (build-system python-build-system)
2502 (arguments
2503 `(#:phases
2504 (modify-phases %standard-phases
2505 (replace 'check
2506 (lambda _
2507 ;; Requires Internet access.
2508 (delete-file "tests/test_build_linkcheck.py")
2509 (substitute* "tests/test_build_latex.py"
2510 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
2511 "@pytest.mark.skip()"))
2512 (when (which "python")
2513 ;; XXX: These tests are broken when using Python2:
2514 ;; <https://github.com/sphinx-doc/sphinx/issues/4710>.
2515 (delete-file "tests/test_api_translator.py")
2516 (delete-file "tests/test_setup_command.py"))
2517 (invoke "make" "test"))))))
2518 (propagated-inputs
2519 `(("python-imagesize" ,python-imagesize)
2520 ("python-sphinx-alabaster-theme"
2521 ,python-sphinx-alabaster-theme)
2522 ("python-babel" ,python-babel)
2523 ("python-snowballstemmer" ,python-snowballstemmer)
2524 ("python-docutils" ,python-docutils)
2525 ("python-jinja2" ,python-jinja2)
2526 ("python-packaging" ,python-packaging)
2527 ("python-pygments" ,python-pygments)
2528 ("python-requests" ,python-requests)
2529 ("python-six" ,python-six)
2530 ("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)))
2531 (native-inputs
2532 `(("graphviz" ,graphviz)
2533 ("imagemagick" ,imagemagick) ;for "convert"
2534 ("python-html5lib" ,python-html5lib)
2535 ("python-mock" ,python-mock)
2536 ("python-nose" ,python-nose)
2537 ("python-pytest" ,python-pytest)))
2538 (home-page "http://sphinx-doc.org/")
2539 (synopsis "Python documentation generator")
2540 (description "Sphinx is a tool that makes it easy to create documentation
2541for Python projects or other documents consisting of multiple reStructuredText
2542sources.")
2543 (license license:bsd-3)
2544 (properties `((python2-variant . ,(delay python2-sphinx))))))
2545
2546(define-public python2-sphinx
2547 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
2548 (package
2549 (inherit base)
2550 (native-inputs `(("python2-mock" ,python2-mock)
2551 ("python2-enum34" ,python2-enum34)
2552 ,@(package-native-inputs base)))
2553 (propagated-inputs `(("python2-pytz" ,python2-pytz)
2554 ("python2-typing" ,python2-typing)
2555 ,@(package-propagated-inputs base))))))
2556
2557(define-public python-sphinx-gallery
2558 (package
2559 (name "python-sphinx-gallery")
2560 (version "0.1.13")
2561 (source (origin
2562 (method url-fetch)
2563 (uri (string-append "https://github.com/sphinx-gallery/sphinx-gallery"
2564 "/archive/v" version ".tar.gz"))
2565 (file-name (string-append name "-" version ".tar.gz"))
2566 (sha256
2567 (base32
2568 "03fs99mcb1r7qp0xixqv07vcz98sk21yq19ffdysi0infdcpzfkd"))))
2569 (build-system python-build-system)
2570 (arguments
2571 ;; FIXME: Tests attempt to download <https://docs.python.org/3/objects.inv>,
2572 ;; <https://docs.scipy.org/doc/numpy/objects.inv>, and
2573 ;; <https://matplotlib.org/objects.inv>.
2574 `(#:tests? #f))
2575 (native-inputs
2576 `(("python-pytest-runner" ,python-pytest-runner)))
2577 (home-page "https://sphinx-gallery.github.io/")
2578 (synopsis "Generate an examples gallery automatically")
2579 (description
2580 "@code{sphinx_gallery} is a Sphinx extension that builds an HTML version
2581from any set of Python scripts and puts it into an examples gallery.")
2582 (license license:bsd-3)))
2583
2584(define-public python2-sphinx-gallery
2585 (package-with-python2 python-sphinx-gallery))
2586
2587(define-public python-sphinx-rtd-theme
2588 (package
2589 (name "python-sphinx-rtd-theme")
2590 (version "0.2.4")
2591 (source
2592 (origin
2593 (method url-fetch)
2594 (uri (pypi-uri "sphinx_rtd_theme" version))
2595 (sha256
2596 (base32
2597 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
2598 (build-system python-build-system)
2599 (arguments '(#:tests? #f)) ; No tests.
2600 (propagated-inputs
2601 `(("python-sphinx" ,python-sphinx)))
2602 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2603 (synopsis "ReadTheDocs.org theme for Sphinx")
2604 (description "A theme for Sphinx used by ReadTheDocs.org.")
2605 (license license:expat)))
2606
2607(define-public python2-sphinx-rtd-theme
2608 (package-with-python2 python-sphinx-rtd-theme))
2609
2610(define-public python-guzzle-sphinx-theme
2611 (package
2612 (name "python-guzzle-sphinx-theme")
2613 (version "0.7.11")
2614 (source
2615 (origin
2616 (method url-fetch)
2617 (uri (pypi-uri "guzzle_sphinx_theme" version))
2618 (sha256
2619 (base32
2620 "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
2621 (build-system python-build-system)
2622 (propagated-inputs
2623 `(("python-sphinx" ,python-sphinx)))
2624 (home-page "https://github.com/guzzle/guzzle_sphinx_theme")
2625 (synopsis "Sphinx theme used by Guzzle")
2626 (description "This package provides guzzle_sphinx_theme, a theme for the
2627Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
2628and several other projects.")
2629 (license license:expat)))
2630
2631(define-public python2-guzzle-sphinx-theme
2632 (package-with-python2 python-guzzle-sphinx-theme))
2633
2634(define-public python-rst.linker
2635 (package
2636 (name "python-rst.linker")
2637 (version "1.10")
2638 (source
2639 (origin
2640 (method url-fetch)
2641 (uri (pypi-uri "rst.linker" version))
2642 (sha256
2643 (base32
2644 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2645 (build-system python-build-system)
2646 (propagated-inputs
2647 `(("python-dateutil" ,python-dateutil)
2648 ("python-six" ,python-six)))
2649 (native-inputs
2650 `(("python-setuptools-scm" ,python-setuptools-scm)))
2651 ;; Test would require path.py, which would introduce a cyclic dependence.
2652 (arguments `(#:tests? #f))
2653 ;; Note: As of version 1.7 the documentation is not worth building.
2654 (home-page "https://github.com/jaraco/rst.linker")
2655 (synopsis "Sphinx plugin to add links and timestamps")
2656 (description "rst.linker allows to automatically replace text by a
2657reStructuredText external reference or timestamps. It's primary purpose is to
2658augment the changelog, but it can be used for other documents, too.")
2659 (license license:expat)))
2660
2661(define-public python2-rst.linker
2662 (package-with-python2 python-rst.linker))
2663
2664(define-public python-feedgenerator
2665 (package
2666 (name "python-feedgenerator")
2667 (version "1.9")
2668 (source
2669 (origin
2670 (method url-fetch)
2671 (uri (pypi-uri "feedgenerator" version))
2672 (sha256
2673 (base32
2674 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2675 (modules '((guix build utils)))
2676 (snippet
2677 '(begin
2678 ;; Remove pre-compiled .pyc files from source.
2679 (for-each delete-file-recursively
2680 (find-files "." "__pycache__" #:directories? #t))
2681 (for-each delete-file (find-files "." "\\.pyc$"))
2682 #t))))
2683 (build-system python-build-system)
2684 (propagated-inputs
2685 `(("python-pytz" ,python-pytz)
2686 ("python-six" ,python-six)))
2687 (home-page "https://github.com/getpelican/feedgenerator")
2688 (synopsis
2689 "Standalone version of Django's Atom/RSS feed generator")
2690 (description
2691 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2692which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2693 (license license:bsd-3)))
2694
2695(define-public python2-feedgenerator
2696 (package-with-python2 python-feedgenerator))
2697
2698(define-public python-toml
2699 (package
2700 (name "python-toml")
2701 (version "0.9.4")
2702 (source
2703 (origin
2704 (method url-fetch)
2705 (uri (pypi-uri "toml" version))
2706 (sha256
2707 (base32
2708 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2709 (build-system python-build-system)
2710 (arguments
2711 `(#:tests? #f)) ;no tests suite in release
2712 (home-page "https://github.com/uiri/toml")
2713 (synopsis "Library for TOML")
2714 (description
2715 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2716Language (TOML) configuration files.")
2717 (license license:expat)))
2718
2719(define-public python-black
2720 (package
2721 (name "python-black")
2722 (version "18.6b4")
2723 (source
2724 (origin
2725 (method url-fetch)
2726 (uri (pypi-uri "black" version))
2727 (sha256
2728 (base32
2729 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
2730 (build-system python-build-system)
2731 (arguments
2732 `(#:phases
2733 (modify-phases %standard-phases
2734 (add-after 'patch-source-shebangs 'patch-extra-shebangs
2735 (lambda _
2736 (let ((python3 (which "python3")))
2737 (substitute* '("tests/data/fmtonoff.py"
2738 "tests/data/string_prefixes.py"
2739 "tests/data/function.py")
2740 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
2741 (string-append "#!" python3 (if (string? minor-version)
2742 minor-version
2743 ""))))))))))
2744 (propagated-inputs
2745 `(("python-click" ,python-click)
2746 ("python-attrs" ,python-attrs)
2747 ("python-appdirs" ,python-appdirs)
2748 ("python-toml" ,python-toml)))
2749 (home-page "https://github.com/ambv/black")
2750 (synopsis "The uncompromising code formatter")
2751 (description "Black is the uncompromising Python code formatter.")
2752 (license license:expat)))
2753
2754(define-public python-blinker
2755 (package
2756 (name "python-blinker")
2757 (version "1.4")
2758 (source
2759 (origin
2760 (method url-fetch)
2761 (uri (pypi-uri "blinker" version))
2762 (sha256
2763 (base32
2764 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2765 (build-system python-build-system)
2766 (home-page "http://pythonhosted.org/blinker/")
2767 (synopsis "Fast, simple object-to-object and broadcast signaling")
2768 (description
2769 "Blinker provides a fast dispatching system that allows any number of
2770interested parties to subscribe to events, or \"signals\".")
2771 (license license:expat)))
2772
2773(define-public python2-blinker
2774 (package-with-python2 python-blinker))
2775
2776(define-public pelican
2777 (package
2778 (name "pelican")
2779 (version "3.7.1")
2780 (source
2781 (origin
2782 (method url-fetch)
2783 (uri (pypi-uri "pelican" version))
2784 (sha256
2785 (base32
2786 "12spygavv9b6xpb5pgp7f0p3z0mms60nx6zrpx1yfkj68zz4flra"))))
2787 (build-system python-build-system)
2788 (propagated-inputs
2789 `(("python-feedgenerator" ,python-feedgenerator)
2790 ("python-jinja2" ,python-jinja2)
2791 ("python-pygments" ,python-pygments)
2792 ("python-docutils" ,python-docutils)
2793 ("python-pytz" ,python-pytz)
2794 ("python-blinker" ,python-blinker)
2795 ("python-unidecode" ,python-unidecode)
2796 ("python-six" ,python-six)
2797 ("python-dateutil" ,python-dateutil)
2798 ("python-markdown" ,python-markdown)))
2799 (home-page "https://getpelican.com/")
2800 (arguments
2801 `(;; XXX Requires a lot more packages to do unit tests :P
2802 #:tests? #f
2803 #:phases (modify-phases %standard-phases
2804 (add-before
2805 'install 'adjust-requires
2806 ;; Since feedgenerator is installed from git, it doesn't
2807 ;; conform to the version requirements.
2808 ;;
2809 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2810 ;; version requirement so setuptools doesn't get confused.
2811 (lambda _
2812 (substitute* "setup.py"
2813 (("['\"]feedgenerator.*?['\"]")
2814 "'feedgenerator'")))))))
2815 (synopsis "Python-based static site publishing system")
2816 (description
2817 "Pelican is a tool to generate a static blog from reStructuredText,
2818Markdown input files, and more. Pelican uses Jinja2 for templating
2819and is very extensible.")
2820 (license license:agpl3+)))
2821
2822(define-public python-scikit-image
2823 (package
2824 (name "python-scikit-image")
2825 (version "0.14.1")
2826 (source
2827 (origin
2828 (method url-fetch)
2829 (uri (pypi-uri "scikit-image" version))
2830 (sha256
2831 (base32 "0l1c3rl4s1jyv80i5hns4pgih09zrxfj7lygdc51w8sgyysb7ac6"))))
2832 (build-system python-build-system)
2833 (arguments
2834 ;; TODO: Some tests require running X11 server. Disable them?
2835 '(#:tests? #f))
2836 ;; See DEPENDS.txt for the list of build and run time requiremnts
2837 (propagated-inputs
2838 `(("python-cloudpickle" ,python-cloudpickle)
2839 ("python-dask" ,python-dask)
2840 ("python-matplotlib" ,python-matplotlib)
2841 ("python-networkx" ,python-networkx)
2842 ("python-numpy" ,python-numpy)
2843 ("python-pillow" ,python-pillow)
2844 ("python-pywavelets" ,python-pywavelets)
2845 ("python-scipy" ,python-scipy)
2846 ("python-six" ,python-six)))
2847 (native-inputs
2848 `(("python-cython" ,python-cython)))
2849 (home-page "http://scikit-image.org/")
2850 (synopsis "Image processing in Python")
2851 (description
2852 "Scikit-image is a collection of algorithms for image processing.")
2853 (license license:bsd-3)))
2854
2855(define-public python2-scikit-image
2856 (package-with-python2 python-scikit-image))
2857
2858(define-public python-cython
2859 (package
2860 (name "python-cython")
2861 (version "0.28.4")
2862 (source
2863 (origin
2864 (method url-fetch)
2865 (uri (pypi-uri "Cython" version))
2866 (sha256
2867 (base32
2868 "0imw9s2rbrh32clbl10csnwmig9p3nzkrd2baxxxfmnrsc42pb3n"))))
2869 (build-system python-build-system)
2870 ;; we need the full python package and not just the python-wrapper
2871 ;; because we need libpython3.3m.so
2872 (inputs
2873 `(("python" ,python)))
2874 (arguments
2875 `(#:phases
2876 (modify-phases %standard-phases
2877 (add-before 'check 'set-HOME
2878 ;; some tests require access to "$HOME/.cython"
2879 (lambda _ (setenv "HOME" "/tmp") #t))
2880
2881 ;; FIXME: These tests started failing on armhf after the 0.28 update
2882 ;; (commit c69d11c5930), both with an error such as this:
2883 ;; compiling (cpp) and running dictcomp ...
2884 ;; === C/C++ compiler error output: ===
2885 ;; ‘
2886 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
2887 ;; See <https://hydra.gnu.org/build/2948724> for logs.
2888 ,@(if (target-arm32?)
2889 `((add-before 'check 'disable-failing-tests
2890 (lambda _
2891 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
2892 (for-each (lambda (test)
2893 (format disabled-tests "~a\n" test))
2894 '("memslice" "dictcomp"))
2895 (close-port disabled-tests)))))
2896 '())
2897
2898 (replace 'check
2899 (lambda _
2900 ;; The "with_outer_raising" test fails with Python 3.7. See
2901 ;; https://github.com/cython/cython/issues/2454
2902 (delete-file "tests/run/generators_py.py")
2903 (invoke "python" "runtests.py" "-vv"))))))
2904 (home-page "http://cython.org/")
2905 (synopsis "C extensions for Python")
2906 (description "Cython is an optimising static compiler for both the Python
2907programming language and the extended Cython programming language. It makes
2908writing C extensions for Python as easy as Python itself.")
2909 (license license:asl2.0)
2910 (properties `((python2-variant . ,(delay python2-cython))))))
2911
2912(define-public python2-cython
2913 (package (inherit (package-with-python2
2914 (strip-python2-variant python-cython)))
2915 (name "python2-cython")
2916 (inputs
2917 `(("python-2" ,python-2))))) ; this is not automatically changed
2918
2919;; The RPython toolchain currently does not support Python 3.
2920(define-public python2-rpython
2921 (package
2922 (name "python2-rpython")
2923 (version "0.2.1")
2924 (source
2925 (origin
2926 (method url-fetch)
2927 (uri (pypi-uri "rpython" version))
2928 (sha256
2929 (base32
2930 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
2931 (build-system python-build-system)
2932 (arguments `(#:python ,python-2))
2933 (native-inputs
2934 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
2935 (home-page "https://rpython.readthedocs.org")
2936 (synopsis "Framework for implementing interpreters and virtual machines")
2937 (description "RPython is a translation and support framework for
2938producing implementations of dynamic languages, emphasizing a clean separation
2939between language specification and implementation aspects.")
2940 (license license:expat)))
2941
2942;; NOTE: when upgrading numpy please make sure that python-pandas and
2943;; python-scipy still build, as these three packages are often used together.
2944(define-public python-numpy
2945 (package
2946 (name "python-numpy")
2947 (version "1.15.4")
2948 (source
2949 (origin
2950 (method url-fetch)
2951 (uri (string-append
2952 "https://github.com/numpy/numpy/releases/download/v"
2953 version "/numpy-" version ".tar.gz"))
2954 (sha256
2955 (base32
2956 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
2957 (build-system python-build-system)
2958 (inputs
2959 `(("openblas" ,openblas)
2960 ("lapack" ,lapack)))
2961 (native-inputs
2962 `(("python-cython" ,python-cython)
2963 ("python-pytest" ,python-pytest)
2964 ("gfortran" ,gfortran)))
2965 (arguments
2966 `(#:phases
2967 (modify-phases %standard-phases
2968 (add-before 'build 'configure-blas-lapack
2969 (lambda* (#:key inputs #:allow-other-keys)
2970 (call-with-output-file "site.cfg"
2971 (lambda (port)
2972 (format port
2973 "[openblas]
2974libraries = openblas
2975library_dirs = ~a/lib
2976include_dirs = ~a/include
2977
2978# backslash-n to make emacs happy
2979\n[lapack]
2980lapack_libs = lapack
2981library_dirs = ~a/lib
2982include_dirs = ~a/include
2983"
2984 (assoc-ref inputs "openblas")
2985 (assoc-ref inputs "openblas")
2986 (assoc-ref inputs "lapack")
2987 (assoc-ref inputs "lapack"))))
2988 #t))
2989 (add-before 'build 'fix-executable-paths
2990 (lambda* (#:key inputs #:allow-other-keys)
2991 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
2992 ;; instead of /bin/sh.
2993 (substitute* "numpy/distutils/exec_command.py"
2994 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
2995 (string-append match-start (assoc-ref inputs "bash") match-end)))
2996 ;; Use "gcc" executable, not "cc".
2997 (substitute* "numpy/distutils/system_info.py"
2998 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
2999 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3000 #t))
3001 ;; Tests can only be run after the library has been installed and not
3002 ;; within the source directory.
3003 (delete 'check)
3004 (add-after 'install 'check
3005 (lambda* (#:key outputs inputs #:allow-other-keys)
3006 ;; Make installed package available for running the tests
3007 (add-installed-pythonpath inputs outputs)
3008 ;; Make sure "f2py" etc is found.
3009 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3010 ":" (getenv "PATH")))
3011 (with-directory-excursion "/tmp"
3012 (invoke "python" "-c"
3013 "import numpy; numpy.test(verbose=2)")))))))
3014 (home-page "http://www.numpy.org/")
3015 (synopsis "Fundamental package for scientific computing with Python")
3016 (description "NumPy is the fundamental package for scientific computing
3017with Python. It contains among other things: a powerful N-dimensional array
3018object, sophisticated (broadcasting) functions, tools for integrating C/C++
3019and Fortran code, useful linear algebra, Fourier transform, and random number
3020capabilities.")
3021 (license license:bsd-3)))
3022
3023(define-public python2-numpy
3024 (package-with-python2 python-numpy))
3025
3026;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3027;; interest only for legacy code going back to NumPy's predecessor
3028;; Numeric.
3029(define-public python2-numpy-1.8
3030 (package (inherit python2-numpy)
3031 (version "1.8.2")
3032 (source
3033 (origin
3034 (method url-fetch)
3035 (uri (string-append
3036 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3037 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3038 (sha256
3039 (base32
3040 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3041 (arguments
3042 (substitute-keyword-arguments (package-arguments python2-numpy)
3043 ((#:phases phases)
3044 `(modify-phases ,phases
3045 (replace 'configure-blas-lapack
3046 (lambda* (#:key inputs #:allow-other-keys)
3047 (call-with-output-file "site.cfg"
3048 (lambda (port)
3049 (format port
3050 "[openblas]
3051libraries = openblas,lapack
3052library_dirs = ~a/lib:~a/lib
3053include_dirs = ~a/include:~a/include
3054"
3055 (assoc-ref inputs "openblas")
3056 (assoc-ref inputs "lapack")
3057 (assoc-ref inputs "openblas")
3058 (assoc-ref inputs "lapack"))))
3059 #t))))))
3060 (native-inputs
3061 `(("python2-nose" ,python2-nose)))
3062 (description "NumPy is the fundamental package for scientific computing
3063with Python. It contains among other things: a powerful N-dimensional array
3064object, sophisticated (broadcasting) functions, tools for integrating C/C++
3065and Fortran code, useful linear algebra, Fourier transform, and random number
3066capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3067that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3068Numeric.")
3069 (license license:bsd-3)))
3070
3071(define-public python-munch
3072 (package
3073 (name "python-munch")
3074 (version "2.0.4")
3075 (source
3076 (origin
3077 (method url-fetch)
3078 (uri (pypi-uri "munch" version))
3079 (sha256
3080 (base32
3081 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3082 (build-system python-build-system)
3083 (home-page "https://github.com/Infinidat/munch")
3084 (synopsis "Dot-accessible dictionary")
3085 (description "Munch is a dot-accessible dictionary similar to JavaScript
3086objects.")
3087 (license license:expat)))
3088
3089(define-public python2-munch
3090 (package-with-python2 python-munch))
3091
3092(define-public python-colormath
3093 (package
3094 (name "python-colormath")
3095 (version "3.0.0")
3096 (source
3097 (origin
3098 (method url-fetch)
3099 (uri (pypi-uri "colormath" version))
3100 (sha256
3101 (base32
3102 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3103 (build-system python-build-system)
3104 (propagated-inputs
3105 `(("python-networkx" ,python-networkx)
3106 ("python-numpy" ,python-numpy)))
3107 (home-page "https://github.com/gtaylor/python-colormath")
3108 (synopsis "Color math and conversion library")
3109 (description
3110 "This is a Python library for color math and conversions.")
3111 (license license:bsd-3)))
3112
3113(define-public python2-colormath
3114 (package-with-python2 python-colormath))
3115
3116(define-public python-spectra
3117 (package
3118 (name "python-spectra")
3119 (version "0.0.11")
3120 (source
3121 (origin
3122 (method url-fetch)
3123 (uri (pypi-uri "spectra" version))
3124 (sha256
3125 (base32
3126 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3127 (build-system python-build-system)
3128 (arguments
3129 `(#:phases
3130 (modify-phases %standard-phases
3131 (replace 'check
3132 (lambda _
3133 (zero? (system* "nosetests" "-v")))))))
3134 (propagated-inputs
3135 `(("python-colormath" ,python-colormath)))
3136 (native-inputs
3137 `(("python-nose" ,python-nose)))
3138 (home-page "https://github.com/jsvine/spectra")
3139 (synopsis "Color scales and color conversion")
3140 (description
3141 "This package provides a Python library intended to make color math,
3142color scales, and color space conversion easy. It has support for:
3143
3144@enumerate
3145@item Color scales
3146@item Color ranges
3147@item Color blending
3148@item Brightening/darkening colors
3149@item Saturating/desaturating colors
3150@item Conversion to/from multiple color spaces.
3151@end enumerate\n")
3152 (license license:expat)))
3153
3154(define-public python2-spectra
3155 (package-with-python2 python-spectra))
3156
3157(define-public python2-fastlmm
3158 (package
3159 (name "python2-fastlmm")
3160 (version "0.2.21")
3161 (source
3162 (origin
3163 (method url-fetch)
3164 (uri (pypi-uri "fastlmm" version ".zip"))
3165 (sha256
3166 (base32
3167 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3168 (build-system python-build-system)
3169 (arguments
3170 `(#:python ,python-2)) ; only Python 2.7 is supported
3171 (propagated-inputs
3172 `(("python2-numpy" ,python2-numpy)
3173 ("python2-scipy" ,python2-scipy)
3174 ("python2-matplotlib" ,python2-matplotlib)
3175 ("python2-pandas" ,python2-pandas)
3176 ("python2-scikit-learn" ,python2-scikit-learn)
3177 ("python2-pysnptools" ,python2-pysnptools)))
3178 (native-inputs
3179 `(("unzip" ,unzip)
3180 ("python2-cython" ,python2-cython)
3181 ("python2-mock" ,python2-mock)
3182 ("python2-nose" ,python2-nose)))
3183 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3184 (synopsis "Perform genome-wide association studies on large data sets")
3185 (description
3186 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3187Models, is a program for performing both single-SNP and SNP-set genome-wide
3188association studies (GWAS) on extremely large data sets.")
3189 (license license:asl2.0)))
3190
3191(define-public python-numpy-documentation
3192 (package
3193 (name "python-numpy-documentation")
3194 (version (package-version python-numpy))
3195 (source (package-source python-numpy))
3196 (build-system python-build-system)
3197 (native-inputs
3198 `(("python-matplotlib" ,python-matplotlib)
3199 ("python-numpy" ,python-numpy)
3200 ("pkg-config" ,pkg-config)
3201 ("python-sphinx" ,python-sphinx)
3202 ("python-numpydoc" ,python-numpydoc)
3203 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3204 texlive-fonts-ec
3205 texlive-generic-ifxetex
3206 texlive-generic-pdftex
3207 texlive-latex-amsfonts
3208 texlive-latex-capt-of
3209 texlive-latex-cmap
3210 texlive-latex-environ
3211 texlive-latex-eqparbox
3212 texlive-latex-etoolbox
3213 texlive-latex-expdlist
3214 texlive-latex-fancyhdr
3215 texlive-latex-fancyvrb
3216 texlive-latex-fncychap
3217 texlive-latex-float
3218 texlive-latex-framed
3219 texlive-latex-geometry
3220 texlive-latex-graphics
3221 texlive-latex-hyperref
3222 texlive-latex-mdwtools
3223 texlive-latex-multirow
3224 texlive-latex-oberdiek
3225 texlive-latex-parskip
3226 texlive-latex-preview
3227 texlive-latex-tabulary
3228 texlive-latex-threeparttable
3229 texlive-latex-titlesec
3230 texlive-latex-trimspaces
3231 texlive-latex-ucs
3232 texlive-latex-upquote
3233 texlive-latex-url
3234 texlive-latex-varwidth
3235 texlive-latex-wrapfig)))
3236 ("texinfo" ,texinfo)
3237 ("perl" ,perl)
3238 ("scipy-sphinx-theme"
3239 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3240 (method git-fetch)
3241 (uri (git-reference
3242 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3243 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3244 (sha256
3245 (base32
3246 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3247 ,@(package-native-inputs python-numpy)))
3248 (arguments
3249 `(#:tests? #f ; we're only generating the documentation
3250 #:phases
3251 (modify-phases %standard-phases
3252 (delete 'build)
3253 (replace 'install
3254 (lambda* (#:key inputs outputs #:allow-other-keys)
3255 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3256 (doc (string-append
3257 data "/doc/" ,name "-"
3258 ,(package-version python-numpy)))
3259 (info-reader (string-append data "/info"))
3260 (html (string-append doc "/html"))
3261 (scipy-sphinx-theme "scipy-sphinx-theme")
3262 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3263 (pyver ,(string-append "PYVER=")))
3264
3265 ;; FIXME: this is needed to for texlive-union to generate
3266 ;; fonts, which are not found.
3267 (setenv "HOME" "/tmp")
3268
3269 (with-directory-excursion "doc"
3270 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3271 (mkdir-p html)
3272 (system* "make" "html" pyver)
3273 (system* "make" "latex" "PAPER=a4" pyver)
3274 (system* "make" "-C" "build/latex"
3275 "all-pdf" "PAPER=a4" pyver)
3276 ;; FIXME: Generation of the info file fails.
3277 ;; (system* "make" "info" pyver)
3278 ;; (mkdir-p info)
3279 ;; (copy-file "build/texinfo/numpy.info"
3280 ;; (string-append info "/numpy.info"))
3281 (for-each (lambda (file)
3282 (copy-file (string-append "build/latex" file)
3283 (string-append doc file)))
3284 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3285 (with-directory-excursion "build/html"
3286 (for-each (lambda (file)
3287 (let* ((dir (dirname file))
3288 (tgt-dir (string-append html "/" dir)))
3289 (unless (equal? "." dir)
3290 (mkdir-p tgt-dir))
3291 (install-file file html)))
3292 (find-files "." ".*")))))
3293 #t)))))
3294 (home-page (package-home-page python-numpy))
3295 (synopsis "Documentation for the python-numpy package")
3296 (description (package-description python-numpy))
3297 (license (package-license python-numpy))))
3298
3299(define-public python2-numpy-documentation
3300 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3301 (package
3302 (inherit numpy-documentation)
3303 (native-inputs `(("python2-functools32" ,python2-functools32)
3304 ,@(package-native-inputs numpy-documentation))))))
3305
3306(define-public python-pygit2
3307 (package
3308 (name "python-pygit2")
3309 (version "0.26.4")
3310 (source
3311 (origin
3312 (method url-fetch)
3313 (uri (pypi-uri "pygit2" version))
3314 (sha256
3315 (base32
3316 "145k3fsd21274swia7mcc7n3kzlbd47xmg55mxsjdb5d9b7fr858"))))
3317 (build-system python-build-system)
3318 (propagated-inputs
3319 `(("python-six" ,python-six)
3320 ("python-cffi" ,python-cffi)
3321 ("libgit2" ,libgit2)
3322 ("python-tox" ,python-tox)))
3323 (home-page "https://github.com/libgit2/pygit2")
3324 (synopsis "Python bindings for libgit2")
3325 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3326library, libgit2 implements Git plumbing.")
3327 ;; GPL2.0 only, with linking exception.
3328 (license license:gpl2)))
3329
3330(define-public python2-pygit2
3331 (package-with-python2 python-pygit2))
3332
3333(define-public python-pyparsing
3334 (package
3335 (name "python-pyparsing")
3336 (version "2.2.1")
3337 (source
3338 (origin
3339 (method url-fetch)
3340 (uri (pypi-uri "pyparsing" version))
3341 (sha256
3342 (base32 "06dgd0iilvf8m0ssmfpcbh8l6jf0zkp8adbb84llksg17crfx4zl"))))
3343 (build-system python-build-system)
3344 (outputs '("out" "doc"))
3345 (arguments
3346 `(#:tests? #f ; no test target
3347 #:phases
3348 (modify-phases %standard-phases
3349 (add-after 'install 'install-doc
3350 (lambda* (#:key outputs #:allow-other-keys)
3351 (let* ((doc (string-append (assoc-ref outputs "doc")
3352 "/share/doc/" ,name "-" ,version))
3353 (html-doc (string-append doc "/html"))
3354 (examples (string-append doc "/examples")))
3355 (mkdir-p html-doc)
3356 (mkdir-p examples)
3357 (for-each
3358 (lambda (dir tgt)
3359 (map (lambda (file)
3360 (install-file file tgt))
3361 (find-files dir ".*")))
3362 (list "docs" "htmldoc" "examples")
3363 (list doc html-doc examples))
3364 #t))))))
3365 (home-page "https://github.com/pyparsing/pyparsing")
3366 (synopsis "Python parsing class library")
3367 (description
3368 "The pyparsing module is an alternative approach to creating and
3369executing simple grammars, vs. the traditional lex/yacc approach, or the use
3370of regular expressions. The pyparsing module provides a library of classes
3371that client code uses to construct the grammar directly in Python code.")
3372 (license license:expat)))
3373
3374(define-public python2-pyparsing
3375 (package-with-python2 python-pyparsing))
3376
3377(define-public python-numpydoc
3378 (package
3379 (name "python-numpydoc")
3380 (version "0.8.0")
3381 (source
3382 (origin
3383 (method url-fetch)
3384 (uri (pypi-uri "numpydoc" version))
3385 (sha256
3386 (base32
3387 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3388 (build-system python-build-system)
3389 (propagated-inputs
3390 `(("python-sphinx" ,python-sphinx)))
3391 (native-inputs
3392 `(("python-nose" ,python-nose)))
3393 (home-page "https://pypi.python.org/pypi/numpydoc")
3394 (synopsis
3395 "Numpy's Sphinx extensions")
3396 (description
3397 "Sphinx extension to support docstrings in Numpy format.")
3398 (license license:bsd-2)))
3399
3400(define-public python2-numpydoc
3401 (package-with-python2 python-numpydoc))
3402
3403(define-public python-numexpr
3404 (package
3405 (name "python-numexpr")
3406 (version "2.6.5")
3407 (source
3408 (origin
3409 (method url-fetch)
3410 (uri (pypi-uri "numexpr" version))
3411 (sha256
3412 (base32
3413 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3414 (build-system python-build-system)
3415 (arguments `(#:tests? #f)) ; no tests included
3416 (propagated-inputs
3417 `(("python-numpy" ,python-numpy)))
3418 (home-page "https://github.com/pydata/numexpr")
3419 (synopsis "Fast numerical expression evaluator for NumPy")
3420 (description
3421 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3422expressions that operate on arrays are accelerated and use less memory than
3423doing the same calculation in Python. In addition, its multi-threaded
3424capabilities can make use of all your cores, which may accelerate
3425computations, most specially if they are not memory-bounded (e.g. those using
3426transcendental functions).")
3427 (license license:expat)))
3428
3429(define-public python2-numexpr
3430 (package-with-python2 python-numexpr))
3431
3432(define-public python-cycler
3433 (package
3434 (name "python-cycler")
3435 (version "0.10.0")
3436 (source (origin
3437 (method url-fetch)
3438 (uri (pypi-uri "cycler" version))
3439 (sha256
3440 (base32
3441 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3442 (build-system python-build-system)
3443 (arguments
3444 ;; XXX: The current version requires 'coveralls' which we don't have.
3445 ;; Enable this for the next release which uses 'python-pytest'.
3446 '(#:tests? #f))
3447 (propagated-inputs
3448 `(("python-six" ,python-six)))
3449 (home-page "http://matplotlib.org/cycler/")
3450 (synopsis "Composable keyword argument iterator")
3451 (description
3452 "When using @code{matplotlib} and plotting more than one line, it is
3453common to want to be able to want to be able to cycle over one or more artist
3454styles; but the plotting logic can quickly become involved.
3455To address this and enable easy cycling over arbitrary @code{kwargs}, the
3456@code{Cycler} class was developed.")
3457 (license license:bsd-3)))
3458
3459(define-public python2-cycler
3460 (package-with-python2 python-cycler))
3461
3462(define-public python-colorspacious
3463 (package
3464 (name "python-colorspacious")
3465 (version "1.1.0")
3466 (source
3467 (origin
3468 (method url-fetch)
3469 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3470 version ".tar.gz"))
3471 (file-name (string-append name "-" version))
3472 (sha256
3473 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3474 (build-system python-build-system)
3475 (propagated-inputs
3476 `(("python-numpy" ,python-numpy)))
3477 (native-inputs
3478 `(("python-nose" ,python-nose)))
3479 (arguments
3480 `(#:phases
3481 (modify-phases %standard-phases
3482 (replace 'check
3483 (lambda _
3484 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
3485 (home-page "https://github.com/njsmith/colorspacious")
3486 (synopsis "Python library for colorspace conversions")
3487 (description "@code{colorspacious} is a Python library that lets you
3488convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3489 (license license:expat)))
3490
3491(define-public python2-colorspacious
3492 (package-with-python2 python-colorspacious))
3493
3494(define-public python-matplotlib
3495 (package
3496 (name "python-matplotlib")
3497 (version "2.2.3")
3498 (source
3499 (origin
3500 (method url-fetch)
3501 (uri (pypi-uri "matplotlib" version))
3502 (sha256
3503 (base32
3504 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3505 (build-system python-build-system)
3506 (propagated-inputs ; the following packages are all needed at run time
3507 `(("python-cycler" ,python-cycler)
3508 ("python-kiwisolver" ,python-kiwisolver)
3509 ("python-pyparsing" ,python-pyparsing)
3510 ("python-pygobject" ,python-pygobject)
3511 ("gobject-introspection" ,gobject-introspection)
3512 ("python-tkinter" ,python "tk")
3513 ("python-dateutil" ,python-dateutil)
3514 ("python-numpy" ,python-numpy)
3515 ("python-pillow" ,python-pillow)
3516 ("python-pytz" ,python-pytz)
3517 ("python-six" ,python-six)
3518 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3519 ;; from 'gtk+') provides the required 'typelib' files used by
3520 ;; 'gobject-introspection'. The location of these files is set with the
3521 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3522 ;; is done automatically by a 'native-search-path' procedure. However,
3523 ;; at run-time the user must set this variable as follows:
3524 ;;
3525 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3526 ("gtk+" ,gtk+)
3527 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3528 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3529 ;; object. For this reason we need to import both libraries.
3530 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3531 ("python-pycairo" ,python-pycairo)
3532 ;; XXX: qtwebkit cannot be built reliably.
3533 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3534 ("python-cairocffi" ,python-cairocffi)))
3535 (inputs
3536 `(("libpng" ,libpng)
3537 ("imagemagick" ,imagemagick)
3538 ("freetype" ,freetype)
3539 ("cairo" ,cairo)
3540 ("glib" ,glib)
3541 ;; FIXME: Add backends when available.
3542 ;("python-wxpython" ,python-wxpython)
3543 ("tcl" ,tcl)
3544 ("tk" ,tk)))
3545 (native-inputs
3546 `(("pkg-config" ,pkg-config)
3547 ("python-nose" ,python-nose)
3548 ("python-mock" ,python-mock)))
3549 (arguments
3550 `(#:phases
3551 (modify-phases %standard-phases
3552 (add-before 'build 'configure-environment
3553 (lambda* (#:key outputs inputs #:allow-other-keys)
3554 (let ((cairo (assoc-ref inputs "cairo"))
3555 (gtk+ (assoc-ref inputs "gtk+")))
3556 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3557 ;; has not effect.
3558 (setenv "LD_LIBRARY_PATH"
3559 (string-append cairo "/lib:" gtk+ "/lib"))
3560 (setenv "HOME" (getcwd))
3561 (call-with-output-file "setup.cfg"
3562 (lambda (port)
3563 (format port "[directories]~%
3564basedirlist = ~a,~a~%
3565 [rc_options]~%
3566backend = TkAgg~%"
3567 (assoc-ref inputs "tcl")
3568 (assoc-ref inputs "tk")))))
3569 #t)))))
3570 (home-page "http://matplotlib.org")
3571 (synopsis "2D plotting library for Python")
3572 (description
3573 "Matplotlib is a Python 2D plotting library which produces publication
3574quality figures in a variety of hardcopy formats and interactive environments
3575across platforms. Matplotlib can be used in Python scripts, the python and
3576ipython shell, web application servers, and six graphical user interface
3577toolkits.")
3578 (license license:psfl)
3579 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3580
3581(define-public python2-matplotlib
3582 (let ((matplotlib (package-with-python2
3583 (strip-python2-variant python-matplotlib))))
3584 (package (inherit matplotlib)
3585 ;; Make sure to use special packages for Python 2 instead
3586 ;; of those automatically rewritten by package-with-python2.
3587 (propagated-inputs
3588 `(("python2-pycairo" ,python2-pycairo)
3589 ("python2-backports-functools-lru-cache"
3590 ,python2-backports-functools-lru-cache)
3591 ("python2-functools32" ,python2-functools32)
3592 ("python2-pygobject-2" ,python2-pygobject-2)
3593 ("python2-subprocess32" ,python2-subprocess32)
3594 ("python2-tkinter" ,python-2 "tk")
3595 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3596 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3597
3598(define-public python-matplotlib-documentation
3599 (package
3600 (name "python-matplotlib-documentation")
3601 (version (package-version python-matplotlib))
3602 (source (package-source python-matplotlib))
3603 (build-system python-build-system)
3604 (native-inputs
3605 `(("python-matplotlib" ,python-matplotlib)
3606 ("python-colorspacious" ,python-colorspacious)
3607 ("python-sphinx" ,python-sphinx)
3608 ("python-sphinx-gallery" ,python-sphinx-gallery)
3609 ("python-numpydoc" ,python-numpydoc)
3610 ("python-ipython" ,python-ipython)
3611 ("python-mock" ,python-mock)
3612 ("graphviz" ,graphviz)
3613 ("texlive" ,texlive)
3614 ("texinfo" ,texinfo)
3615 ,@(package-native-inputs python-matplotlib)))
3616 (arguments
3617 `(#:tests? #f ; we're only generating documentation
3618 #:phases
3619 (modify-phases %standard-phases
3620 (replace 'build
3621 (lambda _
3622 (chdir "doc")
3623 ;; Produce pdf in 'A4' format.
3624 (substitute* "conf.py"
3625 (("latex_paper_size = 'letter'") "")
3626 ;; latex_paper_size is deprecated -> set paper size using
3627 ;; latex_elements
3628 (("latex_elements\\['pointsize'\\] = '11pt'" match)
3629 ;; insert at a point where latex_elements{} is defined:
3630 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
3631 (invoke "make" "SPHINXBUILD=sphinx-build" "html" "latex" "texinfo")))
3632 (replace 'install
3633 (lambda* (#:key inputs outputs #:allow-other-keys)
3634 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3635 (doc (string-append data "/doc/python-matplotlib-" ,version))
3636 (info (string-append data "/info"))
3637 (html (string-append doc "/html")))
3638 (mkdir-p html)
3639 (mkdir-p info)
3640 (copy-recursively "build/html" html)
3641 (symlink (string-append html "/_images")
3642 (string-append info "/matplotlib-figures"))
3643 (with-directory-excursion "build/texinfo"
3644 (substitute* "matplotlib.texi"
3645 (("@image\\{([^,]*)" all file)
3646 (string-append "@image{matplotlib-figures/" file)))
3647 (symlink (string-append html "/_images")
3648 "./matplotlib-figures")
3649 (system* "makeinfo" "--no-split"
3650 "-o" "matplotlib.info" "matplotlib.texi"))
3651 (copy-file "build/texinfo/matplotlib.info"
3652 (string-append info "/matplotlib.info"))
3653 (copy-file "build/latex/Matplotlib.pdf"
3654 (string-append doc "/Matplotlib.pdf")))
3655 #t)))))
3656 (home-page (package-home-page python-matplotlib))
3657 (synopsis "Documentation for the python-matplotlib package")
3658 (description (package-description python-matplotlib))
3659 (license (package-license python-matplotlib))))
3660
3661(define-public python2-matplotlib-documentation
3662 (package-with-python2 python-matplotlib-documentation))
3663
3664(define-public python2-pysnptools
3665 (package
3666 (name "python2-pysnptools")
3667 (version "0.3.9")
3668 (source
3669 (origin
3670 (method url-fetch)
3671 (uri (pypi-uri "pysnptools" version ".zip"))
3672 (sha256
3673 (base32
3674 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
3675 (build-system python-build-system)
3676 (arguments
3677 `(#:python ,python-2)) ; only Python 2.7 is supported
3678 (propagated-inputs
3679 `(("python2-numpy" ,python2-numpy)
3680 ("python2-scipy" ,python2-scipy)
3681 ("python2-pandas" ,python2-pandas)))
3682 (native-inputs
3683 `(("python2-cython" ,python2-cython)))
3684 (native-inputs
3685 `(("unzip" ,unzip)))
3686 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3687 (synopsis "Library for reading and manipulating genetic data")
3688 (description
3689 "PySnpTools is a library for reading and manipulating genetic data. It
3690can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3691those files. It can also efficiently manipulate ranges of integers using set
3692operators such as union, intersection, and difference.")
3693 (license license:asl2.0)))
3694
3695(define-public python-rpy2
3696 (package
3697 (name "python-rpy2")
3698 (version "2.9.4")
3699 (source
3700 (origin
3701 (method url-fetch)
3702 (uri (pypi-uri "rpy2" version))
3703 (sha256
3704 (base32
3705 "0bl1d2qhavmlrvalir9hmkjh74w21vzkvc2sg3cbb162s10zfmxy"))))
3706 (build-system python-build-system)
3707 (arguments
3708 '(#:modules ((ice-9 ftw)
3709 (srfi srfi-1)
3710 (srfi srfi-26)
3711 (guix build utils)
3712 (guix build python-build-system))
3713 #:phases
3714 (modify-phases %standard-phases
3715 (replace 'check
3716 (lambda* (#:key outputs inputs #:allow-other-keys)
3717 (let ((cwd (getcwd)))
3718 (setenv "PYTHONPATH"
3719 (string-append cwd "/build/"
3720 (find (cut string-prefix? "lib" <>)
3721 (scandir (string-append cwd "/build")))
3722 ":"
3723 (getenv "PYTHONPATH"))))
3724 (invoke "python" "-m" "rpy2.tests" "-v"))))))
3725 (propagated-inputs
3726 `(("python-six" ,python-six)
3727 ("python-jinja2" ,python-jinja2)
3728 ("python-pytz" ,python-pytz)))
3729 (inputs
3730 `(("readline" ,readline)
3731 ("icu4c" ,icu4c)
3732 ("pcre" ,pcre)
3733 ("r-minimal" ,r-minimal)
3734 ("r-survival" ,r-survival)
3735 ("r-ggplot2" ,r-ggplot2)
3736 ("r-rsqlite" ,r-rsqlite)
3737 ("r-dplyr" ,r-dplyr)
3738 ("r-dbplyr" ,r-dbplyr)
3739 ("python-numpy" ,python-numpy)))
3740 (native-inputs
3741 `(("zlib" ,zlib)))
3742 (home-page "https://rpy2.bitbucket.io/")
3743 (synopsis "Python interface to the R language")
3744 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3745low-level interface to R from Python, a proposed high-level interface,
3746including wrappers to graphical libraries, as well as R-like structures and
3747functions.")
3748 ;; Any of these licenses can be picked for the R interface. The whole
3749 ;; project is released under GPLv2+ according to the license declaration
3750 ;; in "setup.py".
3751 (license (list license:mpl2.0 license:gpl2+ license:lgpl2.1+))))
3752
3753(define-public python-scipy
3754 (package
3755 (name "python-scipy")
3756 (version "1.1.0")
3757 (source
3758 (origin
3759 (method url-fetch)
3760 (uri (pypi-uri "scipy" version))
3761 (sha256
3762 (base32
3763 "1lfg686w6vv2m2dfs8v9d0bf2i18z7wz5vgzjnkgmpr4hi0550w7"))))
3764 (build-system python-build-system)
3765 (propagated-inputs
3766 `(("python-numpy" ,python-numpy)
3767 ("python-matplotlib" ,python-matplotlib)
3768 ("python-pyparsing" ,python-pyparsing)))
3769 (inputs
3770 `(("lapack" ,lapack)
3771 ("openblas" ,openblas)))
3772 (native-inputs
3773 `(("python-cython" ,python-cython)
3774 ("python-pytest" ,python-pytest)
3775 ("python-sphinx" ,python-sphinx)
3776 ("python-numpydoc" ,python-numpydoc)
3777 ("gfortran" ,gfortran)
3778 ("perl" ,perl)
3779 ("which" ,which)))
3780 (outputs '("out" "doc"))
3781 (arguments
3782 `(#:phases
3783 (modify-phases %standard-phases
3784 (add-after 'unpack 'disable-broken-tests
3785 (lambda _
3786 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
3787 (("^( +)def test_threads_parallel\\(self\\):" m indent)
3788 (string-append indent
3789 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3790 m)))
3791 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
3792 (("^def test_parallel_threads\\(\\):" m)
3793 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3794 m)))
3795 #t))
3796 (add-before 'build 'configure-openblas
3797 (lambda* (#:key inputs #:allow-other-keys)
3798 (call-with-output-file "site.cfg"
3799 (lambda (port)
3800 (format port
3801 "[blas]
3802libraries = openblas
3803library_dirs = ~a/lib
3804include_dirs = ~a/include
3805
3806# backslash-n to make emacs happy
3807\n[atlas]
3808library_dirs = ~a/lib
3809atlas_libs = openblas
3810"
3811 (assoc-ref inputs "openblas")
3812 (assoc-ref inputs "openblas")
3813 (assoc-ref inputs "openblas"))))
3814 #t))
3815 (add-after 'install 'install-doc
3816 (lambda* (#:key inputs outputs #:allow-other-keys)
3817 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3818 (doc (string-append data "/doc/" ,name "-" ,version))
3819 (html (string-append doc "/html"))
3820 (pyver ,(string-append "PYVER=" (version-major+minor
3821 (package-version python))))
3822 ;; By default it tries to run sphinx-build through the Python
3823 ;; interpreter which won't work with our shell wrapper.
3824 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
3825 ;; Make installed package available for building the
3826 ;; documentation
3827 (add-installed-pythonpath inputs outputs)
3828 (with-directory-excursion "doc"
3829 ;; Fix generation of images for mathematical expressions.
3830 (substitute* (find-files "source" "conf\\.py")
3831 (("pngmath_use_preview = True")
3832 "pngmath_use_preview = False"))
3833 (mkdir-p html)
3834 (invoke "make" "html" pyver sphinxbuild)
3835 (with-directory-excursion "build/html"
3836 (for-each (lambda (file)
3837 (let* ((dir (dirname file))
3838 (tgt-dir (string-append html "/" dir)))
3839 (install-file file html)))
3840 (find-files "." ".*")))))
3841 #t))
3842 ;; Tests can only be run after the library has been installed and not
3843 ;; within the source directory.
3844 (delete 'check)
3845 (add-after 'install 'check
3846 (lambda* (#:key inputs outputs #:allow-other-keys)
3847 (add-installed-pythonpath inputs outputs)
3848 (with-directory-excursion "/tmp"
3849 (invoke "python" "-c"
3850 "import scipy; scipy.test(verbose=2)")))))))
3851 (home-page "https://www.scipy.org/")
3852 (synopsis "The Scipy library provides efficient numerical routines")
3853 (description "The SciPy library is one of the core packages that make up
3854the SciPy stack. It provides many user-friendly and efficient numerical
3855routines such as routines for numerical integration and optimization.")
3856 (properties `((python2-variant . ,(delay python2-scipy))))
3857 (license license:bsd-3)))
3858
3859(define-public python2-scipy
3860 (package-with-python2
3861 (strip-python2-variant python-scipy)))
3862
3863(define-public python-socksipy-branch
3864 (package
3865 (name "python-socksipy-branch")
3866 (version "1.01")
3867 (source
3868 (origin
3869 (method url-fetch)
3870 (uri (pypi-uri "SocksiPy-branch" version))
3871 (sha256
3872 (base32
3873 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3874 (build-system python-build-system)
3875 (arguments
3876 `(#:tests? #f)) ; There are no tests
3877 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3878 (synopsis "Python SOCKS module")
3879 (description
3880 "SocksiPy - A Python SOCKS client module. It provides a
3881socket-like interface that supports connections to any TCP
3882service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3883The original version was developed by Dan Haim, this is a
3884branch created by Mario Vilas to address some open issues,
3885as the original project seems to have been abandoned circa 2007.")
3886 (license license:bsd-3)))
3887
3888(define-public python2-socksipy-branch
3889 (package-with-python2 python-socksipy-branch))
3890
3891(define-public python-pycodestyle
3892 (package
3893 (name "python-pycodestyle")
3894 (version "2.4.0")
3895 (source
3896 (origin
3897 (method url-fetch)
3898 (uri (pypi-uri "pycodestyle" version))
3899 (sha256
3900 (base32
3901 "0fhy4vnlgpjq4qd1wdnl6pvdw7rah0ypmn8c9mkhz8clsndskz6b"))))
3902 (build-system python-build-system)
3903 (home-page "https://pycodestyle.readthedocs.io/")
3904 (synopsis "Python style guide checker")
3905 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3906Python code against some of the style conventions in
3907@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3908 (license license:expat)))
3909
3910(define-public python2-pycodestyle
3911 (package-with-python2 python-pycodestyle))
3912
3913(define-public python-multidict
3914 (package
3915 (name "python-multidict")
3916 (version "4.2.0")
3917 (source
3918 (origin
3919 (method url-fetch)
3920 (uri (pypi-uri "multidict" version))
3921 (sha256
3922 (base32
3923 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
3924 (build-system python-build-system)
3925 (native-inputs
3926 `(("python-pytest" ,python-pytest)
3927 ("python-pytest-runner" ,python-pytest-runner)))
3928 (home-page "https://github.com/aio-libs/multidict/")
3929 (synopsis "Multidict implementation")
3930 (description "Multidict is dict-like collection of key-value pairs
3931where key might be occurred more than once in the container.")
3932 (license license:asl2.0)))
3933
3934(define-public python-orderedmultidict
3935 (package
3936 (name "python-orderedmultidict")
3937 (version "0.7.11")
3938 (source
3939 (origin
3940 (method url-fetch)
3941 (uri (pypi-uri "orderedmultidict" version))
3942 (sha256
3943 (base32
3944 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
3945 (build-system python-build-system)
3946 (arguments
3947 `(#:phases
3948 (modify-phases %standard-phases
3949 (add-after 'unpack 'fix-tests
3950 (lambda _
3951 ;; The package uses nosetest for running the tests.
3952 ;; Adding this initfile allows to run the test suite
3953 ;; without requiring nosetest.
3954 (zero? (system* "touch" "tests/__init__.py")))))))
3955 (propagated-inputs
3956 `(("python-six" ,python-six)))
3957 (native-inputs
3958 `(("python-pycodestyle" ,python-pycodestyle)))
3959 (home-page "https://github.com/gruns/orderedmultidict")
3960 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3961 (description "This package contains a library for ordered multivalue
3962dictionaries. A multivalue dictionary is a dictionary that can store
3963multiple values for the same key. An ordered multivalue dictionary is a
3964multivalue dictionary that retains the order of insertions and deletions.")
3965 (license license:unlicense)))
3966
3967(define-public python2-orderedmultidict
3968 (package-with-python2 python-orderedmultidict))
3969
3970(define-public python-autopep8
3971 (package
3972 (name "python-autopep8")
3973 (version "1.3.5")
3974 (source
3975 (origin
3976 (method url-fetch)
3977 (uri (pypi-uri "autopep8" version))
3978 (sha256
3979 (base32
3980 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
3981 (build-system python-build-system)
3982 (propagated-inputs
3983 `(("python-pycodestyle" ,python-pycodestyle)))
3984 (home-page "https://github.com/hhatto/autopep8")
3985 (synopsis "Format Python code according to the PEP 8 style guide")
3986 (description
3987 "@code{autopep8} automatically formats Python code to conform to
3988the PEP 8 style guide. It uses the pycodestyle utility to determine
3989what parts of the code needs to be formatted. @code{autopep8} is
3990capable of fixing most of the formatting issues that can be reported
3991by pycodestyle.")
3992 (license (license:non-copyleft
3993 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
3994
3995(define-public python2-autopep8
3996 (package-with-python2 python-autopep8))
3997
3998(define-public python-distutils-extra
3999 (package
4000 (name "python-distutils-extra")
4001 (version "2.38")
4002 (source
4003 (origin
4004 (method url-fetch)
4005 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4006 version "/+download/python-distutils-extra-"
4007 version ".tar.gz"))
4008 (sha256
4009 (base32
4010 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4011 (build-system python-build-system)
4012 (home-page "https://launchpad.net/python-distutils-extra/")
4013 (synopsis "Enhancements to Python's distutils")
4014 (description
4015 "The python-distutils-extra module enables you to easily integrate
4016gettext support, themed icons, and scrollkeeper-based documentation into
4017Python's distutils.")
4018 (license license:gpl2)))
4019
4020(define-public python2-distutils-extra
4021 (package-with-python2 python-distutils-extra))
4022
4023(define-public python2-elib.intl
4024 (package
4025 (name "python2-elib.intl")
4026 (version "0.0.3")
4027 (source
4028 (origin
4029 ;; This project doesn't tag releases or publish tarballs, so we take
4030 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4031 (method git-fetch)
4032 (uri (git-reference
4033 (url "https://github.com/dieterv/elib.intl.git")
4034 (commit "d09997cfef")))
4035 (file-name (string-append name "-" version "-checkout"))
4036 (sha256
4037 (base32
4038 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4039 (build-system python-build-system)
4040 (arguments
4041 ;; incompatible with Python 3 (exception syntax)
4042 `(#:python ,python-2
4043 #:tests? #f))
4044 (home-page "https://github.com/dieterv/elib.intl")
4045 (synopsis "Enhanced internationalization for Python")
4046 (description
4047 "The elib.intl module provides enhanced internationalization (I18N)
4048services for your Python modules and applications.")
4049 (license license:lgpl3+)))
4050
4051(define-public python-olefile
4052 (package
4053 (name "python-olefile")
4054 (version "0.45.1")
4055 (source
4056 (origin
4057 (method url-fetch)
4058 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
4059 version ".tar.gz"))
4060 (file-name (string-append name "-" version ".tar.gz"))
4061 (sha256
4062 (base32
4063 "18ai19zwagm6nli14k8bii31ipbab2rp7plrvsm6gmfql551a8ai"))))
4064 (build-system python-build-system)
4065 (home-page
4066 "https://www.decalage.info/python/olefileio")
4067 (synopsis "Read and write Microsoft OLE2 files.")
4068 (description
4069 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4070Storage or Compound Document, Microsoft Office). It is an improved version of
4071the OleFileIO module from PIL, the Python Image Library.")
4072 (license license:bsd-3)))
4073
4074(define-public python2-olefile
4075 (package-with-python2 python-olefile))
4076
4077(define-public python-pillow
4078 (package
4079 (name "python-pillow")
4080 (version "5.2.0")
4081 (source
4082 (origin
4083 (method url-fetch)
4084 (uri (pypi-uri "Pillow" version))
4085 (sha256
4086 (base32
4087 "1ary9mj2ddllq3lkxgn6aac7qxqiwbcg2pacrl94py58ql9x9czq"))))
4088 (build-system python-build-system)
4089 (native-inputs
4090 `(("python-pytest" ,python-pytest)))
4091 (inputs
4092 `(("freetype" ,freetype)
4093 ("lcms" ,lcms)
4094 ("zlib" ,zlib)
4095 ("libjpeg" ,libjpeg)
4096 ("openjpeg" ,openjpeg)
4097 ("libtiff" ,libtiff)
4098 ("libwebp" ,libwebp)))
4099 (propagated-inputs
4100 `(("python-olefile" ,python-olefile)))
4101 (arguments
4102 `(#:phases (modify-phases %standard-phases
4103 (add-after
4104 'install 'check-installed
4105 (lambda* (#:key outputs inputs #:allow-other-keys)
4106 (begin
4107 (setenv "HOME" (getcwd))
4108 ;; Make installed package available for running the
4109 ;; tests
4110 (add-installed-pythonpath inputs outputs)
4111 (invoke "python" "selftest.py" "--installed")
4112 (invoke "python" "-m" "pytest" "-vv"))))
4113 (delete 'check))))
4114 (home-page "https://pypi.python.org/pypi/Pillow")
4115 (synopsis "Fork of the Python Imaging Library")
4116 (description
4117 "The Python Imaging Library adds image processing capabilities to your
4118Python interpreter. This library provides extensive file format support, an
4119efficient internal representation, and fairly powerful image processing
4120capabilities. The core image library is designed for fast access to data
4121stored in a few basic pixel formats. It should provide a solid foundation for
4122a general image processing tool.")
4123 (license (license:x11-style
4124 "http://www.pythonware.com/products/pil/license.htm"
4125 "The PIL Software License"))))
4126
4127(define-public python2-pillow
4128 (package-with-python2 python-pillow))
4129
4130(define-public python-pycparser
4131 (package
4132 (name "python-pycparser")
4133 (version "2.18")
4134 (source
4135 (origin
4136 (method url-fetch)
4137 (uri (pypi-uri "pycparser" version))
4138 (sha256
4139 (base32
4140 "09mjyw82ibqzl449g7swy8bfxnfpmas0815d2rkdjlcqw81wma4r"))))
4141 (outputs '("out" "doc"))
4142 (build-system python-build-system)
4143 (native-inputs
4144 `(("pkg-config" ,pkg-config)))
4145 (arguments
4146 `(#:phases
4147 (modify-phases %standard-phases
4148 (replace 'check
4149 (lambda _
4150 (with-directory-excursion "tests"
4151 (zero? (system* "python" "all_tests.py")))))
4152 (add-after 'install 'install-doc
4153 (lambda* (#:key outputs #:allow-other-keys)
4154 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4155 (doc (string-append data "/doc/" ,name "-" ,version))
4156 (examples (string-append doc "/examples")))
4157 (mkdir-p examples)
4158 (for-each (lambda (file)
4159 (copy-file (string-append "." file)
4160 (string-append doc file)))
4161 '("/README.rst" "/CHANGES" "/LICENSE"))
4162 (copy-recursively "examples" examples)))))))
4163 (home-page "https://github.com/eliben/pycparser")
4164 (synopsis "C parser in Python")
4165 (description
4166 "Pycparser is a complete parser of the C language, written in pure Python
4167using the PLY parsing library. It parses C code into an AST and can serve as
4168a front-end for C compilers or analysis tools.")
4169 (license license:bsd-3)))
4170
4171(define-public python2-pycparser
4172 (package-with-python2 python-pycparser))
4173
4174(define-public python-pywavelets
4175 (package
4176 (name "python-pywavelets")
4177 (version "1.0.1")
4178 (home-page "https://github.com/PyWavelets/pywt")
4179 (source (origin
4180 (method url-fetch)
4181 (uri (pypi-uri "PyWavelets" version))
4182 (sha256
4183 (base32
4184 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4185 (build-system python-build-system)
4186 (arguments
4187 '(#:modules ((ice-9 ftw)
4188 (srfi srfi-1)
4189 (srfi srfi-26)
4190 (guix build utils)
4191 (guix build python-build-system))
4192 #:phases (modify-phases %standard-phases
4193 (replace 'check
4194 (lambda _
4195 (let ((cwd (getcwd))
4196 (libdir (find (cut string-prefix? "lib." <>)
4197 (scandir "build"))))
4198 (with-directory-excursion (string-append cwd "/build/" libdir)
4199 (invoke "nosetests" "-v" "."))))))))
4200 (native-inputs
4201 `(("python-matplotlib" ,python-matplotlib) ;for tests
4202 ("python-nose" ,python-nose)))
4203 (propagated-inputs
4204 `(("python-numpy" ,python-numpy)))
4205 (synopsis "Wavelet transforms in Python")
4206 (description
4207 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4208mathematical basis functions that are localized in both time and frequency.
4209Wavelet transforms are time-frequency transforms employing wavelets. They are
4210similar to Fourier transforms, the difference being that Fourier transforms are
4211localized only in frequency instead of in time and frequency.")
4212 (license license:expat)))
4213
4214(define-public python2-pywavelets
4215 (package-with-python2 python-pywavelets))
4216
4217(define-public python-xcffib
4218 (package
4219 (name "python-xcffib")
4220 (version "0.6.0")
4221 (source
4222 (origin
4223 (method url-fetch)
4224 (uri (pypi-uri "xcffib" version))
4225 (sha256
4226 (base32
4227 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4228 (build-system python-build-system)
4229 (inputs
4230 `(("libxcb" ,libxcb)))
4231 (propagated-inputs
4232 `(("python-cffi" ,python-cffi) ; used at run time
4233 ("python-six" ,python-six)))
4234 (arguments
4235 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4236 #:tests? #f
4237 #:phases
4238 (modify-phases %standard-phases
4239 (add-after 'unpack 'fix-libxcb-path
4240 (lambda* (#:key inputs #:allow-other-keys)
4241 (let ((libxcb (assoc-ref inputs "libxcb")))
4242 (substitute* '("xcffib/__init__.py")
4243 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4244 #t)))
4245 (add-after 'install 'install-doc
4246 (lambda* (#:key outputs #:allow-other-keys)
4247 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4248 "/doc/" ,name "-" ,version)))
4249 (mkdir-p doc)
4250 (copy-file "README.md"
4251 (string-append doc "/README.md"))
4252 #t))))))
4253 (home-page "https://github.com/tych0/xcffib")
4254 (synopsis "XCB Python bindings")
4255 (description
4256 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4257support for Python 3 and PyPy. It is based on cffi.")
4258 (license license:expat)))
4259
4260(define-public python2-xcffib
4261 (package-with-python2 python-xcffib))
4262
4263(define-public python-cairocffi
4264 (package
4265 (name "python-cairocffi")
4266 (version "0.9.0")
4267 (source
4268 (origin
4269 (method url-fetch)
4270 (uri (pypi-uri "cairocffi" version))
4271 (sha256
4272 (base32
4273 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4274 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4275 (build-system python-build-system)
4276 (outputs '("out" "doc"))
4277 (inputs
4278 `(("glib" ,glib)
4279 ("gtk+" ,gtk+)
4280 ("gdk-pixbuf" ,gdk-pixbuf)
4281 ("cairo" ,cairo)
4282 ("pango" ,pango)))
4283 (native-inputs
4284 `(("pkg-config" ,pkg-config)
4285 ("python-pytest" ,python-pytest)
4286 ("python-pytest-cov" ,python-pytest-cov)
4287 ("python-pytest-runner" ,python-pytest-runner)
4288 ("python-sphinx" ,python-sphinx)
4289 ("python-docutils" ,python-docutils)))
4290 (propagated-inputs
4291 `(("python-xcffib" ,python-xcffib))) ; used at run time
4292 (arguments
4293 `(#:phases
4294 (modify-phases %standard-phases
4295 (add-after 'unpack 'patch-paths
4296 (lambda* (#:key inputs outputs #:allow-other-keys)
4297 (substitute* (find-files "." "\\.py$")
4298 (("dlopen\\(ffi, 'cairo'")
4299 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4300 "/lib/libcairo.so.2'"))
4301 (("dlopen\\(ffi, 'gdk-3'")
4302 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4303 "/lib/libgtk-3.so.0'"))
4304 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4305 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4306 "/lib/libgdk_pixbuf-2.0.so.0'"))
4307 (("dlopen\\(ffi, 'glib-2.0'")
4308 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4309 "/lib/libglib-2.0.so.0'"))
4310 (("dlopen\\(ffi, 'gobject-2.0'")
4311 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4312 "/lib/libgobject-2.0.so.0'"))
4313 (("dlopen\\(ffi, 'pangocairo-1.0'")
4314 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4315 "/lib/libpangocairo-1.0.so.0'"))
4316 (("dlopen\\(ffi, 'pango-1.0'")
4317 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4318 "/lib/libpango-1.0.so.0'")))
4319 #t))
4320 (add-after 'install 'install-doc
4321 (lambda* (#:key inputs outputs #:allow-other-keys)
4322 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4323 (doc (string-append data "/doc/" ,name "-" ,version))
4324 (html (string-append doc "/html")))
4325 (setenv "LD_LIBRARY_PATH"
4326 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4327 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4328 (setenv "LANG" "en_US.UTF-8")
4329 (mkdir-p html)
4330 (for-each (lambda (file)
4331 (copy-file (string-append "." file)
4332 (string-append doc file)))
4333 '("/README.rst" "/CHANGES" "/LICENSE"))
4334 (system* "python" "setup.py" "build_sphinx")
4335 (copy-recursively "docs/_build/html" html)
4336 #t))))))
4337 (home-page "https://github.com/Kozea/cairocffi")
4338 (synopsis "Python bindings and object-oriented API for Cairo")
4339 (description
4340 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4341Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4342graphics library with support for multiple backends including image buffers,
4343PNG, PostScript, PDF, and SVG file output.")
4344 (license license:bsd-3)))
4345
4346(define-public python2-cairocffi
4347 (package-with-python2 python-cairocffi))
4348
4349(define-public python-decorator
4350 (package
4351 (name "python-decorator")
4352 (version "4.3.0")
4353 (source
4354 (origin
4355 (method url-fetch)
4356 (uri (pypi-uri "decorator" version))
4357 (sha256
4358 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4359 (build-system python-build-system)
4360 (home-page "https://pypi.python.org/pypi/decorator/")
4361 (synopsis "Python module to simplify usage of decorators")
4362 (description
4363 "The aim of the decorator module is to simplify the usage of decorators
4364for the average programmer, and to popularize decorators usage giving examples
4365of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4366etc. The core of this module is a decorator factory.")
4367 (license license:expat)))
4368
4369(define-public python2-decorator
4370 (package-with-python2 python-decorator))
4371
4372(define-public python-drmaa
4373 (package
4374 (name "python-drmaa")
4375 (version "0.7.7")
4376 (source
4377 (origin
4378 (method url-fetch)
4379 (uri (pypi-uri "drmaa" version))
4380 (sha256
4381 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4382 (build-system python-build-system)
4383 ;; The test suite requires libdrmaa which is provided by the cluster
4384 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4385 ;; should be set to the path of the libdrmaa library.
4386 (arguments '(#:tests? #f))
4387 (native-inputs
4388 `(("python-nose" ,python-nose)))
4389 (home-page "https://pypi.python.org/pypi/drmaa")
4390 (synopsis "Python bindings for the DRMAA library")
4391 (description
4392 "A Python package for Distributed Resource Management (DRM) job
4393submission and control. This package is an implementation of the DRMAA 1.0
4394Python language binding specification.")
4395 (license license:bsd-3)))
4396
4397(define-public python2-drmaa
4398 (package-with-python2 python-drmaa))
4399
4400(define-public python-grako
4401 (package
4402 (name "python-grako")
4403 (version "3.99.9")
4404 (source
4405 (origin
4406 (method url-fetch)
4407 (uri
4408 (pypi-uri "grako" version ".zip"))
4409 (sha256
4410 (base32
4411 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4412 (build-system python-build-system)
4413 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4414 (native-inputs
4415 `(("unzip" ,unzip)
4416 ("python-pytest" ,python-pytest)
4417 ("python-pytest-runner" ,python-pytest-runner)))
4418 (home-page "https://bitbucket.org/neogeny/grako")
4419 (synopsis "EBNF parser generator")
4420 (description
4421 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4422memoizing PEG/Packrat parser in Python.")
4423 (license license:bsd-3)))
4424
4425(define-public python2-grako
4426 (package-with-python2 python-grako))
4427
4428(define-public python-gridmap
4429 (package
4430 (name "python-gridmap")
4431 (version "0.13.0")
4432 (source
4433 (origin
4434 (method url-fetch)
4435 (uri (string-append
4436 "https://github.com/pygridtools/gridmap/archive/v"
4437 version ".tar.gz"))
4438 (file-name (string-append name "-" version ".tar.gz"))
4439 (sha256
4440 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4441 (build-system python-build-system)
4442 (arguments
4443 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4444 (propagated-inputs
4445 `(("python-psutil" ,python-psutil)
4446 ("python-drmaa" ,python-drmaa)
4447 ("python-pyzmq" ,python-pyzmq)))
4448 (home-page "https://github.com/pygridtools/gridmap")
4449 (synopsis "Create jobs on a cluster directly from Python")
4450 (description
4451 "Gridmap is a Python package to allow you to easily create jobs on the
4452cluster directly from Python. You can directly map Python functions onto the
4453cluster without needing to write any wrapper code yourself.")
4454 (license license:gpl3+)))
4455
4456(define-public python2-gridmap
4457 (package-with-python2 python-gridmap))
4458
4459(define-public python-honcho
4460 (package
4461 (name "python-honcho")
4462 (version "1.0.1")
4463 (source
4464 (origin
4465 (method url-fetch)
4466 (uri (string-append
4467 "https://github.com/nickstenning/honcho/archive/v"
4468 version ".tar.gz"))
4469 (file-name (string-append name "-" version ".tar.gz"))
4470 (sha256
4471 (base32 "0zizn61n5z5hq421hkypk9pw8s6fpxw30f4hsg7k4ivwzy3gjw9j"))))
4472 (build-system python-build-system)
4473 (native-inputs
4474 `(("python-pytest" ,python-pytest)
4475 ("python-mock" ,python-mock)
4476 ("python-tox" ,python-tox)
4477 ("which" ,which))) ;for tests
4478 (propagated-inputs
4479 `(("python-jinja2" ,python-jinja2)))
4480 (arguments
4481 `(#:phases
4482 (modify-phases %standard-phases
4483 (delete 'check)
4484 (add-after 'install 'check
4485 (lambda* (#:key outputs inputs #:allow-other-keys)
4486 ;; fix honcho path in testsuite
4487 (substitute* "tests/conftest.py"
4488 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4489 "/bin/honcho" "'")))
4490 ;; It's easier to run tests after install.
4491 ;; Make installed package available for running the tests
4492 (add-installed-pythonpath inputs outputs)
4493 (zero? (system* "py.test" "-v")))))))
4494 (home-page "https://github.com/nickstenning/honcho")
4495 (synopsis "Manage Procfile-based applications")
4496 (description
4497 "A Procfile is a file which describes how to run an application
4498consisting of serveral processes. honcho starts all listed processes.
4499The output of all running processes is collected by honcho and
4500displayed.")
4501 (license license:expat)))
4502
4503(define-public python2-honcho
4504 (package-with-python2 python-honcho))
4505
4506(define-public python-pexpect
4507 (package
4508 (name "python-pexpect")
4509 (version "4.6.0")
4510 (source
4511 (origin
4512 (method url-fetch)
4513 (uri (pypi-uri "pexpect" version))
4514 (sha256
4515 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4516 (build-system python-build-system)
4517 (arguments
4518 `(#:phases
4519 (modify-phases %standard-phases
4520 (add-before 'check 'prepare-tests
4521 (lambda _
4522 (substitute* (find-files "tests")
4523 (("/bin/ls") (which "ls"))
4524 (("/bin/echo") (which "echo"))
4525 (("/bin/which") (which "which"))
4526 ;; Many tests try to use the /bin directory which
4527 ;; is not present in the build environment.
4528 ;; Use one that's non-empty and unlikely to change.
4529 (("/bin'") "/dev'"))
4530 ;; XXX: Socket connection test gets "Connection reset by peer".
4531 ;; Why does it not work? Delete for now.
4532 (delete-file "tests/test_socket.py")
4533 #t))
4534 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4535 (native-inputs
4536 `(("python-nose" ,python-nose)
4537 ("python-pytest" ,python-pytest)
4538 ("man-db" ,man-db)
4539 ("which" ,which)
4540 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4541 (propagated-inputs
4542 `(("python-ptyprocess" ,python-ptyprocess)))
4543 (home-page "http://pexpect.readthedocs.org/")
4544 (synopsis "Controlling interactive console applications")
4545 (description
4546 "Pexpect is a pure Python module for spawning child applications;
4547controlling them; and responding to expected patterns in their output.
4548Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4549child application and control it as if a human were typing commands.")
4550 (license license:isc)))
4551
4552(define-public python2-pexpect
4553 (package-with-python2 python-pexpect))
4554
4555(define-public python-setuptools-scm
4556 (package
4557 (name "python-setuptools-scm")
4558 (version "3.1.0")
4559 (source (origin
4560 (method url-fetch)
4561 (uri (pypi-uri "setuptools_scm" version))
4562 (sha256
4563 (base32
4564 "0h4bglwfz8b9prqljv8z3w9rgydfyxzaj05bm1y6zs5m6shz548i"))))
4565 (build-system python-build-system)
4566 (home-page "https://github.com/pypa/setuptools_scm/")
4567 (synopsis "Manage Python package versions in SCM metadata")
4568 (description
4569 "Setuptools_scm handles managing your Python package versions in
4570@dfn{software configuration management} (SCM) metadata instead of declaring
4571them as the version argument or in a SCM managed file.")
4572 (license license:expat)))
4573
4574(define-public python2-setuptools-scm
4575 (package-with-python2 python-setuptools-scm))
4576
4577(define-public python-pathpy
4578 (package
4579 (name "python-pathpy")
4580 (version "11.0.1")
4581 (source
4582 (origin
4583 (method url-fetch)
4584 (uri (pypi-uri "path.py" version))
4585 (sha256
4586 (base32 "07x15v8c7ry9bvycw294c9yq6ky9v2b0dalvgi6rn38ilh69vsz7"))))
4587 ;; (outputs '("out" "doc"))
4588 (build-system python-build-system)
4589 (propagated-inputs
4590 `(("python-appdirs" ,python-appdirs)))
4591 (native-inputs
4592 `(("python-setuptools-scm" ,python-setuptools-scm)
4593 ("python-sphinx" ,python-sphinx)
4594 ("python-rst.linker" ,python-rst.linker)
4595 ("python-pytest" ,python-pytest)
4596 ("python-pytest-runner" ,python-pytest-runner)))
4597 (arguments
4598 ;; FIXME: Documentation and tests require "jaraco.packaging".
4599 `(#:tests? #f))
4600 ;; #:phases
4601 ;; (modify-phases %standard-phases
4602 ;; (add-after 'build 'build-doc
4603 ;; (lambda _
4604 ;; (setenv "LANG" "en_US.UTF-8")
4605 ;; (zero? (system* "python" "setup.py" "build_sphinx"))))
4606 ;; (add-after 'install 'install-doc
4607 ;; (lambda* (#:key outputs #:allow-other-keys)
4608 ;; (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4609 ;; (doc (string-append data "/doc/" ,name "-" ,version))
4610 ;; (html (string-append doc "/html")))
4611 ;; (mkdir-p html)
4612 ;; (for-each (lambda (file)
4613 ;; (copy-file file (string-append doc "/" file)))
4614 ;; '("README.rst" "CHANGES.rst"))
4615 ;; (copy-recursively "build/sphinx/html" html)))))))
4616 (home-page "https://github.com/jaraco/path.py")
4617 (synopsis "Python module wrapper for built-in os.path")
4618 (description
4619 "@code{path.py} implements path objects as first-class entities, allowing
4620common operations on files to be invoked on those path objects directly.")
4621 (license license:expat)))
4622
4623(define-public python2-pathpy
4624 (package-with-python2 python-pathpy))
4625
4626(define-public python-simplegeneric
4627 (package
4628 (name "python-simplegeneric")
4629 (version "0.8.1")
4630 (source
4631 (origin
4632 (method url-fetch)
4633 (uri (string-append "https://pypi.python.org/packages/source/s/"
4634 "simplegeneric/simplegeneric-" version ".zip"))
4635 (sha256
4636 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4637 (build-system python-build-system)
4638 (native-inputs
4639 `(("unzip" ,unzip)))
4640 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4641 (synopsis "Python module for simple generic functions")
4642 (description
4643 "The simplegeneric module lets you define simple single-dispatch generic
4644functions, akin to Python’s built-in generic functions like @code{len()},
4645@code{iter()} and so on. However, instead of using specially-named methods,
4646these generic functions use simple lookup tables, akin to those used by
4647e.g. @code{pickle.dump()} and other generic functions found in the Python
4648standard library.")
4649 (license license:zpl2.1)))
4650
4651(define-public python2-simplegeneric
4652 (package-with-python2 python-simplegeneric))
4653
4654(define-public python-ipython-genutils
4655 ;; TODO: This package is retired, check if can be removed, see description.
4656 (package
4657 (name "python-ipython-genutils")
4658 (version "0.1.0")
4659 (source
4660 (origin
4661 (method url-fetch)
4662 (uri (string-append "https://pypi.python.org/packages/source/i/"
4663 "ipython_genutils/ipython_genutils-"
4664 version ".tar.gz"))
4665 (sha256
4666 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4667 (build-system python-build-system)
4668 (arguments `(#:tests? #f)) ; no tests
4669 (home-page "https://ipython.org")
4670 (synopsis "Vestigial utilities from IPython")
4671 (description
4672 "This package provides retired utilities from IPython. No packages
4673outside IPython/Jupyter should depend on it.
4674
4675This package shouldn't exist. It contains some common utilities shared by
4676Jupyter and IPython projects during The Big Split. As soon as possible, those
4677packages will remove their dependency on this, and this package will go
4678away.")
4679 (license license:bsd-3)))
4680
4681(define-public python2-ipython-genutils
4682 (package-with-python2 python-ipython-genutils))
4683
4684(define-public python-traitlets
4685 (package
4686 (name "python-traitlets")
4687 (version "4.3.2")
4688 (source
4689 (origin
4690 (method url-fetch)
4691 (uri (pypi-uri "traitlets" version))
4692 (sha256
4693 (base32
4694 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
4695 (build-system python-build-system)
4696 (arguments
4697 `(#:phases
4698 (modify-phases %standard-phases
4699 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
4700 (propagated-inputs
4701 `(("python-ipython-genutils" ,python-ipython-genutils)
4702 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
4703 (native-inputs
4704 `(("python-pytest" ,python-pytest)))
4705 (properties `((python2-variant . ,(delay python2-traitlets))))
4706 (home-page "https://ipython.org")
4707 (synopsis "Configuration system for Python applications")
4708 (description
4709 "Traitlets is a framework that lets Python classes have attributes with
4710type checking, dynamically calculated default values, and ‘on change’
4711callbacks. The package also includes a mechanism to use traitlets for
4712configuration, loading values from files or from command line arguments. This
4713is a distinct layer on top of traitlets, so you can use traitlets in your code
4714without using the configuration machinery.")
4715 (license license:bsd-3)))
4716
4717(define-public python2-traitlets
4718 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
4719 (package
4720 (inherit traitlets)
4721 (propagated-inputs
4722 `(("python2-enum34" ,python2-enum34)
4723 ,@(package-propagated-inputs traitlets))))))
4724
4725(define-public python-jupyter-core
4726 (package
4727 (name "python-jupyter-core")
4728 (version "4.4.0")
4729 (source
4730 (origin
4731 (method url-fetch)
4732 (uri (string-append (pypi-uri "jupyter_core" version)))
4733 (sha256
4734 (base32
4735 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
4736 (build-system python-build-system)
4737 ;; FIXME: not sure how to run the tests
4738 (arguments `(#:tests? #f))
4739 (propagated-inputs
4740 `(("python-traitlets" ,python-traitlets)))
4741 (home-page "http://jupyter.org/")
4742 (synopsis "Jupyter base package")
4743 (description
4744 "Jupyter core is the base package on which Jupyter projects rely.")
4745 (license license:bsd-3)))
4746
4747(define-public python2-jupyter-core
4748 (package-with-python2 python-jupyter-core))
4749
4750(define-public python-jupyter-client
4751 (package
4752 (name "python-jupyter-client")
4753 (version "4.4.0")
4754 (source
4755 (origin
4756 (method url-fetch)
4757 (uri (pypi-uri "jupyter_client" version))
4758 (sha256
4759 (base32
4760 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4761 (build-system python-build-system)
4762 ;; Tests fail because of missing native python kernel which I assume is
4763 ;; provided by the ipython package, which we cannot use because it would
4764 ;; cause a dependency cycle.
4765 (arguments `(#:tests? #f))
4766 (propagated-inputs
4767 `(("python-pyzmq" ,python-pyzmq)
4768 ("python-traitlets" ,python-traitlets)
4769 ("python-jupyter-core" ,python-jupyter-core)))
4770 (home-page "http://jupyter.org/")
4771 (synopsis "Jupyter protocol implementation and client libraries")
4772 (description
4773 "The @code{jupyter_client} package contains the reference implementation
4774of the Jupyter protocol. It also provides client and kernel management APIs
4775for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4776installing @code{kernelspec}s for use with Jupyter frontends.")
4777 (license license:bsd-3)))
4778
4779(define-public python2-jupyter-client
4780 (package-with-python2 python-jupyter-client))
4781
4782(define-public python-ipykernel
4783 (package
4784 (name "python-ipykernel")
4785 (version "4.5.2")
4786 (source
4787 (origin
4788 (method url-fetch)
4789 (uri (pypi-uri "ipykernel" version))
4790 (sha256
4791 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
4792 (build-system python-build-system)
4793 ;; The tests load a submodule of IPython. However, IPython itself depends
4794 ;; on ipykernel.
4795 (arguments `(#:tests? #f))
4796 (propagated-inputs
4797 ;; imported at runtime during connect
4798 `(("python-jupyter-client" ,python-jupyter-client)))
4799 (home-page "https://ipython.org")
4800 (synopsis "IPython Kernel for Jupyter")
4801 (description
4802 "This package provides the IPython kernel for Jupyter.")
4803 (license license:bsd-3)))
4804
4805(define-public python2-ipykernel
4806 (package-with-python2 python-ipykernel))
4807
4808(define-public python-ipython
4809 (package
4810 (name "python-ipython")
4811 (version "5.5.0")
4812 (source
4813 (origin
4814 (method url-fetch)
4815 (uri (pypi-uri "ipython" version ".tar.gz"))
4816 (sha256
4817 (base32 "03qmzpfy00if10i9k8fjkam1s4xg22j73f933x5d228z9n4rwik6"))))
4818 (build-system python-build-system)
4819 (outputs '("out" "doc"))
4820 (propagated-inputs
4821 `(("python-pyzmq" ,python-pyzmq)
4822 ("python-prompt-toolkit" ,python-prompt-toolkit)
4823 ("python-terminado" ,python-terminado)
4824 ("python-matplotlib" ,python-matplotlib)
4825 ("python-numpy" ,python-numpy)
4826 ("python-numpydoc" ,python-numpydoc)
4827 ("python-jinja2" ,python-jinja2)
4828 ("python-jupyter-console"
4829 ;; The python-ipython and python-jupyter-console require each
4830 ;; other. To get the functionality in both packages working, strip
4831 ;; down the python-jupyter-console package when using it as an input
4832 ;; to python-ipython.
4833 ,python-jupyter-console-minimal)
4834 ("python-mistune" ,python-mistune)
4835 ("python-pexpect" ,python-pexpect)
4836 ("python-pickleshare" ,python-pickleshare)
4837 ("python-simplegeneric" ,python-simplegeneric)
4838 ("python-jsonschema" ,python-jsonschema)
4839 ("python-traitlets" ,python-traitlets)
4840 ("python-ipykernel" ,python-ipykernel)
4841 ("python-nbformat" ,python-nbformat)
4842 ("python-pygments" ,python-pygments)))
4843 (inputs
4844 `(("readline" ,readline)
4845 ("which" ,which)))
4846 (native-inputs
4847 `(("graphviz" ,graphviz)
4848 ("pkg-config" ,pkg-config)
4849 ("python-requests" ,python-requests) ;; for tests
4850 ("python-testpath" ,python-testpath)
4851 ("python-nose" ,python-nose)
4852 ("python-sphinx" ,python-sphinx)
4853 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
4854 ;; FIXME: It's possible that a smaller union would work just as well.
4855 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
4856 texlive-fonts-ec
4857 texlive-generic-ifxetex
4858 texlive-generic-pdftex
4859 texlive-latex-amsfonts
4860 texlive-latex-capt-of
4861 texlive-latex-cmap
4862 texlive-latex-environ
4863 texlive-latex-eqparbox
4864 texlive-latex-etoolbox
4865 texlive-latex-expdlist
4866 texlive-latex-fancyhdr
4867 texlive-latex-fancyvrb
4868 texlive-latex-fncychap
4869 texlive-latex-float
4870 texlive-latex-framed
4871 texlive-latex-geometry
4872 texlive-latex-graphics
4873 texlive-latex-hyperref
4874 texlive-latex-mdwtools
4875 texlive-latex-multirow
4876 texlive-latex-oberdiek
4877 texlive-latex-parskip
4878 texlive-latex-preview
4879 texlive-latex-tabulary
4880 texlive-latex-threeparttable
4881 texlive-latex-titlesec
4882 texlive-latex-trimspaces
4883 texlive-latex-ucs
4884 texlive-latex-upquote
4885 texlive-latex-url
4886 texlive-latex-varwidth
4887 texlive-latex-wrapfig)))
4888 ("texinfo" ,texinfo)))
4889 (arguments
4890 `(#:phases
4891 (modify-phases %standard-phases
4892 (add-after
4893 'install 'install-doc
4894 (lambda* (#:key inputs outputs #:allow-other-keys)
4895 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4896 (doc (string-append data "/doc/" ,name "-" ,version))
4897 (html (string-append doc "/html"))
4898 (man1 (string-append data "/man/man1"))
4899 (info (string-append data "/info"))
4900 (examples (string-append doc "/examples"))
4901 (python-arg (string-append "PYTHON=" (which "python"))))
4902 (setenv "LANG" "en_US.utf8")
4903 ;; Make installed package available for running the tests
4904 (add-installed-pythonpath inputs outputs)
4905 (with-directory-excursion "docs"
4906 ;; FIXME: pdf fails to build
4907 ;;(system* "make" "pdf" "PAPER=a4")
4908 (system* "make" python-arg "html")
4909 (system* "make" python-arg "info"))
4910 (copy-recursively "docs/man" man1)
4911 (copy-recursively "examples" examples)
4912 (copy-recursively "docs/build/html" html)
4913 ;; (copy-file "docs/build/latex/ipython.pdf"
4914 ;; (string-append doc "/ipython.pdf"))
4915 (mkdir-p info)
4916 (copy-file "docs/build/texinfo/ipython.info"
4917 (string-append info "/ipython.info"))
4918 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4919 ;; Tests can only be run after the library has been installed and not
4920 ;; within the source directory.
4921 (delete 'check)
4922 (add-after
4923 'install 'check
4924 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4925 (if tests?
4926 (with-directory-excursion "/tmp"
4927 ;; Make installed package available for running the tests
4928 (add-installed-pythonpath inputs outputs)
4929 (setenv "HOME" "/tmp/") ;; required by a test
4930 (zero? (system* (string-append (assoc-ref outputs "out")
4931 "/bin/iptest"))))
4932 #t)))
4933 (add-before
4934 'install 'fix-tests
4935 (lambda* (#:key inputs #:allow-other-keys)
4936 (substitute* "./IPython/utils/_process_posix.py"
4937 (("/usr/bin/env', 'which") (which "which")))
4938 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4939 (("#!/usr/bin/env python")
4940 (string-append "#!" (which "python"))))
4941 ;; Disable 1 failing test
4942 (substitute* "./IPython/core/tests/test_magic.py"
4943 (("def test_dirops\\(\\):" all)
4944 (string-append "@dec.skipif(True)\n" all))))))))
4945 (home-page "https://ipython.org")
4946 (synopsis "IPython is a tool for interactive computing in Python")
4947 (description
4948 "IPython provides a rich architecture for interactive computing with:
4949Powerful interactive shells, a browser-based notebook, support for interactive
4950data visualization, embeddable interpreters and tools for parallel
4951computing.")
4952 (license license:bsd-3)
4953 (properties `((python2-variant . ,(delay python2-ipython))))))
4954
4955(define-public python2-ipython
4956 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4957 (package
4958 (inherit ipython)
4959 ;; FIXME: add pyreadline once available.
4960 (propagated-inputs
4961 `(("python2-backports-shutil-get-terminal-size"
4962 ,python2-backports-shutil-get-terminal-size)
4963 ("python2-pathlib2" ,python2-pathlib2)
4964 ,@(package-propagated-inputs ipython)))
4965 (native-inputs
4966 `(("python2-mock" ,python2-mock)
4967 ,@(package-native-inputs ipython))))))
4968
4969(define-public python-urwid
4970 (package
4971 (name "python-urwid")
4972 (version "2.0.1")
4973 (source
4974 (origin
4975 (method url-fetch)
4976 (uri (pypi-uri "urwid" version))
4977 (sha256
4978 (base32
4979 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
4980 (build-system python-build-system)
4981 (home-page "http://urwid.org")
4982 (synopsis "Console user interface library for Python")
4983 (description
4984 "Urwid is a curses-based UI/widget library for Python. It includes many
4985features useful for text console applications.")
4986 (license license:lgpl2.1+)))
4987
4988(define-public python2-urwid
4989 (package-with-python2 python-urwid))
4990
4991(define-public python-urwidtrees
4992 (package
4993 (name "python-urwidtrees")
4994 (version "1.0.2")
4995 (source
4996 (origin
4997 (method url-fetch)
4998 ;; package author intends on distributing via github rather than pypi:
4999 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5000 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5001 version ".tar.gz"))
5002 (file-name (string-append name "-" version ".tar.gz"))
5003 (sha256
5004 (base32
5005 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5006 (build-system python-build-system)
5007 (arguments
5008 '(#:tests? #f)) ; no tests
5009 (propagated-inputs `(("python-urwid" ,python-urwid)))
5010 (home-page "https://github.com/pazz/urwidtrees")
5011 (synopsis "Tree widgets for urwid")
5012 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5013toolkit. Use it to build trees of widgets.")
5014 (license license:gpl3+)))
5015
5016(define-public python2-urwidtrees
5017 (package-with-python2 python-urwidtrees))
5018
5019(define-public python-ua-parser
5020 (package
5021 (name "python-ua-parser")
5022 (version "0.8.0")
5023 (source
5024 (origin
5025 (method url-fetch)
5026 (uri (pypi-uri "ua-parser" version))
5027 (sha256
5028 (base32
5029 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5030 (build-system python-build-system)
5031 (arguments
5032 `(#:tests? #f)) ;no test suite in release
5033 (native-inputs
5034 `(("python-pyyaml" ,python-pyyaml)))
5035 (home-page "https://github.com/ua-parser/uap-python")
5036 (synopsis "User agent parser")
5037 (description
5038 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5039 (license license:asl2.0)))
5040
5041(define-public python2-ua-parser
5042 (package-with-python2 python-ua-parser))
5043
5044(define-public python-user-agents
5045 (package
5046 (name "python-user-agents")
5047 (version "1.1.0")
5048 (source
5049 (origin
5050 (method url-fetch)
5051 (uri (pypi-uri "user-agents" version))
5052 (sha256
5053 (base32
5054 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5055 (build-system python-build-system)
5056 (arguments
5057 `(#:tests? #f)) ;missing devices.json test file in release
5058 (propagated-inputs
5059 `(("python-ua-parser" ,python-ua-parser)))
5060 (home-page "https://github.com/selwin/python-user-agents")
5061 (synopsis "User Agent strings parsing library")
5062 (description
5063 "A library to identify devices (phones, tablets) and their capabilities by
5064parsing (browser/HTTP) user agent strings.")
5065 (license license:expat)))
5066
5067(define-public python2-user-agents
5068 (package-with-python2 python-user-agents))
5069
5070(define-public python-dbus
5071 (package
5072 (name "python-dbus")
5073 (version "1.2.8")
5074 (source
5075 (origin
5076 (method url-fetch)
5077 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5078 "dbus-python-" version ".tar.gz"))
5079 (sha256
5080 (base32
5081 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5082 (build-system gnu-build-system)
5083 (arguments
5084 '(#:phases
5085 (modify-phases %standard-phases
5086 (add-before
5087 'check 'pre-check
5088 (lambda _
5089 ;; XXX: For the missing '/etc/machine-id'.
5090 (substitute* "test/run-test.sh"
5091 (("DBUS_FATAL_WARNINGS=1")
5092 "DBUS_FATAL_WARNINGS=0"))
5093 #t)))))
5094 (native-inputs
5095 `(("pkg-config" ,pkg-config)))
5096 (inputs
5097 `(("python" ,python-wrapper)
5098 ("dbus-glib" ,dbus-glib)))
5099 (synopsis "Python bindings for D-bus")
5100 (description "python-dbus provides bindings for libdbus, the reference
5101implementation of D-Bus.")
5102 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5103 (license license:expat)))
5104
5105(define-public python2-dbus
5106 (package (inherit python-dbus)
5107 (name "python2-dbus")
5108 (inputs `(("python" ,python-2)
5109 ,@(alist-delete "python"
5110 (package-inputs python-dbus)
5111 equal?)))
5112 ;; FIXME: on Python 2, the test_utf8 fails with:
5113 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5114 (arguments `(#:tests? #f))))
5115
5116(define-public python-lxml
5117 (package
5118 (name "python-lxml")
5119 (version "4.2.4")
5120 (source
5121 (origin
5122 (method url-fetch)
5123 (uri (pypi-uri "lxml" version))
5124 (sha256
5125 (base32
5126 "1jk336k0kw616gfhqk1wwxsjjwz0flld0n294lz8kxch610bxbz2"))))
5127 (build-system python-build-system)
5128 (inputs
5129 `(("libxml2" ,libxml2)
5130 ("libxslt" ,libxslt)))
5131 (home-page "http://lxml.de/")
5132 (synopsis
5133 "Python XML processing library")
5134 (description
5135 "The lxml XML toolkit is a Pythonic binding for the C libraries
5136libxml2 and libxslt.")
5137 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5138
5139(define-public python2-lxml
5140 (package-with-python2 python-lxml))
5141
5142;; beautifulsoup4 has a totally different namespace than 3.x,
5143;; and pypi seems to put it under its own name, so I guess we should too
5144(define-public python-beautifulsoup4
5145 (package
5146 (name "python-beautifulsoup4")
5147 (version "4.6.3")
5148 (source
5149 (origin
5150 (method url-fetch)
5151 (uri (pypi-uri "beautifulsoup4" version))
5152 (sha256
5153 (base32
5154 "041dhalzjciw6qyzzq7a2k4h1yvyk76xigp35hv5ibnn448ydy4h"))))
5155 (build-system python-build-system)
5156 (arguments
5157 `(#:phases
5158 (modify-phases %standard-phases
5159 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5160 ;; must use this conversion script when building with Python 3. The
5161 ;; conversion script also runs the tests.
5162 ;; For more information, see the file 'convert-py3k' in the source
5163 ;; distribution.
5164 (replace 'check
5165 (lambda _ (zero? (system* "./convert-py3k")))))))
5166 (home-page
5167 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5168 (synopsis
5169 "Python screen-scraping library")
5170 (description
5171 "Beautiful Soup is a Python library designed for rapidly setting up
5172screen-scraping projects. It offers Pythonic idioms for navigating,
5173searching, and modifying a parse tree, providing a toolkit for
5174dissecting a document and extracting what you need. It automatically
5175converts incoming documents to Unicode and outgoing documents to UTF-8.")
5176 (license license:expat)
5177 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5178
5179(define-public python2-beautifulsoup4
5180 (package
5181 (inherit (package-with-python2
5182 (strip-python2-variant python-beautifulsoup4)))
5183 (arguments `(#:python ,python-2))))
5184
5185(define-public python-netifaces
5186 (package
5187 (name "python-netifaces")
5188 (version "0.10.7")
5189 (source
5190 (origin
5191 (method url-fetch)
5192 (uri (pypi-uri "netifaces" version))
5193 (sha256
5194 (base32
5195 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5196 (build-system python-build-system)
5197 (home-page "https://github.com/al45tair/netifaces")
5198 (synopsis
5199 "Python module for portable network interface information")
5200 (description
5201 "Netifaces is a Python module providing information on network
5202interfaces in an easy and portable manner.")
5203 (license license:expat)))
5204
5205(define-public python2-netifaces
5206 (package-with-python2 python-netifaces))
5207
5208(define-public python-networkx
5209 (package
5210 (name "python-networkx")
5211 (version "2.2")
5212 (source
5213 (origin
5214 (method url-fetch)
5215 (uri (pypi-uri "networkx" version ".zip"))
5216 (sha256
5217 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5218 (build-system python-build-system)
5219 ;; python-decorator is needed at runtime.
5220 (propagated-inputs
5221 `(("python-decorator" ,python-decorator)))
5222 (native-inputs
5223 `(("python-nose" ,python-nose)
5224 ("unzip" ,unzip)))
5225 (home-page "https://networkx.github.io/")
5226 (synopsis "Python module for creating and manipulating graphs and networks")
5227 (description
5228 "NetworkX is a Python package for the creation, manipulation, and study
5229of the structure, dynamics, and functions of complex networks.")
5230 (license license:bsd-3)))
5231
5232(define-public python2-networkx
5233 (package-with-python2 python-networkx))
5234
5235(define-public python-datrie
5236 (package
5237 (name "python-datrie")
5238 (version "0.7.1")
5239 (source
5240 (origin
5241 (method url-fetch)
5242 (uri (pypi-uri "datrie" version))
5243 (sha256
5244 (base32
5245 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
5246 (build-system python-build-system)
5247 (arguments
5248 `(#:phases (modify-phases %standard-phases
5249 (add-before 'build 'cythonize
5250 (lambda _
5251 ;; Regenerate Cython classes to solve ABI issues with Python
5252 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
5253 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
5254 "src/stdio_ext.pxd" "-a"))))))
5255 (native-inputs
5256 `(("python-cython" ,python-cython)
5257 ("python-hypothesis" ,python-hypothesis)
5258 ("python-pytest" ,python-pytest)
5259 ("python-pytest-runner" ,python-pytest-runner)))
5260 (home-page "https://github.com/kmike/datrie")
5261 (synopsis "Fast, efficiently stored trie for Python")
5262 (description
5263 "This package provides a fast, efficiently stored trie implementation for
5264Python.")
5265 (license license:lgpl2.1+)))
5266
5267(define-public snakemake
5268 (package
5269 (name "snakemake")
5270 (version "5.2.4")
5271 (source
5272 (origin
5273 (method url-fetch)
5274 (uri (pypi-uri "snakemake" version))
5275 (sha256
5276 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5277 (build-system python-build-system)
5278 (arguments
5279 ;; TODO: Package missing test dependencies.
5280 '(#:tests? #f
5281 #:phases
5282 (modify-phases %standard-phases
5283 ;; For cluster execution Snakemake will call Python. Since there is
5284 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5285 ;; this by calling the snakemake wrapper instead.
5286 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5287 (lambda* (#:key outputs #:allow-other-keys)
5288 (substitute* "snakemake/executors.py"
5289 (("\\{sys.executable\\} -m snakemake")
5290 (string-append (assoc-ref outputs "out")
5291 "/bin/snakemake")))
5292 #t)))))
5293 (propagated-inputs
5294 `(("python-gitpython" ,python-gitpython)
5295 ("python-wrapt" ,python-wrapt)
5296 ("python-requests" ,python-requests)
5297 ("python-appdirs" ,python-appdirs)
5298 ("python-configargparse" ,python-configargparse)
5299 ("python-datrie" ,python-datrie)
5300 ("python-docutils" ,python-docutils)
5301 ("python-jinja2" ,python-jinja2)
5302 ("python-jsonschema" ,python-jsonschema)
5303 ("python-networkx" ,python-networkx)
5304 ("python-pyyaml" ,python-pyyaml)
5305 ("python-ratelimiter" ,python-ratelimiter)))
5306 (home-page "https://snakemake.readthedocs.io")
5307 (synopsis "Python-based execution environment for make-like workflows")
5308 (description
5309 "Snakemake aims to reduce the complexity of creating workflows by
5310providing a clean and modern domain specific specification language (DSL) in
5311Python style, together with a fast and comfortable execution environment.")
5312 (license license:expat)))
5313
5314;; This is currently needed for the pigx-* packages.
5315(define-public snakemake-4
5316 (package (inherit snakemake)
5317 (version "4.4.0")
5318 (source
5319 (origin
5320 (method url-fetch)
5321 (uri (pypi-uri "snakemake" version))
5322 (sha256
5323 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5324 (propagated-inputs
5325 `(("python-wrapt" ,python-wrapt)
5326 ("python-requests" ,python-requests)
5327 ("python-appdirs" ,python-appdirs)
5328 ("python-configargparse" ,python-configargparse)
5329 ("python-pyyaml" ,python-pyyaml)
5330 ("python-ratelimiter" ,python-ratelimiter)))))
5331
5332(define-public python-pyqrcode
5333 (package
5334 (name "python-pyqrcode")
5335 (version "1.2.1")
5336 (source
5337 (origin
5338 (method url-fetch)
5339 (uri (pypi-uri "PyQRCode" version))
5340 (sha256
5341 (base32
5342 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5343 (build-system python-build-system)
5344 (home-page
5345 "https://github.com/mnooner256/pyqrcode")
5346 (synopsis "QR code generator")
5347 (description
5348 "Pyqrcode is a QR code generator written purely in Python with
5349SVG, EPS, PNG and terminal output.")
5350 (license license:bsd-3)))
5351
5352(define-public python-seaborn
5353 (package
5354 (name "python-seaborn")
5355 (version "0.9.0")
5356 (source
5357 (origin
5358 (method url-fetch)
5359 (uri (pypi-uri "seaborn" version))
5360 (sha256
5361 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5362 (build-system python-build-system)
5363 (arguments
5364 `(#:phases
5365 (modify-phases %standard-phases
5366 (add-before 'check 'start-xserver
5367 (lambda* (#:key inputs #:allow-other-keys)
5368 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5369 ;; There must be a running X server and make check doesn't
5370 ;; start one. Therefore we must do it.
5371 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5372 (setenv "DISPLAY" ":1")
5373 #t)))
5374 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5375 (propagated-inputs
5376 `(("python-pandas" ,python-pandas)
5377 ("python-matplotlib" ,python-matplotlib)
5378 ("python-numpy" ,python-numpy)
5379 ("python-scipy" ,python-scipy)))
5380 (native-inputs
5381 `(("python-pytest" ,python-pytest)
5382 ("xorg-server" ,xorg-server)))
5383 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5384 (synopsis "Statistical data visualization")
5385 (description
5386 "Seaborn is a library for making attractive and informative statistical
5387graphics in Python. It is built on top of matplotlib and tightly integrated
5388with the PyData stack, including support for numpy and pandas data structures
5389and statistical routines from scipy and statsmodels.")
5390 (license license:bsd-3)))
5391
5392(define-public python2-seaborn
5393 (package-with-python2 python-seaborn))
5394
5395(define-public python-mpmath
5396 (package
5397 (name "python-mpmath")
5398 (version "0.19")
5399 (source (origin
5400 (method url-fetch)
5401 (uri (string-append "http://mpmath.org/files/mpmath-"
5402 version ".tar.gz"))
5403 (sha256
5404 (base32
5405 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5406 (build-system python-build-system)
5407 (arguments
5408 '(#:phases
5409 (modify-phases %standard-phases
5410 (replace 'check
5411 (lambda _
5412 (zero?
5413 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
5414 (home-page "http://mpmath.org")
5415 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5416 (description
5417 "@code{mpmath} can be used as an arbitrary-precision substitute for
5418Python's float/complex types and math/cmath modules, but also does much
5419more advanced mathematics.")
5420 (license license:bsd-3)))
5421
5422(define-public python2-mpmath
5423 (package-with-python2 python-mpmath))
5424
5425(define-public python-bigfloat
5426 (package
5427 (name "python-bigfloat")
5428 (version "0.3.0")
5429 (source
5430 (origin
5431 (method url-fetch)
5432 (uri (pypi-uri "bigfloat" version))
5433 (sha256
5434 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
5435 (build-system python-build-system)
5436 (inputs
5437 `(("mpfr" ,mpfr)))
5438 (home-page "https://github.com/mdickinson/bigfloat")
5439 (synopsis "Arbitrary precision floating-point arithmetic for Python")
5440 (description
5441 "This packages provides a Python interface to the MPFR library for
5442multiprecision arithmetic.")
5443 (license license:lgpl3+)))
5444
5445(define-public python2-bigfloat
5446 (package-with-python2 python-bigfloat))
5447
5448(define-public python-sympy
5449 (package
5450 (name "python-sympy")
5451 (version "1.1.1")
5452 (source
5453 (origin
5454 (method url-fetch)
5455 (uri (string-append
5456 "https://github.com/sympy/sympy/releases/download/sympy-"
5457 version "/sympy-" version ".tar.gz"))
5458 (sha256
5459 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
5460 (build-system python-build-system)
5461 (arguments
5462 `(#:phases
5463 (modify-phases %standard-phases
5464 ;; Run the core tests after installation. By default it would run
5465 ;; *all* tests, which take a very long time to complete and are known
5466 ;; to be flaky.
5467 (delete 'check)
5468 (add-after 'install 'check
5469 (lambda* (#:key outputs #:allow-other-keys)
5470 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
5471 #t)))))
5472 (propagated-inputs
5473 `(("python-mpmath" ,python-mpmath)))
5474 (home-page "http://www.sympy.org/")
5475 (synopsis "Python library for symbolic mathematics")
5476 (description
5477 "SymPy is a Python library for symbolic mathematics. It aims to become a
5478full-featured computer algebra system (CAS) while keeping the code as simple
5479as possible in order to be comprehensible and easily extensible.")
5480 (license license:bsd-3)))
5481
5482(define-public python2-sympy
5483 (package
5484 (inherit (package-with-python2 python-sympy))
5485 (arguments
5486 `(#:phases
5487 (modify-phases %standard-phases
5488 ;; Run the core tests after installation. By default it would run
5489 ;; *all* tests, which take a very long time to complete and are known
5490 ;; to be flaky.
5491 (delete 'check)
5492 (add-after 'install 'check
5493 (lambda* (#:key outputs #:allow-other-keys)
5494 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
5495 #t)))))))
5496
5497(define-public python-q
5498 (package
5499 (name "python-q")
5500 (version "2.6")
5501 (source
5502 (origin
5503 (method url-fetch)
5504 (uri (pypi-uri "q" version))
5505 (sha256
5506 (base32
5507 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5508 (build-system python-build-system)
5509 (home-page "https://github.com/zestyping/q")
5510 (synopsis "Quick-and-dirty debugging output for tired programmers")
5511 (description
5512 "q is a Python module for \"print\" style of debugging Python code. It
5513provides convenient short API for print out of values, tracebacks, and
5514falling into the Python interpreter.")
5515 (license license:asl2.0)))
5516
5517(define-public python2-q
5518 (package-with-python2 python-q))
5519
5520(define-public python2-xlib
5521 (package
5522 (name "python2-xlib")
5523 (version "0.14")
5524 (source (origin
5525 (method url-fetch)
5526 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5527 "/" version "/"
5528 "python-xlib-" version ".tar.gz"))
5529 (sha256
5530 (base32
5531 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5532 (build-system python-build-system)
5533 (arguments
5534 `(#:python ,python-2 ;Python 2 only
5535 #:tests? #f)) ;no tests
5536 (home-page "http://python-xlib.sourceforge.net/")
5537 (synopsis "Python X11 client library")
5538 (description
5539 "The Python X Library is intended to be a fully functional X client
5540library for Python programs. It is useful to implement low-level X clients.
5541It is written entirely in Python.")
5542 (license license:gpl2+)))
5543
5544(define-public python-singledispatch
5545 (package
5546 (name "python-singledispatch")
5547 (version "3.4.0.3")
5548 (source
5549 (origin
5550 (method url-fetch)
5551 (uri (pypi-uri "singledispatch" version))
5552 (sha256
5553 (base32
5554 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5555 (build-system python-build-system)
5556 (native-inputs
5557 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5558 (home-page
5559 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5560 (synopsis "Backport of singledispatch feature from Python 3.4")
5561 (description
5562 "This library brings functools.singledispatch from Python 3.4 to Python
55632.6-3.3.")
5564 (license license:expat)))
5565
5566(define-public python2-singledispatch
5567 (package-with-python2 python-singledispatch))
5568
5569;; the python- version can be removed with python-3.5
5570(define-public python-backports-abc
5571 (package
5572 (name "python-backports-abc")
5573 (version "0.5")
5574 (source
5575 (origin
5576 (method url-fetch)
5577 (uri (pypi-uri "backports_abc" version))
5578 (sha256
5579 (base32
5580 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5581 (build-system python-build-system)
5582 (home-page "https://github.com/cython/backports_abc")
5583 (synopsis "Backport of additions to the 'collections.abc' module")
5584 (description
5585 "Python-backports-abc provides a backport of additions to the
5586'collections.abc' module in Python-3.5.")
5587 (license license:psfl)))
5588
5589(define-public python2-backports-abc
5590 (package-with-python2 python-backports-abc))
5591
5592(define-public python-backports-csv
5593 (package
5594 (name "python-backports-csv")
5595 (version "1.0.5")
5596 (source
5597 (origin
5598 (method url-fetch)
5599 (uri (pypi-uri "backports.csv" version))
5600 (sha256
5601 (base32
5602 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
5603 (build-system python-build-system)
5604 (home-page "https://github.com/ryanhiebert/backports.csv")
5605 (synopsis "Backport of Python 3's csv module for Python 2")
5606 (description
5607 "Provides a backport of Python 3's @code{csv} module for parsing
5608comma separated values. The API of the @code{csv} module in Python 2
5609is drastically different from the @code{csv} module in Python 3.
5610This is due, for the most part, to the difference between str in
5611Python 2 and Python 3.")
5612 (license license:psfl)))
5613
5614(define-public python2-backports-csv
5615 (package-with-python2 python-backports-csv))
5616
5617(define-public python2-backports-shutil-get-terminal-size
5618 (package
5619 (name "python2-backports-shutil-get-terminal-size")
5620 (version "1.0.0")
5621 (source
5622 (origin
5623 (method url-fetch)
5624 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
5625 (sha256
5626 (base32
5627 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
5628 (build-system python-build-system)
5629 (arguments
5630 `(#:python ,python-2
5631 #:phases
5632 (modify-phases %standard-phases
5633 (replace 'check
5634 (lambda _
5635 (zero? (system* "py.test" "-v")))))))
5636 (native-inputs
5637 `(("python2-pytest" ,python2-pytest)))
5638 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
5639 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
5640 (description
5641 "This package provides a backport of the @code{get_terminal_size
5642function} from Python 3.3's @code{shutil}.
5643Unlike the original version it is written in pure Python rather than C,
5644so it might be a tiny bit slower.")
5645 (license license:expat)))
5646
5647(define-public python-waf
5648 (package
5649 (name "python-waf")
5650 (version "2.0.11")
5651 (source (origin
5652 (method url-fetch)
5653 (uri (string-append "https://waf.io/"
5654 "waf-" version ".tar.bz2"))
5655 (sha256
5656 (base32
5657 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
5658 (build-system python-build-system)
5659 (arguments
5660 '(#:phases
5661 (modify-phases %standard-phases
5662 (replace 'build
5663 (lambda _
5664 (invoke "python" "waf-light" "configure" "build")))
5665 (replace 'check
5666 (lambda _
5667 (invoke "python" "waf" "--version")))
5668 (replace 'install
5669 (lambda* (#:key outputs #:allow-other-keys)
5670 (let ((out (assoc-ref outputs "out")))
5671 (install-file "waf" (string-append out "/bin")))
5672 #t))
5673 ;; waf breaks when it is wrapped.
5674 (delete 'wrap))))
5675 (home-page "https://waf.io/")
5676 (synopsis "Python-based build system")
5677 (description
5678 "Waf is a Python-based framework for configuring, compiling and installing
5679applications.")
5680 (license license:bsd-3)))
5681
5682(define-public python2-waf
5683 (package-with-python2 python-waf))
5684
5685(define-public python-pyzmq
5686 (package
5687 (name "python-pyzmq")
5688 (version "17.1.2")
5689 (source
5690 (origin
5691 (method url-fetch)
5692 (uri (pypi-uri "pyzmq" version))
5693 (sha256
5694 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
5695 (build-system python-build-system)
5696 (arguments
5697 `(#:configure-flags
5698 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5699 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5700 ;; --inplace' for 'python setup.py test' to work.
5701 #:tests? #f))
5702 (inputs
5703 `(("zeromq" ,zeromq)))
5704 (native-inputs
5705 `(("pkg-config" ,pkg-config)
5706 ("python-nose" ,python-nose)))
5707 (home-page "https://github.com/zeromq/pyzmq")
5708 (synopsis "Python bindings for 0MQ")
5709 (description
5710 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5711 (license license:bsd-4)))
5712
5713(define-public python2-pyzmq
5714 (package-with-python2 python-pyzmq))
5715
5716(define-public python-pep8
5717 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
5718 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
5719 ;; some dependents' test suites, and nothing more.
5720 (package
5721 (name "python-pep8")
5722 (version "1.7.0")
5723 (source
5724 (origin
5725 (method url-fetch)
5726 (uri (pypi-uri "pep8" version))
5727 (sha256
5728 (base32
5729 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5730 (build-system python-build-system)
5731 (home-page "https://pep8.readthedocs.org/")
5732 (synopsis "Python style guide checker")
5733 (description
5734 "This tools checks Python code against some of the style conventions in
5735PEP 8.")
5736 (license license:expat)))
5737
5738(define-public python2-pep8
5739 (package-with-python2 python-pep8))
5740
5741(define-public python-pyflakes
5742 (package
5743 (name "python-pyflakes")
5744 (version "2.0.0")
5745 (source
5746 (origin
5747 (method url-fetch)
5748 (uri (pypi-uri "pyflakes" version))
5749 (sha256
5750 (base32
5751 "0jba28czyvimdc72llms3f17swp3i8jdcabf5w0j00adfbn64xls"))))
5752 (build-system python-build-system)
5753 (home-page
5754 "https://github.com/pyflakes/pyflakes")
5755 (synopsis "Passive checker of Python programs")
5756 (description
5757 "Pyflakes statically checks Python source code for common errors.")
5758 (license license:expat)))
5759
5760(define-public python2-pyflakes
5761 (package-with-python2 python-pyflakes))
5762
5763(define-public python-mccabe
5764 (package
5765 (name "python-mccabe")
5766 (version "0.6.1")
5767 (source
5768 (origin
5769 (method url-fetch)
5770 (uri (pypi-uri "mccabe" version))
5771 (sha256
5772 (base32
5773 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
5774 (build-system python-build-system)
5775 (native-inputs
5776 `(("python-pytest" ,python-pytest-bootstrap)
5777 ("python-pytest-runner" ,python-pytest-runner)))
5778 (home-page "https://github.com/flintwork/mccabe")
5779 (synopsis "McCabe checker, plugin for flake8")
5780 (description
5781 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5782complexity of Python source code.")
5783 (license license:expat)))
5784
5785(define-public python2-mccabe
5786 (package-with-python2 python-mccabe))
5787
5788(define-public python-mccabe-0.2.1
5789 (package (inherit python-mccabe)
5790 (version "0.2.1")
5791 (source
5792 (origin
5793 (method url-fetch)
5794 (uri (pypi-uri "mccabe" version))
5795 (sha256
5796 (base32
5797 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5798
5799(define-public python2-mccabe-0.2.1
5800 (package-with-python2 python-mccabe-0.2.1))
5801
5802;; Flake8 2.4.1 requires an older version of pep8.
5803;; This should be removed ASAP.
5804(define-public python-pep8-1.5.7
5805 (package (inherit python-pep8)
5806 (version "1.5.7")
5807 (source
5808 (origin
5809 (method url-fetch)
5810 (uri (string-append
5811 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5812 version
5813 ".tar.gz"))
5814 (sha256
5815 (base32
5816 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
5817 (arguments
5818 ;; XXX Tests not compatible with Python 3.5.
5819 '(#:tests? #f))))
5820
5821(define-public python2-pep8-1.5.7
5822 (package-with-python2 python-pep8-1.5.7))
5823
5824;; Flake8 2.4.1 requires an older version of pyflakes.
5825;; This should be removed ASAP.
5826(define-public python-pyflakes-0.8.1
5827 (package (inherit python-pyflakes)
5828 (version "0.8.1")
5829 (source
5830 (origin
5831 (method url-fetch)
5832 (uri (string-append
5833 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5834 version
5835 ".tar.gz"))
5836 (sha256
5837 (base32
5838 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
5839 (arguments
5840 ;; XXX Tests not compatible with Python 3.5.
5841 '(#:tests? #f))))
5842
5843(define-public python2-pyflakes-0.8.1
5844 (package-with-python2 python-pyflakes-0.8.1))
5845
5846;; This package is used by hypothesis which has thousands of dependent packages.
5847;; FIXME: Consolidate this with "python-flake8" below in the next rebuild cycle.
5848(define-public python-flake8-3.5
5849 (package
5850 (name "python-flake8")
5851 (version "3.5.0")
5852 (source
5853 (origin
5854 (method url-fetch)
5855 (uri (pypi-uri "flake8" version))
5856 (sha256
5857 (base32
5858 "184b33grvvjmiwlv9kyd7yng9qv5ld24154j70z332xxg9gjclvj"))))
5859 (build-system python-build-system)
5860 (arguments
5861 `(#:phases
5862 (modify-phases %standard-phases
5863 ;; Two errors don't seem to have assigned codes.
5864 (add-after 'unpack 'delete-broken-test
5865 (lambda _ (delete-file "tests/unit/test_pyflakes_codes.py") #t))
5866 (add-after 'unpack 'fix-problem-with-pycodestyle
5867 (lambda _
5868 ;; See https://gitlab.com/pycqa/flake8/merge_requests/230
5869 ;; This should no longer be needed with the next release.
5870 (substitute* "setup.py"
5871 (("PEP8_PLUGIN\\('break_around_binary_operator'\\),")
5872 "PEP8_PLUGIN('break_after_binary_operator'),\
5873PEP8_PLUGIN('break_before_binary_operator'),"))
5874 #t))
5875 (delete 'check)
5876 (add-after 'install 'check
5877 (lambda* (#:key inputs outputs #:allow-other-keys)
5878 (add-installed-pythonpath inputs outputs)
5879 (invoke "pytest" "-v")
5880 #t)))))
5881 (propagated-inputs
5882 `(("python-pycodestyle" ,python-pycodestyle)
5883 ("python-pyflakes" ,python-pyflakes)
5884 ("python-mccabe" ,python-mccabe)))
5885 (native-inputs
5886 `(("python-mock" ,python-mock)
5887 ("python-pytest" ,python-pytest-bootstrap)
5888 ("python-pytest-runner" ,python-pytest-runner)))
5889 (home-page "https://gitlab.com/pycqa/flake8")
5890 (synopsis
5891 "The modular source code checker: pep8, pyflakes and co")
5892 (description
5893 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5894 (properties `((python2-variant . ,(delay python2-flake8-3.5))))
5895 (license license:expat)))
5896
5897(define-public python2-flake8-3.5
5898 (let ((base (package-with-python2 (strip-python2-variant python-flake8-3.5))))
5899 (package (inherit base)
5900 (propagated-inputs
5901 `(("python2-configparser" ,python2-configparser)
5902 ("python2-enum34" ,python2-enum34)
5903 ,@(package-propagated-inputs base))))))
5904
5905;; Version 3.5.0 has compatibility issues with Pyflakes 2.0, so we need
5906;; this newer version. Keep it as a separate variable for now to avoid
5907;; rebuilding "python-hypothesis"; this should be removed in the next
5908;; rebuild cycle.
5909(define-public python-flake8
5910 (package
5911 (inherit python-flake8-3.5)
5912 (version "3.6.0")
5913 (source (origin
5914 (method url-fetch)
5915 (uri (pypi-uri "flake8" version))
5916 (sha256
5917 (base32
5918 "0w0nprx22rbvrrkbfx9v5jc5gskbm08g219l7r8wai8zfswgadba"))))
5919 (arguments
5920 (substitute-keyword-arguments (package-arguments python-flake8-3.5)
5921 ((#:phases phases)
5922 `(modify-phases ,phases
5923 (delete 'delete-broken-test)
5924 (delete 'fix-problem-with-pycodestyle)))))
5925 (properties `((python2-variant . ,(delay python2-flake8))))))
5926
5927(define-public python2-flake8
5928 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
5929 (package (inherit base)
5930 (propagated-inputs
5931 (package-propagated-inputs python2-flake8-3.5)))))
5932
5933;; python-hacking requires flake8 <2.6.0.
5934(define-public python-flake8-2.5
5935 (package
5936 (inherit python-flake8)
5937 (version "2.5.5")
5938 (source (origin
5939 (method url-fetch)
5940 (uri (pypi-uri "flake8" version))
5941 (sha256
5942 (base32
5943 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
5944 (propagated-inputs
5945 `(("python-pep8" ,python-pep8)
5946 ,@(package-propagated-inputs python-flake8)))
5947 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
5948
5949(define-public python2-flake8-2.5
5950 (package
5951 (inherit python2-flake8)
5952 (version (package-version python-flake8-2.5))
5953 (source (origin
5954 (inherit (package-source python-flake8-2.5))))
5955 (propagated-inputs
5956 `(("python2-pep8" ,python2-pep8)
5957 ,@(package-propagated-inputs python2-flake8)))))
5958
5959(define-public python-flake8-polyfill
5960 (package
5961 (name "python-flake8-polyfill")
5962 (version "1.0.2")
5963 (source
5964 (origin
5965 (method url-fetch)
5966 (uri (pypi-uri "flake8-polyfill" version))
5967 (sha256
5968 (base32
5969 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
5970 (build-system python-build-system)
5971 (arguments
5972 '(#:phases
5973 (modify-phases %standard-phases
5974 (replace 'check
5975 (lambda _
5976 (setenv "PYTHONPATH"
5977 (string-append (getcwd) "/build/lib:"
5978 (getenv "PYTHONPATH")))
5979 (zero? (system* "py.test" "-v")))))))
5980 (native-inputs
5981 `(("python-flake8" ,python-flake8)
5982 ("python-mock" ,python-mock)
5983 ("python-pep8" ,python-pep8)
5984 ("python-pycodestyle" ,python-pycodestyle)
5985 ("python-pytest" ,python-pytest)))
5986 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
5987 (synopsis "Polyfill package for Flake8 plugins")
5988 (description
5989 "This package that provides some compatibility helpers for Flake8
5990plugins that intend to support Flake8 2.x and 3.x simultaneously.")
5991 (license license:expat)))
5992
5993(define-public python2-flake8-polyfill
5994 (package-with-python2 python-flake8-polyfill))
5995
5996(define-public python-mistune
5997 (package
5998 (name "python-mistune")
5999 (version "0.8.4")
6000 (source
6001 (origin
6002 (method url-fetch)
6003 (uri (pypi-uri "mistune" version))
6004 (sha256
6005 (base32
6006 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6007 (build-system python-build-system)
6008 (native-inputs
6009 `(("python-nose" ,python-nose)
6010 ("python-cython" ,python-cython)))
6011 (home-page "https://github.com/lepture/mistune")
6012 (synopsis "Markdown parser in pure Python")
6013 (description "This package provides a fast markdown parser in pure
6014Python.")
6015 (license license:bsd-3)))
6016
6017(define-public python2-mistune
6018 (package-with-python2 python-mistune))
6019
6020(define-public python-markdown
6021 (package
6022 (name "python-markdown")
6023 (version "3.0.1")
6024 (source
6025 (origin
6026 (method url-fetch)
6027 (uri (pypi-uri "Markdown" version))
6028 (sha256
6029 (base32
6030 "0z6v8649sr434d5r5zmrhydka7v7f9yas4bwcgkcs0650jdhybnh"))))
6031 (build-system python-build-system)
6032 (native-inputs
6033 `(("python-nose" ,python-nose)
6034 ("python-pyyaml" ,python-pyyaml)))
6035 (home-page "https://python-markdown.github.io/")
6036 (synopsis "Python implementation of Markdown")
6037 (description
6038 "This package provides a Python implementation of John Gruber's
6039Markdown. The library features international input, various Markdown
6040extensions, and several HTML output formats. A command line wrapper
6041markdown_py is also provided to convert Markdown files to HTML.")
6042 (license license:bsd-3)))
6043
6044(define-public python2-markdown
6045 (package-with-python2 python-markdown))
6046
6047(define-public python-ptyprocess
6048 (package
6049 (name "python-ptyprocess")
6050 (version "0.5.2")
6051 (source
6052 (origin
6053 (method url-fetch)
6054 (uri (pypi-uri "ptyprocess" version))
6055 (sha256
6056 (base32
6057 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6058 (build-system python-build-system)
6059 (native-inputs
6060 `(("python-nose" ,python-nose)))
6061 (arguments
6062 `(#:phases
6063 (modify-phases %standard-phases
6064 (replace 'check
6065 (lambda _
6066 (zero? (system* "nosetests")))))))
6067 (home-page "https://github.com/pexpect/ptyprocess")
6068 (synopsis "Run a subprocess in a pseudo terminal")
6069 (description
6070 "This package provides a Python library used to launch a subprocess in a
6071pseudo terminal (pty), and interact with both the process and its pty.")
6072 (license license:isc)))
6073
6074(define-public python2-ptyprocess
6075 (package-with-python2 python-ptyprocess))
6076
6077(define-public python-cram
6078 (package
6079 (name "python-cram")
6080 (version "0.7")
6081 (home-page "https://bitheap.org/cram/")
6082 (source (origin
6083 (method url-fetch)
6084 (uri (list (string-append home-page "cram-"
6085 version ".tar.gz")
6086 (pypi-uri "cram" version)))
6087 (sha256
6088 (base32
6089 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6090 (arguments
6091 '(#:phases
6092 (modify-phases %standard-phases
6093 (add-after 'unpack 'patch-source
6094 (lambda _
6095 (substitute* (find-files "cram" ".*\\.py$")
6096 ;; Replace default shell path.
6097 (("/bin/sh") (which "sh")))
6098 (substitute* (find-files "tests" ".*\\.t$")
6099 (("md5") "md5sum")
6100 (("/bin/bash") (which "bash"))
6101 (("/bin/sh") (which "sh")))
6102 (substitute* "cram/_test.py"
6103 ;; This hack works around a bug triggered by substituting
6104 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6105 ;; "cram -h", which breaks the output at 80 characters. This
6106 ;; causes the line showing the default shell to break into two
6107 ;; lines, but the test expects a single line...
6108 (("env\\['COLUMNS'\\] = '80'")
6109 "env['COLUMNS'] = '160'"))
6110 #t))
6111 (delete 'check)
6112 (add-after 'install 'check
6113 ;; The test phase uses the built library and executable.
6114 ;; It's easier to run it after install since the build
6115 ;; directory contains version-specific PATH.
6116 (lambda* (#:key inputs outputs #:allow-other-keys)
6117 (add-installed-pythonpath inputs outputs)
6118 (setenv "PATH" (string-append (getenv "PATH") ":"
6119 (assoc-ref outputs "out") "/bin"))
6120 (zero? (system* "make" "test")))))))
6121 (build-system python-build-system)
6122 (native-inputs
6123 `(("python-coverage" ,python-coverage)
6124 ("which" ,which)))
6125 (synopsis "Simple testing framework for command line applications")
6126 (description
6127 "Cram is a functional testing framework for command line applications.
6128Cram tests look like snippets of interactive shell sessions. Cram runs each
6129command and compares the command output in the test with the command’s actual
6130output.")
6131 (license license:gpl2+)))
6132
6133(define-public python2-cram
6134 (package-with-python2 python-cram))
6135
6136(define-public python-straight-plugin
6137 (package
6138 (name "python-straight-plugin")
6139 (version "1.4.1")
6140 (source
6141 (origin
6142 (method url-fetch)
6143 (uri (pypi-uri "straight.plugin" version))
6144 (sha256
6145 (base32
6146 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6147 (build-system python-build-system)
6148 (home-page "https://github.com/ironfroggy/straight.plugin")
6149 (synopsis "Simple namespaced plugin facility")
6150 (description "Straight Plugin provides a type of plugin you can create from
6151almost any existing Python modules, and an easy way for outside developers to
6152add functionality and customization to your projects with their own plugins.")
6153 (license license:expat)))
6154
6155(define-public python2-straight-plugin
6156 (package-with-python2 python-straight-plugin))
6157
6158(define-public python-fonttools
6159 (package
6160 (name "python-fonttools")
6161 (version "3.28.0")
6162 (source (origin
6163 (method url-fetch)
6164 (uri (pypi-uri "fonttools" version ".zip"))
6165 (sha256
6166 (base32
6167 "0vsvjhidpb5kywpjgz1j3fywzkddxkb0afqai18qa3h6lqjyxwpb"))))
6168 (build-system python-build-system)
6169 (native-inputs
6170 `(("unzip" ,unzip)
6171 ("python-pytest" ,python-pytest)
6172 ("python-pytest-runner" ,python-pytest-runner)))
6173 (home-page "https://github.com/behdad/fonttools")
6174 (synopsis "Tools to manipulate font files")
6175 (description
6176 "FontTools/TTX is a library to manipulate font files from Python. It
6177supports reading and writing of TrueType/OpenType fonts, reading and writing
6178of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6179also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6180from an XML-based format.")
6181 (license license:expat)))
6182
6183(define-public python2-fonttools
6184 (package-with-python2 python-fonttools))
6185
6186(define-public python-ly
6187 (package
6188 (name "python-ly")
6189 (version "0.9.5")
6190 (source
6191 (origin
6192 (method url-fetch)
6193 (uri (pypi-uri name version))
6194 (sha256
6195 (base32
6196 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6197 (build-system python-build-system)
6198 (arguments
6199 ;; FIXME: Some tests need network access.
6200 '(#:tests? #f))
6201 (synopsis "Tool and library for manipulating LilyPond files")
6202 (description "This package provides a Python library to parse, manipulate
6203or create documents in LilyPond format. A command line program ly is also
6204provided that can be used to do various manipulations with LilyPond files.")
6205 (home-page "https://pypi.python.org/pypi/python-ly")
6206 (license license:gpl2+)))
6207
6208(define-public python-appdirs
6209 (package
6210 (name "python-appdirs")
6211 (version "1.4.3")
6212 (source
6213 (origin
6214 (method url-fetch)
6215 (uri (pypi-uri "appdirs" version))
6216 (sha256
6217 (base32
6218 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6219 (build-system python-build-system)
6220 (home-page "https://github.com/ActiveState/appdirs")
6221 (synopsis
6222 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6223 (description
6224 "This module provides a portable way of finding out where user data
6225should be stored on various operating systems.")
6226 (license license:expat)))
6227
6228(define-public python2-appdirs
6229 (package-with-python2 python-appdirs))
6230
6231(define-public python-llfuse
6232 (package
6233 (name "python-llfuse")
6234 (version "1.3.5")
6235 (source (origin
6236 (method url-fetch)
6237 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6238 (sha256
6239 (base32
6240 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6241 (build-system python-build-system)
6242 (inputs
6243 `(("fuse" ,fuse)
6244 ("attr" ,attr)))
6245 (native-inputs
6246 `(("pkg-config" ,pkg-config)))
6247 (synopsis "Python bindings for FUSE")
6248 (description
6249 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6250 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6251 (license license:lgpl2.0+)
6252 (properties `((python2-variant . ,(delay python2-llfuse))))))
6253
6254(define-public python2-llfuse
6255 (package (inherit (package-with-python2
6256 (strip-python2-variant python-llfuse)))
6257 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6258
6259;; For attic-0.16
6260(define-public python-llfuse-0.41
6261 (package (inherit python-llfuse)
6262 (version "0.41.1")
6263 (source (origin
6264 (method url-fetch)
6265 (uri (string-append
6266 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6267 "llfuse-" version ".tar.bz2"))
6268 (sha256
6269 (base32
6270 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6271 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6272 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6273 (license (list license:expat license:lgpl2.0+))))
6274
6275(define-public python-msgpack
6276 (package
6277 (name "python-msgpack")
6278 (version "0.5.6")
6279 (source (origin
6280 (method url-fetch)
6281 (uri (pypi-uri "msgpack" version))
6282 (sha256
6283 (base32
6284 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6285 (build-system python-build-system)
6286 (arguments
6287 `(#:modules ((guix build utils)
6288 (guix build python-build-system)
6289 (ice-9 ftw)
6290 (srfi srfi-1)
6291 (srfi srfi-26))
6292 #:phases
6293 (modify-phases %standard-phases
6294 (replace 'check
6295 (lambda _
6296 (let ((cwd (getcwd)))
6297 (setenv "PYTHONPATH"
6298 (string-append cwd "/build/"
6299 (find (cut string-prefix? "lib" <>)
6300 (scandir (string-append cwd "/build")))
6301 ":"
6302 (getenv "PYTHONPATH")))
6303 (invoke "pytest" "-v" "test")))))))
6304 (native-inputs
6305 `(("python-pytest" ,python-pytest)))
6306 (synopsis "MessagePack (de)serializer")
6307 (description "MessagePack is a fast, compact binary serialization format,
6308suitable for similar data to JSON. This package provides CPython bindings for
6309reading and writing MessagePack data.")
6310 (home-page "https://pypi.python.org/pypi/msgpack/")
6311 (license license:asl2.0)))
6312
6313;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6314;; release 0.5. Some packages like borg still call it by the old name for now.
6315;; <https://bugs.gnu.org/30662>
6316(define-public python-msgpack-transitional
6317 (package
6318 (inherit python-msgpack)
6319 (name "python-msgpack-transitional")
6320 (arguments
6321 (substitute-keyword-arguments (package-arguments python-msgpack)
6322 ((#:phases phases)
6323 `(modify-phases ,phases
6324 (add-after 'unpack 'configure-transitional
6325 (lambda _
6326 ;; Keep using the old name.
6327 (substitute* "setup.py"
6328 (("TRANSITIONAL = False")
6329 "TRANSITIONAL = 1"))
6330 #t))))))))
6331
6332(define-public python2-msgpack
6333 (package-with-python2 python-msgpack))
6334
6335(define-public python-netaddr
6336 (package
6337 (name "python-netaddr")
6338 (version "0.7.19")
6339 (source
6340 (origin
6341 (method url-fetch)
6342 (uri (pypi-uri "netaddr" version))
6343 (sha256
6344 (base32
6345 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6346 (build-system python-build-system)
6347 (arguments `(#:tests? #f)) ;; No tests.
6348 (home-page "https://github.com/drkjam/netaddr/")
6349 (synopsis "Pythonic manipulation of network addresses")
6350 (description
6351 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6352and MAC network addresses.")
6353 (license license:bsd-3)))
6354
6355(define-public python2-netaddr
6356 (package-with-python2 python-netaddr))
6357
6358(define-public python-wrapt
6359 (package
6360 (name "python-wrapt")
6361 (version "1.10.11")
6362 (source
6363 (origin
6364 (method url-fetch)
6365 (uri (pypi-uri "wrapt" version))
6366 (sha256
6367 (base32
6368 "1ip3dwib39xhp79kblskgvz3fjzcwxgx3fs3ahdixhpjg7a61mfl"))))
6369 (build-system python-build-system)
6370 (arguments
6371 ;; Tests are not included in the tarball, they are only available in the
6372 ;; git repository.
6373 `(#:tests? #f))
6374 (home-page "https://github.com/GrahamDumpleton/wrapt")
6375 (synopsis "Module for decorators, wrappers and monkey patching")
6376 (description
6377 "The aim of the wrapt module is to provide a transparent object proxy for
6378 Python, which can be used as the basis for the construction of function
6379 wrappers and decorator functions.")
6380 (license license:bsd-2)))
6381
6382(define-public python2-wrapt
6383 (package-with-python2 python-wrapt))
6384
6385(define-public python-xlrd
6386 (package
6387 (name "python-xlrd")
6388 (version "1.0.0")
6389 (source (origin
6390 (method url-fetch)
6391 (uri (pypi-uri "xlrd" version))
6392 (sha256
6393 (base32
6394 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6395 (build-system python-build-system)
6396 (arguments
6397 `(#:phases
6398 (modify-phases %standard-phases
6399 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6400 ;; run tests instead for now.
6401 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
6402 (native-inputs `(("python-nose" ,python-nose)))
6403 (home-page "http://www.python-excel.org/")
6404 (synopsis "Library for extracting data from Excel files")
6405 (description "This packages provides a library to extract data from
6406spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6407@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6408Unicode-aware. It is not intended as an end-user tool.")
6409 (license license:bsd-3)))
6410
6411(define-public python2-xlrd
6412 (package-with-python2 python-xlrd))
6413
6414(define-public python-prettytable
6415 (package
6416 (name "python-prettytable")
6417 (version "0.7.2")
6418 (source
6419 (origin
6420 (method url-fetch)
6421 (uri (string-append
6422 "https://pypi.python.org/packages/source/P/PrettyTable/"
6423 "prettytable-" version ".tar.bz2"))
6424 (sha256
6425 (base32
6426 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6427 (build-system python-build-system)
6428 (home-page "http://code.google.com/p/prettytable/")
6429 (synopsis "Display tabular data in an ASCII table format")
6430 (description
6431 "A library designed to represent tabular data in visually appealing ASCII
6432tables. PrettyTable allows for selection of which columns are to be printed,
6433independent alignment of columns (left or right justified or centred) and
6434printing of sub-tables by specifying a row range.")
6435 (license license:bsd-3)))
6436
6437(define-public python2-prettytable
6438 (package-with-python2 python-prettytable))
6439
6440(define-public python-tables
6441 (package
6442 (name "python-tables")
6443 (version "3.4.4")
6444 (source
6445 (origin
6446 (method url-fetch)
6447 (uri (pypi-uri "tables" version))
6448 (sha256
6449 (base32
6450 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
6451 (modules '((guix build utils)))
6452 (snippet
6453 '(begin
6454 ;; Remove pre-compiled .pyc files from source.
6455 (for-each delete-file-recursively
6456 (find-files "." "__pycache__" #:directories? #t))
6457 (for-each delete-file (find-files "." "\\.pyc$"))
6458 #t))))
6459 (build-system python-build-system)
6460 (arguments
6461 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6462 ;; or "check", so we must override the build and check phases.
6463 #:phases
6464 (modify-phases %standard-phases
6465 (add-after 'unpack 'use-gcc
6466 (lambda _
6467 (substitute* "setup.py"
6468 (("compiler = new_compiler\\(\\)" line)
6469 (string-append line
6470 "\ncompiler.set_executables(compiler='gcc',"
6471 "compiler_so='gcc',"
6472 "linker_exe='gcc',"
6473 "linker_so='gcc -shared')")))
6474 #t))
6475 (replace 'build
6476 (lambda* (#:key inputs #:allow-other-keys)
6477 (zero? (system* "python" "setup.py" "build"
6478 (string-append "--hdf5="
6479 (assoc-ref inputs "hdf5"))))))
6480 (replace 'check
6481 (lambda* (#:key inputs #:allow-other-keys)
6482 (zero? (system* "python" "setup.py" "check"
6483 (string-append "--hdf5="
6484 (assoc-ref inputs "hdf5")))))))))
6485 (propagated-inputs
6486 `(("python-numexpr" ,python-numexpr)
6487 ("python-numpy" ,python-numpy)))
6488 (native-inputs
6489 `(("python-cython" ,python-cython)
6490 ("pkg-config" ,pkg-config)))
6491 (inputs
6492 `(("hdf5" ,hdf5)
6493 ("bzip2" ,bzip2)
6494 ("zlib" ,zlib)))
6495 (home-page "http://www.pytables.org/")
6496 (synopsis "Hierarchical datasets for Python")
6497 (description "PyTables is a package for managing hierarchical datasets and
6498designed to efficiently cope with extremely large amounts of data.")
6499 (license license:bsd-3)))
6500
6501(define-public python2-tables
6502 (package-with-python2 python-tables))
6503
6504(define-public python-pyasn1
6505 (package
6506 (name "python-pyasn1")
6507 (version "0.4.3")
6508 (source
6509 (origin
6510 (method url-fetch)
6511 (uri (pypi-uri "pyasn1" version))
6512 (sha256
6513 (base32
6514 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
6515 (build-system python-build-system)
6516 (home-page "http://pyasn1.sourceforge.net/")
6517 (synopsis "ASN.1 types and codecs")
6518 (description
6519 "This is an implementation of ASN.1 types and codecs in Python. It is
6520suitable for a wide range of protocols based on the ASN.1 specification.")
6521 (license license:bsd-2)))
6522
6523(define-public python2-pyasn1
6524 (package-with-python2 python-pyasn1))
6525
6526(define-public python-pyasn1-modules
6527 (package
6528 (name "python-pyasn1-modules")
6529 (version "0.2.2")
6530 (source
6531 (origin
6532 (method url-fetch)
6533 (uri (pypi-uri "pyasn1-modules" version))
6534 (sha256
6535 (base32
6536 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
6537 (build-system python-build-system)
6538 (propagated-inputs
6539 `(("python-pyasn1" ,python-pyasn1)))
6540 (home-page "https://sourceforge.net/projects/pyasn1/")
6541 (synopsis "ASN.1 codec implementations")
6542 (description
6543 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6544implementations of ASN.1-based codecs and protocols.")
6545 (license license:bsd-3)))
6546
6547(define-public python2-pyasn1-modules
6548 (package-with-python2 python-pyasn1-modules))
6549
6550(define-public python-ipaddress
6551 (package
6552 (name "python-ipaddress")
6553 (version "1.0.22")
6554 (source (origin
6555 (method url-fetch)
6556 (uri (pypi-uri "ipaddress" version))
6557 (sha256
6558 (base32
6559 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
6560 (build-system python-build-system)
6561 (home-page "https://github.com/phihag/ipaddress")
6562 (synopsis "IP address manipulation library")
6563 (description
6564 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6565 in Python. This library is used to create, poke at, and manipulate IPv4 and
6566 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6567 module to older versions of Python.")
6568 (license license:psfl)))
6569
6570(define-public python2-ipaddress
6571 (package-with-python2 python-ipaddress))
6572
6573(define-public python2-ipaddr
6574 (package
6575 (name "python2-ipaddr")
6576 (version "2.1.11")
6577 (source
6578 (origin
6579 (method url-fetch)
6580 (uri (pypi-uri "ipaddr" version))
6581 (sha256
6582 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6583 (build-system python-build-system)
6584 (arguments
6585 `(#:python ,python-2 ;version 2 only
6586 #:phases
6587 (modify-phases %standard-phases
6588 (replace 'check
6589 (lambda* _
6590 (zero? (system* "python" "ipaddr_test.py")))))))
6591 (home-page "https://github.com/google/ipaddr-py")
6592 (synopsis "IP address manipulation library")
6593 (description
6594 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6595IPv6 addresses and networks.
6596
6597For new implementations you may prefer to use the standard module
6598@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6599versions of Python.")
6600 (license license:asl2.0)))
6601
6602(define-public python-idna
6603 (package
6604 (name "python-idna")
6605 (version "2.7")
6606 (source
6607 (origin
6608 (method url-fetch)
6609 (uri (pypi-uri "idna" version))
6610 (sha256
6611 (base32
6612 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))
6613 (build-system python-build-system)
6614 (home-page "https://github.com/kjd/idna")
6615 (synopsis "Internationalized domain names in applications")
6616 (description
6617 "This is a library to support the Internationalised Domain Names in
6618Applications (IDNA) protocol as specified in RFC 5891. This version of the
6619protocol is often referred to as “IDNA2008” and can produce different results
6620from the earlier standard from 2003. The library is also intended to act as a
6621suitable drop-in replacement for the “encodings.idna” module that comes with
6622the Python standard library but currently only supports the older 2003
6623specification.")
6624 (license license:bsd-4)))
6625
6626(define-public python2-idna
6627 (package-with-python2 python-idna))
6628
6629(define-public python-idna-ssl
6630 (package
6631 (name "python-idna-ssl")
6632 (version "1.0.1")
6633 (source
6634 (origin
6635 (method url-fetch)
6636 (uri (pypi-uri "idna-ssl" version))
6637 (sha256
6638 (base32
6639 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
6640 (build-system python-build-system)
6641 (arguments
6642 `(#:tests? #f)) ;circular dependency with python-aiohttp
6643 (home-page "https://github.com/aio-libs/idna-ssl")
6644 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
6645 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
6646domains support.")
6647 (license license:expat)))
6648
6649(define-public python-pretend
6650 (package
6651 (name "python-pretend")
6652 (version "1.0.9")
6653 (source
6654 (origin
6655 (method url-fetch)
6656 (uri (string-append "https://pypi.python.org/packages/source/p/"
6657 "pretend/pretend-" version ".tar.gz"))
6658 (sha256
6659 (base32
6660 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
6661 (build-system python-build-system)
6662 (home-page "https://github.com/alex/pretend")
6663 (synopsis "Library for stubbing in Python")
6664 (description
6665 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6666technique for writing tests. You may hear the term mixed up with mocks,
6667fakes, or doubles. Basically, a stub is an object that returns pre-canned
6668responses, rather than doing any computation.")
6669 (license license:bsd-3)))
6670
6671(define-public python2-pretend
6672 (package-with-python2 python-pretend))
6673
6674(define-public python-pip
6675 (package
6676 (name "python-pip")
6677 (version "18.1")
6678 (source
6679 (origin
6680 (method url-fetch)
6681 (uri (pypi-uri "pip" version))
6682 (sha256
6683 (base32
6684 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
6685 (build-system python-build-system)
6686 (arguments
6687 '(#:tests? #f)) ; there are no tests in the pypi archive.
6688 (home-page "https://pip.pypa.io/")
6689 (synopsis "Package manager for Python software")
6690 (description
6691 "Pip is a package manager for Python software, that finds packages on the
6692Python Package Index (PyPI).")
6693 (license license:expat)))
6694
6695(define-public python2-pip
6696 (package-with-python2 python-pip))
6697
6698(define-public python-tlsh
6699 (package
6700 (name "python-tlsh")
6701 (version "3.4.5")
6702 (home-page "https://github.com/trendmicro/tlsh")
6703 (source (origin
6704 (method url-fetch)
6705 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6706 version ".tar.gz"))
6707 (sha256
6708 (base32
6709 "1x1vahd4zg5kpyr9h9hs3fvh460p25rjy4cclwdnbbw8x3vc30q3"))
6710 (file-name (string-append name "-" version ".tar.gz"))))
6711 (build-system cmake-build-system)
6712 (arguments
6713 '(#:out-of-source? #f
6714 #:phases (modify-phases %standard-phases
6715 (replace
6716 'install
6717 (lambda* (#:key outputs #:allow-other-keys)
6718 ;; Build and install the Python bindings. The underlying
6719 ;; C++ library is apparently not meant to be installed.
6720 (let ((out (assoc-ref outputs "out")))
6721 (with-directory-excursion "py_ext"
6722 (and (system* "python" "setup.py" "build")
6723 (system* "python" "setup.py" "install"
6724 (string-append "--prefix=" out))))))))))
6725 (inputs `(("python" ,python-wrapper))) ;for the bindings
6726 (synopsis "Fuzzy matching library for Python")
6727 (description
6728 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6729Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6730value which can be used for similarity comparisons. Similar objects have
6731similar hash values, which allows for the detection of similar objects by
6732comparing their hash values. The byte stream should have a sufficient amount
6733of complexity; for example, a byte stream of identical bytes will not generate
6734a hash value.")
6735 (license license:asl2.0)))
6736
6737(define-public python2-tlsh
6738 (package
6739 (inherit python-tlsh)
6740 (name "python2-tlsh")
6741 (inputs `(("python" ,python-2)))))
6742
6743(define-public python-termcolor
6744 (package
6745 (name "python-termcolor")
6746 (version "1.1.0")
6747 (source
6748 (origin
6749 (method url-fetch)
6750 (uri (pypi-uri "termcolor" version))
6751 (sha256
6752 (base32
6753 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6754 (build-system python-build-system)
6755 (arguments
6756 ;; There are no tests.
6757 `(#:tests? #f))
6758 (home-page "https://pypi.python.org/pypi/termcolor")
6759 (synopsis "ANSII Color formatting for terminal output")
6760 (description
6761 "This package provides ANSII Color formatting for output in terminals.")
6762 (license license:expat)))
6763
6764(define-public python2-termcolor
6765 (package-with-python2 python-termcolor))
6766
6767(define-public python-libarchive-c
6768 (package
6769 (name "python-libarchive-c")
6770 (version "2.8")
6771 (source (origin
6772 (method url-fetch)
6773 (uri (pypi-uri "libarchive-c" version))
6774 (sha256
6775 (base32
6776 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
6777 (build-system python-build-system)
6778 (arguments
6779 '(#:phases (modify-phases %standard-phases
6780 (add-before
6781 'build 'reference-libarchive
6782 (lambda* (#:key inputs #:allow-other-keys)
6783 ;; Retain the absolute file name of libarchive.so.
6784 (let ((libarchive (assoc-ref inputs "libarchive")))
6785 (substitute* "libarchive/ffi.py"
6786 (("find_library\\('archive'\\)")
6787 (string-append "'" libarchive
6788 "/lib/libarchive.so'"))))))
6789 (replace 'check
6790 (lambda _ (invoke "pytest" "-vv"))))))
6791 (native-inputs
6792 `(("python-mock" ,python-mock)
6793 ("python-pytest" ,python-pytest)))
6794 (inputs
6795 `(("libarchive" ,libarchive)))
6796 (home-page "https://github.com/Changaco/python-libarchive-c")
6797 (synopsis "Python interface to libarchive")
6798 (description
6799 "This package provides Python bindings to libarchive, a C library to
6800access possibly compressed archives in many different formats. It uses
6801Python's @code{ctypes} foreign function interface (FFI).")
6802 (license license:lgpl2.0+)))
6803
6804(define-public python2-libarchive-c
6805 (package-with-python2 python-libarchive-c))
6806
6807(define-public python-file
6808 (package
6809 (inherit file)
6810 (name "python-file")
6811 (build-system python-build-system)
6812 (arguments
6813 '(#:tests? #f ;no tests
6814 #:configure-flags '("--single-version-externally-managed" "--root=/")
6815 #:phases (modify-phases %standard-phases
6816 (add-before 'build 'change-directory
6817 (lambda _
6818 (chdir "python")
6819 #t))
6820 (add-before 'build 'set-library-file-name
6821 (lambda* (#:key inputs #:allow-other-keys)
6822 (let ((file (assoc-ref inputs "file")))
6823 (substitute* "magic.py"
6824 (("find_library\\('magic'\\)")
6825 (string-append "'" file "/lib/libmagic.so'")))
6826 #t))))))
6827 (inputs `(("file" ,file)))
6828 (self-native-input? #f)
6829 (synopsis "Python bindings to the libmagic file type guesser. Note that
6830this module and the python-magic module both provide a \"magic.py\" file;
6831these two modules, which are different and were developed separately, both
6832serve the same purpose: provide Python bindings for libmagic.")))
6833
6834(define-public python2-file
6835 (package-with-python2 python-file))
6836
6837(define-public python-debian
6838 (package
6839 (name "python-debian")
6840 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
6841 (version "0.1.28")
6842 (source
6843 (origin
6844 (method url-fetch)
6845 (uri (pypi-uri name version))
6846 (sha256
6847 (base32
6848 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
6849 (build-system python-build-system)
6850 (propagated-inputs
6851 `(("python-six" ,python-six)))
6852 (synopsis "Debian package related modules")
6853 (description
6854 ;; XXX: Use @enumerate instead of @itemize to work around
6855 ;; <http://bugs.gnu.org/21772>.
6856 "This package provides Python modules that abstract many formats of
6857Debian-related files, such as:
6858
6859@enumerate
6860@item Debtags information;
6861@item @file{debian/changelog} files;
6862@item packages files, pdiffs;
6863@item control files of single or multiple RFC822-style paragraphs---e.g.
6864 @file{debian/control}, @file{.changes}, @file{.dsc};
6865@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6866 contained files and meta-information.
6867@end enumerate\n")
6868
6869 ;; Modules are either GPLv2+ or GPLv3+.
6870 (license license:gpl3+)))
6871
6872(define-public python2-debian
6873 (package-with-python2 python-debian))
6874
6875(define-public python-nbformat
6876 (package
6877 (name "python-nbformat")
6878 (version "4.4.0")
6879 (source
6880 (origin
6881 (method url-fetch)
6882 (uri (pypi-uri "nbformat" version))
6883 (sha256
6884 (base32
6885 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
6886 (build-system python-build-system)
6887 (arguments `(#:tests? #f)) ; no test target
6888 (propagated-inputs
6889 `(("python-ipython-genutils" ,python-ipython-genutils)
6890 ("python-jsonschema" ,python-jsonschema)
6891 ("python-jupyter-core" ,python-jupyter-core)
6892 ("python-traitlets" ,python-traitlets)))
6893 (home-page "http://jupyter.org")
6894 (synopsis "Jupyter Notebook format")
6895 (description "This package provides the reference implementation of the
6896Jupyter Notebook format and Python APIs for working with notebooks.")
6897 (license license:bsd-3)))
6898
6899(define-public python2-nbformat
6900 (package-with-python2 python-nbformat))
6901
6902(define-public python-bleach
6903 (package
6904 (name "python-bleach")
6905 (version "1.4.3")
6906 (source
6907 (origin
6908 (method url-fetch)
6909 (uri (pypi-uri "bleach" version))
6910 (sha256
6911 (base32
6912 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6913 (build-system python-build-system)
6914 (propagated-inputs
6915 `(("python-html5lib" ,python-html5lib-0.9)
6916 ("python-six" ,python-six)))
6917 (native-inputs
6918 `(("python-nose" ,python-nose)))
6919 (home-page "https://github.com/jsocol/bleach")
6920 (synopsis "Whitelist-based HTML-sanitizing tool")
6921 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6922 (license license:asl2.0)))
6923
6924(define-public python2-bleach
6925 (package-with-python2 python-bleach))
6926
6927(define-public python-entrypoints
6928 (package
6929 (name "python-entrypoints")
6930 (version "0.2.3")
6931 (source
6932 (origin
6933 (method url-fetch)
6934 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
6935 version ".tar.gz"))
6936 (file-name (string-append name "-" version ".tar.gz"))
6937 (sha256
6938 (base32
6939 "1pdvgfr5bxyvnfvxbsd3zi0dh3il71pc4k6rinx6zpps91b84a56"))))
6940 (build-system python-build-system)
6941 ;; The package does not come with a setup.py file, so we have to generate
6942 ;; one ourselves.
6943 (arguments
6944 `(#:tests? #f
6945 #:phases
6946 (modify-phases %standard-phases
6947 (add-after 'unpack 'create-setup.py
6948 (lambda _
6949 (call-with-output-file "setup.py"
6950 (lambda (port)
6951 (format port "\
6952from setuptools import setup
6953setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6954" ,version))))))))
6955 (home-page "https://github.com/takluyver/entrypoints")
6956 (synopsis "Discover and load entry points from installed Python packages")
6957 (description "Entry points are a way for Python packages to advertise
6958objects with some common interface. The most common examples are
6959@code{console_scripts} entry points, which define shell commands by
6960identifying a Python function to run. The @code{entrypoints} module contains
6961functions to find and load entry points.")
6962 (license license:expat)))
6963
6964(define-public python2-entrypoints
6965 (package-with-python2 python-entrypoints))
6966
6967(define-public python-nbconvert
6968 (package
6969 (name "python-nbconvert")
6970 (version "5.0.0b1")
6971 (source
6972 (origin
6973 (method url-fetch)
6974 (uri (pypi-uri "nbconvert" version))
6975 (sha256
6976 (base32
6977 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6978 (build-system python-build-system)
6979 (arguments
6980 `(;; The "bdist_egg" target is disabled by default, causing the installation
6981 ;; to fail.
6982 #:configure-flags (list "bdist_egg")
6983 ;; FIXME: 5 failures, 40 errors.
6984 #:tests? #f))
6985 ;; #:phases
6986 ;; (modify-phases %standard-phases
6987 ;; (replace 'check
6988 ;; (lambda _
6989 ;; (zero? (system* "py.test" "-v")))))
6990 (native-inputs
6991 `(("python-pytest" ,python-pytest)))
6992 (propagated-inputs
6993 `(("python-bleach" ,python-bleach)
6994 ("python-entrypoints" ,python-entrypoints)
6995 ("python-jinja2" ,python-jinja2)
6996 ("python-jupyter-core" ,python-jupyter-core)
6997 ("python-mistune" ,python-mistune)
6998 ("python-nbformat" ,python-nbformat)
6999 ("python-pygments" ,python-pygments)
7000 ("python-traitlets" ,python-traitlets)))
7001 (home-page "http://jupyter.org")
7002 (synopsis "Converting Jupyter Notebooks")
7003 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7004notebooks to various other formats via Jinja templates. It allows you to
7005convert an @code{.ipynb} notebook file into various static formats including:
7006
7007@enumerate
7008@item HTML
7009@item LaTeX
7010@item PDF
7011@item Reveal JS
7012@item Markdown (md)
7013@item ReStructured Text (rst)
7014@item executable script
7015@end enumerate\n")
7016 (license license:bsd-3)))
7017
7018(define-public python2-nbconvert
7019 (package-with-python2 python-nbconvert))
7020
7021(define-public python-notebook
7022 (package
7023 (name "python-notebook")
7024 (version "4.2.3")
7025 (source (origin
7026 (method url-fetch)
7027 (uri (pypi-uri "notebook" version))
7028 (sha256
7029 (base32
7030 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
7031 (build-system python-build-system)
7032 (arguments
7033 `(#:phases
7034 (modify-phases %standard-phases
7035 (replace 'check
7036 (lambda _
7037 ;; HOME must be set for tests
7038 (setenv "HOME" "/tmp")
7039 (zero? (system* "nosetests")))))))
7040 (propagated-inputs
7041 `(("python-jupyter-core" ,python-jupyter-core)
7042 ("python-nbformat" ,python-nbformat)
7043 ("python-nbconvert" ,python-nbconvert)
7044 ("python-ipython" ,python-ipython)))
7045 (native-inputs
7046 `(("python-nose" ,python-nose)
7047 ("python-sphinx" ,python-sphinx)
7048 ("python-requests" ,python-requests)))
7049 (home-page "http://jupyter.org/")
7050 (synopsis "Web-based notebook environment for interactive computing")
7051 (description
7052 "The Jupyter HTML notebook is a web-based notebook environment for
7053interactive computing.")
7054 (properties `((python2-variant . ,(delay python2-notebook))))
7055 (license license:bsd-3)))
7056
7057(define-public python2-notebook
7058 (let ((base (package-with-python2
7059 (strip-python2-variant python-notebook))))
7060 (package (inherit base)
7061 (native-inputs
7062 `(("python2-mock" ,python2-mock)
7063 ,@(package-native-inputs base)))
7064 (arguments
7065 (substitute-keyword-arguments (package-arguments base)
7066 ((#:phases phases)
7067 `(modify-phases ,phases
7068 (add-before 'check 'disable-test-case
7069 ;; The test requires network access to localhost. Curiously it
7070 ;; fails with Python 2 only. Simply make the test-case return
7071 ;; immediately.
7072 (lambda _
7073 (substitute*
7074 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7075 (("formats = self.nbconvert_api") "return #")))))))))))
7076
7077(define-public python-widgetsnbextension
7078 (package
7079 (name "python-widgetsnbextension")
7080 (version "1.2.6")
7081 (source
7082 (origin
7083 (method url-fetch)
7084 (uri (pypi-uri "widgetsnbextension" version))
7085 (sha256
7086 (base32
7087 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
7088 (build-system python-build-system)
7089 (propagated-inputs
7090 `(("python-notebook" ,python-notebook)))
7091 (native-inputs
7092 `(("python-certifi" ,python-certifi)
7093 ("python-nose" ,python-nose)))
7094 (home-page "https://ipython.org")
7095 (synopsis "IPython HTML widgets for Jupyter")
7096 (description "This package provides interactive HTML widgets for Jupyter
7097notebooks.")
7098 (license license:bsd-3)))
7099
7100(define-public python2-widgetsnbextension
7101 (package-with-python2 python-widgetsnbextension))
7102
7103(define-public python-ipywidgets
7104 (package
7105 (name "python-ipywidgets")
7106 (version "5.2.2")
7107 (source
7108 (origin
7109 (method url-fetch)
7110 (uri (pypi-uri "ipywidgets" version))
7111 (sha256
7112 (base32
7113 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7114 (build-system python-build-system)
7115 ;; FIXME: it's not clear how to run the tests.
7116 (arguments `(#:tests? #f))
7117 (propagated-inputs
7118 `(("python-ipykernel" ,python-ipykernel)
7119 ("python-ipython" ,python-ipython)
7120 ("python-traitlets" ,python-traitlets)
7121 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7122 (home-page "https://ipython.org")
7123 (synopsis "IPython HTML widgets for Jupyter")
7124 (description "Ipywidgets are interactive HTML widgets for Jupyter
7125notebooks and the IPython kernel. Notebooks come alive when interactive
7126widgets are used. Users gain control of their data and can visualize changes
7127in the data.")
7128 (license license:bsd-3)))
7129
7130(define-public python2-ipywidgets
7131 (package-with-python2 python-ipywidgets))
7132
7133(define-public python-jupyter-console
7134 (package
7135 (name "python-jupyter-console")
7136 (version "5.2.0")
7137 (source
7138 (origin
7139 (method url-fetch)
7140 (uri (pypi-uri "jupyter_console" version))
7141 (sha256
7142 (base32
7143 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7144 (build-system python-build-system)
7145 ;; FIXME: it's not clear how to run the tests.
7146 (arguments `(#:tests? #f))
7147 (propagated-inputs
7148 `(("python-ipykernel" ,python-ipykernel)
7149 ("python-ipython" ,python-ipython)
7150 ("python-jupyter-client" ,python-jupyter-client)
7151 ("python-prompt-toolkit" ,python-prompt-toolkit)
7152 ("python-pygments" ,python-pygments)))
7153 (home-page "https://jupyter.org")
7154 (synopsis "Jupyter terminal console")
7155 (description "This package provides a terminal-based console frontend for
7156Jupyter kernels. It also allows for console-based interaction with non-Python
7157Jupyter kernels such as IJulia and IRKernel.")
7158 (license license:bsd-3)))
7159
7160(define-public python2-jupyter-console
7161 (package-with-python2 python-jupyter-console))
7162
7163;; The python-ipython and python-jupyter-console require each other. To get
7164;; the functionality in both packages working, strip down the
7165;; python-jupyter-console package when using it as an input to python-ipython.
7166(define python-jupyter-console-minimal
7167 (package
7168 (inherit python-jupyter-console)
7169 (name "python-jupyter-console-minimal")
7170 (arguments
7171 (substitute-keyword-arguments
7172 (package-arguments python-jupyter-console)
7173 ((#:phases phases)
7174 `(modify-phases ,phases
7175 (add-after 'install 'delete-bin
7176 (lambda* (#:key outputs #:allow-other-keys)
7177 ;; Delete the bin files, to avoid conflicts in profiles
7178 ;; where python-ipython and python-jupyter-console are
7179 ;; both present.
7180 (delete-file-recursively
7181 (string-append
7182 (assoc-ref outputs "out") "/bin"))))))))
7183 ;; Remove the python-ipython propagated input, to avoid the cycle
7184 (propagated-inputs
7185 (alist-delete
7186 "python-ipython"
7187 (package-propagated-inputs python-jupyter-console)))))
7188
7189(define-public jupyter
7190 (package
7191 (name "jupyter")
7192 (version "1.0.0")
7193 (source
7194 (origin
7195 (method url-fetch)
7196 (uri (pypi-uri "jupyter" version))
7197 (sha256
7198 (base32
7199 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7200 (build-system python-build-system)
7201 ;; FIXME: it's not clear how to run the tests.
7202 (arguments `(#:tests? #f))
7203 (propagated-inputs
7204 `(("python-ipykernel" ,python-ipykernel)
7205 ("python-ipywidgets" ,python-ipywidgets)
7206 ("python-jupyter-console" ,python-jupyter-console)
7207 ("python-nbconvert" ,python-nbconvert)
7208 ("python-notebook" ,python-notebook)))
7209
7210 (native-search-paths
7211 (list (search-path-specification
7212 (variable "JUPYTER_PATH")
7213 (files '("share/jupyter")))))
7214
7215 (home-page "http://jupyter.org")
7216 (synopsis "Web application for interactive documents")
7217 (description
7218 "The Jupyter Notebook is a web application that allows you to create and
7219share documents that contain live code, equations, visualizations and
7220explanatory text. Uses include: data cleaning and transformation, numerical
7221simulation, statistical modeling, machine learning and much more.")
7222 (license license:bsd-3)))
7223
7224(define-public python-chardet
7225 (package
7226 (name "python-chardet")
7227 (version "3.0.4")
7228 (source
7229 (origin
7230 (method url-fetch)
7231 (uri (pypi-uri "chardet" version))
7232 (sha256
7233 (base32
7234 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7235 (native-inputs
7236 `(("python-hypothesis" ,python-hypothesis)
7237 ("python-pytest" ,python-pytest)
7238 ("python-pytest-runner" ,python-pytest-runner)))
7239 (build-system python-build-system)
7240 (home-page "https://github.com/chardet/chardet")
7241 (synopsis "Universal encoding detector for Python 2 and 3")
7242 (description
7243 "This package provides @code{chardet}, a Python module that can
7244automatically detect a wide range of file encodings.")
7245 (license license:lgpl2.1+)))
7246
7247(define-public python2-chardet
7248 (package-with-python2 python-chardet))
7249
7250(define-public python-docopt
7251 (package
7252 (name "python-docopt")
7253 (version "0.6.2")
7254 (source
7255 (origin
7256 (method url-fetch)
7257 ;; The release on PyPI does not include tests.
7258 (uri (string-append
7259 "https://github.com/docopt/docopt/archive/"
7260 version ".tar.gz"))
7261 (file-name (string-append name "-" version ".tar.gz"))
7262 (sha256
7263 (base32
7264 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7265 (build-system python-build-system)
7266 (native-inputs
7267 `(("python-pytest" ,python-pytest)))
7268 (arguments
7269 `(#:phases
7270 (modify-phases %standard-phases
7271 (replace 'check
7272 (lambda _ (zero? (system* "py.test")))))))
7273 (home-page "http://docopt.org")
7274 (synopsis "Command-line interface description language for Python")
7275 (description "This library allows the user to define a command-line
7276interface from a program's help message rather than specifying it
7277programatically with command-line parsers like @code{getopt} and
7278@code{argparse}.")
7279 (license license:expat)))
7280
7281(define-public python2-docopt
7282 (package-with-python2 python-docopt))
7283
7284(define-public python-pythondialog
7285 (package
7286 (name "python-pythondialog")
7287 (version "3.4.0")
7288 (source
7289 (origin
7290 (method url-fetch)
7291 (uri (pypi-uri "pythondialog" version))
7292 (sha256
7293 (base32
7294 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7295 (build-system python-build-system)
7296 (arguments
7297 `(#:phases
7298 (modify-phases %standard-phases
7299 (add-after 'unpack 'patch-path
7300 (lambda* (#:key inputs #:allow-other-keys)
7301 (let* ((dialog (assoc-ref inputs "dialog")))
7302 ;; Since this library really wants to grovel the search path, we
7303 ;; must hardcode dialog's store path into it.
7304 (substitute* "dialog.py"
7305 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7306 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7307 #t))))
7308 #:tests? #f)) ; no test suite
7309 (propagated-inputs
7310 `(("dialog" ,dialog)))
7311 (home-page "http://pythondialog.sourceforge.net/")
7312 (synopsis "Python interface to the UNIX dialog utility")
7313 (description "A Python wrapper for the dialog utility. Its purpose is to
7314provide an easy to use, pythonic and comprehensive Python interface to dialog.
7315This allows one to make simple text-mode user interfaces on Unix-like systems")
7316 (license license:lgpl2.1)
7317 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7318
7319(define-public python2-pythondialog
7320 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7321 (package
7322 (inherit base)
7323 (version (package-version python-pythondialog))
7324 (source (origin
7325 (method url-fetch)
7326 (uri (pypi-uri "python2-pythondialog" version))
7327 (sha256
7328 (base32
7329 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7330
7331(define-public python-configobj
7332 (package
7333 (name "python-configobj")
7334 (version "5.0.6")
7335 (source (origin
7336 (method url-fetch)
7337 (uri (string-append
7338 "https://pypi.python.org/packages/source/c/configobj/"
7339 "configobj-" version ".tar.gz"))
7340 (sha256
7341 (base32
7342 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7343 ;; Patch setup.py so it looks for python-setuptools, which is
7344 ;; required to parse the keyword 'install_requires' in setup.py.
7345 (patches (search-patches "python-configobj-setuptools.patch"))))
7346 (build-system python-build-system)
7347 (propagated-inputs
7348 `(("python-six" ,python-six)))
7349 (synopsis "Config file reading, writing and validation")
7350 (description "ConfigObj is a simple but powerful config file reader and
7351writer: an ini file round tripper. Its main feature is that it is very easy to
7352use, with a straightforward programmer’s interface and a simple syntax for
7353config files.")
7354 (home-page "https://github.com/DiffSK/configobj")
7355 (license license:bsd-3)))
7356
7357(define-public python2-configobj
7358 (package-with-python2 python-configobj))
7359
7360(define-public python-configargparse
7361 (package
7362 (name "python-configargparse")
7363 (version "0.12.0")
7364 (source (origin
7365 (method url-fetch)
7366 (uri (pypi-uri "ConfigArgParse" version))
7367 (sha256
7368 (base32
7369 "0fgkiqh6r3rbkdq3k8c48m85g52k96686rw3a6jg4lcncrkpvk98"))))
7370 (build-system python-build-system)
7371 (native-inputs
7372 `(("python-pyyaml" ,python-pyyaml)))
7373 (arguments
7374 `(#:phases
7375 (modify-phases %standard-phases
7376 (replace 'check
7377 (lambda _
7378 ;; Bypass setuptools-shim because one test relies on "setup.py"
7379 ;; being the first argument passed to the python call.
7380 ;;
7381 ;; NOTE: Many tests do not run because they rely on Python's
7382 ;; built-in test.test_argparse, but we remove the unit tests from
7383 ;; our Python installation.
7384 (zero? (system* "python" "setup.py" "test")))))))
7385 (synopsis "Replacement for argparse")
7386 (description "A drop-in replacement for argparse that allows options to also
7387be set via config files and/or environment variables.")
7388 (home-page "https://github.com/bw2/ConfigArgParse")
7389 (license license:expat)))
7390
7391(define-public python2-configargparse
7392 (package-with-python2 python-configargparse))
7393
7394(define-public python-argparse-manpage
7395 (package
7396 (name "python-argparse-manpage")
7397 (version "1.1")
7398 (source
7399 (origin
7400 (method url-fetch)
7401 (uri (pypi-uri "argparse-manpage" version))
7402 (sha256
7403 (base32
7404 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
7405 (build-system python-build-system)
7406 (home-page "https://github.com/praiskup/argparse-manpage")
7407 (synopsis "Build manual page from Python's ArgumentParser object")
7408 (description
7409 "This package provides tools to build manual pages from Python's
7410@code{ArgumentParser} object.")
7411 (license license:asl2.0)))
7412
7413(define-public python2-contextlib2
7414 (package
7415 (name "python2-contextlib2")
7416 (version "0.5.5")
7417 (source
7418 (origin
7419 (method url-fetch)
7420 (uri (pypi-uri "contextlib2" version))
7421 (sha256
7422 (base32
7423 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
7424 (build-system python-build-system)
7425 (arguments
7426 `(#:python ,python-2
7427 #:phases
7428 (modify-phases %standard-phases
7429 (replace 'check
7430 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
7431 (native-inputs
7432 `(("python2-unittest2" ,python2-unittest2)))
7433 (home-page "http://contextlib2.readthedocs.org/")
7434 (synopsis "Tools for decorators and context managers")
7435 (description "This module is primarily a backport of the Python
74363.2 contextlib to earlier Python versions. Like contextlib, it
7437provides utilities for common tasks involving decorators and context
7438managers. It also contains additional features that are not part of
7439the standard library.")
7440 (license license:psfl)))
7441
7442(define-public python-texttable
7443 (package
7444 (name "python-texttable")
7445 (version "0.8.7")
7446 (source
7447 (origin
7448 (method url-fetch)
7449 (uri (pypi-uri "texttable" version))
7450 (sha256
7451 (base32
7452 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
7453 (build-system python-build-system)
7454 (arguments '(#:tests? #f)) ; no tests
7455 (home-page "https://github.com/foutaise/texttable/")
7456 (synopsis "Python module for creating simple ASCII tables")
7457 (description "Texttable is a Python module for creating simple ASCII
7458tables.")
7459 (license license:lgpl2.1+)))
7460
7461(define-public python2-texttable
7462 (package-with-python2 python-texttable))
7463
7464(define-public python-atomicwrites
7465 (package
7466 (name "python-atomicwrites")
7467 (version "1.1.5")
7468 (source (origin
7469 (method url-fetch)
7470 (uri (pypi-uri "atomicwrites" version))
7471 (sha256
7472 (base32
7473 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
7474 (build-system python-build-system)
7475 (synopsis "Atomic file writes in Python")
7476 (description "Library for atomic file writes using platform dependent tools
7477for atomic file system operations.")
7478 (home-page "https://github.com/untitaker/python-atomicwrites")
7479 (license license:expat)))
7480
7481(define-public python2-atomicwrites
7482 (package-with-python2 python-atomicwrites))
7483
7484(define-public python-click-threading
7485 (package
7486 (name "python-click-threading")
7487 (version "0.4.4")
7488 (source (origin
7489 (method url-fetch)
7490 (uri (pypi-uri "click-threading" version))
7491 (sha256
7492 (base32
7493 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
7494 (build-system python-build-system)
7495 (propagated-inputs
7496 `(("python-click" ,python-click)))
7497 (synopsis "Utilities for multithreading in Click")
7498 (description "This package provides utilities for multithreading in Click
7499applications.")
7500 (home-page "https://github.com/click-contrib/click-threading")
7501 (license license:expat)))
7502
7503(define-public python-click-log
7504 (package
7505 (name "python-click-log")
7506 (version "0.3.2")
7507 (source (origin
7508 (method url-fetch)
7509 (uri (pypi-uri "click-log" version))
7510 (sha256
7511 (base32
7512 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
7513 (build-system python-build-system)
7514 (propagated-inputs
7515 `(("python-click" ,python-click)))
7516 (synopsis "Logging for click applications")
7517 (description "This package provides a Python library for logging Click
7518applications.")
7519 (home-page "https://github.com/click-contrib/click-log")
7520 (license license:expat)))
7521
7522(define-public python-apipkg
7523 (package
7524 (name "python-apipkg")
7525 (version "1.4")
7526 (source (origin
7527 (method url-fetch)
7528 (uri (pypi-uri "apipkg" version))
7529 (sha256
7530 (base32
7531 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7532 (build-system python-build-system)
7533 (native-inputs
7534 `(("python-pytest" ,python-pytest)))
7535 (synopsis "Namespace control and lazy-import mechanism")
7536 (description "With apipkg you can control the exported namespace of a Python
7537package and greatly reduce the number of imports for your users. It is a small
7538pure Python module that works on virtually all Python versions.")
7539 (home-page "https://github.com/pytest-dev/apipkg")
7540 (license license:expat)))
7541
7542(define-public python2-apipkg
7543 (package-with-python2 python-apipkg))
7544
7545(define-public python-execnet
7546 (package
7547 (name "python-execnet")
7548 (version "1.4.1")
7549 (source (origin
7550 (method url-fetch)
7551 (uri (pypi-uri "execnet" version))
7552 (sha256
7553 (base32
7554 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7555 (build-system python-build-system)
7556 (arguments
7557 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7558 ;; The two test failures are caused by the lack of an `ssh` executable.
7559 ;; The test suite can be run with pytest after the 'install' phase.
7560 #:tests? #f))
7561 (native-inputs
7562 `(("python-pytest" ,python-pytest)
7563 ("python-setuptools-scm" ,python-setuptools-scm)))
7564 (propagated-inputs
7565 `(("python-apipkg" ,python-apipkg)))
7566 (synopsis "Rapid multi-Python deployment")
7567 (description "Execnet provides a share-nothing model with
7568channel-send/receive communication for distributing execution across many
7569Python interpreters across version, platform and network barriers. It has a
7570minimal and fast API targeting the following uses:
7571@enumerate
7572@item distribute tasks to (many) local or remote CPUs
7573@item write and deploy hybrid multi-process applications
7574@item write scripts to administer multiple environments
7575@end enumerate")
7576 (home-page "http://codespeak.net/execnet/")
7577 (license license:expat)))
7578
7579(define-public python2-execnet
7580 (package-with-python2 python-execnet))
7581
7582(define-public python-icalendar
7583 (package
7584 (name "python-icalendar")
7585 (version "4.0.3")
7586 (source (origin
7587 (method url-fetch)
7588 (uri (pypi-uri "icalendar" version))
7589 (sha256
7590 (base32
7591 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
7592 (build-system python-build-system)
7593 (propagated-inputs
7594 `(("python-dateutil" ,python-dateutil)
7595 ("python-pytz" ,python-pytz)))
7596 (synopsis "Python library for parsing iCalendar files")
7597 (description "The icalendar package is a parser/generator of iCalendar
7598files for use with Python.")
7599 (home-page "https://github.com/collective/icalendar")
7600 (license license:bsd-2)))
7601
7602(define-public python-sphinxcontrib-newsfeed
7603 (package
7604 (name "python-sphinxcontrib-newsfeed")
7605 (version "0.1.4")
7606 (source (origin
7607 (method url-fetch)
7608 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7609 (sha256
7610 (base32
7611 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7612 (arguments '(#:tests? #f)) ; No tests.
7613 (build-system python-build-system)
7614 (propagated-inputs
7615 `(("python-sphinx" ,python-sphinx)))
7616 (synopsis "News Feed extension for Sphinx")
7617 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7618Blog, News or Announcements section to a Sphinx website.")
7619 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7620 (license license:bsd-2)))
7621
7622(define-public python-args
7623 (package
7624 (name "python-args")
7625 (version "0.1.0")
7626 (source (origin
7627 (method url-fetch)
7628 (uri (pypi-uri "args" version))
7629 (sha256
7630 (base32
7631 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7632 (build-system python-build-system)
7633 (home-page "https://github.com/kennethreitz/args")
7634 (synopsis "Command-line argument parser")
7635 (description
7636 "This library provides a Python module to parse command-line arguments.")
7637 (license license:bsd-3)))
7638
7639(define-public python2-args
7640 (package-with-python2 python-args))
7641
7642(define-public python-clint
7643 (package
7644 (name "python-clint")
7645 (version "0.5.1")
7646 (source (origin
7647 (method url-fetch)
7648 (uri (pypi-uri "clint" version))
7649 (sha256
7650 (base32
7651 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7652 (build-system python-build-system)
7653 (arguments
7654 '(#:phases
7655 (modify-phases %standard-phases
7656 (replace 'check
7657 (lambda _
7658 (zero? (system* "py.test" "-v")))))))
7659 (native-inputs
7660 `(("python-pytest" ,python-pytest)))
7661 (propagated-inputs
7662 `(("python-args" ,python-args)))
7663 (home-page "https://github.com/kennethreitz/clint")
7664 (synopsis "Command-line interface tools")
7665 (description
7666 "Clint is a Python module filled with a set of tools for developing
7667command-line applications, including tools for colored and indented
7668output, progress bar display, and pipes.")
7669 (license license:isc)))
7670
7671(define-public python2-clint
7672 (package-with-python2 python-clint))
7673
7674(define-public python-astor
7675 (package
7676 (name "python-astor")
7677 (version "0.5")
7678 (source (origin
7679 (method url-fetch)
7680 (uri (pypi-uri "astor" version))
7681 (sha256
7682 (base32
7683 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7684 (build-system python-build-system)
7685 (home-page "https://github.com/berkerpeksag/astor")
7686 (synopsis "Read and write Python ASTs")
7687 (description
7688 "Astor is designed to allow easy manipulation of Python source via the
7689Abstract Syntax Tree.")
7690 (license license:bsd-3)))
7691
7692(define-public python2-astor
7693 (package-with-python2 python-astor))
7694
7695(define-public python-rply
7696 (package
7697 (name "python-rply")
7698 (version "0.7.5")
7699 (source (origin
7700 (method url-fetch)
7701 (uri (pypi-uri "rply" version))
7702 (sha256
7703 (base32
7704 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
7705 (build-system python-build-system)
7706 (propagated-inputs
7707 `(("python-appdirs" ,python-appdirs)))
7708 (home-page "https://github.com/alex/rply")
7709 (synopsis "Parser generator for Python")
7710 (description
7711 "This package provides a pure Python based parser generator, that also
7712works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7713with a new public API, and RPython support.")
7714 (license license:bsd-3)))
7715
7716(define-public python2-rply
7717 (package-with-python2 python-rply))
7718
7719(define-public python-hy
7720 (package
7721 (name "python-hy")
7722 (version "0.13.0")
7723 (source (origin
7724 (method url-fetch)
7725 (uri (pypi-uri "hy" version))
7726 (sha256
7727 (base32
7728 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
7729 (build-system python-build-system)
7730 (arguments
7731 '(#:phases
7732 (modify-phases %standard-phases
7733 (replace 'check
7734 (lambda _
7735 ;; Tests require write access to HOME.
7736 (setenv "HOME" "/tmp")
7737 (zero? (system* "nosetests")))))))
7738 (native-inputs
7739 `(("python-coverage" ,python-coverage)
7740 ("python-nose" ,python-nose)))
7741 (propagated-inputs
7742 `(("python-astor" ,python-astor)
7743 ("python-clint" ,python-clint)
7744 ("python-rply" ,python-rply)))
7745 (home-page "http://hylang.org/")
7746 (synopsis "Lisp frontend to Python")
7747 (description
7748 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7749its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7750Python at your fingertips, in Lisp form.")
7751 (license license:expat)))
7752
7753(define-public python2-hy
7754 (package-with-python2 python-hy))
7755
7756(define-public python2-functools32
7757 (package
7758 (name "python2-functools32")
7759 (version "3.2.3-2")
7760 (source
7761 (origin
7762 (method url-fetch)
7763 (uri (pypi-uri "functools32" version))
7764 (sha256
7765 (base32
7766 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7767 (build-system python-build-system)
7768 (arguments
7769 `(#:python ,python-2
7770 #:tests? #f)) ; no test target
7771 (home-page "https://github.com/MiCHiLU/python-functools32")
7772 (synopsis
7773 "Backport of the functools module from Python 3.2.3")
7774 (description
7775 "This package is a backport of the @code{functools} module from Python
77763.2.3 for use with older versions of Python and PyPy.")
7777 (license license:expat)))
7778
7779(define-public python2-subprocess32
7780 (package
7781 (name "python2-subprocess32")
7782 (version "3.2.7")
7783 (source (origin
7784 (method url-fetch)
7785 (uri (pypi-uri "subprocess32" version))
7786 (sha256
7787 (base32
7788 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
7789 (patches
7790 (search-patches "python2-subprocess32-disable-input-test.patch"))))
7791 (build-system python-build-system)
7792 (arguments
7793 `(#:python ,python-2
7794 ;; The test suite fails with Python > 2.7.13:
7795 ;; import test.support
7796 ;; ImportError: No module named support
7797 #:tests? #f
7798 #:phases
7799 (modify-phases %standard-phases
7800 (add-after 'unpack 'patch-/bin/sh
7801 (lambda _
7802 (substitute* '("subprocess32.py"
7803 "test_subprocess32.py")
7804 (("/bin/sh") (which "sh")))
7805 #t)))))
7806 (home-page "https://github.com/google/python-subprocess32")
7807 (synopsis "Backport of the subprocess module from Python 3.2")
7808 (description
7809 "This is a backport of the @code{subprocess} standard library module
7810from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
7811new features. On POSIX systems it is guaranteed to be reliable when used
7812in threaded applications. It includes timeout support from Python 3.3 but
7813otherwise matches 3.2’s API.")
7814 (license license:psfl)))
7815
7816(define-public python2-futures
7817 (package
7818 (name "python2-futures")
7819 (version "3.2.0")
7820 (source
7821 (origin
7822 (method url-fetch)
7823 (uri (pypi-uri "futures" version))
7824 (sha256
7825 (base32
7826 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
7827 (build-system python-build-system)
7828 (arguments `(#:python ,python-2
7829 ;; FIXME: Python 2.7.14 moved the test.support library,
7830 ;; but our package has not yet been adjusted. Enable
7831 ;; tests when the python2 package has been fixed.
7832 #:tests? #f))
7833 (home-page "https://github.com/agronholm/pythonfutures")
7834 (synopsis
7835 "Backport of the concurrent.futures package from Python 3.2")
7836 (description
7837 "The concurrent.futures module provides a high-level interface for
7838asynchronously executing callables. This package backports the
7839concurrent.futures package from Python 3.2")
7840 (license license:bsd-3)))
7841
7842(define-public python-promise
7843 (package
7844 (name "python-promise")
7845 (version "0.4.2")
7846 (source
7847 (origin
7848 (method url-fetch)
7849 (uri (pypi-uri "promise" version))
7850 (sha256
7851 (base32
7852 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7853 (build-system python-build-system)
7854 ;; Tests wants python-futures, which is a python2 only program, and
7855 ;; can't be found by python-promise at test time.
7856 (arguments `(#:tests? #f))
7857 (home-page "https://github.com/syrusakbary/promise")
7858 (synopsis "Promises/A+ implementation for Python")
7859 (description
7860 "Promises/A+ implementation for Python")
7861 (properties `((python2-variant . ,(delay python2-promise))))
7862 (license license:expat)))
7863
7864(define-public python2-promise
7865 (let ((promise (package-with-python2
7866 (strip-python2-variant python-promise))))
7867 (package (inherit promise)
7868 (arguments (substitute-keyword-arguments (package-arguments promise)
7869 ((#:tests? _) #t)))
7870 (native-inputs
7871 `(("python2-futures" ,python2-futures)
7872 ("python2-pytest" ,python2-pytest)
7873 ,@(package-native-inputs promise))))))
7874
7875(define-public python-colorama
7876 (package
7877 (name "python-colorama")
7878 (version "0.3.9")
7879 (source
7880 (origin
7881 (method url-fetch)
7882 (uri (pypi-uri "colorama" version))
7883 (sha256
7884 (base32
7885 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
7886 (build-system python-build-system)
7887 (synopsis "Colored terminal text rendering for Python")
7888 (description "Colorama is a Python library for rendering colored terminal
7889text.")
7890 (home-page "https://pypi.python.org/pypi/colorama")
7891 (license license:bsd-3)))
7892
7893(define-public python2-colorama
7894 (package-with-python2 python-colorama))
7895
7896(define-public python-rsa
7897 (package
7898 (name "python-rsa")
7899 (version "3.4.2")
7900 (source
7901 (origin
7902 (method url-fetch)
7903 (uri (pypi-uri "rsa" version))
7904 (sha256
7905 (base32
7906 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
7907 (build-system python-build-system)
7908 (propagated-inputs
7909 `(("python-pyasn1" ,python-pyasn1)))
7910 (synopsis "Pure-Python RSA implementation")
7911 (description "Python-RSA is a pure-Python RSA implementation. It supports
7912encryption and decryption, signing and verifying signatures, and key
7913generation according to PKCS#1 version 1.5. It can be used as a Python
7914library as well as on the command line.")
7915 (home-page "https://stuvel.eu/rsa")
7916 (license license:asl2.0)))
7917
7918(define-public python2-rsa
7919 (package-with-python2 python-rsa))
7920
7921(define-public python-pluggy
7922 (package
7923 (name "python-pluggy")
7924 (version "0.7.1")
7925 (source
7926 (origin
7927 (method url-fetch)
7928 (uri (pypi-uri "pluggy" version))
7929 (sha256
7930 (base32
7931 "1qbn70mksmr03hac6jgp6fiqc4l7859z8dchx2x950vhlij87swm"))))
7932 (build-system python-build-system)
7933 (native-inputs
7934 `(("python-setuptools-scm" ,python-setuptools-scm)))
7935 (synopsis "Plugin and hook calling mechanism for Python")
7936 (description "Pluggy is an extraction of the plugin manager as used by
7937Pytest but stripped of Pytest specific details.")
7938 (home-page "https://pypi.python.org/pypi/pluggy")
7939 (license license:expat)))
7940
7941(define-public python2-pluggy
7942 (package-with-python2 python-pluggy))
7943
7944(define-public python-tox
7945 (package
7946 (name "python-tox")
7947 (version "2.8.1")
7948 (source
7949 (origin
7950 (method url-fetch)
7951 (uri (pypi-uri "tox" version))
7952 (sha256
7953 (base32
7954 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
7955 (build-system python-build-system)
7956 (arguments
7957 ;; FIXME: Tests require pytest-timeout, which itself requires
7958 ;; pytest>=2.8.0 for installation.
7959 '(#:tests? #f))
7960 (propagated-inputs
7961 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
7962 ("python-py" ,python-py)
7963 ("python-virtualenv" ,python-virtualenv)))
7964 (native-inputs
7965 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
7966 ("python-pytest" ,python-pytest) ; >= 2.3.5
7967 ("python-setuptools-scm" ,python-setuptools-scm)))
7968 (home-page "http://tox.testrun.org/")
7969 (synopsis "Virtualenv-based automation of test activities")
7970 (description "Tox is a generic virtualenv management and test command line
7971tool. It can be used to check that a package installs correctly with
7972different Python versions and interpreters, or run tests in each type of
7973supported environment, or act as a frontend to continuous integration
7974servers.")
7975 (license license:expat)))
7976
7977(define-public python2-tox
7978 (package-with-python2 python-tox))
7979
7980(define-public python-jmespath
7981 (package
7982 (name "python-jmespath")
7983 (version "0.9.3")
7984 (source
7985 (origin
7986 (method url-fetch)
7987 (uri (pypi-uri "jmespath" version))
7988 (sha256
7989 (base32
7990 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
7991 (build-system python-build-system)
7992 (native-inputs
7993 `(("python-nose" ,python-nose)))
7994 (synopsis "JSON Matching Expressions")
7995 (description "JMESPath (pronounced “james path”) is a Python library that
7996allows one to declaratively specify how to extract elements from a JSON
7997document.")
7998 (home-page "https://github.com/jmespath/jmespath.py")
7999 (license license:expat)))
8000
8001(define-public python2-jmespath
8002 (package-with-python2 python-jmespath))
8003
8004(define-public python-botocore
8005 (package
8006 (name "python-botocore")
8007 (version "1.8.43")
8008 (source
8009 (origin
8010 (method url-fetch)
8011 (uri (pypi-uri "botocore" version))
8012 (sha256
8013 (base32
8014 "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg"))))
8015 (build-system python-build-system)
8016 (arguments
8017 ;; FIXME: Many tests are failing.
8018 '(#:tests? #f))
8019 (propagated-inputs
8020 `(("python-dateutil" ,python-dateutil)
8021 ("python-docutils" ,python-docutils)
8022 ("python-jmespath" ,python-jmespath)))
8023 (native-inputs
8024 `(("python-mock" ,python-mock)
8025 ("python-nose" ,python-nose)
8026 ("behave" ,behave)
8027 ("python-tox" ,python-tox)
8028 ("python-wheel" ,python-wheel)))
8029 (home-page "https://github.com/boto/botocore")
8030 (synopsis "Low-level interface to AWS")
8031 (description "Botocore is a Python library that provides a low-level
8032interface to the Amazon Web Services (AWS) API.")
8033 (license license:asl2.0)))
8034
8035(define-public python2-botocore
8036 (package-with-python2 python-botocore))
8037
8038(define-public python-xdo
8039 (package
8040 (name "python-xdo")
8041 (version "0.3")
8042 (source (origin
8043 (method url-fetch)
8044 (uri (string-append
8045 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8046 "python-xdo_" version ".orig.tar.gz"))
8047 (sha256
8048 (base32
8049 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8050 (build-system python-build-system)
8051 (arguments
8052 '(#:phases
8053 (modify-phases %standard-phases
8054 (add-before 'install 'patch-libxdo-path
8055 ;; Hardcode the path of dynamically loaded libxdo library.
8056 (lambda* (#:key inputs #:allow-other-keys)
8057 (let ((libxdo (string-append
8058 (assoc-ref inputs "xdotool")
8059 "/lib/libxdo.so")))
8060 (substitute* "xdo/_xdo.py"
8061 (("find_library\\(\"xdo\"\\)")
8062 (simple-format #f "\"~a\"" libxdo)))
8063 #t))))
8064 #:tests? #f)) ; no tests provided
8065 (propagated-inputs
8066 `(("python-six" ,python-six)))
8067 (inputs
8068 `(("xdotool" ,xdotool)
8069 ("libX11" ,libx11)))
8070 (home-page "https://tracker.debian.org/pkg/python-xdo")
8071 (synopsis "Python library for simulating X11 keyboard/mouse input")
8072 (description "Provides bindings to libxdo for manipulating X11 via simulated
8073input. (Note that this is mostly a legacy library; you may wish to look at
8074python-xdo for newer bindings.)")
8075 (license license:bsd-3)))
8076
8077(define-public python2-xdo
8078 (package-with-python2 python-xdo))
8079
8080(define-public python-mako
8081 (package
8082 (name "python-mako")
8083 (version "1.0.7")
8084 (source
8085 (origin
8086 (method url-fetch)
8087 (uri (pypi-uri "Mako" version))
8088 (sha256
8089 (base32
8090 "1bi5gnr8r8dva06qpyx4kgjc6spm2k1y908183nbbaylggjzs0jf"))))
8091 (build-system python-build-system)
8092 (propagated-inputs
8093 `(("python-markupsafe" ,python-markupsafe)))
8094 (native-inputs
8095 `(("python-mock" ,python-mock)
8096 ("python-nose" ,python-nose)
8097 ("python-pytest" ,python-pytest)))
8098 (home-page "http://www.makotemplates.org/")
8099 (synopsis "Templating language for Python")
8100 (description "Mako is a templating language for Python that compiles
8101templates into Python modules.")
8102 (license license:expat)))
8103
8104(define-public python2-mako
8105 (package-with-python2 python-mako))
8106
8107(define-public python-waitress
8108 (package
8109 (name "python-waitress")
8110 (version "1.1.0")
8111 (source
8112 (origin
8113 (method url-fetch)
8114 (uri (pypi-uri "waitress" version))
8115 (patches (search-patches "python-waitress-fix-tests.patch"))
8116 (sha256
8117 (base32
8118 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8119 (build-system python-build-system)
8120 (home-page "https://github.com/Pylons/waitress")
8121 (synopsis "Waitress WSGI server")
8122 (description "Waitress is meant to be a production-quality pure-Python WSGI
8123server with very acceptable performance.")
8124 (license license:zpl2.1)))
8125
8126(define-public python2-waitress
8127 (package-with-python2 python-waitress))
8128
8129(define-public python-pyquery
8130 (package
8131 (name "python-pyquery")
8132 (version "1.2.17")
8133 (source
8134 (origin
8135 (method url-fetch)
8136 (uri (pypi-uri "pyquery" version))
8137 (sha256
8138 (base32
8139 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8140 (build-system python-build-system)
8141 (native-inputs
8142 `(("python-webob" ,python-webob)
8143 ("python-webtest" ,python-webtest)))
8144 (propagated-inputs
8145 `(("python-lxml" ,python-lxml)
8146 ("python-cssselect" ,python-cssselect)))
8147 (home-page "https://github.com/gawel/pyquery")
8148 (synopsis "Make jQuery-like queries on xml documents")
8149 (description "pyquery allows you to make jQuery queries on xml documents.
8150The API is as much as possible the similar to jQuery. pyquery uses lxml for
8151fast xml and html manipulation.")
8152 (license license:bsd-3)))
8153
8154(define-public python2-pyquery
8155 (package-with-python2 python-pyquery))
8156
8157(define-public python-anyjson
8158 (package
8159 (name "python-anyjson")
8160 (version "0.3.3")
8161 (source
8162 (origin
8163 (method url-fetch)
8164 (uri (pypi-uri "anyjson" version))
8165 (sha256
8166 (base32
8167 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8168 (build-system python-build-system)
8169 (arguments
8170 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8171 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8172 ;; whatever) so this transformation needs to be done before the tests
8173 ;; can be run. Maybe we could add a build step to transform beforehand
8174 ;; but it could be annoying/difficult.
8175 ;; We can enable tests for the Python 2 version, though, and do below.
8176 #:tests? #f))
8177 (home-page "https://bitbucket.org/runeh/anyjson/")
8178 (synopsis
8179 "Wraps best available JSON implementation in a common interface")
8180 (description
8181 "Anyjson loads whichever is the fastest JSON module installed
8182and provides a uniform API regardless of which JSON implementation is used.")
8183 (license license:bsd-3)
8184 (properties `((python2-variant . ,(delay python2-anyjson))))))
8185
8186(define-public python2-anyjson
8187 (let ((anyjson (package-with-python2
8188 (strip-python2-variant python-anyjson))))
8189 (package
8190 (inherit anyjson)
8191 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8192 #:tests? #t
8193 ,@(package-arguments anyjson)))
8194 (native-inputs `(("python2-nose" ,python2-nose))))))
8195
8196(define-public python-amqp
8197 (package
8198 (name "python-amqp")
8199 (version "1.4.9")
8200 (source
8201 (origin
8202 (method url-fetch)
8203 (uri (pypi-uri "amqp" version))
8204 (sha256
8205 (base32
8206 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
8207 (build-system python-build-system)
8208 (native-inputs
8209 `(("python-nose" ,python-nose)
8210 ("python-mock" ,python-mock)))
8211 (home-page "https://github.com/celery/py-amqp")
8212 (synopsis
8213 "Low-level AMQP client for Python (fork of amqplib)")
8214 (description
8215 "This is a fork of amqplib which was originally written by Barry Pederson.
8216It is maintained by the Celery project, and used by kombu as a pure python
8217alternative when librabbitmq is not available.")
8218 (license license:lgpl2.1+)
8219 (properties `((python2-variant . ,(delay python2-amqp))))))
8220
8221(define-public python2-amqp
8222 (let ((amqp (package-with-python2
8223 (strip-python2-variant python-amqp))))
8224 (package
8225 (inherit amqp)
8226 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8227 ;; unmaintained. Weirdly, does not do this on the python 3
8228 ;; version?
8229 #:tests? #f
8230 ,@(package-arguments amqp))))))
8231
8232(define-public python-txamqp
8233 (package
8234 (name "python-txamqp")
8235 (version "0.8.2")
8236 (source
8237 (origin
8238 (method url-fetch)
8239 (uri (pypi-uri "txAMQP" version))
8240 (sha256
8241 (base32
8242 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8243 (build-system python-build-system)
8244 (propagated-inputs
8245 `(("python-six" ,python-six)
8246 ("python-twisted" ,python-twisted)))
8247 (home-page "https://github.com/txamqp/txamqp")
8248 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8249 (description
8250 "This package provides a Python library for communicating with AMQP peers
8251and brokers using the asynchronous networking framework Twisted. It contains
8252all the necessary code to connect, send and receive messages to/from an
8253AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8254also includes support for using Thrift RPC over AMQP in Twisted
8255applications.")
8256 (license license:asl2.0)))
8257
8258(define-public python2-txamqp
8259 (package-with-python2 python-txamqp))
8260
8261(define-public python-kombu
8262 (package
8263 (name "python-kombu")
8264 (version "3.0.37")
8265 (source
8266 (origin
8267 (method url-fetch)
8268 (uri (pypi-uri "kombu" version))
8269 (sha256
8270 (base32
8271 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
8272 (build-system python-build-system)
8273 (native-inputs
8274 `(("python-mock" ,python-mock)
8275 ("python-nose" ,python-nose)))
8276 (propagated-inputs
8277 `(("python-anyjson" ,python-anyjson)
8278 ("python-amqp" ,python-amqp)
8279 ("python-redis" ,python-redis)))
8280 (home-page "http://kombu.readthedocs.org")
8281 (synopsis "Message passing library for Python")
8282 (description "The aim of Kombu is to make messaging in Python as easy as
8283possible by providing an idiomatic high-level interface for the AMQ protocol,
8284and also provide proven and tested solutions to common messaging problems.
8285AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8286message orientation, queuing, routing, reliability and security, for which the
8287RabbitMQ messaging server is the most popular implementation.")
8288 (license license:bsd-3)
8289 (properties `((python2-variant . ,(delay python2-kombu))))))
8290
8291(define-public python2-kombu
8292 (let ((kombu (package-with-python2
8293 (strip-python2-variant python-kombu))))
8294 (package
8295 (inherit kombu)
8296 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8297 ;; It works fine on the python3 variant.
8298 #:tests? #f
8299 ,@(package-arguments kombu)))
8300 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8301 ,@(package-native-inputs kombu))))))
8302
8303(define-public python-billiard
8304 (package
8305 (name "python-billiard")
8306 (version "3.3.0.23")
8307 (source
8308 (origin
8309 (method url-fetch)
8310 (uri (pypi-uri "billiard" version))
8311 (sha256
8312 (base32
8313 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
8314 (build-system python-build-system)
8315 (native-inputs
8316 `(("python-nose" ,python-nose)))
8317 (home-page "https://github.com/celery/billiard")
8318 (synopsis
8319 "Python multiprocessing fork with improvements and bugfixes")
8320 (description
8321 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8322multiprocessing package itself is a renamed and updated version of R Oudkerk's
8323pyprocessing package. This standalone variant is intended to be compatible with
8324Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8325 (license license:bsd-3)
8326 (properties `((python2-variant . ,(delay python2-billiard))))))
8327
8328(define-public python2-billiard
8329 (let ((billiard (package-with-python2
8330 (strip-python2-variant python-billiard))))
8331 (package
8332 (inherit billiard)
8333 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8334 ("python2-mock" ,python2-mock)
8335 ,@(package-native-inputs billiard))))))
8336
8337(define-public python-celery
8338 (package
8339 (name "python-celery")
8340 (version "3.1.24")
8341 (source
8342 (origin
8343 (method url-fetch)
8344 (uri (pypi-uri "celery" version))
8345 (sha256
8346 (base32
8347 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
8348 (build-system python-build-system)
8349 (arguments
8350 `(#:phases
8351 (modify-phases %standard-phases
8352 ;; These tests break with Python 3.5:
8353 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
8354 (replace 'check
8355 (lambda _
8356 (zero?
8357 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
8358 (native-inputs
8359 `(("python-nose" ,python-nose)))
8360 (propagated-inputs
8361 `(("python-pytz" ,python-pytz)
8362 ("python-billiard" ,python-billiard)
8363 ("python-kombu" ,python-kombu)))
8364 (home-page "http://celeryproject.org")
8365 (synopsis "Distributed Task Queue")
8366 (description "Celery is an asynchronous task queue/job queue based on
8367distributed message passing. It is focused on real-time operation, but
8368supports scheduling as well. The execution units, called tasks, are executed
8369concurrently on a single or more worker servers using multiprocessing,
8370Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8371synchronously (wait until ready).")
8372 (license license:bsd-3)
8373 (properties `((python2-variant . ,(delay python2-celery))))))
8374
8375(define-public python2-celery
8376 (let ((celery (package-with-python2
8377 (strip-python2-variant python-celery))))
8378 (package
8379 (inherit celery)
8380 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8381 ("python2-mock" ,python2-mock)
8382 ,@(package-native-inputs celery))))))
8383
8384(define-public python-translitcodec
8385 (package
8386 (name "python-translitcodec")
8387 (version "0.4.0")
8388 (source
8389 (origin
8390 (method url-fetch)
8391 (uri (pypi-uri "translitcodec" version))
8392 (sha256
8393 (base32
8394 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8395 (build-system python-build-system)
8396 (arguments
8397 `(#:tests? #f)) ; no tests provided
8398 (home-page
8399 "https://github.com/claudep/translitcodec")
8400 (synopsis
8401 "Unicode to 8-bit charset transliteration codec")
8402 (description
8403 "This package contains codecs for transliterating ISO 10646 texts into
8404best-effort representations using smaller coded character sets (ASCII,
8405ISO 8859, etc.).")
8406 (license license:expat)))
8407
8408(define-public python2-translitcodec
8409 (package-with-python2 python-translitcodec))
8410
8411(define-public python-editor
8412 (package
8413 (name "python-editor")
8414 (version "0.5")
8415 (source
8416 (origin
8417 (method url-fetch)
8418 (uri (pypi-uri "python-editor" version))
8419 (sha256
8420 (base32
8421 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8422 (build-system python-build-system)
8423 (home-page
8424 "https://github.com/fmoo/python-editor")
8425 (synopsis
8426 "Programmatically open an editor, capture the result")
8427 (description
8428 "python-editor is a library that provides the editor module for
8429programmatically interfacing with your system's $EDITOR.")
8430 (license license:asl2.0)))
8431
8432(define-public python2-editor
8433 (package-with-python2 python-editor))
8434
8435(define-public python-sphinxcontrib-programoutput
8436 (package
8437 (name "python-sphinxcontrib-programoutput")
8438 (version "0.10")
8439 (source (origin
8440 (method url-fetch)
8441 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8442 (sha256
8443 (base32
8444 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
8445 (build-system python-build-system)
8446 (arguments
8447 ;; FIXME: Many tests are failing and the upstream is gone.
8448 '(#:tests? #f))
8449 (propagated-inputs
8450 `(("python-sphinx" ,python-sphinx)))
8451 (synopsis "Sphinx extension to include program output")
8452 (description "A Sphinx extension to literally insert the output of arbitrary
8453commands into documents, helping you to keep your command examples up to date.")
8454 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8455 (license license:bsd-2)))
8456
8457(define-public python2-sphinxcontrib-programoutput
8458 (package-with-python2 python-sphinxcontrib-programoutput))
8459
8460(define-public python-sphinx-repoze-autointerface
8461 (package
8462 (name "python-sphinx-repoze-autointerface")
8463 (version "0.8")
8464 (source (origin
8465 (method url-fetch)
8466 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8467 (sha256
8468 (base32
8469 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8470 (build-system python-build-system)
8471 (arguments '(#:tests? #f)) ; No tests.
8472 (propagated-inputs
8473 `(("python-sphinx" ,python-sphinx)
8474 ("python-zope-interface" ,python-zope-interface)))
8475 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8476 (description "This package defines an extension for the Sphinx documentation
8477system. The extension allows generation of API documentation by
8478introspection of @code{zope.interface} instances in code.")
8479 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8480 (license license:repoze)))
8481
8482(define-public python2-sphinx-repoze-autointerface
8483 (package-with-python2 python-sphinx-repoze-autointerface))
8484
8485(define-public python-vobject
8486 (package
8487 (name "python-vobject")
8488 (version "0.9.5")
8489 (source (origin
8490 (method url-fetch)
8491 (uri (pypi-uri "vobject" version))
8492 (sha256
8493 (base32
8494 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
8495 (build-system python-build-system)
8496 (arguments
8497 '(;; The test suite relies on some non-portable Windows interfaces.
8498 #:tests? #f))
8499 (propagated-inputs
8500 `(("python-dateutil" ,python-dateutil)
8501 ("python-pyicu" ,python-pyicu)))
8502 (synopsis "Parse and generate vCard and vCalendar files")
8503 (description "Vobject is intended to be a full featured Python package for
8504parsing and generating vCard and vCalendar files. Currently, iCalendar files
8505are supported and well tested. vCard 3.0 files are supported, and all data
8506should be imported, but only a few components are understood in a sophisticated
8507way.")
8508 (home-page "http://eventable.github.io/vobject/")
8509 (license license:asl2.0)))
8510
8511(define-public python2-vobject
8512 (package-with-python2 python-vobject))
8513
8514(define-public python-munkres
8515 (package
8516 (name "python-munkres")
8517 (version "1.0.8")
8518 (source (origin
8519 (method url-fetch)
8520 (uri (pypi-uri "munkres" version))
8521 (sha256
8522 (base32
8523 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
8524 (build-system python-build-system)
8525 (arguments
8526 '(#:tests? #f)) ; no test suite
8527 (home-page "http://software.clapper.org/munkres/")
8528 (synopsis "Implementation of the Munkres algorithm")
8529 (description "The Munkres module provides an implementation of the Munkres
8530algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8531useful for solving the Assignment Problem.")
8532 (license license:bsd-3)))
8533
8534(define-public python2-munkres
8535 (package-with-python2 python-munkres))
8536
8537(define-public python-whoosh
8538 (package
8539 (name "python-whoosh")
8540 (version "2.7.4")
8541 (source
8542 (origin
8543 (method url-fetch)
8544 (uri (pypi-uri "Whoosh" version))
8545 (sha256
8546 (base32
8547 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8548 (build-system python-build-system)
8549 (native-inputs
8550 `(("python-pytest" ,python-pytest)))
8551 (home-page "https://bitbucket.org/mchaput/whoosh")
8552 (synopsis "Full text indexing, search, and spell checking library")
8553 (description
8554 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8555checking library.")
8556 (license license:bsd-2)))
8557
8558(define-public python2-whoosh
8559 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8560 (package (inherit whoosh)
8561 (propagated-inputs
8562 `(("python2-backport-ssl-match-hostname"
8563 ,python2-backport-ssl-match-hostname)
8564 ,@(package-propagated-inputs whoosh))))))
8565
8566(define-public python-pathlib
8567 (package
8568 (name "python-pathlib")
8569 (version "1.0.1")
8570 (source (origin
8571 (method url-fetch)
8572 (uri (pypi-uri "pathlib" version))
8573 (sha256
8574 (base32
8575 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8576 (build-system python-build-system)
8577 ;; The tests depend on the internal "test" module, which does not provide
8578 ;; a stable interface.
8579 (arguments `(#:tests? #f))
8580 (home-page "https://pathlib.readthedocs.org/")
8581 (synopsis "Object-oriented file system paths")
8582 (description "Pathlib offers a set of classes to handle file system paths.
8583It offers the following advantages over using string objects:
8584
8585@enumerate
8586@item No more cumbersome use of os and os.path functions. Everything can
8587be done easily through operators, attribute accesses, and method calls.
8588@item Embodies the semantics of different path types. For example,
8589comparing Windows paths ignores casing.
8590@item Well-defined semantics, eliminating any inconsistencies or
8591ambiguities (forward vs. backward slashes, etc.).
8592@end enumerate
8593
8594Note: In Python 3.4, pathlib is now part of the standard library. For other
8595Python versions please consider python-pathlib2 instead, which tracks the
8596standard library module. This module (python-pathlib) isn't maintained
8597anymore.")
8598 (license license:expat)))
8599
8600(define-public python2-pathlib
8601 (package-with-python2 python-pathlib))
8602
8603(define-public python2-pathlib2
8604 (package
8605 (name "python2-pathlib2")
8606 (version "2.3.2")
8607 (source (origin
8608 (method url-fetch)
8609 (uri (pypi-uri "pathlib2" version))
8610 (sha256
8611 (base32
8612 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
8613 (build-system python-build-system)
8614 ;; We only need the the Python 2 variant, since for Python 3 our minimum
8615 ;; version is 3.4 which already includes this package as part of the
8616 ;; standard library.
8617 (arguments
8618 `(#:python ,python-2))
8619 (propagated-inputs
8620 `(("python2-scandir" ,python2-scandir)
8621 ("python2-six" ,python2-six)))
8622 (home-page "https://pypi.python.org/pypi/pathlib2/")
8623 (synopsis "Object-oriented file system paths - backport of standard
8624pathlib module")
8625 (description "The goal of pathlib2 is to provide a backport of standard
8626pathlib module which tracks the standard library module, so all the newest
8627features of the standard pathlib can be used also on older Python versions.
8628
8629Pathlib offers a set of classes to handle file system paths. It offers the
8630following advantages over using string objects:
8631
8632@enumerate
8633@item No more cumbersome use of os and os.path functions. Everything can
8634be done easily through operators, attribute accesses, and method calls.
8635@item Embodies the semantics of different path types. For example,
8636comparing Windows paths ignores casing.
8637@item Well-defined semantics, eliminating any inconsistencies or
8638ambiguities (forward vs. backward slashes, etc.).
8639@end enumerate")
8640 (license license:expat)))
8641
8642(define-public python2-pathlib2-bootstrap
8643 (hidden-package
8644 (package
8645 (inherit python2-pathlib2)
8646 (name "python2-pathlib2-bootstrap")
8647 (propagated-inputs
8648 `(("python2-scandir" ,python2-scandir)
8649 ("python2-six" ,python2-six-bootstrap))))))
8650
8651(define-public python-jellyfish
8652 (package
8653 (name "python-jellyfish")
8654 (version "0.5.6")
8655 (source (origin
8656 (method url-fetch)
8657 (uri (pypi-uri "jellyfish" version))
8658 (sha256
8659 (base32
8660 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
8661 (build-system python-build-system)
8662 (native-inputs
8663 `(("python-pytest" ,python-pytest)))
8664 (home-page "https://github.com/jamesturk/jellyfish")
8665 (synopsis "Approximate and phonetic matching of strings")
8666 (description "Jellyfish uses a variety of string comparison and phonetic
8667encoding algorithms to do fuzzy string matching.")
8668 (license license:bsd-2)
8669 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8670
8671(define-public python2-jellyfish
8672 (let ((jellyfish (package-with-python2
8673 (strip-python2-variant python-jellyfish))))
8674 (package (inherit jellyfish)
8675 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
8676 ,@(package-native-inputs jellyfish))))))
8677
8678(define-public python2-unicodecsv
8679 (package
8680 (name "python2-unicodecsv")
8681 (version "0.14.1")
8682 (source (origin
8683 (method url-fetch)
8684 ;; The test suite is not included in the PyPi release.
8685 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8686 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8687 "archive/" version ".tar.gz"))
8688 (file-name (string-append name "-" version ".tar.gz"))
8689 (sha256
8690 (base32
8691 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8692 (build-system python-build-system)
8693 (arguments
8694 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8695 #:python ,python-2))
8696 (native-inputs
8697 `(("python2-unittest2" ,python2-unittest2)))
8698 (home-page "https://github.com/jdunck/python-unicodecsv")
8699 (synopsis "Unicode CSV module for Python 2")
8700 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8701module, adding support for Unicode strings.")
8702 (license license:bsd-2)))
8703
8704(define-public python-rarfile
8705 (package
8706 (name "python-rarfile")
8707 (version "2.8")
8708 (source (origin
8709 (method url-fetch)
8710 (uri (pypi-uri "rarfile" version))
8711 (sha256
8712 (base32
8713 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
8714 (build-system python-build-system)
8715 (arguments
8716 '(#:phases
8717 (modify-phases %standard-phases
8718 (replace 'check
8719 ;; Many tests fail, but the installation proceeds.
8720 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
8721 (native-inputs
8722 `(("which" ,which))) ; required for tests
8723 (propagated-inputs
8724 `(("libarchive" ,libarchive)))
8725 (home-page "https://github.com/markokr/rarfile")
8726 (synopsis "RAR archive reader for Python")
8727 (description "This is Python module for RAR archive reading. The interface
8728is made as zipfile like as possible.")
8729 (license license:isc)))
8730
8731(define-public python2-rarfile
8732 (package-with-python2 python-rarfile))
8733
8734(define-public python-magic
8735 (package
8736 (name "python-magic")
8737 (version "0.4.15")
8738 (source
8739 (origin
8740 (method url-fetch)
8741 (uri (pypi-uri "python-magic" version))
8742 (sha256
8743 (base32
8744 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
8745 (file-name (string-append name "-" version "-checkout"))))
8746 (build-system python-build-system)
8747 (arguments
8748 ;; The tests are unreliable, so don't run them. The tests fail
8749 ;; under Python3 because they were written for Python2 and
8750 ;; contain import statements that do not work in Python3. One of
8751 ;; the tests fails under Python2 because its assertions are
8752 ;; overly stringent; it relies on comparing output strings which
8753 ;; are brittle and can change depending on the version of
8754 ;; libmagic being used and the system on which the test is
8755 ;; running. In my case, under GuixSD 0.10.0, only one test
8756 ;; failed, and it seems to have failed only because the version
8757 ;; of libmagic that is packaged in Guix outputs a slightly
8758 ;; different (but not wrong) string than the one that the test
8759 ;; expected.
8760 '(#:tests? #f
8761 #:phases (modify-phases %standard-phases
8762 ;; Replace a specific method call with a hard-coded
8763 ;; path to the necessary libmagic.so file in the
8764 ;; store. If we don't do this, then the method call
8765 ;; will fail to find the libmagic.so file, which in
8766 ;; turn will cause any application using
8767 ;; python-magic to fail.
8768 (add-before 'build 'hard-code-path-to-libmagic
8769 (lambda* (#:key inputs #:allow-other-keys)
8770 (let ((file (assoc-ref inputs "file")))
8771 (substitute* "magic.py"
8772 (("ctypes.util.find_library\\('magic'\\)")
8773 (string-append "'" file "/lib/libmagic.so'")))
8774 #t)))
8775 (add-before 'install 'disable-egg-compression
8776 (lambda _
8777 (let ((port (open-file "setup.cfg" "a")))
8778 (display "\n[easy_install]\nzip_ok = 0\n"
8779 port)
8780 (close-port port)
8781 #t))))))
8782 (inputs
8783 ;; python-magic needs to be able to find libmagic.so.
8784 `(("file" ,file)))
8785 (home-page
8786 "https://github.com/ahupp/python-magic")
8787 (synopsis
8788 "File type identification using libmagic")
8789 (description
8790 "This module uses ctypes to access the libmagic file type
8791identification library. It makes use of the local magic database and
8792supports both textual and MIME-type output. Note that this module and
8793the python-file module both provide a \"magic.py\" file; these two
8794modules, which are different and were developed separately, both serve
8795the same purpose: to provide Python bindings for libmagic.")
8796 (license license:expat)))
8797
8798(define-public python2-magic
8799 (package-with-python2 python-magic))
8800
8801(define-public python2-s3cmd
8802 (package
8803 (name "python2-s3cmd")
8804 (version "1.6.1")
8805 (source
8806 (origin
8807 (method url-fetch)
8808 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
8809 "s3cmd-" version ".tar.gz"))
8810 (sha256
8811 (base32
8812 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8813 (build-system python-build-system)
8814 (arguments
8815 ;; s3cmd is written for python2 only and contains no tests.
8816 `(#:python ,python-2
8817 #:tests? #f))
8818 (propagated-inputs
8819 `(("python2-dateutil" ,python2-dateutil)
8820 ;; The python-file package also provides a magic.py module.
8821 ;; This is an unfortunate state of affairs; however, s3cmd
8822 ;; fails to install if it cannot find specifically the
8823 ;; python-magic package. Thus we include it, instead of using
8824 ;; python-file. Ironically, s3cmd sometimes works better
8825 ;; without libmagic bindings at all:
8826 ;; https://github.com/s3tools/s3cmd/issues/198
8827 ("python2-magic" ,python2-magic)))
8828 (home-page "http://s3tools.org/s3cmd")
8829 (synopsis "Command line tool for S3-compatible storage services")
8830 (description
8831 "S3cmd is a command line tool for uploading, retrieving and managing data
8832in storage services that are compatible with the Amazon Simple Storage
8833Service (S3) protocol, including S3 itself. It supports rsync-like backup,
8834GnuPG encryption, and more. It also supports management of Amazon's
8835CloudFront content delivery network.")
8836 (license license:gpl2+)))
8837
8838(define-public python-pkgconfig
8839 (package
8840 (name "python-pkgconfig")
8841 (version "1.3.1")
8842 (source
8843 (origin
8844 (method url-fetch)
8845 (uri (pypi-uri "pkgconfig" version))
8846 (sha256
8847 (base32
8848 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
8849 (build-system python-build-system)
8850 (native-inputs
8851 `(("python-nose" ,python-nose)))
8852 (inputs
8853 `(("pkg-config" ,pkg-config)))
8854 (arguments
8855 `(#:phases
8856 (modify-phases %standard-phases
8857 (add-before 'build 'patch
8858 ;; Hard-code the path to pkg-config.
8859 (lambda _
8860 (substitute* "pkgconfig/pkgconfig.py"
8861 (("cmd = 'pkg-config")
8862 (string-append "cmd = '" (which "pkg-config"))))
8863 #t))
8864 (replace 'check
8865 (lambda _
8866 (invoke "nosetests" "test.py"))))))
8867 (home-page "https://github.com/matze/pkgconfig")
8868 (synopsis "Python interface for pkg-config")
8869 (description "This module provides a Python interface to pkg-config. It
8870can be used to find all pkg-config packages, check if a package exists,
8871check if a package meets certain version requirements, query CFLAGS and
8872LDFLAGS and parse the output to build extensions with setup.py.")
8873 (license license:expat)))
8874
8875(define-public python2-pkgconfig
8876 (package-with-python2 python-pkgconfig))
8877
8878(define-public python-bz2file
8879 (package
8880 (name "python-bz2file")
8881 (version "0.98")
8882 (source
8883 (origin
8884 (method url-fetch)
8885 (uri (pypi-uri "bz2file" version))
8886 (sha256
8887 (base32
8888 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
8889 (build-system python-build-system)
8890 (arguments
8891 `(#:tests? #f)) ; Tests use deprecated python modules.
8892 (home-page "https://github.com/nvawda/bz2file")
8893 (synopsis "Read and write bzip2-compressed files")
8894 (description
8895 "Bz2file is a Python library for reading and writing bzip2-compressed
8896files. It contains a drop-in replacement for the I/O interface in the
8897standard library's @code{bz2} module, including features from the latest
8898development version of CPython that are not available in older releases.")
8899 (license license:asl2.0)))
8900
8901(define-public python2-bz2file
8902 (package-with-python2 python-bz2file))
8903
8904(define-public python-future
8905 (package
8906 (name "python-future")
8907 (version "0.16.0")
8908 (source
8909 (origin
8910 (method url-fetch)
8911 (uri (pypi-uri "future" version))
8912 (sha256
8913 (base32
8914 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
8915 (build-system python-build-system)
8916 ;; Many tests connect to the network or are otherwise flawed.
8917 ;; https://github.com/PythonCharmers/python-future/issues/210
8918 (arguments
8919 `(#:tests? #f))
8920 (home-page "http://python-future.org")
8921 (synopsis "Single-source support for Python 3 and 2")
8922 (description
8923 "@code{python-future} is the missing compatibility layer between Python 2 and
8924Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
8925to support both Python 2 and Python 3 with minimal overhead.")
8926 (license license:expat)))
8927
8928(define-public python2-future
8929 (package-with-python2 python-future))
8930
8931(define-public python-cysignals
8932 (package
8933 (name "python-cysignals")
8934 (version "1.1.0")
8935 (source
8936 (origin
8937 (method url-fetch)
8938 (uri (pypi-uri "cysignals" version ".tar.bz2"))
8939 (sha256
8940 (base32
8941 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
8942 (build-system python-build-system)
8943 (native-inputs
8944 `(("python-cython" ,python-cython)
8945 ("python-sphinx" ,python-sphinx)))
8946 (inputs
8947 `(("pari-gp" ,pari-gp)))
8948 (arguments
8949 `(#:modules ((guix build python-build-system)
8950 ((guix build gnu-build-system) #:prefix gnu:)
8951 (guix build utils))
8952 ;; FIXME: Tests are executed after installation and currently fail
8953 ;; when not installing into standard locations; the author is working
8954 ;; on a fix.
8955 #:tests? #f
8956 #:phases
8957 (modify-phases %standard-phases
8958 (add-before
8959 'build 'configure
8960 (assoc-ref gnu:%standard-phases 'configure)))))
8961 (home-page
8962 "https://github.com/sagemath/cysignals")
8963 (synopsis
8964 "Handling of interrupts and signals for Cython")
8965 (description
8966 "The cysignals package provides mechanisms to handle interrupts (and
8967other signals and errors) in Cython code, using two related approaches,
8968for mixed Cython/Python code or external C libraries and pure Cython code,
8969respectively.")
8970 (license license:lgpl3+)))
8971
8972(define-public python2-cysignals
8973 (package-with-python2 python-cysignals))
8974
8975(define-public python2-shedskin
8976 (package
8977 (name "python2-shedskin")
8978 (version "0.9.4")
8979 (source
8980 (origin
8981 (method url-fetch)
8982 (uri (string-append "https://github.com/shedskin/shedskin/"
8983 "releases/download/v" version
8984 "/shedskin-" version ".tgz"))
8985 (sha256
8986 (base32
8987 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
8988 (build-system python-build-system)
8989 (arguments
8990 `(#:python ,python-2
8991 #:phases (modify-phases %standard-phases
8992 (add-after 'unpack 'fix-resulting-include-libs
8993 (lambda* (#:key inputs #:allow-other-keys)
8994 (let ((libgc (assoc-ref inputs "libgc"))
8995 (pcre (assoc-ref inputs "pcre")))
8996 (substitute* "shedskin/makefile.py"
8997 (("variable == 'CCFLAGS':[ ]*")
8998 (string-append "variable == 'CCFLAGS':\n"
8999 " line += ' -I " pcre "/include"
9000 " -I " libgc "/include'"))
9001 (("variable == 'LFLAGS':[ ]*")
9002 (string-append "variable == 'LFLAGS':\n"
9003 " line += ' -L" pcre "/lib"
9004 " -L " libgc "/lib'")))
9005 #t))))))
9006 (inputs `(("pcre" ,pcre)
9007 ("libgc" ,libgc)))
9008 (home-page "https://shedskin.github.io/")
9009 (synopsis "Experimental Python-2 to C++ Compiler")
9010 (description (string-append "This is an experimental compiler for a subset of
9011Python. It generates C++ code and a Makefile."))
9012 (license (list license:gpl3 license:bsd-3 license:expat))))
9013
9014(define-public python2-rope
9015 (package
9016 (name "python2-rope")
9017 (version "0.10.3")
9018 (source
9019 (origin
9020 (method url-fetch)
9021 (uri (pypi-uri "rope" version))
9022 (sha256
9023 (base32
9024 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
9025 (arguments
9026 ;; Rope is currently python-2 only.
9027 ;; https://github.com/python-rope/rope/issues/57
9028 `(#:python ,python-2))
9029 (build-system python-build-system)
9030 (native-inputs
9031 `(("python2-unittest2" ,python2-unittest2)))
9032 (home-page "https://github.com/python-rope/rope")
9033 (synopsis "Refactoring library for Python")
9034 (description "Rope is a refactoring library for Python. It facilitates
9035the renaming, moving and extracting of attributes, functions, modules, fields
9036and parameters in Python 2 source code. These refactorings can also be applied
9037to occurrences in strings and comments.")
9038 (license license:gpl2)))
9039
9040(define-public python-py3status
9041 (package
9042 (name "python-py3status")
9043 (version "3.7")
9044 (source
9045 (origin
9046 (method url-fetch)
9047 (uri (pypi-uri "py3status" version))
9048 (sha256
9049 (base32
9050 "0shxcfz4wcczj0mhwp4w0dvwd2fdd9bgprq8slim1519iiqzgwhq"))))
9051 (build-system python-build-system)
9052 (inputs
9053 `(("file" ,file)))
9054 (arguments
9055 '(#:phases
9056 (modify-phases %standard-phases
9057 ;; 'file' is used for detection of configuration file encoding
9058 ;; let's make link the dependency to particular input
9059 (add-before 'build 'patch-file-path
9060 (lambda* (#:key inputs #:allow-other-keys)
9061 (let ((file-path (assoc-ref inputs "file")))
9062 (substitute* "py3status/parse_config.py"
9063 (("\\['file', '-b'")
9064 (string-append "['" file-path "/bin/file', '-b'")))
9065 #t))))
9066 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9067 (home-page "https://github.com/ultrabug/py3status")
9068 (synopsis "Extensible i3status wrapper written in Python")
9069 (description "py3status is an i3status wrapper which extends i3status
9070functionality in a modular way, allowing you to extend your panel with your
9071own code, responding to click events and updating clock every second.")
9072 (license license:bsd-3)))
9073
9074(define-public python-tblib
9075 (package
9076 (name "python-tblib")
9077 (version "1.3.2")
9078 (source (origin
9079 (method url-fetch)
9080 (uri (pypi-uri "tblib" version))
9081 (sha256 (base32
9082 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9083 (build-system python-build-system)
9084 (arguments
9085 `(#:phases
9086 (modify-phases %standard-phases
9087 (add-before 'check 'adjust-tests
9088 (lambda _
9089 (when (which "python3")
9090 ;; Adjust the example output to match that of Python 3.7:
9091 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9092 (substitute* "README.rst"
9093 (("Exception\\('fail',") "Exception('fail'"))
9094 #t)))
9095 (replace 'check
9096 (lambda _
9097 ;; Upstream runs tests after installation and the package itself
9098 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9099 ;; found.
9100 (setenv "PYTHONPATH"
9101 (string-append (getcwd) "/build/lib:"
9102 (getenv "PYTHONPATH")))
9103 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9104 (native-inputs
9105 `(("python-pytest" ,python-pytest)
9106 ("python-six" ,python-six)))
9107 (home-page "https://github.com/ionelmc/python-tblib")
9108 (synopsis "Traceback serialization library")
9109 (description
9110 "Traceback serialization allows you to:
9111
9112@enumerate
9113@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9114different processes. This allows better error handling when running code over
9115multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9116
9117@item Parse traceback strings and raise with the parsed tracebacks.
9118@end enumerate\n")
9119 (license license:bsd-3)))
9120
9121(define-public python2-tblib
9122 (package-with-python2 python-tblib))
9123
9124(define-public python-greenlet
9125 (package
9126 (name "python-greenlet")
9127 (version "0.4.15")
9128 (source (origin
9129 (method url-fetch)
9130 (uri (pypi-uri "greenlet" version))
9131 (sha256
9132 (base32
9133 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9134 (build-system python-build-system)
9135 (home-page "https://greenlet.readthedocs.io/")
9136 (synopsis "Lightweight in-process concurrent programming")
9137 (description
9138 "Greenlet package is a spin-off of Stackless, a version of CPython
9139that supports micro-threads called \"tasklets\". Tasklets run
9140pseudo-concurrently (typically in a single or a few OS-level threads) and
9141are synchronized with data exchanges on \"channels\".")
9142 (license (list license:psfl license:expat))))
9143
9144(define-public python2-greenlet
9145 (package-with-python2 python-greenlet))
9146
9147(define-public python-objgraph
9148 (package
9149 (name "python-objgraph")
9150 (version "3.4.0")
9151 (source
9152 (origin
9153 (method url-fetch)
9154 (uri (pypi-uri "objgraph" version))
9155 (sha256
9156 (base32
9157 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9158 (build-system python-build-system)
9159 (propagated-inputs
9160 `(("python-graphviz" ,python-graphviz)))
9161 (native-inputs
9162 `(("python-mock" ,python-mock)
9163 ("graphviz" ,graphviz)))
9164 (home-page "https://mg.pov.lt/objgraph/")
9165 (synopsis "Draw Python object reference graphs with graphviz")
9166 (description
9167 "This package provides tools to draw Python object reference graphs with
9168graphviz.")
9169 (license license:expat)))
9170
9171(define-public python-gevent
9172 (package
9173 (name "python-gevent")
9174 (version "1.3.7")
9175 (source (origin
9176 (method url-fetch)
9177 (uri (pypi-uri "gevent" version))
9178 (sha256
9179 (base32
9180 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9181 (modules '((guix build utils)))
9182 (snippet
9183 '(begin
9184 ;; unbunding libev and c-ares
9185 (delete-file-recursively "deps")
9186 #t))))
9187 (build-system python-build-system)
9188 (arguments
9189 `(#:modules ((ice-9 ftw)
9190 (ice-9 match)
9191 (srfi srfi-26)
9192 (guix build utils)
9193 (guix build python-build-system))
9194 #:phases (modify-phases %standard-phases
9195 (add-after 'unpack 'unpack-libev
9196 (lambda* (#:key inputs #:allow-other-keys)
9197 (mkdir-p "deps/libev")
9198 ;; FIXME: gevent requires building libev, even though
9199 ;; it only links against the proper one.
9200 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
9201 "--strip-components=1" "-C" "deps/libev")))
9202 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9203 (lambda _
9204 (substitute* "src/gevent/subprocess.py"
9205 (("/bin/sh") (which "sh")))
9206 (for-each (lambda (file)
9207 (substitute* file
9208 (("/bin/sh") (which "sh"))
9209 (("/bin/true") (which "true"))))
9210 (find-files "src/greentest" "\\.py$"))
9211 #t))
9212 (add-before 'build 'do-not-use-bundled-sources
9213 (lambda* (#:key inputs #:allow-other-keys)
9214 (setenv "CONFIG_SHELL" (which "bash"))
9215 (setenv "LIBEV_EMBED" "false")
9216 (setenv "CARES_EMBED" "false")
9217 (setenv "EMBED" "false")
9218
9219 (let ((greenlet (string-append
9220 (assoc-ref inputs "python-greenlet")
9221 "/include")))
9222 (match (scandir greenlet
9223 (lambda (item)
9224 (string-prefix? "python" item)))
9225 ((python)
9226 (setenv "CPATH"
9227 (string-append greenlet "/" python)))))
9228 #t))
9229 (replace 'check
9230 (lambda _
9231 ;; Make sure the build directory is on PYTHONPATH.
9232 (setenv "PYTHONPATH"
9233 (string-append
9234 (getenv "PYTHONPATH") ":"
9235 (getcwd) "/build/"
9236 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9237 (with-directory-excursion "src/greentest"
9238 ;; XXX: Many tests require network access. Instead we only
9239 ;; run known-good tests. Unfortunately we cannot use
9240 ;; recursion here since this directory also contains
9241 ;; Python-version-specific subfolders.
9242 (apply invoke "python" "testrunner.py" "--config"
9243 "known_failures.py"
9244 (scandir "." (cut regexp-exec
9245 (make-regexp "test_+(subprocess|core)")
9246 <>)))))))))
9247 (propagated-inputs
9248 `(("python-greenlet" ,python-greenlet)
9249 ("python-objgraph" ,python-objgraph)))
9250 (native-inputs
9251 `(("libev-source" ,(package-source libev))
9252 ("python-six" ,python-six)))
9253 (inputs
9254 `(("c-ares" ,c-ares)
9255 ("libev" ,libev)))
9256 (home-page "http://www.gevent.org/")
9257 (synopsis "Coroutine-based network library")
9258 (description
9259 "gevent is a coroutine-based Python networking library that uses greenlet
9260to provide a high-level synchronous API on top of the libev event loop.")
9261 (license license:expat)
9262 (properties `((python2-variant . ,(delay python2-gevent))))))
9263
9264(define-public python2-gevent
9265 (let ((base (package-with-python2
9266 (strip-python2-variant python-gevent))))
9267 (package
9268 (inherit base)
9269 (arguments
9270 (substitute-keyword-arguments (package-arguments base)
9271 ((#:phases phases)
9272 `(modify-phases ,phases
9273 (add-before 'check 'skip-timer-test
9274 (lambda _
9275 ;; XXX: Skip 'TestTimerResolution', which appears to be
9276 ;; unreliable.
9277 (substitute* "src/greentest/test__core_timer.py"
9278 (("not greentest.RUNNING_ON_CI") "False"))
9279 #t))))))
9280 (native-inputs `(,@(package-native-inputs python-gevent)
9281 ("python-mock" ,python2-mock))))))
9282
9283(define-public python-fastimport
9284 (package
9285 (name "python-fastimport")
9286 (version "0.9.6")
9287 (source
9288 (origin
9289 (method url-fetch)
9290 (uri (pypi-uri "fastimport" version))
9291 (sha256
9292 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9293 (build-system python-build-system)
9294 (home-page "https://github.com/jelmer/python-fastimport")
9295 (synopsis "VCS fastimport parser and generator in Python")
9296 (description "This package provides a parser for and generator of the Git
9297@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9298format.")
9299 (license license:gpl2+)))
9300
9301(define-public python2-fastimport
9302 (package-with-python2 python-fastimport))
9303
9304(define-public python-twisted
9305 (package
9306 (name "python-twisted")
9307 (version "17.1.0")
9308 (source (origin
9309 (method url-fetch)
9310 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9311 (sha256
9312 (base32
9313 "1p245mg15hkxp7hy5cyq2fgvlgjkb4cg0gwkwd148nzy1bbi3wnv"))))
9314 (build-system python-build-system)
9315 (arguments
9316 '(#:tests? #f)) ; FIXME: Some tests are failing.
9317 ;; #:phases
9318 ;; (modify-phases %standard-phases
9319 ;; (replace 'check
9320 ;; (lambda _
9321 ;; (zero? (system* "./bin/trial" "twisted")))))
9322 (propagated-inputs
9323 `(("python-zope-interface" ,python-zope-interface)
9324 ("python-incremental" ,python-incremental)
9325 ("python-constantly" ,python-constantly)
9326 ("python-automat" ,python-automat)))
9327 (home-page "https://twistedmatrix.com/")
9328 (synopsis "Asynchronous networking framework written in Python")
9329 (description
9330 "Twisted is an extensible framework for Python programming, with special
9331focus on event-based network programming and multiprotocol integration.")
9332 (license license:expat)))
9333
9334(define-public python2-twisted
9335 (package-with-python2 python-twisted))
9336
9337(define-public python-pika
9338 (package
9339 (name "python-pika")
9340 (version "0.12.0")
9341 (source
9342 (origin
9343 (method url-fetch)
9344 (uri (pypi-uri "pika" version))
9345 (sha256
9346 (base32
9347 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
9348 (build-system python-build-system)
9349 (native-inputs
9350 `(("python-pyev" ,python-pyev)
9351 ("python-tornado" ,python-tornado)
9352 ("python-twisted" ,python-twisted)))
9353 (home-page "https://pika.readthedocs.org")
9354 (synopsis "Pure Python AMQP Client Library")
9355 (description
9356 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9357Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9358network support library.")
9359 (license license:bsd-3)))
9360
9361(define-public python2-pika
9362 (package-with-python2 python-pika))
9363
9364(define-public python-ply
9365 (package
9366 (name "python-ply")
9367 (version "3.10")
9368 (source
9369 (origin
9370 (method url-fetch)
9371 (uri (pypi-uri "ply" version))
9372 (sha256
9373 (base32
9374 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9375 (build-system python-build-system)
9376 (home-page "http://www.dabeaz.com/ply/")
9377 (synopsis "Python Lex & Yacc")
9378 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9379It uses LR parsing and does extensive error checking.")
9380 (license license:bsd-3)))
9381
9382(define-public python2-ply
9383 (package-with-python2 python-ply))
9384
9385(define-public python-tabulate
9386 (package
9387 (name "python-tabulate")
9388 (version "0.7.7")
9389 (source (origin
9390 (method url-fetch)
9391 (uri (pypi-uri "tabulate" version))
9392 (sha256
9393 (base32
9394 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
9395 (build-system python-build-system)
9396 (arguments
9397 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
9398 ;; and the latest release is not tagged in the upstream repository.
9399 '(#:tests? #f))
9400 (home-page "https://bitbucket.org/astanin/python-tabulate")
9401 (synopsis "Pretty-print tabular data")
9402 (description
9403 "Tabulate is a library and command-line utility to pretty-print tabular
9404data in Python.")
9405 (license license:expat)))
9406
9407(define-public python2-tabulate
9408 (package-with-python2 python-tabulate))
9409
9410(define-public python-kazoo
9411 (package
9412 (name "python-kazoo")
9413 (version "2.4.0")
9414 (source
9415 (origin
9416 (method url-fetch)
9417 (uri (pypi-uri "kazoo" version))
9418 (sha256
9419 (base32
9420 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
9421 (build-system python-build-system)
9422 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9423 (propagated-inputs
9424 `(("python-six" ,python-six)))
9425 (home-page "https://kazoo.readthedocs.org")
9426 (synopsis "High-level Zookeeper client library")
9427 (description
9428 "Kazoo is a Python client library for the Apache Zookeeper distributed
9429application service. It is designed to be easy to use and to avoid common
9430programming errors.")
9431 (license license:asl2.0)))
9432
9433(define-public python2-kazoo
9434 (package-with-python2 python-kazoo))
9435
9436(define-public python-pykafka
9437 (package
9438 (name "python-pykafka")
9439 (version "2.4.0")
9440 (source (origin
9441 (method url-fetch)
9442 (uri (string-append
9443 "https://pypi.python.org/packages/8b/3e/"
9444 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
9445 "pykafka-" version ".tar.gz"))
9446 (sha256
9447 (base32
9448 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9449 (build-system python-build-system)
9450 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9451 (propagated-inputs
9452 `(("python-gevent" ,python-gevent)
9453 ("python-kazoo" ,python-kazoo)
9454 ("python-tabulate" ,python-tabulate)))
9455 (inputs
9456 `(("librdkafka" ,librdkafka)))
9457 (home-page "https://pykafka.readthedocs.io/")
9458 (synopsis "Apache Kafka client for Python")
9459 (description
9460 "PyKafka is a client for the Apache Kafka distributed messaging system.
9461It includes Python implementations of Kafka producers and consumers, which
9462are optionally backed by a C extension built on librdkafka.")
9463 (license license:asl2.0)))
9464
9465(define-public python2-pykafka
9466 (package-with-python2 python-pykafka))
9467
9468(define-public python-wcwidth
9469 (package
9470 (name "python-wcwidth")
9471 (version "0.1.7")
9472 (source
9473 (origin
9474 (method url-fetch)
9475 (uri (pypi-uri "wcwidth" version))
9476 (sha256
9477 (base32
9478 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
9479 (build-system python-build-system)
9480 (home-page "https://github.com/jquast/wcwidth")
9481 (synopsis "Measure number of terminal column cells of wide-character codes")
9482 (description "Wcwidth measures the number of terminal column cells of
9483wide-character codes. It is useful for those implementing a terminal emulator,
9484or programs that carefully produce output to be interpreted by one. It is a
9485Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9486specified in POSIX.1-2001 and POSIX.1-2008.")
9487 (license license:expat)))
9488
9489(define-public python2-wcwidth
9490 (package-with-python2 python-wcwidth))
9491
9492(define-public python2-jsonrpclib
9493 (package
9494 (name "python2-jsonrpclib")
9495 (version "0.1.7")
9496 (source (origin
9497 (method url-fetch)
9498 (uri (string-append
9499 "https://pypi.python.org/packages/source/j/jsonrpclib/"
9500 "jsonrpclib-" version ".tar.gz"))
9501 (sha256
9502 (base32
9503 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9504 (build-system python-build-system)
9505 (arguments
9506 `(#:tests? #f
9507 #:python ,python-2))
9508 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9509 (synopsis "Implementation of JSON-RPC specification for Python")
9510 (description
9511 "This library is an implementation of the JSON-RPC specification.
9512It supports both the original 1.0 specification, as well as the
9513new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9514etc.")
9515 (license license:asl2.0)))
9516
9517(define-public python-chai
9518 (package
9519 (name "python-chai")
9520 (version "1.1.2")
9521 (source (origin
9522 (method url-fetch)
9523 (uri (pypi-uri "chai" version))
9524 (sha256
9525 (base32
9526 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
9527 (build-system python-build-system)
9528 (home-page "https://github.com/agoragames/chai")
9529 (synopsis "Mocking framework for Python")
9530 (description
9531 "Chai provides an api for mocking, stubbing and spying your python
9532objects, patterned after the Mocha library for Ruby.")
9533 (license license:bsd-3)))
9534
9535(define-public python2-chai
9536 (package-with-python2 python-chai))
9537
9538(define-public python-inflection
9539 (package
9540 (name "python-inflection")
9541 (version "0.3.1")
9542 (source
9543 (origin (method url-fetch)
9544 (uri (pypi-uri "inflection" version))
9545 (sha256
9546 (base32
9547 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9548 (build-system python-build-system)
9549 (native-inputs
9550 `(("python-pytest" ,python-pytest)))
9551 (home-page "https://github.com/jpvanhal/inflection")
9552 (synopsis "Python string transformation library")
9553 (description
9554 "Inflection is a string transformation library. It singularizes
9555and pluralizes English words, and transforms strings from CamelCase to
9556underscored string.")
9557 (license license:expat)))
9558
9559(define-public python2-inflection
9560 (package-with-python2 python-inflection))
9561
9562(define-public python-pylev
9563 (package
9564 (name "python-pylev")
9565 (version "1.3.0")
9566 (source (origin
9567 (method url-fetch)
9568 (uri (pypi-uri "pylev" version))
9569 (sha256
9570 (base32
9571 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9572 (build-system python-build-system)
9573 (home-page "https://github.com/toastdriven/pylev")
9574 (synopsis "Levenshtein distance implementation in Python")
9575 (description "Pure Python Levenshtein implementation, based off the
9576Wikipedia code samples at
9577@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9578 (license license:bsd-3)))
9579
9580(define-public python2-pylev
9581 (package-with-python2 python-pylev))
9582
9583(define-public python-cleo
9584 (package
9585 (name "python-cleo")
9586 (version "0.6.1")
9587 (source (origin
9588 (method url-fetch)
9589 (uri (pypi-uri "cleo" version))
9590 (sha256
9591 (base32
9592 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
9593 (build-system python-build-system)
9594 (native-inputs
9595 `(;; For testing
9596 ("python-mock" ,python-mock)
9597 ("python-pytest-mock" ,python-pytest-mock)
9598 ("python-pytest" ,python-pytest)))
9599 (propagated-inputs
9600 `(("python-backpack" ,python-backpack)
9601 ("python-pastel" ,python-pastel)
9602 ("python-pylev" ,python-pylev)))
9603 (home-page "https://github.com/sdispater/cleo")
9604 (synopsis "Command-line arguments library for Python")
9605 (description
9606 "Cleo allows you to create command-line commands with signature in
9607docstring and colored output.")
9608 (license license:expat)))
9609
9610(define-public python2-cleo
9611 (package-with-python2 python-cleo))
9612
9613(define-public python-lazy-object-proxy
9614 (package
9615 (name "python-lazy-object-proxy")
9616 (version "1.3.1")
9617 (source (origin
9618 (method url-fetch)
9619 (uri (pypi-uri "lazy-object-proxy" version))
9620 (sha256
9621 (base32
9622 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
9623 (build-system python-build-system)
9624 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9625 (synopsis "Lazy object proxy for python")
9626 (description
9627 "Lazy object proxy is an object that wraps a callable but defers the call
9628until the object is actually required, and caches the result of said call.")
9629 (license license:bsd-2)))
9630
9631(define-public python2-lazy-object-proxy
9632 (package-with-python2 python-lazy-object-proxy))
9633
9634(define-public python-dnspython
9635 (package
9636 (name "python-dnspython")
9637 (version "1.15.0")
9638 (source (origin
9639 (method url-fetch)
9640 (uri (string-append "http://www.dnspython.org/kits/"
9641 version "/dnspython-" version ".tar.gz"))
9642 (sha256
9643 (base32
9644 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
9645 (build-system python-build-system)
9646 (arguments '(#:tests? #f)) ; XXX: requires internet access
9647 (home-page "http://www.dnspython.org")
9648 (synopsis "DNS toolkit for Python")
9649 (description
9650 "dnspython is a DNS toolkit for Python. It supports almost all record
9651types. It can be used for queries, zone transfers, and dynamic updates.
9652It supports TSIG authenticated messages and EDNS0.")
9653 (license license:expat)))
9654
9655(define-public python2-dnspython
9656 (package-with-python2 python-dnspython))
9657
9658(define-public python-email-validator
9659 (package
9660 (name "python-email-validator")
9661 (version "1.0.2")
9662 (source
9663 (origin (method url-fetch)
9664 (uri (pypi-uri "email_validator" version))
9665 (sha256
9666 (base32
9667 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
9668 (build-system python-build-system)
9669 (arguments
9670 '(#:phases
9671 (modify-phases %standard-phases
9672 (add-before 'build 'use-dnspython
9673 (lambda _
9674 (substitute* "setup.py"
9675 (("dnspython3") "dnspython"))
9676 #t)))))
9677 (propagated-inputs
9678 `(("python-dnspython" ,python-dnspython)
9679 ("python-idna" ,python-idna)))
9680 (home-page "https://github.com/JoshData/python-email-validator")
9681 (synopsis "Email address validation library for Python")
9682 (description
9683 "This library validates email address syntax and deliverability.")
9684 (license license:cc0)))
9685
9686(define-public python2-email-validator
9687 (package-with-python2 python-email-validator))
9688
9689(define-public python-ukpostcodeparser
9690 (package
9691 (name "python-ukpostcodeparser")
9692 (version "1.0.3")
9693 (source (origin
9694 (method url-fetch)
9695 (uri (pypi-uri "UkPostcodeParser" version))
9696 (sha256
9697 (base32
9698 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9699 (build-system python-build-system)
9700 (home-page "https://github.com/hamstah/ukpostcodeparser")
9701 (synopsis "UK Postcode parser for Python")
9702 (description
9703 "This library provides the @code{parse_uk_postcode} function for
9704parsing UK postcodes.")
9705 (license license:expat)))
9706
9707(define-public python2-ukpostcodeparser
9708 (package-with-python2 python-ukpostcodeparser))
9709
9710(define-public python-faker
9711 (package
9712 (name "python-faker")
9713 (version "0.7.9")
9714 (source (origin
9715 (method url-fetch)
9716 (uri (pypi-uri "Faker" version))
9717 (sha256
9718 (base32
9719 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
9720 (patches
9721 (search-patches "python-faker-fix-build-32bit.patch"))
9722 (modules '((guix build utils)))
9723 (snippet
9724 '(begin
9725 (for-each delete-file (find-files "." "\\.pyc$"))
9726 #t))))
9727 (build-system python-build-system)
9728 (arguments
9729 '(#:phases
9730 (modify-phases %standard-phases
9731 (replace 'check
9732 (lambda _
9733 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
9734 (native-inputs
9735 `(;; For testing
9736 ("python-email-validator" ,python-email-validator)
9737 ("python-mock" ,python-mock)
9738 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
9739 (propagated-inputs
9740 `(("python-dateutil" ,python-dateutil)
9741 ("python-six" ,python-six)))
9742 (home-page "https://github.com/joke2k/faker")
9743 (synopsis "Python package that generates fake data")
9744 (description
9745 "Faker is a Python package that generates fake data such as names,
9746addresses, and phone numbers.")
9747 (license license:expat)
9748 (properties `((python2-variant . ,(delay python2-faker))))))
9749
9750(define-public python2-faker
9751 (let ((base (package-with-python2 (strip-python2-variant
9752 python-faker))))
9753 (package
9754 (inherit base)
9755 (propagated-inputs
9756 `(("python2-ipaddress" ,python2-ipaddress)
9757 ,@(package-propagated-inputs base))))))
9758
9759(define-public python-pyaml
9760 (package
9761 (name "python-pyaml")
9762 (version "17.7.2")
9763 (source (origin
9764 (method url-fetch)
9765 (uri (pypi-uri "pyaml" version))
9766 (sha256
9767 (base32
9768 "132grrw0ajq4nrappi3ldbkb952k7yn9b6c7csi2rmvzm1g6ppp2"))))
9769 (build-system python-build-system)
9770 (native-inputs
9771 `(("python-unidecode" ,python-unidecode)))
9772 (propagated-inputs
9773 `(("python-pyyaml" ,python-pyyaml)))
9774 (home-page "https://github.com/mk-fg/pretty-yaml")
9775 (synopsis "YAML pretty-print library for Python")
9776 (description
9777 "pyaml is a PyYAML based python module to produce pretty and readable
9778YAML-serialized data.")
9779 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
9780
9781(define-public python2-pyaml
9782 (package-with-python2 python-pyaml))
9783
9784(define-public python-backpack
9785 (package
9786 (name "python-backpack")
9787 (version "0.1")
9788 (source
9789 (origin
9790 (method url-fetch)
9791 (uri (pypi-uri "backpack" version))
9792 (sha256
9793 (base32
9794 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
9795 (build-system python-build-system)
9796 (native-inputs
9797 `(("python-pytest" ,python-pytest)
9798 ("python-nose" ,python-nose)))
9799 (propagated-inputs
9800 `(("python-simplejson" ,python-simplejson)))
9801 (home-page "https://github.com/sdispater/backpack")
9802 (synopsis "Utilities for working with Python collections")
9803 (description "Backpack provides some useful utilities for working with
9804collections of data.")
9805 (license license:expat)))
9806
9807(define-public python2-backpack
9808 (package-with-python2 python-backpack))
9809
9810(define-public python-prompt-toolkit
9811 (package
9812 (name "python-prompt-toolkit")
9813 (version "1.0.15")
9814 (source
9815 (origin
9816 (method url-fetch)
9817 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9818 (sha256
9819 (base32
9820 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))
9821 (build-system python-build-system)
9822 (arguments
9823 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
9824 (propagated-inputs
9825 `(("python-wcwidth" ,python-wcwidth)
9826 ("python-six" ,python-six)
9827 ("python-pygments" ,python-pygments)))
9828 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
9829 (synopsis "Library for building command line interfaces in Python")
9830 (description
9831 "Prompt-Toolkit is a library for building interactive command line
9832interfaces in Python. It's like GNU Readline but it also features syntax
9833highlighting while typing, out-of-the-box multi-line input editing, advanced
9834code completion, incremental search, support for Chinese double-width
9835characters, mouse support, and auto suggestions.")
9836 (license license:bsd-3)))
9837
9838(define-public python2-prompt-toolkit
9839 (package-with-python2 python-prompt-toolkit))
9840
9841(define-public python-jedi
9842 (package
9843 (name "python-jedi")
9844 (version "0.12.1")
9845 (source
9846 (origin
9847 (method url-fetch)
9848 (uri (pypi-uri "jedi" version))
9849 (sha256
9850 (base32
9851 "1h8ypnjisn57kiv1zqrkj1im6sbfnhxllqaa8znh39qkd47ys2dl"))))
9852 (build-system python-build-system)
9853 (arguments
9854 `(#:phases
9855 (modify-phases %standard-phases
9856 (replace 'check (lambda _
9857 (invoke "py.test" "-vv"))))))
9858 (native-inputs
9859 `(("python-pytest" ,python-pytest)
9860 ("python-docopt" ,python-docopt)))
9861 (propagated-inputs
9862 `(("python-parso" ,python-parso)))
9863 (home-page "https://github.com/davidhalter/jedi")
9864 (synopsis "Autocompletion and static analysis library for Python")
9865 (description
9866 "Jedi is a static analysis tool for Python that can be used in Integrated
9867Development Environments (@dfn{IDE}s) and text editors. It understands Python
9868on a deeper level than many other static analysis frameworks for Python.
9869
9870Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
9871well.")
9872 (license license:expat)))
9873
9874(define-public python2-jedi
9875 (package-with-python2 python-jedi))
9876
9877(define-public ptpython
9878 (package
9879 (name "ptpython")
9880 (version "0.34")
9881 (source (origin
9882 (method url-fetch)
9883 (uri (pypi-uri "ptpython" version))
9884 (sha256
9885 (base32
9886 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
9887 (build-system python-build-system)
9888 (arguments
9889 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
9890 (propagated-inputs
9891 `(("python-docopt" ,python-docopt)
9892 ("python-jedi" ,python-jedi)
9893 ("python-prompt-toolkit" ,python-prompt-toolkit)
9894 ("python-pygments" ,python-pygments)))
9895 (home-page "https://github.com/jonathanslenders/ptpython")
9896 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
9897 (description
9898 "ptpython is a Python read-eval-print loop with IDE-like features.
9899It supports syntax highlighting, multiline editing, autocompletion, mouse,
9900color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
9901etc.")
9902 (license license:bsd-3)
9903 (properties `((python2-variant . ,(delay ptpython-2))))))
9904
9905(define-public ptpython-2
9906 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
9907 (package
9908 (inherit base)
9909 (name "ptpython2"))))
9910
9911(define-public python-stem
9912 (package
9913 (name "python-stem")
9914 (version "1.7.0")
9915 (source
9916 (origin
9917 (method url-fetch)
9918 (uri (pypi-uri "stem" version))
9919 (sha256
9920 (base32
9921 "1awiglfiajnx2hva9aqpj3fmdvdb4qg7cwnlfyih827m68y3cq8v"))))
9922 (build-system python-build-system)
9923 (arguments
9924 `(#:phases
9925 (modify-phases %standard-phases
9926 (replace 'check
9927 (lambda _
9928 (invoke "./run_tests.py" "--unit")
9929 #t)))))
9930 (native-inputs
9931 `(("python-mock" ,python-mock)
9932 ("python-pycodestyle" ,python-pycodestyle)
9933 ("python-pyflakes" ,python-pyflakes)))
9934 (home-page "https://stem.torproject.org/")
9935 (synopsis
9936 "Python controller library that allows applications to interact with Tor")
9937 (description
9938 "Stem is a Python controller library for Tor. With it you can use Tor's
9939control protocol to script against the Tor process and read descriptor data
9940relays publish about themselves.")
9941 (license license:lgpl3)))
9942
9943(define-public python2-stem
9944 (package-with-python2 python-stem))
9945
9946(define-public python-pyserial
9947 (package
9948 (name "python-pyserial")
9949 (version "3.1.1")
9950 (source
9951 (origin
9952 (method url-fetch)
9953 (uri (pypi-uri "pyserial" version))
9954 (sha256
9955 (base32
9956 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
9957 (build-system python-build-system)
9958 (arguments
9959 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
9960 ;; #:phases
9961 ;; (modify-phases %standard-phases
9962 ;; (replace 'check
9963 ;; (lambda _
9964 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
9965 (home-page
9966 "https://github.com/pyserial/pyserial")
9967 (synopsis "Python Serial Port Bindings")
9968 (description "@code{pyserial} provide serial port bindings for Python. It
9969supports different byte sizes, stop bits, parity and flow control with RTS/CTS
9970and/or Xon/Xoff. The port is accessed in RAW mode.")
9971 (license license:bsd-3)))
9972
9973(define-public python2-pyserial
9974 (package-with-python2 python-pyserial))
9975
9976(define-public python-kivy
9977 (package
9978 (name "python-kivy")
9979 (version "1.10.1")
9980 (source
9981 (origin
9982 (method url-fetch)
9983 (uri (pypi-uri "Kivy" version))
9984 (file-name (string-append name "-" version ".tar.gz"))
9985 (sha256
9986 (base32
9987 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
9988 (build-system python-build-system)
9989 (arguments
9990 `(#:tests? #f ; Tests require many optional packages
9991 #:phases
9992 (modify-phases %standard-phases
9993 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
9994 (lambda* (#:key inputs #:allow-other-keys)
9995 (setenv "KIVY_SDL2_PATH"
9996 (string-append (assoc-ref inputs "sdl-union")
9997 "/include/SDL2"))
9998 #t)))))
9999 (native-inputs
10000 `(("git" ,git)
10001 ("pkg-config" ,pkg-config)
10002 ("python-cython" ,python-cython)))
10003 (inputs
10004 `(("gstreamer" ,gstreamer)
10005 ("mesa" ,mesa)
10006 ("sdl-union"
10007 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10008 (home-page "http://kivy.org")
10009 (synopsis
10010 "Multitouch application framework")
10011 (description
10012 "A software library for rapid development of
10013hardware-accelerated multitouch applications.")
10014 (license license:expat)))
10015
10016(define-public python2-kivy
10017 (package-with-python2 python-kivy))
10018
10019(define-public python-kivy-next
10020 (deprecated-package "python-kivy-next" python-kivy))
10021
10022(define-public python2-kivy-next
10023 (deprecated-package "python2-kivy-next" python2-kivy))
10024
10025(define-public python-binaryornot
10026 (package
10027 (name "python-binaryornot")
10028 (version "0.4.4")
10029 (source (origin
10030 (method url-fetch)
10031 (uri (pypi-uri "binaryornot" version))
10032 (sha256
10033 (base32
10034 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10035 (build-system python-build-system)
10036 (propagated-inputs
10037 `(("python-chardet" ,python-chardet)
10038 ("python-hypothesis" ,python-hypothesis)))
10039 (home-page "https://github.com/audreyr/binaryornot")
10040 (synopsis "Package to check if a file is binary or text")
10041 (description "Ultra-lightweight pure Python package to check if a file is
10042binary or text.")
10043 (license license:bsd-3)
10044 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10045
10046(define-public python2-binaryornot
10047 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10048 (package (inherit base)
10049 (propagated-inputs
10050 `(("python2-enum34" ,python2-enum34)
10051 ,@(package-propagated-inputs base))))))
10052
10053(define-public python-nltk
10054 (package
10055 (name "python-nltk")
10056 (version "3.2.1")
10057 (source (origin
10058 (method url-fetch)
10059 (uri (pypi-uri "nltk" version))
10060 (sha256
10061 (base32
10062 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
10063 (build-system python-build-system)
10064 (arguments
10065 '(;; The tests require some extra resources to be downloaded.
10066 ;; TODO Try packaging these resources.
10067 #:tests? #f))
10068 (home-page "http://nltk.org/")
10069 (synopsis "Natural Language Toolkit")
10070 (description "It provides interfaces to over 50 corpora and lexical
10071resources such as WordNet, along with a suite of text processing libraries
10072for classification, tokenization, stemming, tagging, parsing, and semantic
10073reasoning, wrappers for natural language processing libraries.")
10074 (license license:asl2.0)))
10075
10076(define-public python2-nltk
10077 (package-with-python2 python-nltk))
10078
10079(define-public python-pymongo
10080 (package
10081 (name "python-pymongo")
10082 (version "3.7.2")
10083 (source (origin
10084 (method url-fetch)
10085 (uri (pypi-uri "pymongo" version))
10086 (sha256
10087 (base32
10088 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10089 (build-system python-build-system)
10090 (propagated-inputs
10091 `(("python-certifi" ,python-certifi)))
10092 (home-page "https://github.com/mongodb/mongo-python-driver")
10093 (synopsis "Python driver for MongoDB")
10094 (description "Python driver for MongoDB.")
10095 (license license:asl2.0)))
10096
10097(define-public python2-pymongo
10098 (package-with-python2 python-pymongo))
10099
10100(define-public python-sh
10101 (package
10102 (name "python-sh")
10103 (version "1.11")
10104 (source (origin
10105 (method url-fetch)
10106 (uri (pypi-uri "sh" version))
10107 (sha256
10108 (base32
10109 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
10110 (build-system python-build-system)
10111 (arguments
10112 `(#:tests? #f)) ; no tests
10113 (home-page "https://github.com/amoffat/sh")
10114 (synopsis "Python subprocess interface")
10115 (description "Abstracts process invocation by providing a function
10116interface for programs.")
10117 (license license:expat)))
10118
10119(define-public python2-sh
10120 (package-with-python2 python-sh))
10121
10122(define-public python-consul
10123 (package
10124 (name "python-consul")
10125 (version "0.6.1")
10126 (source
10127 (origin
10128 (method url-fetch)
10129 (uri (pypi-uri "python-consul" version))
10130 (sha256
10131 (base32
10132 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10133 (build-system python-build-system)
10134 (arguments
10135 '(#:tests? #f)) ; The tests are not distributed
10136 (propagated-inputs
10137 `(("python-requests" ,python-requests)
10138 ("python-six" ,python-six)))
10139 (home-page "https://github.com/cablehead/python-consul")
10140 (synopsis "Python client for Consul")
10141 (description
10142 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10143discovery, monitoring and configuration.")
10144 (license license:expat)))
10145
10146(define-public python2-consul
10147 (package-with-python2 python-consul))
10148
10149(define-public python-schematics
10150 (package
10151 (name "python-schematics")
10152 (version "1.1.1")
10153 (source
10154 (origin
10155 (method url-fetch)
10156 (uri (string-append
10157 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
10158 (file-name (string-append name "-" version ".tar.gz"))
10159 (sha256
10160 (base32
10161 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
10162 (build-system python-build-system)
10163 (propagated-inputs
10164 `(("python-six" ,python-six)))
10165 (arguments
10166 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
10167 ; version requirements (eg python-coveralls)
10168 (home-page "https://github.com/schematics/schematics")
10169 (synopsis "Python Data Structures for Humans")
10170 (description "Python Data Structures for Humans.")
10171 (license license:bsd-3)))
10172
10173(define-public python2-schematics
10174 (package-with-python2 python-schematics))
10175
10176(define-public python-odfpy
10177 (package
10178 (name "python-odfpy")
10179 (version "1.3.3")
10180 (source (origin
10181 (method url-fetch)
10182 (uri (pypi-uri "odfpy" version))
10183 (sha256
10184 (base32
10185 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10186 (arguments
10187 `(#:modules ((srfi srfi-1)
10188 (guix build python-build-system)
10189 (guix build utils))
10190 #:phases
10191 (modify-phases %standard-phases
10192 (replace 'check
10193 ;; The test runner invokes python2 and python3 for test*.py.
10194 ;; To avoid having both in inputs, we replicate it here.
10195 (lambda _
10196 (every (lambda (test-file)
10197 (zero? (system* "python" test-file)))
10198 (find-files "tests" "^test.*\\.py$")))))))
10199 (build-system python-build-system)
10200 (home-page "https://github.com/eea/odfpy")
10201 (synopsis "Python API and tools to manipulate OpenDocument files")
10202 (description "Collection of libraries and utility programs written in
10203Python to manipulate OpenDocument 1.2 files.")
10204 (license
10205 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10206 ;; number of files with other licenses.
10207 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10208
10209(define-public python2-odfpy
10210 (package-with-python2 python-odfpy))
10211
10212(define-public python-natsort
10213 (package
10214 (name "python-natsort")
10215 (version "5.4.1")
10216 (source (origin
10217 (method url-fetch)
10218 (uri (pypi-uri "natsort" version))
10219 (sha256
10220 (base32
10221 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10222 (build-system python-build-system)
10223 (arguments
10224 `(#:modules ((guix build utils)
10225 (guix build python-build-system)
10226 (srfi srfi-1)
10227 (srfi srfi-26)
10228 (ice-9 ftw))
10229 #:phases
10230 (modify-phases %standard-phases
10231 (add-before 'check 'set-cachedir
10232 ;; Tests require write access to $HOME by default
10233 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10234 (replace 'check
10235 (lambda _
10236 (let ((cwd (getcwd)))
10237 (setenv "PYTHONPATH"
10238 (string-append
10239 cwd "/build/"
10240 (find (cut string-prefix? "lib" <>)
10241 (scandir (string-append cwd "/build")))
10242 ":"
10243 (getenv "PYTHONPATH")))
10244 (invoke "pytest" "-v")))))))
10245 (native-inputs
10246 `(("python-hypothesis" ,python-hypothesis)
10247 ("python-pytest-cov" ,python-pytest-cov)
10248 ("python-pytest-mock" ,python-pytest-mock)
10249 ("python-pytest" ,python-pytest)))
10250 (propagated-inputs ; TODO: Add python-fastnumbers.
10251 `(("python-pyicu" ,python-pyicu)))
10252 (home-page "https://github.com/SethMMorton/natsort")
10253 (synopsis "Natural sorting for python and shell")
10254 (description
10255 "Natsort lets you apply natural sorting on lists instead of
10256lexicographical. If you use the built-in @code{sorted} method in python
10257on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
10258returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
10259function @code{natsorted} that identifies numbers and sorts them separately
10260from strings. It can also sort version numbers, real numbers, mixed types
10261and more, and comes with a shell command @command{natsort} that exposes this
10262functionality in the command line.")
10263 (license license:expat)
10264 (properties `((python2-variant . ,(delay python2-natsort))))))
10265
10266(define-public python2-natsort
10267 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10268 (package (inherit base)
10269 (native-inputs
10270 `(("python2-pathlib" ,python2-pathlib)
10271 ,@(package-native-inputs base))))))
10272
10273(define-public python-glances
10274 (package
10275 (name "python-glances")
10276 (version "3.0.2")
10277 (source
10278 (origin
10279 (method url-fetch)
10280 (uri (pypi-uri "Glances" version))
10281 (sha256
10282 (base32
10283 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10284 (build-system python-build-system)
10285 (propagated-inputs
10286 `(("python-psutil" ,python-psutil)))
10287 (home-page
10288 "https://github.com/nicolargo/glances")
10289 (synopsis
10290 "A cross-platform curses-based monitoring tool")
10291 (description
10292 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10293Glances uses the PsUtil library to get information from your system. It monitors
10294CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10295 (license license:lgpl3+)))
10296
10297(define-public python2-glances
10298 (package-with-python2 python-glances))
10299
10300(define-public python-graphql-core
10301 (package
10302 (name "python-graphql-core")
10303 (version "0.5.3")
10304 (source
10305 (origin
10306 (method url-fetch)
10307 (uri (pypi-uri "graphql-core" version))
10308 (sha256
10309 (base32
10310 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10311 (build-system python-build-system)
10312 (arguments
10313 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10314 #:phases
10315 (modify-phases %standard-phases
10316 (add-after 'unpack 'patch-hardcoded-version
10317 (lambda _ (substitute*
10318 "setup.py"
10319 (("'gevent==1.1rc1'") "'gevent'"))
10320 #t)))))
10321 (native-inputs
10322 `(("python-gevent" ,python-gevent)
10323 ("python-mock" ,python-mock)
10324 ("python-pytest-mock" ,python-pytest-mock)))
10325 (propagated-inputs
10326 `(("python-promise" ,python-promise)
10327 ("python-six" ,python-six)))
10328 (home-page "https://github.com/graphql-python/graphql-core")
10329 (synopsis "GraphQL implementation for Python")
10330 (description
10331 "GraphQL implementation for Python. GraphQL is a data query language and
10332runtime designed and used to request and deliver data to mobile and web apps.
10333This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10334to Python.")
10335 (license license:expat)))
10336
10337(define-public python2-graphql-core
10338 (package-with-python2 python-graphql-core))
10339
10340(define-public python-graphql-relay
10341 (package
10342 (name "python-graphql-relay")
10343 (version "0.4.5")
10344 (source
10345 (origin
10346 (method url-fetch)
10347 (uri (pypi-uri "graphql-relay" version))
10348 (sha256
10349 (base32
10350 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10351 (build-system python-build-system)
10352 (arguments
10353 '(#:tests? #f)) ; The tests are not distributed
10354 (propagated-inputs
10355 `(("python-graphql-core" ,python-graphql-core)
10356 ("python-promise" ,python-promise)
10357 ("python-six" ,python-six)))
10358 (home-page "https://github.com/graphql-python/graphql-relay-py")
10359 (synopsis "Relay implementation for Python")
10360 (description
10361 "This is a library to allow the easy creation of Relay-compliant servers
10362using the GraphQL Python reference implementation of a GraphQL server. It
10363should be noted that the code is a exact port of the original
10364@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10365from Facebook.")
10366 (license license:expat)))
10367
10368(define-public python2-graphql-relay
10369 (package-with-python2 python-graphql-relay))
10370
10371(define-public python-graphene
10372 (package
10373 (name "python-graphene")
10374 (version "0.10.2")
10375 (source
10376 (origin
10377 (method url-fetch)
10378 (uri (pypi-uri "graphene" version))
10379 (sha256
10380 (base32
10381 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10382 (build-system python-build-system)
10383 (propagated-inputs
10384 `(("python-graphql-core" ,python-graphql-core)
10385 ("python-graphql-relay" ,python-graphql-relay)
10386 ("python-iso8601" ,python-iso8601)
10387 ("python-promise" ,python-promise)
10388 ("python-six" ,python-six)))
10389 (arguments
10390 `(#:tests? #f)) ; no tests/ in the PyPI tarball
10391 (home-page "http://graphene-python.org/")
10392 (synopsis "GraphQL Framework for Python")
10393 (description
10394 "Graphene is a Python library for building GraphQL schemas/types.
10395A GraphQL schema describes your data model, and provides a GraphQL server
10396with an associated set of resolve methods that know how to fetch data.")
10397 (properties `((python2-variant . ,(delay python2-graphene))))
10398 (license license:expat)))
10399
10400(define-public python2-graphene
10401 (let ((base (package-with-python2
10402 (strip-python2-variant python-graphene))))
10403 (package (inherit base)
10404 (native-inputs
10405 `(("python2-sqlalchemy" ,python2-sqlalchemy)
10406 ,@(package-native-inputs base))))))
10407
10408(define-public python-nautilus
10409 (package
10410 (name "python-nautilus")
10411 (version "0.4.9")
10412 (source
10413 (origin
10414 (method url-fetch)
10415 (uri (pypi-uri "nautilus" version))
10416 (sha256
10417 (base32
10418 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
10419 (build-system python-build-system)
10420 (arguments `(#:tests? #f)) ; fails to import test modules
10421 (propagated-inputs
10422 `(("python-bcrypt" ,python-bcrypt)
10423 ("python-click" ,python-click)
10424 ("python-consul" ,python-consul)
10425 ("python-graphene" ,python-graphene)
10426 ("python-jinja2" ,python-jinja2)
10427 ("python-peewee" ,python-peewee)
10428 ("python-pika" ,python-pika)
10429 ("python-tornado" ,python-tornado)
10430 ("python-wtforms" ,python-wtforms)))
10431 (native-inputs
10432 `(("python-nose2" ,python-nose2)))
10433 (home-page "https://github.com/AlecAivazis/nautilus")
10434 (synopsis "Library for creating microservice applications")
10435 (description
10436 "Nautilus is a framework for flux based microservices that looks to
10437provide extendible implementations of common aspects of a cloud so that you can
10438focus on building massively scalable web applications.")
10439 (license license:expat)))
10440
10441(define-public python-snowballstemmer
10442 (package
10443 (name "python-snowballstemmer")
10444 (version "1.2.1")
10445 (source (origin
10446 (method url-fetch)
10447 (uri (pypi-uri "snowballstemmer" version))
10448 (sha256
10449 (base32
10450 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
10451 (build-system python-build-system)
10452 (arguments
10453 `(;; No tests exist
10454 #:tests? #f))
10455 (home-page "https://github.com/shibukawa/snowball_py")
10456 (synopsis "Snowball stemming library collection for Python")
10457 (description "This package provides 16 word stemmer algorithms generated
10458from Snowball algorithms. It includes the 15 original ones plus the Poerter
10459English stemmer.")
10460 (license license:bsd-3)))
10461
10462(define-public python2-snowballstemmer
10463 (package-with-python2 python-snowballstemmer))
10464
10465(define-public python-sphinx-cloud-sptheme
10466 (package
10467 (name "python-sphinx-cloud-sptheme")
10468 (version "1.8.0")
10469 (source (origin
10470 (method url-fetch)
10471 (uri (pypi-uri "cloud_sptheme" version))
10472 (sha256
10473 (base32
10474 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
10475 (build-system python-build-system)
10476 ;; FIXME: The 'pypi' release archive does not contain tests.
10477 (arguments '(#:tests? #f))
10478 (native-inputs
10479 `(("python-sphinx" ,python-sphinx)))
10480 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
10481 (synopsis "'Cloud' theme for Sphinx documenter")
10482 (description "This package contains the \"Cloud\" theme for Sphinx and some
10483related extensions.")
10484 (license license:bsd-3)))
10485
10486(define-public python2-sphinx-cloud-sptheme
10487 (package-with-python2 python-sphinx-cloud-sptheme))
10488
10489(define-public python-sphinx-alabaster-theme
10490 (package
10491 (name "python-sphinx-alabaster-theme")
10492 (version "0.7.9")
10493 (source (origin
10494 (method url-fetch)
10495 (uri (pypi-uri "alabaster" version))
10496 (sha256
10497 (base32
10498 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
10499 (build-system python-build-system)
10500 (propagated-inputs
10501 `(("python-pygments" ,python-pygments)))
10502 (home-page "https://alabaster.readthedocs.io/")
10503 (synopsis "Configurable sidebar-enabled Sphinx theme")
10504 (description "Alabaster is a visually (c)lean, responsive, configurable
10505theme for the Sphinx documentation system. It's the default theme of Sphinx.")
10506 (license license:bsd-3)))
10507
10508(define-public python2-sphinx-alabaster-theme
10509 (package-with-python2 python-sphinx-alabaster-theme))
10510
10511(define-public python-setproctitle
10512(package
10513 (name "python-setproctitle")
10514 (version "1.1.10")
10515 (source
10516 (origin
10517 (method url-fetch)
10518 (uri (pypi-uri "setproctitle" version))
10519 (sha256
10520 (base32
10521 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
10522 (build-system python-build-system)
10523 (arguments
10524 '(#:phases
10525 (modify-phases %standard-phases
10526 (add-before 'check 'patch-Makefile
10527 ;; Stricly this is only required for the python2 variant.
10528 ;; But adding a phase in an inherited package seems to be
10529 ;; cumbersum. So we patch even for python3.
10530 (lambda _
10531 (let ((nose (assoc-ref %build-inputs "python2-nose")))
10532 (when nose
10533 (substitute* "Makefile"
10534 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
10535 (string-append nose "/bin/nosetests "))))
10536 #t)))
10537 (replace 'check
10538 (lambda _
10539 (setenv "PYTHON" (or (which "python3") (which "python")))
10540 (setenv "PYCONFIG" (or (which "python3-config")
10541 (which "python-config")))
10542 (setenv "CC" "gcc")
10543 ;; No need to extend PYTHONPATH to find the built package, since
10544 ;; the Makefile will build anyway
10545 (invoke "make" "check"))))))
10546 (native-inputs
10547 `(("procps" ,procps))) ; required for tests
10548 (home-page
10549 "https://github.com/dvarrazzo/py-setproctitle")
10550 (synopsis
10551 "Setproctitle implementation for Python to customize the process title")
10552 (description "The library allows a process to change its title (as displayed
10553by system tools such as ps and top).
10554
10555Changing the title is mostly useful in multi-process systems, for
10556example when a master process is forked: changing the children's title
10557allows to identify the task each process is busy with. The technique
10558is used by PostgreSQL and the OpenSSH Server for example.")
10559 (license license:bsd-3)
10560 (properties `((python2-variant . ,(delay python2-setproctitle))))))
10561
10562(define-public python2-setproctitle
10563 (let ((base (package-with-python2
10564 (strip-python2-variant python-setproctitle))))
10565 (package
10566 (inherit base)
10567 (native-inputs `(("python2-nose" ,python2-nose)
10568 ,@(package-native-inputs base))))))
10569
10570(define-public python-validictory
10571 (package
10572 (name "python-validictory")
10573 (version "1.0.1")
10574 (source
10575 (origin
10576 (method url-fetch)
10577 (uri (pypi-uri "validictory" version))
10578 (sha256
10579 (base32
10580 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
10581 (build-system python-build-system)
10582 (arguments
10583 '(#:phases
10584 (modify-phases %standard-phases
10585 (add-after 'unpack 'bootstrap
10586 ;; Move the tests out of the package directory to avoid
10587 ;; packaging them.
10588 (lambda* _
10589 (rename-file "validictory/tests" "tests")
10590 (delete-file "tests/__init__.py")))
10591 (replace 'check
10592 (lambda _
10593 ;; Extend PYTHONPATH so the built package will be found.
10594 (setenv "PYTHONPATH"
10595 (string-append (getcwd) "/build/lib:"
10596 (getenv "PYTHONPATH")))
10597 (zero? (system* "py.test" "-vv" )))))))
10598 (native-inputs
10599 `(("python-pytest" ,python-pytest)))
10600 (home-page
10601 "https://github.com/jamesturk/validictory")
10602 (synopsis "General purpose Python data validator")
10603 (description "It allows validation of arbitrary Python data structures.
10604
10605The schema format is based on the JSON Schema
10606proposal (http://json-schema.org), so combined with json the library is also
10607useful as a validator for JSON data.")
10608 (license license:expat)))
10609
10610(define-public python2-validictory
10611 (package-with-python2 python-validictory))
10612
10613(define-public python-pyelftools
10614 (package
10615 (name "python-pyelftools")
10616 (version "0.25")
10617 (source
10618 (origin
10619 (method url-fetch)
10620 (uri (pypi-uri "pyelftools" version))
10621 (sha256
10622 (base32
10623 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
10624 (build-system python-build-system)
10625 ;; Test suite requires python-setuptools
10626 (native-inputs
10627 `(("python-setuptools" ,python-setuptools)))
10628 (home-page
10629 "https://github.com/eliben/pyelftools")
10630 (synopsis
10631 "Analyze binary and library file information")
10632 (description "This Python library provides interfaces for parsing and
10633analyzing two binary and library file formats; the Executable and Linking
10634Format (ELF), and debugging information in the Debugging With Attributed
10635Record Format (DWARF).")
10636 (license license:public-domain)))
10637
10638(define-public python-pyev
10639 (package
10640 (name "python-pyev")
10641 (version "0.9.0")
10642 (source
10643 (origin
10644 (method url-fetch)
10645 (uri (pypi-uri "pyev" version))
10646 (sha256
10647 (base32
10648 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
10649 (build-system python-build-system)
10650 (arguments
10651 `(#:tests? #f ; no test suite
10652 #:phases
10653 (modify-phases %standard-phases
10654 (add-after 'unpack 'patch
10655 (lambda* (#:key inputs #:allow-other-keys)
10656 (let ((libev (string-append (assoc-ref inputs "libev")
10657 "/lib/libev.so.4")))
10658 (substitute* "setup.py"
10659 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
10660 (string-append "libev_dll_name = \"" libev "\"")))))))))
10661 (inputs
10662 `(("libev" ,libev)))
10663 (home-page "http://pythonhosted.org/pyev/")
10664 (synopsis "Python libev interface")
10665 (description "Pyev provides a Python interface to libev.")
10666 (license license:gpl3)))
10667
10668(define-public python2-pyev
10669 (package-with-python2 python-pyev))
10670
10671(define-public python-imagesize
10672 (package
10673 (name "python-imagesize")
10674 (version "1.0.0")
10675 (source
10676 (origin
10677 (method url-fetch)
10678 (uri (pypi-uri "imagesize" version))
10679 (sha256
10680 (base32
10681 "05b3p62r7rbcvvbk5vknr3bhcq9b2airysn6ric534mng136wcjv"))))
10682 (build-system python-build-system)
10683 (home-page "https://github.com/shibukawa/imagesize_py")
10684 (synopsis "Gets image size of files in various formats in Python")
10685 (description
10686 "This package allows determination of image size from
10687PNG, JPEG, JPEG2000 and GIF files in pure Python.")
10688 (license license:expat)))
10689
10690(define-public python2-imagesize
10691 (package-with-python2 python-imagesize))
10692
10693(define-public python-termstyle
10694 (package
10695 (name "python-termstyle")
10696 (version "0.1.11")
10697 (source
10698 (origin
10699 (method url-fetch)
10700 (uri (pypi-uri "termstyle" version))
10701 (sha256
10702 (base32
10703 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
10704 (build-system python-build-system)
10705 (arguments
10706 '(#:phases
10707 (modify-phases %standard-phases
10708 (replace 'check
10709 (lambda _
10710 (zero? (system* "python" "test3.py")))))))
10711 (home-page "https://github.com/gfxmonk/termstyle")
10712 (synopsis "Console text coloring for Python")
10713 (description "This package provides console text coloring for Python.")
10714 (license license:bsd-3)))
10715
10716(define-public python-argcomplete
10717 (package
10718 (name "python-argcomplete")
10719 (version "1.7.0")
10720 (source
10721 (origin
10722 (method url-fetch)
10723 (uri (pypi-uri "argcomplete" version))
10724 (sha256
10725 (base32
10726 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
10727 (build-system python-build-system)
10728 (native-inputs
10729 `(("python-pexpect" ,python-pexpect)
10730 ("tcsh" ,tcsh)
10731 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
10732 (home-page "https://github.com/kislyuk/argcomplete")
10733 (synopsis "Shell tab completion for Python argparse")
10734 (description "argcomplete provides extensible command line tab completion
10735of arguments and options for Python scripts using @code{argparse}. It's
10736particularly useful for programs with many options or sub-parsers that can
10737dynamically suggest completions; for example, when browsing resources over the
10738network.")
10739 (license license:asl2.0)))
10740
10741(define-public python2-argcomplete
10742 (package-with-python2 python-argcomplete))
10743
10744(define-public python-xopen
10745 (package
10746 (name "python-xopen")
10747 (version "0.3.3")
10748 (source
10749 (origin
10750 (method url-fetch)
10751 (uri (pypi-uri "xopen" version))
10752 (sha256
10753 (base32
10754 "1a0wbil552wsmklwd89ssmgz3pjd86qa9i7jh8wqb9wslc8a2qjr"))
10755 (file-name (string-append name "-" version ".tar.gz"))))
10756 (build-system python-build-system)
10757 (home-page "https://github.com/marcelm/xopen/")
10758 (synopsis "Open compressed files transparently")
10759 (description "This module provides an @code{xopen} function that works like
10760Python's built-in @code{open} function, but can also deal with compressed files.
10761Supported compression formats are gzip, bzip2 and, xz, and are automatically
10762recognized by their file extensions. The focus is on being as efficient as
10763possible on all supported Python versions.")
10764 (license license:expat)))
10765
10766(define-public python2-xopen
10767 (let ((base (package-with-python2
10768 (strip-python2-variant python-xopen))))
10769 (package
10770 (inherit base)
10771 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
10772 ,@(package-propagated-inputs base))))))
10773
10774(define-public python-cheetah
10775 (package
10776 (name "python-cheetah")
10777 (version "3.1.0")
10778 (source
10779 (origin
10780 (method url-fetch)
10781 (uri (pypi-uri "Cheetah3" version))
10782 (sha256
10783 (base32
10784 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
10785 (build-system python-build-system)
10786 (arguments
10787 `(#:modules ((guix build utils)
10788 (guix build python-build-system)
10789 (ice-9 ftw)
10790 (srfi srfi-1)
10791 (srfi srfi-26))
10792 #:phases (modify-phases %standard-phases
10793 (add-after 'unpack 'use-absolute-python
10794 (lambda _
10795 (substitute* "Cheetah/CheetahWrapper.py"
10796 (("#!/usr/bin/env python")
10797 (string-append "#!" (which "python"))))
10798 #t))
10799 (replace 'check
10800 (lambda _
10801 (let ((cwd (getcwd)))
10802 (setenv "PYTHONPATH"
10803 (string-append
10804 cwd "/build/"
10805 (find (cut string-prefix? "lib" <>)
10806 (scandir (string-append cwd "/build")))
10807 ":" (getenv "PYTHONPATH")))
10808 (setenv "PATH"
10809 (string-append (getenv "PATH")
10810 ":" cwd "/bin"))
10811 (setenv "TMPDIR" "/tmp")
10812
10813 (substitute* "Cheetah/Tests/Test.py"
10814 (("unittest.TextTestRunner\\(\\)")
10815 "unittest.TextTestRunner(verbosity=2)"))
10816
10817 (invoke "python" "Cheetah/Tests/Test.py")))))))
10818 (propagated-inputs
10819 `(("python-markdown" ,python-markdown))) ;optional
10820 (home-page "http://cheetahtemplate.org/")
10821 (synopsis "Template engine")
10822 (description "Cheetah is a text-based template engine and Python code
10823generator.
10824
10825Cheetah can be used as a standalone templating utility or referenced as
10826a library from other Python applications. It has many potential uses,
10827but web developers looking for a viable alternative to ASP, JSP, PHP and
10828PSP are expected to be its principle user group.
10829
10830Features:
10831@enumerate
10832@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
10833 text-based format.
10834@item Cleanly separates content, graphic design, and program code.
10835@item Blends the power and flexibility of Python with a simple template language
10836 that non-programmers can understand.
10837@item Gives template writers full access to any Python data structure, module,
10838 function, object, or method in their templates.
10839@item Makes code reuse easy by providing an object-orientated interface to
10840 templates that is accessible from Python code or other Cheetah templates.
10841 One template can subclass another and selectively reimplement sections of it.
10842@item Provides a simple, yet powerful, caching mechanism that can dramatically
10843 improve the performance of a dynamic website.
10844@item Compiles templates into optimized, yet readable, Python code.
10845@end enumerate")
10846 (license (license:x11-style "file://LICENSE"))))
10847
10848(define-public python2-cheetah
10849 (package-with-python2 python-cheetah))
10850
10851(define-public python-dulwich
10852 (package
10853 (name "python-dulwich")
10854 (version "0.18.6")
10855 (source
10856 (origin
10857 (method url-fetch)
10858 (uri (list (string-append "https://www.dulwich.io/releases/"
10859 "dulwich-" version ".tar.gz")
10860 (pypi-uri "dulwich" version)))
10861 (sha256
10862 (base32
10863 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
10864 (build-system python-build-system)
10865 (arguments
10866 `(#:phases
10867 (modify-phases %standard-phases
10868 (add-before 'check 'fix-tests
10869 (lambda* (#:key inputs #:allow-other-keys)
10870 ;; The tests use Popen with a custom environment which doesn't
10871 ;; include PATH.
10872 (substitute* "dulwich/tests/compat/utils.py"
10873 (("'git'") (string-append "'"
10874 (which "git")
10875 "'")))
10876 (substitute* '("dulwich/tests/test_repository.py"
10877 "dulwich/tests/test_hooks.py")
10878 (("#!/bin/sh") (string-append "#!" (which "sh"))))
10879 (setenv "TEST_RUNNER" "unittest")
10880 (setenv "PYTHONHASHSEED" "random")
10881 #t)))))
10882 (propagated-inputs
10883 `(("python-fastimport" ,python-fastimport)))
10884 (native-inputs
10885 `(("python-mock" ,python-mock)
10886 ("python-geventhttpclient" ,python-geventhttpclient)
10887 ("git" ,git)))
10888 (home-page "https://www.dulwich.io/")
10889 (synopsis "Git implementation in Python")
10890 (description "Dulwich is an implementation of the Git file formats and
10891protocols written in pure Python.")
10892 ;; Can be used with either license.
10893 (license (list license:asl2.0 license:gpl2+))))
10894
10895(define-public python2-dulwich
10896 (package-with-python2 python-dulwich))
10897
10898(define-public python-pbkdf2
10899 (package
10900 (name "python-pbkdf2")
10901 (version "1.3")
10902 (source
10903 (origin
10904 (method url-fetch)
10905 (uri (pypi-uri "pbkdf2" version))
10906 (sha256
10907 (base32
10908 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
10909 (build-system python-build-system)
10910 (arguments
10911 '(#:phases
10912 (modify-phases %standard-phases
10913 (replace 'check
10914 (lambda _
10915 (setenv "PYTHONPATH"
10916 (string-append (getcwd) "/build/lib:"
10917 (getenv "PYTHONPATH")))
10918 (zero? (system* "python" "test/test_pbkdf2.py")))))))
10919 (propagated-inputs
10920 `(("python-pycrypto" ,python-pycrypto))) ; optional
10921 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
10922 (synopsis "Password-based key derivation")
10923 (description "This module implements the password-based key derivation
10924function, PBKDF2, specified in RSA PKCS#5 v2.0.
10925
10926PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
10927is part of the RSA Public Key Cryptography Standards series. The provided
10928implementation takes a password or a passphrase and a salt value (and
10929optionally a iteration count, a digest module, and a MAC module) and provides
10930a file-like object from which an arbitrarly-sized key can be read.")
10931 (license license:expat)))
10932
10933(define-public python2-pbkdf2
10934 (package-with-python2 python-pbkdf2))
10935
10936(define-public python-qrcode
10937 (package
10938 (name "python-qrcode")
10939 (version "6.0")
10940 (source
10941 (origin
10942 (method url-fetch)
10943 (uri (pypi-uri "qrcode" version))
10944 (sha256
10945 (base32
10946 "1gz1g2n9kqwqkak78aavr354z1v3yyiksk7q6xp5hi1zr6s0syq3"))))
10947 (build-system python-build-system)
10948 (arguments
10949 ;; FIXME: Tests require packaging 'pymaging'.
10950 '(#:tests? #f))
10951 (propagated-inputs
10952 `(("python-lxml" ,python-lxml) ; for SVG output
10953 ("python-pillow" ,python-pillow) ; for PNG output
10954 ("python-six" ,python-six)))
10955 (inputs
10956 `(;; The setup.cfg file needs to be used, and support for this requires
10957 ;; at least version 30.3.0 of setuptools
10958 ("python-setuptools" ,python-setuptools)))
10959 (home-page "https://github.com/lincolnloop/python-qrcode")
10960 (synopsis "QR Code image generator")
10961 (description "This package provides a pure Python QR Code generator
10962module. It uses the Python Imaging Library (PIL) to allow for the generation
10963of QR Codes.
10964
10965In addition this package provides a command line tool to generate QR codes and
10966either write these QR codes to a file or do the output as ascii art at the
10967console.")
10968 (license license:bsd-3)))
10969
10970(define-public python2-qrcode
10971 (package-with-python2 python-qrcode))
10972
10973(define-public python-rst2ansi
10974 (package
10975 (name "python-rst2ansi")
10976 (version "0.1.5")
10977 (source
10978 (origin
10979 (method url-fetch)
10980 (uri (pypi-uri "rst2ansi" version))
10981 (sha256
10982 (base32
10983 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
10984 (build-system python-build-system)
10985 (propagated-inputs
10986 `(("python-docutils" ,python-docutils)))
10987 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
10988 (synopsis "Convert RST to ANSI-decorated console output")
10989 (description
10990 "Python module dedicated to rendering RST (reStructuredText) documents
10991to ansi-escaped strings suitable for display in a terminal.")
10992 (license license:expat)))
10993
10994(define-public python-ansi2html
10995 (package
10996 (name "python-ansi2html")
10997 (version "1.2.0")
10998 (source
10999 (origin
11000 (method url-fetch)
11001 (uri (pypi-uri "ansi2html" version))
11002 (sha256
11003 (base32
11004 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11005 (build-system python-build-system)
11006 (native-inputs
11007 `(("python-mock" ,python-mock)
11008 ("python-nose" ,python-nose)))
11009 (propagated-inputs
11010 `(("python-six" ,python-six)))
11011 (home-page "https://github.com/ralphbean/ansi2html")
11012 (synopsis "Convert ANSI-decorated console output to HTML")
11013 (description
11014 "@command{ansi2html} is a Python library and command line utility for
11015convering text with ANSI color codes to HTML or LaTeX.")
11016 (license license:gpl3+)))
11017
11018(define-public python2-ansi2html
11019 (package-with-python2 python-ansi2html))
11020
11021(define-public python-ddt
11022 (package
11023 (name "python-ddt")
11024 (version "1.1.3")
11025 (source
11026 (origin
11027 (method url-fetch)
11028 (uri (pypi-uri "ddt" version))
11029 (sha256
11030 (base32
11031 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11032 (build-system python-build-system)
11033 (native-inputs
11034 `(("python-mock" ,python-mock)
11035 ("python-nose" ,python-nose)))
11036 (propagated-inputs
11037 `(("python-six" ,python-six)
11038 ("python-pyyaml" ,python-pyyaml)))
11039 (home-page "https://github.com/txels/ddt")
11040 (synopsis "Data-Driven Tests")
11041 (description
11042 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11043running it with different test data, and make it appear as multiple test
11044cases.")
11045 (license license:expat)))
11046
11047(define-public python2-ddt
11048 (package-with-python2 python-ddt))
11049
11050(define-public python-pycountry
11051 (package
11052 (name "python-pycountry")
11053 (version "18.5.26")
11054 (source
11055 (origin
11056 (method url-fetch)
11057 (uri (pypi-uri "pycountry" version))
11058 (sha256
11059 (base32
11060 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11061 (build-system python-build-system)
11062 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11063 (synopsis "ISO databases for languages, countries, currencies, etc.")
11064 (description
11065 "@code{pycountry} provides the ISO databases for the standards:
11066@enumerate
11067@item 639-3 (Languages)
11068@item 3166 (Countries)
11069@item 3166-3 (Deleted Countries)
11070@item 3166-2 (Subdivisions of countries)
11071@item 4217 (Currencies)
11072@item 15924 (Scripts)
11073@end enumerate
11074It includes a copy from Debian’s pkg-isocodes and makes the data accessible
11075through a Python API.")
11076 (license license:lgpl2.1+)))
11077
11078(define-public python2-pycountry
11079 (package-with-python2 python-pycountry))
11080
11081(define-public python-pycosat
11082 (package
11083 (name "python-pycosat")
11084 (version "0.6.1")
11085 (source
11086 (origin
11087 (method url-fetch)
11088 (uri (pypi-uri "pycosat" version))
11089 (sha256
11090 (base32
11091 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
11092 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
11093 (build-system python-build-system)
11094 (home-page "https://github.com/ContinuumIO/pycosat")
11095 (synopsis "Bindings to picosat (a SAT solver)")
11096 (description
11097 "This package provides efficient Python bindings to @code{picosat} on
11098the C level. When importing pycosat, the @code{picosat} solver becomes part
11099of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
11100Problem} (SAT) solver.")
11101 (license license:expat)))
11102
11103(define-public python2-pycosat
11104 (package-with-python2 python-pycosat))
11105
11106(define-public python2-ruamel.ordereddict
11107 (package
11108 (name "python2-ruamel.ordereddict")
11109 (version "0.4.9")
11110 (source
11111 (origin
11112 (method url-fetch)
11113 (uri (pypi-uri "ruamel.ordereddict" version))
11114 (sha256
11115 (base32
11116 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11117 (build-system python-build-system)
11118 (arguments
11119 `(#:python ,python-2
11120 #:phases
11121 (modify-phases %standard-phases
11122 (delete 'check)
11123 (add-after 'install 'check
11124 (lambda* (#:key inputs outputs #:allow-other-keys)
11125 (add-installed-pythonpath inputs outputs)
11126 (zero? (system* "python" "test/testordereddict.py")))))))
11127 (home-page "https://bitbucket.org/ruamel/ordereddict")
11128 (synopsis "Version of dict that keeps keys in insertion order")
11129 (description
11130 "This is an implementation of an ordered dictionary with @dfn{Key
11131Insertion Order} (KIO: updates of values do not affect the position of the
11132key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11133removed and put at the back). The standard library module @code{OrderedDict},
11134implemented later, implements a subset of @code{ordereddict} functionality.
11135Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11136Order} (KSO, no sorting function can be specified, but a transform can be
11137specified to apply on the key before comparison (e.g. @code{string.lower})).")
11138 (license license:expat)))
11139
11140(define-public python-pypeg2
11141 (package
11142 (name "python-pypeg2")
11143 (version "2.15.2")
11144 (source
11145 (origin
11146 (method url-fetch)
11147 (uri (pypi-uri "pyPEG2" version))
11148 (sha256
11149 (base32
11150 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11151 (build-system python-build-system)
11152 (propagated-inputs `(("python-lxml" ,python-lxml)))
11153 (arguments
11154 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11155 '(#:tests? #f))
11156 (home-page "https://fdik.org/pyPEG/")
11157 (synopsis "Parsering Expression Grammars in Python")
11158 (description "PyPEG is an intrinsic parser interpreter framework for
11159Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11160parse many formal languages.")
11161 (license license:gpl2)))
11162
11163(define-public python-incremental
11164 (package
11165 (name "python-incremental")
11166 (version "17.5.0")
11167 (source
11168 (origin
11169 (method url-fetch)
11170 (uri (pypi-uri "incremental" version))
11171 (sha256
11172 (base32
11173 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11174 (build-system python-build-system)
11175 (home-page "https://github.com/hawkowl/incremental")
11176 (synopsis "Library for versioning Python projects")
11177 (description "Incremental is a small library that versions your Python
11178projects.")
11179 (license license:expat)))
11180
11181(define-public python2-incremental
11182 (package-with-python2 python-incremental))
11183
11184(define-public python-invoke
11185 (package
11186 (name "python-invoke")
11187 (home-page "http://www.pyinvoke.org/")
11188 (version "1.1.0")
11189 (source (origin
11190 (method url-fetch)
11191 (uri (pypi-uri "invoke" version))
11192 (sha256
11193 (base32
11194 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11195 (build-system python-build-system)
11196 (arguments
11197 ;; XXX: Requires many dependencies that are not yet in Guix.
11198 `(#:tests? #f))
11199 (synopsis "Pythonic task execution")
11200 (description
11201 "Invoke is a Python task execution tool and library, drawing inspiration
11202from various sources to arrive at a powerful and clean feature set. It is
11203evolved from the Fabric project, but focuses on local and abstract concerns
11204instead of servers and network commands.")
11205 (license license:bsd-3)))
11206
11207(define-public python2-invoke
11208 (package-with-python2 python-invoke))
11209
11210(define-public python-automat
11211 (package
11212 (name "python-automat")
11213 (version "0.6.0")
11214 (source (origin
11215 (method url-fetch)
11216 (uri (pypi-uri "Automat" version))
11217 (sha256
11218 (base32
11219 "1a7nsrljysfmdqmpn2apfa1gg6rfah4y9sizvns8gb08rx7d07rw"))))
11220 (build-system python-build-system)
11221 ;; We disable the tests because they require python-twisted, while
11222 ;; python-twisted depends on python-automat. Twisted is optional, but the
11223 ;; tests fail if it is not available. Also see
11224 ;; <https://github.com/glyph/automat/issues/71>.
11225 (arguments '(#:tests? #f))
11226 (native-inputs
11227 `(("python-m2r" ,python-m2r)
11228 ("python-setuptools-scm" ,python-setuptools-scm)
11229 ("python-graphviz" ,python-graphviz)))
11230 (propagated-inputs
11231 `(("python-six" ,python-six)
11232 ("python-attrs" ,python-attrs)))
11233 (home-page "https://github.com/glyph/Automat")
11234 (synopsis "Self-service finite-state machines")
11235 (description "Automat is a library for concise, idiomatic Python
11236expression of finite-state automata (particularly deterministic finite-state
11237transducers).")
11238 (license license:expat)))
11239
11240(define-public python2-automat
11241 (package-with-python2 python-automat))
11242
11243(define-public python-m2r
11244 (package
11245 (name "python-m2r")
11246 (version "0.1.12")
11247 (source (origin
11248 (method url-fetch)
11249 (uri (pypi-uri "m2r" version))
11250 (sha256
11251 (base32
11252 "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd"))))
11253 (build-system python-build-system)
11254 (propagated-inputs
11255 `(("python-docutils" ,python-docutils)
11256 ("python-mistune" ,python-mistune)))
11257 (native-inputs
11258 `(("python-pygments" ,python-pygments)
11259 ("python-mock" ,python-mock)))
11260 (home-page "https://github.com/miyakogi/m2r")
11261 (synopsis "Markdown to reStructuredText converter")
11262 (description "M2R converts a markdown file including reST markups to valid
11263reST format.")
11264 (license license:expat)))
11265
11266(define-public python2-m2r
11267 (package-with-python2 python-m2r))
11268
11269(define-public python-constantly
11270 (package
11271 (name "python-constantly")
11272 (version "15.1.0")
11273 (source (origin
11274 (method url-fetch)
11275 (uri (pypi-uri "constantly" version))
11276 (sha256
11277 (base32
11278 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11279 (build-system python-build-system)
11280 (home-page "https://github.com/twisted/constantly")
11281 (synopsis "Symbolic constants in Python")
11282 (description "Constantly is a Python library that provides symbolic
11283constant support. It includes collections and constants with text, numeric,
11284and bit flag values.")
11285 (license license:expat)))
11286
11287(define-public python2-constantly
11288 (package-with-python2 python-constantly))
11289
11290(define-public python-attrs
11291 (package
11292 (name "python-attrs")
11293 (version "18.2.0")
11294 (source (origin
11295 (method url-fetch)
11296 (uri (pypi-uri "attrs" version))
11297 (sha256
11298 (base32
11299 "0s9ydh058wmmf5v391pym877x4ahxg45dw6a0w4c7s5wgpigdjqh"))))
11300 (build-system python-build-system)
11301 (arguments
11302 `(#:modules ((guix build utils)
11303 (guix build python-build-system)
11304 (ice-9 ftw)
11305 (srfi srfi-1)
11306 (srfi srfi-26))
11307 #:phases (modify-phases %standard-phases
11308 (replace 'check
11309 (lambda _
11310 (let ((cwd (getcwd)))
11311 (setenv "PYTHONPATH"
11312 (string-append
11313 cwd "/build/"
11314 (find (cut string-prefix? "lib" <>)
11315 (scandir (string-append cwd "/build")))
11316 ":"
11317 (getenv "PYTHONPATH")))
11318 (invoke "python" "-m" "pytest")))))))
11319 (native-inputs
11320 `(("python-coverage" ,python-coverage)
11321 ("python-hypothesis" ,python-hypothesis)
11322 ("python-pympler" ,python-pympler)
11323 ("python-pytest" ,python-pytest)
11324 ("python-six" ,python-six)
11325 ("python-sphinx" ,python-sphinx)
11326 ("python-zope-interface" ,python-zope-interface)))
11327 (home-page "https://github.com/python-attrs/attrs/")
11328 (synopsis "Attributes without boilerplate")
11329 (description "@code{attrs} is a Python package with class decorators that
11330ease the chores of implementing the most common attribute-related object
11331protocols.")
11332 (license license:expat)))
11333
11334(define-public python2-attrs
11335 (package-with-python2 python-attrs))
11336
11337(define-public python-attrs-bootstrap
11338 (package
11339 (inherit python-attrs)
11340 (name "python-attrs-bootstrap")
11341 ;; Keep this on a fixed version so python-attrs can be updated without
11342 ;; triggering a mass-rebuild. FIXME: Update this in the next rebuild cycle.
11343 (version "17.4.0")
11344 (source (origin
11345 (method url-fetch)
11346 (uri (pypi-uri "attrs" version))
11347 (sha256
11348 (base32
11349 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
11350 (native-inputs `())
11351 (arguments `(#:tests? #f))))
11352
11353(define-public python2-attrs-bootstrap
11354 (package-with-python2 python-attrs-bootstrap))
11355
11356(define-public python2-cliapp
11357 (package
11358 (name "python2-cliapp")
11359 (version "1.20170823")
11360 (source
11361 (origin
11362 (method url-fetch)
11363 (uri (string-append
11364 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11365 version ".tar.gz"))
11366 (sha256
11367 (base32
11368 "1i9gik0xrj6jmi95s5w988jl1y265baz5xm5pbqdyvsh8h9ln6yq"))))
11369 (build-system python-build-system)
11370 (arguments
11371 `(#:python ,python-2
11372 #:phases
11373 (modify-phases %standard-phases
11374 ;; check phase needs to be run before the build phase. If not,
11375 ;; coverage-test-runner looks for tests for the built source files,
11376 ;; and fails.
11377 (delete 'check)
11378 (add-before 'build 'check
11379 (lambda _
11380 ;; Disable python3 tests
11381 (substitute* "check"
11382 (("python3") "# python3"))
11383 (zero? (system* "./check")))))))
11384 (native-inputs
11385 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11386 ("python2-pep8" ,python2-pep8)))
11387 (propagated-inputs
11388 `(("python2-pyaml" ,python2-pyaml)))
11389 (home-page "https://liw.fi/cliapp/")
11390 (synopsis "Python framework for command line programs")
11391 (description "@code{python2-cliapp} is a python framework for
11392command line programs. It contains the typical stuff such programs
11393need to do, such as parsing the command line for options, and
11394iterating over input files.")
11395 (license license:gpl2+)))
11396
11397(define-public python2-ttystatus
11398 (package
11399 (name "python2-ttystatus")
11400 (version "0.35")
11401 (source
11402 (origin
11403 (method url-fetch)
11404 (uri (string-append
11405 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
11406 version ".tar.gz"))
11407 (sha256
11408 (base32
11409 "0vivqbw7ddhsq1zj3g9cvvv4f0phl0pis2smsnwcr2szz2fk3hl6"))))
11410 (build-system python-build-system)
11411 (native-inputs
11412 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11413 ("python2-pep8" ,python2-pep8)))
11414 (arguments
11415 `(#:python ,python-2
11416 #:phases
11417 (modify-phases %standard-phases
11418 ;; check phase needs to be run before the build phase. If not,
11419 ;; coverage-test-runner looks for tests for the built source files,
11420 ;; and fails.
11421 (delete 'check)
11422 (add-before 'build 'check
11423 (lambda _
11424 (zero? (system* "make" "check")))))))
11425 (home-page "https://liw.fi/ttystatus/")
11426 (synopsis "Python library for showing progress reporting and
11427status updates on terminals")
11428 (description "@code{python2-ttystatus} is a python library for
11429showing progress reporting and status updates on terminals, for
11430command line programs. Output is automatically adapted to the width
11431of the terminal: truncated if it does not fit, and resized if the
11432terminal size changes.")
11433 (license license:gpl3+)))
11434
11435(define-public python2-tracing
11436 (package
11437 (name "python2-tracing")
11438 (version "0.10")
11439 (source
11440 (origin
11441 (method url-fetch)
11442 (uri (string-append
11443 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
11444 version ".tar.gz"))
11445 (sha256
11446 (base32
11447 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
11448 (build-system python-build-system)
11449 (arguments
11450 `(#:python ,python-2))
11451 (home-page "https://liw.fi/tracing/")
11452 (synopsis "Python debug logging helper")
11453 (description "@code{python2-tracing} is a python library for
11454logging debug messages. It provides a way to turn debugging messages
11455on and off, based on the filename they occur in. It is much faster
11456than using @code{logging.Filter} to accomplish the same thing, which
11457matters when code is run in production mode. The actual logging still
11458happens using the @code{logging} library.")
11459 (license license:gpl3+)))
11460
11461(define-public python2-larch
11462 (package
11463 (name "python2-larch")
11464 (version "1.20151025")
11465 (source
11466 (origin
11467 (method url-fetch)
11468 (uri (string-append
11469 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
11470 version ".tar.gz"))
11471 (patches (search-patches
11472 "python2-larch-coverage-4.0a6-compatibility.patch"))
11473 (sha256
11474 (base32
11475 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
11476 (build-system python-build-system)
11477 (arguments
11478 `(#:python ,python-2
11479 #:phases
11480 (modify-phases %standard-phases
11481 ;; check phase needs to be run before the build phase. If not,
11482 ;; coverage-test-runner looks for tests for the built source files,
11483 ;; and fails.
11484 (delete 'check)
11485 (add-before 'build 'check
11486 (lambda _
11487 (zero? (system* "make" "check")))))))
11488 (native-inputs
11489 `(("cmdtest" ,cmdtest)
11490 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
11491 (propagated-inputs
11492 `(("python2-tracing" ,python2-tracing)))
11493 (home-page "https://liw.fi/larch/")
11494 (synopsis "Python copy-on-write B-tree library")
11495 (description "@code{python2-larch} is an implementation of
11496particular kind of B-tree, based on research by Ohad Rodeh. See
11497@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
11498on the data structure.
11499
11500The distinctive feature of this B-tree is that a node is never
11501(conceptually) modified. Instead, all updates are done by
11502copy-on-write. This makes it easy to clone a tree, and modify only the
11503clone, while other processes access the original tree.")
11504 (license license:gpl3+)))
11505
11506(define-public python-astroid
11507 (package
11508 (name "python-astroid")
11509 (version "2.0.4")
11510 (source
11511 (origin
11512 (method url-fetch)
11513 (uri (pypi-uri "astroid" version))
11514 (sha256
11515 (base32
11516 "138svbm88w5k0y2nvl4svyas1jfhcc5iy0d2ywkbcpn9kq8ks0f7"))))
11517 (build-system python-build-system)
11518 (propagated-inputs
11519 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
11520 ("python-six" ,python-six)
11521 ("python-wrapt" ,python-wrapt)))
11522 (native-inputs
11523 `(("python-dateutil" ,python-dateutil)
11524 ("python-nose" ,python-nose)
11525 ("python-pytest" ,python-pytest)
11526 ("python-pytest-runner" ,python-pytest-runner)))
11527 (arguments
11528 `(#:phases
11529 (modify-phases %standard-phases
11530 (add-after 'unpack 'remove-spurious-test
11531 (lambda _
11532 ;; This can be removed after upgrading from python-3.7
11533 ;; https://github.com/PyCQA/astroid/issues/593
11534 ;; https://bugs.python.org/issue34056
11535 (delete-file "astroid/tests/unittest_modutils.py")
11536 #t))
11537 (replace 'check
11538 (lambda _
11539 (invoke "pytest" "astroid"))))))
11540 (home-page "https://github.com/PyCQA/astroid")
11541 (synopsis "Common base representation of python source code for pylint and
11542other projects")
11543 (description "@code{python-astroid} provides a common base representation
11544of python source code for projects such as pychecker, pyreverse, pylint, etc.
11545
11546It provides a compatible representation which comes from the _ast module. It
11547rebuilds the tree generated by the builtin _ast module by recursively walking
11548down the AST and building an extended ast. The new node classes have
11549additional methods and attributes for different usages. They include some
11550support for static inference and local name scopes. Furthermore, astroid
11551builds partial trees by inspecting living objects.")
11552 (license license:lgpl2.1+)
11553 (properties `((python2-variant . ,(delay python2-astroid))))))
11554
11555(define-public python2-astroid
11556 (let ((base (package-with-python2
11557 (strip-python2-variant python-astroid))))
11558 (package (inherit base)
11559 ;; Version 2.x removes python2 support.
11560 (version "1.6.5")
11561 (source
11562 (origin
11563 (method url-fetch)
11564 (uri (pypi-uri "astroid" version))
11565 (sha256
11566 (base32
11567 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
11568 (arguments
11569 (substitute-keyword-arguments (package-arguments base)
11570 ((#:phases phases)
11571 `(modify-phases ,phases
11572 (add-after 'unpack 'remove-spurious-test
11573 (lambda _
11574 ;; https://github.com/PyCQA/astroid/issues/276
11575 (delete-file "astroid/tests/unittest_brain.py")
11576 #t))
11577 (replace 'check
11578 (lambda _
11579 (invoke"python" "-m" "unittest" "discover"
11580 "-p" "unittest*.py")))))))
11581 (native-inputs `())
11582 (propagated-inputs
11583 `(("python2-backports-functools-lru-cache"
11584 ,python2-backports-functools-lru-cache)
11585 ("python2-enum34" ,python2-enum34)
11586 ("python2-singledispatch" ,python2-singledispatch)
11587 ,@(package-propagated-inputs base))))))
11588
11589(define-public python-isort
11590 (package
11591 (name "python-isort")
11592 (version "4.2.5")
11593 (source
11594 (origin
11595 (method url-fetch)
11596 (uri (string-append
11597 "https://github.com/timothycrosley/isort/archive/"
11598 version ".tar.gz"))
11599 (file-name (string-append name "-" version ".tar.gz"))
11600 (sha256
11601 (base32
11602 "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh"))))
11603 (build-system python-build-system)
11604 (native-inputs
11605 `(("python-mock" ,python-mock)
11606 ("python-pytest" ,python-pytest)))
11607 (home-page "https://github.com/timothycrosley/isort")
11608 (synopsis "Python utility/library to sort python imports")
11609 (description "@code{python-isort} is a python utility/library to sort
11610imports alphabetically, and automatically separated into sections. It
11611provides a command line utility, a python library and plugins for various
11612editors.")
11613 (license license:expat)))
11614
11615(define-public python2-isort
11616 (package-with-python2 python-isort))
11617
11618(define-public python2-backports-functools-lru-cache
11619 (package
11620 (name "python2-backports-functools-lru-cache")
11621 (version "1.5")
11622 (source
11623 (origin
11624 (method url-fetch)
11625 ;; only the pypi tarballs contain the necessary metadata
11626 (uri (pypi-uri "backports.functools_lru_cache" version))
11627 (sha256
11628 (base32
11629 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
11630 (build-system python-build-system)
11631 (native-inputs
11632 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
11633 (arguments
11634 `(#:python ,python-2))
11635 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
11636 (synopsis "Backport of functools.lru_cache from Python 3.3")
11637 (description "@code{python2-backports-functools-lru-cache} is a backport
11638of @code{functools.lru_cache} from python 3.3.")
11639 (license license:expat)))
11640
11641(define-public python-configparser
11642 (package
11643 (name "python-configparser")
11644 (version "3.5.0")
11645 (source
11646 (origin
11647 (method url-fetch)
11648 (uri (string-append
11649 "https://bitbucket.org/ambv/configparser/get/"
11650 version ".tar.bz2"))
11651 (file-name (string-append name "-" version ".tar.gz"))
11652 (sha256
11653 (base32
11654 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
11655 (build-system python-build-system)
11656 (home-page "http://docs.python.org/py3k/library/configparser.html")
11657 (synopsis "Backport of configparser from python 3.5")
11658 (description "@code{python-configparser} is a backport of
11659@code{configparser} from Python 3.5 so that it can be used directly
11660in other versions.")
11661 (license license:expat)))
11662
11663(define-public python2-configparser
11664 (package-with-python2 python-configparser))
11665
11666(define-public python-mando
11667 (package
11668 (name "python-mando")
11669 (version "0.6.4")
11670 (source (origin
11671 (method url-fetch)
11672 (uri (pypi-uri "mando" version))
11673 (sha256
11674 (base32
11675 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
11676 (build-system python-build-system)
11677 (propagated-inputs
11678 `(("python-rst2ansi" ,python-rst2ansi)
11679 ("python-six" ,python-six)))
11680 (native-inputs
11681 `(("python-pytest" ,python-pytest)))
11682 (home-page "https://mando.readthedocs.org/")
11683 (synopsis
11684 "Wrapper around argparse, allowing creation of complete CLI applications")
11685 (description
11686 "This package is a wrapper around argparse, allowing you to write complete CLI
11687applications in seconds while maintaining all the flexibility.")
11688 (license license:expat)))
11689
11690(define-public python2-mando
11691 (package-with-python2 python-mando))
11692
11693(define-public python-fudge
11694 (package
11695 (name "python-fudge")
11696 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
11697 ;; package, which is currently the only use of this package.
11698 (version "0.9.6")
11699 (source
11700 (origin
11701 (method url-fetch)
11702 (uri (pypi-uri "fudge" version))
11703 (sha256
11704 (base32
11705 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
11706 (build-system python-build-system)
11707 (arguments
11708 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
11709 (home-page "https://github.com/fudge-py/fudge")
11710 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
11711 (description
11712 "Fudge is a Python module for using fake objects (mocks and stubs) to
11713test real ones.
11714
11715In readable Python code, you declare the methods available on your fake object
11716and how they should be called. Then you inject that into your application and
11717start testing. This declarative approach means you don’t have to record and
11718playback actions and you don’t have to inspect your fakes after running code.
11719If the fake object was used incorrectly then you’ll see an informative
11720exception message with a traceback that points to the culprit.")
11721 (license license:expat)))
11722
11723(define-public python2-fudge
11724 (package-with-python2 python-fudge))
11725
11726(define-public python-mwclient
11727 (package
11728 (name "python-mwclient")
11729 (version "0.8.4")
11730 (source
11731 (origin
11732 (method url-fetch)
11733 ;; The PyPI version wouldn't contain tests.
11734 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
11735 "v" version ".tar.gz"))
11736 (file-name (string-append name "-" version ".tar.gz"))
11737 (sha256
11738 (base32
11739 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
11740 (build-system python-build-system)
11741 (propagated-inputs
11742 `(("python-requests" ,python-requests)
11743 ("python-requests-oauthlib"
11744 ,python-requests-oauthlib)
11745 ("python-six" ,python-six)))
11746 (native-inputs
11747 `(("python-mock" ,python-mock)
11748 ("python-pytest" ,python-pytest)
11749 ("python-pytest-pep8" ,python-pytest-pep8)
11750 ("python-pytest-cache" ,python-pytest-cache)
11751 ("python-pytest-cov" ,python-pytest-cov)
11752 ("python-responses" ,python-responses)))
11753 (home-page "https://github.com/btongminh/mwclient")
11754 (synopsis "MediaWiki API client")
11755 (description "This package provides a MediaWiki API client.")
11756 (license license:expat)))
11757
11758(define-public python2-mwclient
11759 (package-with-python2 python-mwclient))
11760
11761(define-public python-utils
11762 (package
11763 (name "python-utils")
11764 (version "2.1.0")
11765 (source (origin
11766 (method url-fetch)
11767 (uri (pypi-uri "python-utils" version))
11768 (sha256
11769 (base32
11770 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
11771 (build-system python-build-system)
11772 (native-inputs
11773 `(("pytest-runner" ,python-pytest-runner)
11774 ("pytest" ,python-pytest)
11775 ("six" ,python-six)))
11776 (home-page "https://github.com/WoLpH/python-utils")
11777 (synopsis "Convenient utilities not included with the standard Python install")
11778 (description
11779 "Python Utils is a collection of small Python functions and classes which
11780make common patterns shorter and easier.")
11781 (license license:bsd-2)))
11782
11783(define-public python2-utils
11784 (package-with-python2 python-utils))
11785
11786(define-public python-sphinx-me
11787 (package
11788 (name "python-sphinx-me")
11789 (version "0.3")
11790 (source
11791 (origin
11792 (method url-fetch)
11793 (uri (pypi-uri "sphinx-me" version))
11794 (sha256
11795 (base32
11796 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
11797 (build-system python-build-system)
11798 (home-page "https://github.com/stephenmcd/sphinx-me")
11799 (synopsis "Create a Sphinx documentation shell")
11800 (description
11801 "Create a Sphinx documentation shell for your project and include the
11802README file as the documentation index. It handles extracting the required
11803meta data such as the project name, author and version from your project for
11804use in your Sphinx docs.")
11805 (license license:bsd-2)))
11806
11807(define-public python2-sphinx-me
11808 (package-with-python2 python-sphinx-me))
11809
11810(define-public python-diff-match-patch
11811 (package
11812 (name "python-diff-match-patch")
11813 (version "20121119")
11814 (source
11815 (origin
11816 (method url-fetch)
11817 (uri (pypi-uri "diff-match-patch" version))
11818 (sha256
11819 (base32
11820 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
11821 (build-system python-build-system)
11822 (home-page "https://code.google.com/p/google-diff-match-patch")
11823 (synopsis "Synchronize plain text")
11824 (description "Diff Match and Patch libraries offer robust algorithms to
11825perform the operations required for synchronizing plain text.")
11826 (license license:asl2.0)))
11827
11828(define-public python2-diff-match-patch
11829 (package-with-python2 python-diff-match-patch))
11830
11831(define-public python-dirsync
11832 (package
11833 (name "python-dirsync")
11834 (version "2.2.3")
11835 (source
11836 (origin
11837 (method url-fetch)
11838 (uri (pypi-uri "dirsync" version))
11839 (sha256
11840 (base32
11841 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
11842 (build-system python-build-system)
11843 (propagated-inputs
11844 `(("six" ,python-six)))
11845 (home-page "https://bitbucket.org/tkhyn/dirsync")
11846 (synopsis "Advanced directory tree synchronisation tool")
11847 (description "Advanced directory tree synchronisation tool.")
11848 (license license:expat)))
11849
11850(define-public python2-dirsync
11851 (package-with-python2 python-dirsync))
11852
11853(define-public python-levenshtein
11854 (package
11855 (name "python-levenshtein")
11856 (version "0.12.0")
11857 (source
11858 (origin
11859 (method url-fetch)
11860 (uri (pypi-uri "python-Levenshtein" version))
11861 (sha256
11862 (base32
11863 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
11864 (build-system python-build-system)
11865 (home-page "https://github.com/ztane/python-Levenshtein")
11866 (synopsis "Fast computation of Levenshtein distance and string similarity")
11867 (description
11868 "The Levenshtein Python C extension module contains functions for fast computation of
11869@enumerate
11870@item Levenshtein (edit) distance, and edit operations
11871@item string similarity
11872@item approximate median strings, and generally string averaging
11873@item string sequence and set similarity
11874@end enumerate
11875It supports both normal and Unicode strings.")
11876 (license license:gpl2+)))
11877
11878(define-public python2-levenshtein
11879 (package-with-python2 python-levenshtein))
11880
11881(define-public python-scandir
11882 (package
11883 (name "python-scandir")
11884 (version "1.9.0")
11885 (source
11886 (origin
11887 (method url-fetch)
11888 (uri (pypi-uri "scandir" version))
11889 (sha256
11890 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
11891 (build-system python-build-system)
11892 (arguments
11893 `(#:phases (modify-phases %standard-phases
11894 (replace 'check
11895 (lambda _
11896 (invoke "python" "test/run_tests.py"))))))
11897 (home-page "https://github.com/benhoyt/scandir")
11898 (synopsis "Directory iteration function")
11899 (description
11900 "Directory iteration function like os.listdir(), except that instead of
11901returning a list of bare filenames, it yields DirEntry objects that include
11902file type and stat information along with the name. Using scandir() increases
11903the speed of os.walk() by 2-20 times (depending on the platform and file
11904system) by avoiding unnecessary calls to os.stat() in most cases.
11905
11906This package is part of the Python standard library since version 3.5.")
11907 (license license:bsd-3)))
11908
11909(define-public python2-scandir
11910 (package-with-python2 python-scandir))
11911
11912(define-public python2-stemming
11913 (package
11914 (name "python2-stemming")
11915 (version "1.0.1")
11916 (source
11917 (origin
11918 (method url-fetch)
11919 (uri (pypi-uri "stemming" version))
11920 (sha256
11921 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
11922 (build-system python-build-system)
11923 (arguments
11924 `(#:python ,python-2))
11925 (home-page "https://bitbucket.org/mchaput/stemming/overview")
11926 (synopsis "Python implementations of various stemming algorithms")
11927 (description
11928 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
11929stemming algorithms for English. These implementations are straightforward and
11930efficient, unlike some Python versions of the same algorithms available on the
11931Web. This package is an extraction of the stemming code included in the Whoosh
11932search engine.")
11933 (license license:public-domain)))
11934
11935(define-public python-factory-boy
11936 (package
11937 (name "python-factory-boy")
11938 (version "2.8.1")
11939 (source
11940 (origin
11941 (method url-fetch)
11942 (uri (pypi-uri "factory_boy" version))
11943 (sha256
11944 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
11945 (build-system python-build-system)
11946 (arguments
11947 ;; Tests are not included in the tarball.
11948 `(#:tests? #f))
11949 (propagated-inputs
11950 `(("faker" ,python-faker)))
11951 (home-page "https://github.com/benhoyt/scandir")
11952 (synopsis "Versatile test fixtures replacement")
11953 (description
11954 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
11955
11956As a fixtures replacement tool, it aims to replace static, hard to maintain
11957fixtures with easy-to-use factories for complex object.
11958
11959Instead of building an exhaustive test setup with every possible combination
11960of corner cases, factory_boy allows you to use objects customized for the
11961current test, while only declaring the test-specific fields")
11962 (license license:expat)))
11963
11964(define-public python2-factory-boy
11965 (package-with-python2 python-factory-boy))
11966
11967(define-public python-translate-toolkit
11968 (package
11969 (name "python-translate-toolkit")
11970 (version "2.1.0")
11971 (source
11972 (origin
11973 (method url-fetch)
11974 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
11975 (sha256
11976 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
11977 (build-system python-build-system)
11978 (native-inputs
11979 `(("python-pytest" ,python-pytest)
11980 ("python-sphinx" ,python-sphinx)))
11981 (propagated-inputs
11982 `(("python-babel" ,python-babel)
11983 ("python-beautifulsoup4" ,python-beautifulsoup4)
11984 ("python-chardet" ,python-chardet)
11985 ("python-diff-match-patch" ,python-diff-match-patch)
11986 ("python-levenshtein" ,python-levenshtein)
11987 ("python-lxml" ,python-lxml)
11988 ("python-six" ,python-six)
11989 ("python-vobject" ,python-vobject)
11990 ("python-pyyaml" ,python-pyyaml)))
11991 (arguments
11992 ;; TODO: tests are not run, because they end with
11993 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
11994 ;; 'parse_funcs'
11995 ;; during test setup.
11996 `(#:tests? #f))
11997 (home-page "http://toolkit.translatehouse.org")
11998 (synopsis "Tools and API for translation and localization engineering")
11999 (description
12000 "Tools and API for translation and localization engineering. It contains
12001several utilities, as well as an API for building localization tools.")
12002 (license license:gpl2+)))
12003
12004(define-public python2-translate-toolkit
12005 (package-with-python2 python-translate-toolkit))
12006
12007(define-public python-packaging
12008 (package
12009 (name "python-packaging")
12010 (version "17.1")
12011 (source
12012 (origin
12013 (method url-fetch)
12014 (uri (pypi-uri "packaging" version))
12015 (sha256
12016 (base32
12017 "0nrpayk8kij1zm9sjnk38ldz3a6705ggvw8ljylqbrb4vmqbf6gh"))))
12018 (build-system python-build-system)
12019 (arguments
12020 `(#:phases (modify-phases %standard-phases
12021 (replace 'check
12022 (lambda _ (invoke "py.test" "-vv"))))))
12023 (native-inputs
12024 `(("python-pretend" ,python-pretend)
12025 ("python-pytest" ,python-pytest)))
12026 (propagated-inputs
12027 `(("python-pyparsing" ,python-pyparsing)
12028 ("python-six" ,python-six)))
12029 (home-page "https://github.com/pypa/packaging")
12030 (synopsis "Core utilities for Python packages")
12031 (description "Packaging is a Python module for dealing with Python packages.
12032It offers an interface for working with package versions, names, and dependency
12033information.")
12034 ;; From 'LICENSE': This software is made available under the terms of
12035 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12036 ;; Contributions to this software is made under the terms of *both* these
12037 ;; licenses.
12038 (license (list license:asl2.0 license:bsd-2))))
12039
12040(define-public python2-packaging
12041 (package-with-python2 python-packaging))
12042
12043(define-public python-relatorio
12044 (package
12045 (name "python-relatorio")
12046 (version "0.8.0")
12047 (source
12048 (origin
12049 (method url-fetch)
12050 (uri (pypi-uri "relatorio" version))
12051 (sha256
12052 (base32
12053 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12054 (build-system python-build-system)
12055 (propagated-inputs
12056 `(("python-lxml" ,python-lxml)
12057 ("python-genshi" ,python-genshi)))
12058 (native-inputs
12059 `(("python-magic" ,python-magic)))
12060 (home-page "https://relatorio.tryton.org/")
12061 (synopsis "Templating library able to output ODT and PDF files")
12062 (description "Relatorio is a templating library which provides a way to
12063easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12064for more filetypes can be easily added by creating plugins for them.")
12065 (license license:gpl3+)))
12066
12067(define-public python2-relatorio
12068 (package-with-python2 python-relatorio))
12069
12070(define-public python-radon
12071 (package
12072 (name "python-radon")
12073 (version "2.2.0")
12074 (source
12075 (origin
12076 (method url-fetch)
12077 (uri (pypi-uri "radon" version))
12078 (sha256
12079 (base32
12080 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
12081 (build-system python-build-system)
12082 (arguments
12083 `(#:phases (modify-phases %standard-phases
12084 (replace 'check
12085 (lambda _
12086 (invoke "python" "radon/tests/run.py"))))))
12087 (propagated-inputs
12088 `(("python-colorama" ,python-colorama)
12089 ("python-flake8-polyfill" ,python-flake8-polyfill)
12090 ("python-mando" ,python-mando)))
12091 (native-inputs
12092 `(("python-pytest" ,python-pytest)
12093 ("python-pytest-mock" ,python-pytest-mock)))
12094 (home-page "https://radon.readthedocs.org/")
12095 (synopsis "Code Metrics in Python")
12096 (description "Radon is a Python tool which computes various code metrics.
12097Supported metrics are:
12098@itemize @bullet
12099@item raw metrics: SLOC, comment lines, blank lines, &c.
12100@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12101@item Halstead metrics (all of them)
12102@item the Maintainability Index (a Visual Studio metric)
12103@end itemize")
12104 (license license:expat)))
12105
12106(define-public python2-radon
12107 (package-with-python2 python-radon))
12108
12109(define-public python-sure
12110 (package
12111 (name "python-sure")
12112 (version "1.4.11")
12113 (source
12114 (origin
12115 (method url-fetch)
12116 (uri (pypi-uri "sure" version))
12117 (sha256
12118 (base32
12119 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12120 (build-system python-build-system)
12121 (propagated-inputs
12122 `(("python-mock" ,python-mock)
12123 ("python-six" ,python-six)))
12124 (native-inputs
12125 `(("python-nose" ,python-nose)))
12126 (home-page "https://github.com/gabrielfalcao/sure")
12127 (synopsis "Automated testing library in python for python")
12128 (description
12129 "Sure is a python library that leverages a DSL for writing assertions.
12130Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12131 (license license:gpl3+)))
12132
12133(define-public python2-sure
12134 (package-with-python2 python-sure))
12135
12136(define-public python2-couleur
12137 ;; This package does not seem to support python3 at all, hence,
12138 ;; only the python2 variant definition is provided.
12139 (package
12140 (name "python2-couleur")
12141 (version "0.6.2")
12142 (source
12143 (origin
12144 (method url-fetch)
12145 (uri (pypi-uri "couleur" version))
12146 (sha256
12147 (base32
12148 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12149 (build-system python-build-system)
12150 (arguments
12151 `(#:python ,python-2))
12152 (home-page "https://github.com/gabrielfalcao/couleur")
12153 (synopsis
12154 "ANSI terminal tool for python, colored shell and other handy fancy features")
12155 (description
12156 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12157terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12158 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12159 ;; https://github.com/gabrielfalcao/couleur/issues/11
12160 (license license:lgpl3+)))
12161
12162(define-public python-misaka
12163 (package
12164 (name "python-misaka")
12165 (version "2.1.0")
12166 (source
12167 (origin
12168 (method url-fetch)
12169 (uri (pypi-uri "misaka" version))
12170 (sha256
12171 (base32
12172 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
12173 (build-system python-build-system)
12174 (arguments
12175 `(;; Line 37 of setup.py calls self.run_command('develop')
12176 ;; in the 'check' phase. This command seems to be trying
12177 ;; to write to
12178 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12179 ;; for which it does not have the permission to write.
12180 #:tests? #f))
12181 (propagated-inputs
12182 `(("python-cffi" ,python-cffi)))
12183 (home-page "https://github.com/FSX/misaka")
12184 (synopsis "Python binding for Hoedown")
12185 (description
12186 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12187library written in C. It features a fast HTML renderer and functionality to make custom
12188renderers (e.g. man pages or LaTeX).")
12189 (license license:expat)))
12190
12191(define-public python2-misaka
12192 (package-with-python2 python-misaka))
12193
12194(define-public python2-steadymark
12195 ;; This is forced into being a python2 only variant
12196 ;; due to its dependence on couleur that has no support
12197 ;; for python3
12198 (package
12199 (name "python2-steadymark")
12200 (version "0.7.3")
12201 (source
12202 (origin
12203 (method url-fetch)
12204 (uri (pypi-uri "steadymark" version))
12205 (sha256
12206 (base32
12207 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12208 (build-system python-build-system)
12209 (native-inputs
12210 `(("python-couleur" ,python2-couleur)
12211 ("python-sure" ,python2-sure)
12212 ("python-misaka" ,python2-misaka)))
12213 (arguments
12214 `(#:python ,python-2
12215 #:phases
12216 (modify-phases %standard-phases
12217 (add-before 'build 'patch-setup-py
12218 (lambda _
12219 ;; Update requirements from dependency==version
12220 ;; to dependency>=version
12221 (substitute* "setup.py"
12222 (("==") ">="))
12223 #t)))))
12224 (home-page "https://github.com/gabrielfalcao/steadymark")
12225 (synopsis "Markdown-based test runner for python")
12226 (description
12227 "@code{Steadymark} allows documentation to be written in github-flavoured
12228markdown. The documentation may contain snippets of code surrounded by python
12229code blocks and @code{Steadymark} will find these snippets and run them, making
12230sure that there are no old malfunctional examples in the documentation examples.")
12231 (license license:expat)))
12232
12233(define-public python-jsonpointer
12234 (package
12235 (name "python-jsonpointer")
12236 (version "1.10")
12237 (source
12238 (origin
12239 (method url-fetch)
12240 (uri (pypi-uri "jsonpointer" version))
12241 (sha256
12242 (base32
12243 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12244 (build-system python-build-system)
12245 (home-page "https://github.com/stefankoegl/python-json-pointer")
12246 (synopsis "Identify specific nodes in a JSON document")
12247 (description "@code{jsonpointer} allows you to access specific nodes
12248by path in a JSON document (see RFC 6901).")
12249 (license license:bsd-3)))
12250
12251(define-public python2-jsonpointer
12252 (package-with-python2 python-jsonpointer))
12253
12254(define-public python-jsonpatch
12255 (package
12256 (name "python-jsonpatch")
12257 (version "1.16")
12258 (source
12259 (origin
12260 (method url-fetch)
12261 ;; pypi version lacks tests.js
12262 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12263 "archive/v" version ".tar.gz"))
12264 (file-name (string-append name "-" version ".tar.gz"))
12265 (sha256
12266 (base32
12267 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12268 (build-system python-build-system)
12269 (native-inputs
12270 `(("python-jsonpointer" ,python-jsonpointer)))
12271 (home-page "https://github.com/stefankoegl/python-json-patch")
12272 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12273 (description "@code{jsonpatch} is a library and program that allows
12274applying JSON Patches according to RFC 6902.")
12275 (license license:bsd-3)))
12276
12277(define-public python2-jsonpatch
12278 (package-with-python2 python-jsonpatch))
12279
12280(define-public python-jsonpatch-0.4
12281 (package (inherit python-jsonpatch)
12282 (name "python-jsonpatch")
12283 (version "0.4")
12284 (source
12285 (origin
12286 (method url-fetch)
12287 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12288 "archive/v" version ".tar.gz"))
12289 (file-name (string-append name "-" version ".tar.gz"))
12290 (sha256
12291 (base32
12292 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12293
12294(define-public python2-jsonpatch-0.4
12295 (package-with-python2 python-jsonpatch-0.4))
12296
12297(define-public python-rfc3986
12298 (package
12299 (name "python-rfc3986")
12300 (version "1.1.0")
12301 (source (origin
12302 (method url-fetch)
12303 (uri (pypi-uri "rfc3986" version))
12304 (sha256
12305 (base32
12306 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12307 (build-system python-build-system)
12308 (arguments
12309 `(#:modules ((guix build utils)
12310 (guix build python-build-system)
12311 (ice-9 ftw)
12312 (srfi srfi-1)
12313 (srfi srfi-26))
12314 #:phases
12315 (modify-phases %standard-phases
12316 (replace 'check
12317 (lambda _
12318 (let ((cwd (getcwd)))
12319 (setenv "PYTHONPATH"
12320 (string-append cwd "/build/"
12321 (find (cut string-prefix? "lib" <>)
12322 (scandir (string-append cwd "/build")))
12323 ":"
12324 (getenv "PYTHONPATH")))
12325 (invoke "pytest" "-v")))))))
12326 (native-inputs
12327 `(("python-pytest" ,python-pytest)))
12328 (home-page "https://rfc3986.readthedocs.io/")
12329 (synopsis "Parse and validate URI references")
12330 (description
12331 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12332validation and authority parsing. This module also supports RFC@tie{}6874
12333which adds support for zone identifiers to IPv6 addresses.")
12334 (license license:asl2.0)))
12335
12336(define-public python2-rfc3986
12337 (package-with-python2 python-rfc3986))
12338
12339(define-public python-rfc3987
12340 (package
12341 (name "python-rfc3987")
12342 (version "1.3.7")
12343 (source
12344 (origin
12345 (method url-fetch)
12346 (uri (pypi-uri "rfc3987" version))
12347 (sha256
12348 (base32
12349 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12350 (build-system python-build-system)
12351 (home-page "https://pypi.python.org/pypi/rfc3987")
12352 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12353 (description "@code{rfc3987} provides routines for parsing and
12354validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12355 (license license:gpl3+)))
12356
12357(define-public python2-rfc3987
12358 (package-with-python2 python-rfc3987))
12359
12360(define-public python-validate-email
12361 (package
12362 (name "python-validate-email")
12363 (version "1.3")
12364 (source
12365 (origin
12366 (method url-fetch)
12367 (uri (pypi-uri "validate_email" version))
12368 (sha256
12369 (base32
12370 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12371 (build-system python-build-system)
12372 (home-page "https://github.com/syrusakbary/validate_email")
12373 (synopsis "Verifies if an email address is valid and really exists")
12374 (description "@code{validate_email} can be used to verify if an email
12375address is valid and really exists.")
12376 (license license:lgpl3+)))
12377
12378(define-public python2-validate-email
12379 (package-with-python2 python-validate-email))
12380
12381(define-public python-flex
12382 (package
12383 (name "python-flex")
12384 (version "6.10.0")
12385 (source
12386 (origin
12387 (method url-fetch)
12388 (uri (pypi-uri "flex" version))
12389 (sha256
12390 (base32
12391 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
12392 (build-system python-build-system)
12393 (propagated-inputs
12394 `(("python-click" ,python-click)
12395 ("python-iso8601" ,python-iso8601)
12396 ("python-jsonpointer" ,python-jsonpointer)
12397 ("python-pyyaml" ,python-pyyaml)
12398 ("python-requests" ,python-requests)
12399 ("python-rfc3987" ,python-rfc3987)
12400 ("python-six" ,python-six)
12401 ("python-validate-email" ,python-validate-email)))
12402 (home-page "https://github.com/pipermerriam/flex")
12403 (synopsis "Validates Swagger schemata")
12404 (description "@code{flex} can be used to validate Swagger schemata.")
12405 (license license:bsd-3)))
12406
12407(define-public python2-flex
12408 (package-with-python2 python-flex))
12409
12410(define-public python-marshmallow
12411 (package
12412 (name "python-marshmallow")
12413 (version "3.0.0b14")
12414 (source
12415 (origin
12416 (method url-fetch)
12417 (uri (pypi-uri "marshmallow" version))
12418 (sha256
12419 (base32
12420 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
12421 (build-system python-build-system)
12422 (propagated-inputs
12423 `(("python-dateutil" ,python-dateutil)
12424 ("python-simplejson" ,python-simplejson)))
12425 (native-inputs
12426 `(("python-pytest" ,python-pytest)
12427 ("python-pytz" ,python-pytz)))
12428 (home-page "https://github.com/marshmallow-code/marshmallow")
12429 (synopsis "Convert complex datatypes to and from native
12430Python datatypes.")
12431 (description "@code{marshmallow} provides a library for converting
12432complex datatypes to and from native Python datatypes.")
12433 (license license:expat)))
12434
12435(define-public python2-marshmallow
12436 (package-with-python2 python-marshmallow))
12437
12438(define-public python-apispec
12439 (package
12440 (name "python-apispec")
12441 (version "0.25.3")
12442 (source
12443 (origin
12444 (method url-fetch)
12445 (uri (pypi-uri "apispec" version))
12446 (sha256
12447 (base32
12448 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
12449 (build-system python-build-system)
12450 (propagated-inputs
12451 `(("python-pyyaml" ,python-pyyaml)))
12452 (native-inputs
12453 `(("python-pytest" ,python-pytest)
12454 ("python-flask" ,python-flask)
12455 ("python-marshmallow" ,python-marshmallow)
12456 ("python-tornado" ,python-tornado)
12457 ("python-bottle" ,python-bottle)
12458 ("python-mock" ,python-mock)))
12459 (home-page "https://github.com/marshmallow-code/apispec")
12460 (synopsis "Swagger 2.0 API specification generator")
12461 (description "@code{python-apispec} is a pluggable API specification
12462generator. Currently supports the OpenAPI specification (f.k.a.
12463Swagger 2.0).")
12464 (license license:expat)))
12465
12466(define-public python2-apispec
12467 (package-with-python2 python-apispec))
12468
12469(define-public python-flasgger
12470 (package
12471 (name "python-flasgger")
12472 (version "0.6.3")
12473 (source
12474 (origin
12475 (method url-fetch)
12476 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
12477 version ".tar.gz"))
12478 (file-name (string-append name "-" version ".tar.gz"))
12479 (sha256
12480 (base32
12481 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
12482 (build-system python-build-system)
12483 (arguments
12484 `(#:phases
12485 (modify-phases %standard-phases
12486 (replace 'check
12487 (lambda* (#:key inputs outputs #:allow-other-keys)
12488 (substitute* "Makefile"
12489 (("flake8 flasgger --ignore=F403")
12490 "flake8 flasgger --ignore=E731,F403"))
12491 (setenv "PYTHONPATH" (string-append (getcwd)
12492 ":"
12493 (getenv "PYTHONPATH")))
12494 (zero? (system* "py.test")))))))
12495 (propagated-inputs
12496 `(("python-flask" ,python-flask)
12497 ("python-pyyaml" ,python-pyyaml)
12498 ("python-jsonschema" ,python-jsonschema)
12499 ("python-mistune" ,python-mistune)
12500 ("python-six" ,python-six)))
12501 (native-inputs
12502 `(("python-decorator" ,python-decorator)
12503 ("python-flake8" ,python-flake8)
12504 ("python-flask-restful" ,python-flask-restful)
12505 ("python-flex" ,python-flex)
12506 ("python-pytest" ,python-pytest)
12507 ("python-pytest-cov" ,python-pytest-cov)
12508 ("python-marshmallow" ,python-marshmallow)
12509 ("python-apispec" ,python-apispec)))
12510 (home-page "https://github.com/rochacbruno/flasgger/")
12511 (synopsis "Extract Swagger specs from your Flask project")
12512 (description "@code{python-flasgger} allows extracting Swagger specs
12513from your Flask project. It is a fork of Flask-Swagger.")
12514 (license license:expat)))
12515
12516(define-public python2-flasgger
12517 (package-with-python2 python-flasgger))
12518
12519(define-public python-swagger-spec-validator
12520 (package
12521 (name "python-swagger-spec-validator")
12522 (version "2.1.0")
12523 (source
12524 (origin
12525 (method url-fetch)
12526 (uri (pypi-uri "swagger-spec-validator" version))
12527 (sha256
12528 (base32
12529 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
12530 (build-system python-build-system)
12531 (propagated-inputs
12532 `(("python-jsonschema" ,python-jsonschema)
12533 ("python-six" ,python-six)))
12534 (home-page
12535 "https://github.com/Yelp/swagger_spec_validator")
12536 (synopsis "Validation of Swagger specifications")
12537 (description "@code{swagger_spec_validator} provides a library for
12538validating Swagger API specifications.")
12539 (license license:asl2.0)))
12540
12541(define-public python2-swagger-spec-validator
12542 (package-with-python2 python-swagger-spec-validator))
12543
12544(define-public python-apache-libcloud
12545 (package
12546 (name "python-apache-libcloud")
12547 (version "2.3.0")
12548 (source
12549 (origin
12550 (method url-fetch)
12551 (uri (pypi-uri "apache-libcloud" version))
12552 (sha256
12553 (base32
12554 "15xg79ad4g2xrk081ylvj41k5hmg9hl1xvbmb5hd0fqn08wfwbhf"))))
12555 (build-system python-build-system)
12556 (arguments
12557 `(#:phases
12558 (modify-phases %standard-phases
12559 (add-after 'unpack 'patch-ssh
12560 (lambda* (#:key inputs #:allow-other-keys)
12561 (substitute* "libcloud/compute/ssh.py"
12562 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
12563 "/bin/ssh" "'")))
12564 #t))
12565 (add-after 'unpack 'patch-tests
12566 (lambda _
12567 (substitute* "./libcloud/test/test_file_fixtures.py"
12568 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
12569 (("def _ascii") "def _raw_data(self, method, url, body, headers):
12570 return (httplib.OK,
12571 \"1234abcd\",
12572 {\"test\": \"value\"},
12573 httplib.responses[httplib.OK])
12574 def _ascii"))
12575 (substitute* "libcloud/test/compute/test_ssh_client.py"
12576 (("class ShellOutSSHClientTests")
12577 "@unittest.skip(\"Guix container doesn't have ssh service\")
12578class ShellOutSSHClientTests")
12579 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
12580 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
12581 (("'.xF0', '.x90', '.x8D', '.x88'")
12582 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
12583 #t))
12584 (add-before 'check 'copy-secret
12585 (lambda _
12586 (copy-file "libcloud/test/secrets.py-dist"
12587 "libcloud/test/secrets.py")
12588 #t)))))
12589 (inputs
12590 `(("openssh" ,openssh)))
12591 (propagated-inputs
12592 `(("python-paramiko" ,python-paramiko)
12593 ("python-requests" ,python-requests)))
12594 (native-inputs
12595 `(("python-lockfile" ,python-lockfile)
12596 ("python-mock" ,python-mock)
12597 ("python-pytest" ,python-pytest)
12598 ("python-pytest-runner" ,python-pytest-runner)
12599 ("python-requests-mock" ,python-requests-mock)))
12600 (home-page "https://libcloud.apache.org/")
12601 (synopsis "Unified Cloud API")
12602 (description "@code{libcloud} is a Python library for interacting with
12603many of the popular cloud service providers using a unified API.")
12604 (license license:asl2.0)))
12605
12606(define-public python2-apache-libcloud
12607 (package-with-python2 python-apache-libcloud))
12608
12609(define-public python-smmap2
12610 (package
12611 (name "python-smmap2")
12612 (version "2.0.3")
12613 (source
12614 (origin
12615 (method url-fetch)
12616 (uri (pypi-uri "smmap2" version))
12617 (sha256
12618 (base32
12619 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
12620 (build-system python-build-system)
12621 (native-inputs
12622 `(("python-nosexcover" ,python-nosexcover)))
12623 (home-page "https://github.com/Byron/smmap")
12624 (synopsis "Python sliding window memory map manager")
12625 (description "@code{smmap2} is a pure Python implementation of a sliding
12626window memory map manager.")
12627 (license license:bsd-3)))
12628
12629(define-public python2-smmap2
12630 (package-with-python2 python-smmap2))
12631
12632(define-public python-regex
12633 (package
12634 (name "python-regex")
12635 (version "2017.06.07")
12636 (source (origin
12637 (method url-fetch)
12638 (uri (pypi-uri "regex" version))
12639 (sha256
12640 (base32
12641 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
12642 (build-system python-build-system)
12643 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
12644 (synopsis "Alternative regular expression module")
12645 (description "This regular expression implementation is backwards-
12646compatible with the standard @code{re} module, but offers additional
12647functionality like full case-folding for case-insensitive matches in Unicode.")
12648 (license license:psfl)))
12649
12650(define-public python2-regex
12651 (package-with-python2 python-regex))
12652
12653(define-public python2-pyopengl
12654 (package
12655 (name "python2-pyopengl")
12656 (version "3.1.0")
12657 (source
12658 (origin
12659 (method url-fetch)
12660 (uri (pypi-uri "PyOpenGL" version))
12661 (sha256
12662 (base32
12663 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
12664 (arguments
12665 `(#:python ,python-2))
12666 (build-system python-build-system)
12667 (home-page "http://pyopengl.sourceforge.net")
12668 (synopsis "Standard OpenGL bindings for Python")
12669 (description
12670 "PyOpenGL is the most common cross platform Python binding to OpenGL and
12671related APIs. The binding is created using the standard @code{ctypes}
12672library.")
12673 (license license:bsd-3)))
12674
12675(define-public python2-pyopengl-accelerate
12676 (package
12677 (inherit python2-pyopengl)
12678 (name "python2-pyopengl-accelerate")
12679 (version "3.1.0")
12680 (source
12681 (origin
12682 (method url-fetch)
12683 (uri (pypi-uri "PyOpenGL-accelerate" version))
12684 (sha256
12685 (base32
12686 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
12687 (synopsis "Acceleration code for PyOpenGL")
12688 (description
12689 "This is the Cython-coded accelerator module for PyOpenGL.")))
12690
12691(define-public python-rencode
12692 (package
12693 (name "python-rencode")
12694 (version "1.0.5")
12695 (source
12696 (origin
12697 (method url-fetch)
12698 (uri (pypi-uri "rencode" version))
12699 (sha256
12700 (base32
12701 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
12702 (build-system python-build-system)
12703 (arguments
12704 `(#:phases
12705 (modify-phases %standard-phases
12706 (add-before 'check 'delete-bogus-test
12707 ;; This test requires /home/aresch/Downloads, which is not provided by
12708 ;; the build environment.
12709 (lambda _
12710 (delete-file "rencode/t.py")
12711 #t)))))
12712 (native-inputs `(("pkg-config" ,pkg-config)
12713 ("python-cython" ,python-cython)))
12714 (home-page "https://github.com/aresch/rencode")
12715 (synopsis "Serialization of heterogeneous data structures")
12716 (description
12717 "The @code{rencode} module is a data structure serialization library,
12718similar to @code{bencode} from the BitTorrent project. For complex,
12719heterogeneous data structures with many small elements, r-encoding stake up
12720significantly less space than b-encodings. This version of rencode is a
12721complete rewrite in Cython to attempt to increase the performance over the
12722pure Python module.")
12723 (license license:bsd-3)))
12724
12725(define-public python2-rencode
12726 (package-with-python2 python-rencode))
12727
12728(define-public python-xenon
12729 (package
12730 (name "python-xenon")
12731 (version "0.5.4")
12732 (source
12733 (origin
12734 (method url-fetch)
12735 (uri (pypi-uri "xenon" version))
12736 (sha256
12737 (base32
12738 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
12739 (build-system python-build-system)
12740 (native-inputs
12741 `(("python-pyyaml" ,python-pyyaml)
12742 ("python-radon" ,python-radon)
12743 ("python-requests" ,python-requests)
12744 ("python-flake8" ,python-flake8)
12745 ("python-tox" ,python-tox)))
12746 (arguments
12747 `(#:phases
12748 (modify-phases %standard-phases
12749 (add-before 'build 'patch-test-requirements
12750 (lambda _
12751 ;; Remove httpretty dependency for tests.
12752 (substitute* "setup.py"
12753 (("httpretty") ""))
12754 #t)))))
12755 (home-page "https://xenon.readthedocs.org/")
12756 (synopsis "Monitor code metrics for Python on your CI server")
12757 (description
12758 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
12759Ideally, @code{xenon} is run every time code is committed. Through command
12760line options, various thresholds can be set for the complexity of code. It
12761will fail (i.e. it will exit with a non-zero exit code) when any of these
12762requirements is not met.")
12763 (license license:expat)))
12764
12765(define-public python2-xenon
12766 (package-with-python2 python-xenon))
12767
12768(define-public python-pysocks
12769 (package
12770 (name "python-pysocks")
12771 (version "1.6.7")
12772 (source
12773 (origin
12774 (method url-fetch)
12775 (uri (pypi-uri "PySocks" version))
12776 (sha256
12777 (base32
12778 "1krkiss578zqwcg4c8iqz1hwscwhsvy2djp3xyvps5gsgvr2j0yh"))))
12779 (build-system python-build-system)
12780 (arguments `(#:tests? #f))
12781 (home-page "https://github.com/Anorov/PySocks")
12782 (synopsis "SOCKS client module")
12783 (description "@code{pysocks} is an updated and semi-actively maintained
12784version of @code{SocksiPy} with bug fixes and extra features.")
12785 (license license:bsd-3)))
12786
12787(define-public python2-pysocks
12788 (package-with-python2 python-pysocks))
12789
12790(define-public python-pydiff
12791 (package
12792 (name "python-pydiff")
12793 (version "0.2")
12794 (source
12795 (origin
12796 (method url-fetch)
12797 (uri (pypi-uri "pydiff" version))
12798 (sha256
12799 (base32
12800 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
12801 (build-system python-build-system)
12802 (home-page "https://github.com/myint/pydiff")
12803 (synopsis "Library to diff two Python files at the bytecode level")
12804 (description
12805 "@code{pydiff} makes it easy to look for actual code changes while
12806ignoring formatting changes.")
12807 (license license:expat)))
12808
12809(define-public python2-pydiff
12810 (package-with-python2 python-pydiff))
12811
12812(define-public python-tqdm
12813 (package
12814 (name "python-tqdm")
12815 (version "4.19.6")
12816 (source
12817 (origin
12818 (method url-fetch)
12819 (uri (pypi-uri "tqdm" version))
12820 (sha256
12821 (base32
12822 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
12823 (build-system python-build-system)
12824 (native-inputs
12825 `(("python-flake8" ,python-flake8)
12826 ("python-nose" ,python-nose)
12827 ("python-coverage" ,python-coverage)))
12828 (home-page "https://github.com/tqdm/tqdm")
12829 (synopsis "Fast, extensible progress meter")
12830 (description
12831 "Make loops show a progress bar on the console by just wrapping any
12832iterable with @code{|tqdm(iterable)|}. Offers many options to define
12833design and layout.")
12834 (license (list license:mpl2.0 license:expat))))
12835
12836(define-public python2-tqdm
12837 (package-with-python2 python-tqdm))
12838
12839(define-public python-pkginfo
12840 (package
12841 (name "python-pkginfo")
12842 (version "1.4.2")
12843 (source
12844 (origin
12845 (method url-fetch)
12846 (uri (pypi-uri "pkginfo" version))
12847 (sha256
12848 (base32
12849 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
12850 (build-system python-build-system)
12851 (arguments
12852 ;; The tests are broken upstream.
12853 '(#:tests? #f))
12854 (home-page
12855 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
12856 (synopsis
12857 "Query metadatdata from sdists, bdists, and installed packages")
12858 (description
12859 "API to query the distutils metadata written in @file{PKG-INFO} inside a
12860source distriubtion (an sdist) or a binary distribution (e.g., created by
12861running bdist_egg). It can also query the EGG-INFO directory of an installed
12862distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
12863created by running @code{python setup.py develop}).")
12864 (license license:expat)))
12865
12866(define-public python2-pkginfo
12867 (package-with-python2 python-pkginfo))
12868
12869(define-public python-twine
12870 (package
12871 (name "python-twine")
12872 (version "1.9.1")
12873 (source
12874 (origin
12875 (method url-fetch)
12876 (uri (pypi-uri "twine" version))
12877 (sha256
12878 (base32
12879 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
12880 (build-system python-build-system)
12881 (propagated-inputs
12882 `(("python-tqdm" ,python-tqdm)
12883 ("python-pkginfo" ,python-pkginfo)
12884 ("python-requests" ,python-requests)
12885 ("python-requests-toolbelt" ,python-requests-toolbelt)))
12886 (home-page "https://github.com/pypa/twine")
12887 (synopsis "Collection of utilities for interacting with PyPI")
12888 (description
12889 "@code{twine} currently supports registering projects and uploading
12890distributions. It authenticates the user over HTTPS, allows them to pre-sign
12891their files and supports any packaging format (including wheels).")
12892 (license license:asl2.0)))
12893
12894(define-public python2-twine
12895 (package-with-python2 python-twine))
12896
12897(define-public python-linecache2
12898 (package
12899 (name "python-linecache2")
12900 (version "1.0.0")
12901 (source
12902 (origin
12903 (method url-fetch)
12904 (uri (pypi-uri "linecache2" version))
12905 (sha256
12906 (base32
12907 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
12908 (build-system python-build-system)
12909 (arguments
12910 `(;; The tests depend on unittest2, and our version is a bit too old.
12911 #:tests? #f))
12912 (native-inputs
12913 `(("python-pbr" ,python-pbr-minimal)))
12914 (home-page
12915 "https://github.com/testing-cabal/linecache2")
12916 (synopsis "Backports of the linecache module")
12917 (description
12918 "The linecache module allows one to get any line from any file, while
12919attempting to optimize internally, using a cache, the common case where many
12920lines are read from a single file.")
12921 (license license:psfl)))
12922
12923(define-public python2-linecache2
12924 (package-with-python2 python-linecache2))
12925
12926(define-public python-traceback2
12927 (package
12928 (name "python-traceback2")
12929 (version "1.4.0")
12930 (source
12931 (origin
12932 (method url-fetch)
12933 (uri (pypi-uri "traceback2" version))
12934 (sha256
12935 (base32
12936 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
12937 (build-system python-build-system)
12938 (arguments
12939 `(;; python-traceback2 and python-unittest2 depend on one another.
12940 #:tests? #f))
12941 (native-inputs
12942 `(("python-pbr" ,python-pbr-minimal)))
12943 (propagated-inputs
12944 `(("python-linecache2" ,python-linecache2)))
12945 (home-page
12946 "https://github.com/testing-cabal/traceback2")
12947 (synopsis "Backports of the traceback module")
12948 (description
12949 "This module provides a standard interface to extract, format and print
12950stack traces of Python programs. It exactly mimics the behavior of the Python
12951interpreter when it prints a stack trace.")
12952 (license license:psfl)))
12953
12954(define-public python2-traceback2
12955 (package-with-python2 python-traceback2))
12956
12957(define-public python-ratelimiter
12958 (package
12959 (name "python-ratelimiter")
12960 (version "1.2.0")
12961 (source
12962 (origin
12963 (method url-fetch)
12964 (uri (pypi-uri "ratelimiter" version))
12965 (sha256
12966 (base32
12967 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
12968 (build-system python-build-system)
12969 (arguments
12970 '(#:tests? #f)) ; There are no tests in the pypi archive.
12971 (home-page "https://github.com/RazerM/ratelimiter")
12972 (synopsis "Simple rate limiting object")
12973 (description
12974 "The @code{ratelimiter} module ensures that an operation will not be
12975executed more than a given number of times during a given period.")
12976 (license license:asl2.0)))
12977
12978(define-public python2-ratelimiter
12979 (package-with-python2 python-ratelimiter))
12980
12981(define-public python-dukpy
12982 (package
12983 (name "python-dukpy")
12984 (version "0.3")
12985 (source
12986 (origin
12987 (method url-fetch)
12988 (uri (string-append "https://github.com/kovidgoyal/dukpy/archive/v"
12989 version ".tar.gz"))
12990 (file-name (string-append name "-" version ".tar.gz"))
12991 (sha256
12992 (base32
12993 "0pj39rfwlzivqm5hkrsza7gssg6ggpxlq5ivc8f3h7x5pfgc6y6c"))))
12994 (build-system python-build-system)
12995 (home-page "https://github.com/kovidgoyal/dukpy")
12996 (synopsis "Run JavaScript in python")
12997 (description
12998 "dukpy is a JavaScript runtime environment for Python using the duktape
12999embeddable JavaScript engine.")
13000 ;; Dukpy is licensed under MIT like the embedded duktape library,
13001 ;; with 'errors.c' as GPL3.
13002 (license (list license:expat license:gpl3))))
13003
13004(define-public python2-dukpy
13005 (package-with-python2 python-dukpy))
13006
13007(define-public python-jsonrpclib-pelix
13008 (package
13009 (name "python-jsonrpclib-pelix")
13010 (version "0.3.2")
13011 (source
13012 (origin
13013 (method url-fetch)
13014 (uri (pypi-uri "jsonrpclib-pelix" version))
13015 (sha256
13016 (base32
13017 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13018 (build-system python-build-system)
13019 (arguments
13020 `(#:tests? #f)) ; no tests in PyPI tarball
13021 (home-page "https://github.com/tcalmant/jsonrpclib/")
13022 (synopsis "JSON-RPC 2.0 client library for Python")
13023 (description
13024 "This library implements the JSON-RPC v2.0
13025specification (backwards-compatible) as a client library for Python. This
13026version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13027services.")
13028 (license license:asl2.0)))
13029
13030(define-public python2-jsonrpclib-pelix
13031 (package-with-python2 python-jsonrpclib-pelix))
13032
13033(define-public python-setuptools-scm-git-archive
13034 (package
13035 (name "python-setuptools-scm-git-archive")
13036 (version "1.0")
13037 (source
13038 (origin
13039 (method url-fetch)
13040 (uri (pypi-uri "setuptools_scm_git_archive" version))
13041 (sha256
13042 (base32
13043 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13044 (build-system python-build-system)
13045 (native-inputs
13046 `(("python-pytest" ,python-pytest)))
13047 (propagated-inputs
13048 `(("python-setuptools-scm" ,python-setuptools-scm)))
13049 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13050 (synopsis "Setuptools_scm plugin for git archives")
13051 (description
13052 "The setuptools_scm_git_archive package is a plugin to
13053setuptools_scm, which supports obtaining versions from git archives that
13054belong to tagged versions.")
13055 (license license:expat)))
13056
13057(define-public python2-setuptools-scm-git-archive
13058 (package-with-python2 python-setuptools-scm-git-archive))
13059
13060(define-public python-pyclipper
13061 (package
13062 (name "python-pyclipper")
13063 (version "1.1.0.post1")
13064 (source
13065 (origin
13066 (method url-fetch)
13067 (uri (pypi-uri "pyclipper" version ".zip"))
13068 (sha256
13069 (base32
13070 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
13071 (modules '((guix build utils)))
13072 (snippet
13073 '(begin
13074 ;; This file is generated by Cython.
13075 (delete-file "pyclipper/pyclipper.cpp") #t))))
13076 (build-system python-build-system)
13077 (arguments
13078 `(#:phases
13079 (modify-phases %standard-phases
13080 (add-before 'build 'cythonize-sources
13081 (lambda _
13082 (with-directory-excursion "pyclipper"
13083 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
13084 (propagated-inputs
13085 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
13086 (native-inputs
13087 `(("python-cython" ,python-cython)
13088 ("python-pytest" ,python-pytest)
13089 ("python-pytest-runner" ,python-pytest-runner)
13090 ("python-unittest2" ,python-unittest2)
13091 ("unzip" ,unzip)))
13092 (home-page "https://github.com/greginvm/pyclipper")
13093 (synopsis "Wrapper for Angus Johnson's Clipper library")
13094 (description
13095 "Pyclipper is a Cython wrapper for the C++ translation of the
13096Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
13097 (license license:expat)))
13098
13099(define-public python2-pyclipper
13100 (package-with-python2 python-pyclipper))
13101
13102(define-public python2-booleanoperations
13103 (package
13104 (name "python2-booleanoperations")
13105 (version "0.7.1")
13106 (source
13107 (origin
13108 (method url-fetch)
13109 (uri (pypi-uri "booleanOperations" version ".zip"))
13110 (sha256
13111 (base32
13112 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13113 (build-system python-build-system)
13114 (arguments
13115 `(#:python ,python-2))
13116 (native-inputs
13117 `(("unzip" ,unzip)
13118 ("python2-pytest" ,python2-pytest)
13119 ("python2-pytest-runner" ,python2-pytest-runner)))
13120 (propagated-inputs
13121 `(("python-fonttools" ,python2-fonttools)
13122 ("python-pyclipper" ,python2-pyclipper)
13123 ("python-ufolib" ,python2-ufolib)))
13124 (home-page "https://github.com/typemytype/booleanOperations")
13125 (synopsis "Boolean operations on paths")
13126 (description
13127 "BooleanOperations provides a Python library that enables
13128boolean operations on paths.")
13129 (license license:expat)))
13130
13131(define-public python-tempdir
13132 (package
13133 (name "python-tempdir")
13134 (version "0.7.1")
13135 (source
13136 (origin
13137 (method url-fetch)
13138 (uri (pypi-uri "tempdir" version))
13139 (sha256
13140 (base32
13141 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13142 (build-system python-build-system)
13143 (home-page "https://pypi.org/project/tempdir/")
13144 (arguments
13145 ;; the package has no tests
13146 '(#:tests? #f))
13147 (synopsis "Python library for managing temporary directories")
13148 (description
13149 "This library manages temporary directories that are automatically
13150deleted with all their contents when they are no longer needed. It is
13151particularly convenient for use in tests.")
13152 (license license:expat)))
13153
13154(define-public python2-tempdir
13155 (package-with-python2 python-tempdir))
13156
13157(define-public python-activepapers
13158 (package
13159 (name "python-activepapers")
13160 (version "0.2.2")
13161 (source
13162 (origin
13163 (method url-fetch)
13164 (uri (pypi-uri "ActivePapers.Py" version))
13165 (sha256
13166 (base32
13167 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13168 (build-system python-build-system)
13169 (arguments
13170 `(#:modules ((ice-9 ftw)
13171 (srfi srfi-1)
13172 (guix build utils)
13173 (guix build python-build-system))
13174
13175 #:phases
13176 (modify-phases %standard-phases
13177 (add-after 'unpack 'delete-python2-code
13178 (lambda _
13179 (for-each delete-file
13180 '("lib/activepapers/builtins2.py"
13181 "lib/activepapers/standardlib2.py"
13182 "lib/activepapers/utility2.py"))))
13183 (replace 'check
13184 (lambda _
13185 ;; Deactivate the test cases that download files
13186 (setenv "NO_NETWORK_ACCESS" "1")
13187 ;; For some strange reason, some tests fail if nosetests runs all
13188 ;; test modules in a single execution. They pass if each test
13189 ;; module is run individually.
13190 (for-each (lambda (filename)
13191 (invoke "nosetests"
13192 (string-append "tests/" filename)))
13193 (scandir "tests"
13194 (lambda (filename)
13195 (string-suffix? ".py" filename)))))))))
13196 (native-inputs
13197 `(("python-tempdir" ,python-tempdir)
13198 ("python-nose" ,python-nose)))
13199 (propagated-inputs
13200 `(("python-h5py" ,python-h5py)))
13201 (home-page "http://www.activepapers.org/")
13202 (synopsis "Executable papers for scientific computing")
13203 (description
13204 "ActivePapers is a tool for working with executable papers, which
13205combine data, code, and documentation in single-file packages,
13206suitable for publication as supplementary material or on repositories
13207such as figshare or Zenodo.")
13208 (properties `((python2-variant . ,(delay python2-activepapers))))
13209 (license license:bsd-3)))
13210
13211(define-public python2-activepapers
13212 (let ((base (package-with-python2
13213 (strip-python2-variant python-activepapers))))
13214 (package
13215 (inherit base)
13216 (arguments
13217 (substitute-keyword-arguments (package-arguments base)
13218 ((#:phases phases)
13219 `(modify-phases ,phases
13220 (delete 'delete-python2-code)
13221 (add-after 'unpack 'delete-python3-code
13222 (lambda _
13223 (for-each delete-file
13224 '("lib/activepapers/builtins3.py"
13225 "lib/activepapers/standardlib3.py"
13226 "lib/activepapers/utility3.py")))))))))))
13227
13228(define-public python-semver
13229 (package
13230 (name "python-semver")
13231 (version "2.7.9")
13232 (source
13233 (origin
13234 (method url-fetch)
13235 (uri (pypi-uri "semver" version))
13236 (sha256
13237 (base32
13238 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13239 (build-system python-build-system)
13240 (arguments
13241 `(#:phases
13242 (modify-phases %standard-phases
13243 (add-after 'unpack 'patch-test-requirements
13244 (lambda _
13245 (substitute* "setup.py"
13246 ;; Our Python is new enough.
13247 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13248 #t)))))
13249 (native-inputs
13250 `(("python-tox" ,python-tox)
13251 ("python-virtualenv" ,python-virtualenv)))
13252 (home-page "https://github.com/k-bx/python-semver")
13253 (synopsis "Python helper for Semantic Versioning")
13254 (description "This package provides a Python library for
13255@url{Semantic Versioning, http://semver.org/}.")
13256 (license license:bsd-3)))
13257
13258(define-public python2-semver
13259 (package-with-python2 python-semver))
13260
13261(define-public python2-pyro
13262 (package
13263 (name "python2-pyro")
13264 (version "3.16")
13265 (source
13266 (origin
13267 (method url-fetch)
13268 (uri (pypi-uri "Pyro" version))
13269 (file-name (string-append "Pyro-" version ".tar.gz"))
13270 (sha256
13271 (base32
13272 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13273 (build-system python-build-system)
13274 (arguments
13275 ;; Pyro is not compatible with Python 3
13276 `(#:python ,python-2
13277 ;; Pyro has no test cases for automatic execution
13278 #:tests? #f))
13279 (home-page "http://pythonhosted.org/Pyro/")
13280 (synopsis "Distributed object manager for Python")
13281 (description "Pyro is a Distributed Object Technology system
13282written in Python that is designed to be easy to use. It resembles
13283Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13284which is a system and language independent Distributed Object Technology
13285and has much more to offer than Pyro or RMI. Pyro 3.x is no
13286longer maintained. New projects should use Pyro4 instead, which
13287is the new Pyro version that is actively developed.")
13288 (license license:expat)))
13289
13290(define-public python2-scientific
13291 (package
13292 (name "python2-scientific")
13293 (version "2.9.4")
13294 (source
13295 (origin
13296 (method url-fetch)
13297 (uri (string-append "https://bitbucket.org/khinsen/"
13298 "scientificpython/downloads/ScientificPython-"
13299 version ".tar.gz"))
13300 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13301 (sha256
13302 (base32
13303 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13304 (build-system python-build-system)
13305 (inputs
13306 `(("netcdf" ,netcdf)))
13307 (propagated-inputs
13308 `(("python-numpy" ,python2-numpy-1.8)
13309 ("python-pyro" ,python2-pyro)))
13310 (arguments
13311 ;; ScientificPython is not compatible with Python 3
13312 `(#:python ,python-2
13313 #:tests? #f ; No test suite
13314 #:phases
13315 (modify-phases %standard-phases
13316 (replace 'build
13317 (lambda* (#:key inputs #:allow-other-keys)
13318 (zero? (system* "python" "setup.py" "build"
13319 (string-append "--netcdf_prefix="
13320 (assoc-ref inputs "netcdf")))))))))
13321 (home-page "https://bitbucket.org/khinsen/scientificpython")
13322 (synopsis "Python modules for scientific computing")
13323 (description "ScientificPython is a collection of Python modules that are
13324useful for scientific computing. Most modules are rather general (Geometry,
13325physical units, automatic derivatives, ...) whereas others are more
13326domain-specific (e.g. netCDF and PDB support). The library is currently
13327not actively maintained and works only with Python 2 and NumPy < 1.9.")
13328 (license license:cecill-c)))
13329
13330(define-public python2-mmtk
13331 (package
13332 (name "python2-mmtk")
13333 (version "2.7.11")
13334 (source
13335 (origin
13336 (method url-fetch)
13337 (uri (string-append "https://bitbucket.org/khinsen/"
13338 "mmtk/downloads/MMTK-" version ".tar.gz"))
13339 (file-name (string-append "MMTK-" version ".tar.gz"))
13340 (sha256
13341 (base32
13342 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
13343 (build-system python-build-system)
13344 (native-inputs
13345 `(("netcdf" ,netcdf)))
13346 (propagated-inputs
13347 `(("python-scientific" ,python2-scientific)
13348 ("python-tkinter" ,python-2 "tk")))
13349 (arguments
13350 `(#:python ,python-2
13351 #:tests? #f
13352 #:phases
13353 (modify-phases %standard-phases
13354 (add-before 'build 'includes-from-scientific
13355 (lambda* (#:key inputs #:allow-other-keys)
13356 (mkdir-p "Include/Scientific")
13357 (copy-recursively
13358 (string-append
13359 (assoc-ref inputs "python-scientific")
13360 "/include/python2.7/Scientific")
13361 "Include/Scientific"))))))
13362 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
13363 (synopsis "Python library for molecular simulation")
13364 (description "MMTK is a library for molecular simulations with an emphasis
13365on biomolecules. It provides widely used methods such as Molecular Dynamics
13366and normal mode analysis, but also basic routines for implementing new methods
13367for simulation and analysis. The library is currently not actively maintained
13368and works only with Python 2 and NumPy < 1.9.")
13369 (license license:cecill-c)))
13370
13371(define-public python-phonenumbers
13372 (package
13373 (name "python-phonenumbers")
13374 (version "8.9.1")
13375 (source
13376 (origin
13377 (method url-fetch)
13378 (uri (pypi-uri "phonenumbers" version))
13379 (sha256
13380 (base32
13381 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
13382 (build-system python-build-system)
13383 (home-page
13384 "https://github.com/daviddrysdale/python-phonenumbers")
13385 (synopsis
13386 "Python library for dealing with international phone numbers")
13387 (description
13388 "This package provides a Python port of Google's libphonenumber library.")
13389 (license license:asl2.0)))
13390
13391(define-public python2-phonenumbers
13392 (package-with-python2 python-phonenumbers))
13393
13394(define-public python-send2trash
13395 (package
13396 (name "python-send2trash")
13397 (version "1.4.2")
13398 (source
13399 (origin (method url-fetch)
13400 ;; Source tarball on PyPI doesn't include tests.
13401 (uri (string-append "https://github.com/hsoft/send2trash/archive/"
13402 version ".tar.gz"))
13403 (file-name (string-append name "-" version ".tar.gz"))
13404 (sha256
13405 (base32
13406 "0ffyhwjyx61slkdy38iwjc4gmj7fj9gs2q58f075gwvq630pzm9z"))))
13407 (build-system python-build-system)
13408 (arguments
13409 '(#:phases
13410 (modify-phases %standard-phases
13411 (add-before 'check 'pre-check
13412 (lambda _
13413 (mkdir-p "/tmp/foo")
13414 (setenv "HOME" "/tmp/foo")
13415 #t)))))
13416 (home-page "https://github.com/hsoft/send2trash")
13417 (synopsis "Send files to the user's @file{~/Trash} directory")
13418 (description "This package provides a Python library to send files to the
13419user's @file{~/Trash} directory.")
13420 (license license:bsd-3)))
13421
13422(define-public python2-send2trash
13423 (package
13424 (inherit (package-with-python2 python-send2trash))
13425 (arguments
13426 (substitute-keyword-arguments (package-arguments python-send2trash)
13427 ((#:phases phases)
13428 `(modify-phases ,phases
13429 (add-before 'check 'setenv
13430 (lambda _
13431 (setenv "PYTHONPATH"
13432 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13433 #t))))))
13434 (properties `((python2-variant . ,(delay python-send2trash))))))
13435
13436(define-public python-yapf
13437 (package
13438 (name "python-yapf")
13439 (version "0.24.0")
13440 (source
13441 (origin
13442 (method url-fetch)
13443 (uri (pypi-uri "yapf" version))
13444 (sha256
13445 (base32
13446 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
13447 (build-system python-build-system)
13448 (home-page "https://github.com/google/yapf")
13449 (synopsis "Formatter for Python code")
13450 (description "YAPF is a formatter for Python code. It's based off of
13451@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
13452takes the code and reformats it to the best formatting that conforms to the
13453style guide, even if the original code didn't violate the style guide.")
13454 (license license:asl2.0)))
13455
13456(define-public python2-yapf
13457 (package-with-python2 python-yapf))
13458
13459(define-public python-gyp
13460 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
13461 (revision "0"))
13462 (package
13463 (name "python-gyp")
13464 ;; Google does not release versions,
13465 ;; based on second most recent commit date.
13466 (version (git-version "0.0.0" revision commit))
13467 (source
13468 (origin
13469 ;; Google does not release tarballs,
13470 ;; git checkout is needed.
13471 (method git-fetch)
13472 (uri (git-reference
13473 (url "https://chromium.googlesource.com/external/gyp")
13474 (commit commit)))
13475 (file-name (git-file-name name version))
13476 (sha256
13477 (base32
13478 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
13479 (build-system python-build-system)
13480 (home-page "https://gyp.gsrc.io/")
13481 (synopsis "GYP is a Meta-Build system")
13482 (description
13483 "GYP builds build systems for large, cross platform applications.
13484It can be used to generate XCode projects, Visual Studio projects, Ninja build
13485files, and Makefiles.")
13486 (license license:bsd-3))))
13487
13488(define-public python2-gyp
13489 (package-with-python2 python-gyp))
13490
13491(define-public python-whatever
13492 (package
13493 (name "python-whatever")
13494 (version "0.5")
13495 (source
13496 (origin
13497 (method url-fetch)
13498 (uri (string-append "https://github.com/Suor/whatever/archive/" version
13499 ".tar.gz"))
13500 (sha256
13501 (base32
13502 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
13503 (file-name (string-append name "-" version ".tar.gz"))))
13504 (build-system python-build-system)
13505 (arguments
13506 `(#:phases
13507 (modify-phases %standard-phases
13508 (replace 'check
13509 (lambda _
13510 (invoke "py.test"))))))
13511 (native-inputs
13512 `(("python-pytest" ,python-pytest)))
13513 (home-page "http://github.com/Suor/whatever")
13514 (synopsis "Make anonymous functions by partial application of operators")
13515 (description "@code{whatever} provides an easy way to make anonymous
13516functions by partial application of operators.")
13517 (license license:bsd-3)))
13518
13519(define-public python2-whatever
13520 (package-with-python2 python-whatever))
13521
13522(define-public python-funcy
13523 (package
13524 (name "python-funcy")
13525 (version "1.10")
13526 (source
13527 (origin
13528 (method url-fetch)
13529 (uri (string-append "https://github.com/Suor/funcy/archive/" version
13530 ".tar.gz"))
13531 (sha256
13532 (base32
13533 "1fanxivsip29vgarw6dn39xym3q4pbxcpa11plpp548lvxajpahz"))
13534 (file-name (string-append name "-" version ".tar.gz"))))
13535 (build-system python-build-system)
13536 (arguments
13537 `(#:phases
13538 (modify-phases %standard-phases
13539 (replace 'check
13540 (lambda _
13541 (invoke "py.test"))))))
13542 (native-inputs
13543 `(("python-pytest" ,python-pytest)
13544 ("python-whatever" ,python-whatever)))
13545 (home-page "http://github.com/Suor/funcy")
13546 (synopsis "Functional tools")
13547 (description "@code{funcy} is a library that provides functional tools.
13548Examples are:
13549@enumerate
13550@item merge - Merges collections of the same type
13551@item walk - Type-preserving map
13552@item select - Selects a part of a collection
13553@item take - Takes the first n items of a collection
13554@item first - Takes the first item of a collection
13555@item remove - Predicated-removes items of a collection
13556@item concat - Concatenates two collections
13557@item flatten - Flattens a collection with subcollections
13558@item distinct - Returns only distinct items
13559@item split - Predicated-splits a collection
13560@item split_at - Splits a collection at a given item
13561@item group_by - Groups items by group
13562@item pairwise - Pairs off adjacent items
13563@item partial - Partially-applies a function
13564@item curry - Curries a function
13565@item compose - Composes functions
13566@item complement - Complements a predicate
13567@item all_fn - \"all\" with predicate
13568@end enumerate")
13569 (license license:bsd-3)))
13570
13571(define-public python2-funcy
13572 (package-with-python2 python-funcy))
13573
13574(define-public python-isoweek
13575 (package
13576 (name "python-isoweek")
13577 (version "1.3.3")
13578 (source
13579 (origin
13580 (method url-fetch)
13581 (uri (pypi-uri "isoweek" version))
13582 (sha256
13583 (base32
13584 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
13585 (build-system python-build-system)
13586 (home-page "https://github.com/gisle/isoweek")
13587 (synopsis "Objects representing a week")
13588 (description "The @code{isoweek} module provide the class Week that
13589implements the week definition of ISO 8601. This standard also defines
13590a notation for identifying weeks; yyyyWww (where the W is a literal).
13591Week instances stringify to this form.")
13592 (license license:bsd-3)))
13593
13594(define-public python2-isoweek
13595 (package-with-python2 python-isoweek))
13596
13597(define-public python-tokenize-rt
13598 (package
13599 (name "python-tokenize-rt")
13600 (version "2.0.1")
13601 (source
13602 (origin
13603 (method url-fetch)
13604 (uri (pypi-uri "tokenize-rt" version))
13605 (sha256
13606 (base32
13607 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
13608 (build-system python-build-system)
13609 (home-page "https://github.com/asottile/tokenize-rt")
13610 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
13611 (description
13612 "This Python library is a wrapper around @code{tokenize} from the Python
13613standard library. It provides two additional tokens @code{ESCAPED_NL} and
13614@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
13615and @code{tokens_to_src} to roundtrip.")
13616 (license license:expat)))
13617
13618(define-public python-future-fstrings
13619 (package
13620 (name "python-future-fstrings")
13621 (version "0.4.1")
13622 (source
13623 (origin
13624 (method url-fetch)
13625 (uri (pypi-uri "future_fstrings" version))
13626 (sha256
13627 (base32
13628 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
13629 (build-system python-build-system)
13630 (propagated-inputs
13631 `(("python-tokenize-rt" ,python-tokenize-rt)))
13632 (home-page "https://github.com/asottile/future-fstrings")
13633 (synopsis "Backport of fstrings to Python < 3.6")
13634 (description
13635 "This package provides a UTF-8 compatible encoding
13636@code{future_fstrings}, which performs source manipulation. It decodes the
13637source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
13638@code{f} strings.")
13639 (license license:expat)))
13640
13641(define-public python-typing
13642 (package
13643 (name "python-typing")
13644 (version "3.6.6")
13645 (source
13646 (origin
13647 (method url-fetch)
13648 (uri (pypi-uri "typing" version))
13649 (sha256
13650 (base32
13651 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
13652 (build-system python-build-system)
13653 (home-page "https://docs.python.org/3/library/typing.html")
13654 (synopsis "Type hints for Python")
13655 (description "This is a backport of the standard library @code{typing}
13656module to Python versions older than 3.5. Typing defines a standard notation
13657for Python function and variable type annotations. The notation can be used
13658for documenting code in a concise, standard format, and it has been designed
13659to also be used by static and runtime type checkers, static analyzers, IDEs
13660and other tools.")
13661 (license license:psfl)))
13662
13663(define-public python2-typing
13664 (package-with-python2 python-typing))
13665
13666(define-public bpython
13667 (package
13668 (name "bpython")
13669 (version "0.17.1")
13670 (source
13671 (origin
13672 (method url-fetch)
13673 (uri (pypi-uri "bpython" version))
13674 (sha256
13675 (base32
13676 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
13677 (build-system python-build-system)
13678 (arguments
13679 `(#:phases
13680 (modify-phases %standard-phases
13681 (add-after 'unpack 'remove-failing-test
13682 (lambda _
13683 ;; Remove failing test. FIXME: make it pass
13684 (delete-file "bpython/test/test_args.py")
13685 #t))
13686 (add-after 'wrap 'add-aliases
13687 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
13688 (lambda* (#:key outputs #:allow-other-keys)
13689 (let ((out (assoc-ref outputs "out")))
13690 (for-each
13691 (lambda (old new)
13692 (symlink old (string-append out "/bin/" new)))
13693 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
13694 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
13695 #t)))))
13696 (propagated-inputs
13697 `(("python-pygments" ,python-pygments)
13698 ("python-requests" ,python-requests)
13699 ("python-babel" ,python-babel) ; optional, for internationalization
13700 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
13701 ("python-greenlet" ,python-greenlet)
13702 ("python-urwid" ,python-urwid) ; for bpython-urwid only
13703 ("python-six" ,python-six)))
13704 (native-inputs
13705 `(("python-sphinx" ,python-sphinx)
13706 ("python-mock" ,python-mock)))
13707 (home-page "https://bpython-interpreter.org/")
13708 (synopsis "Fancy interface to the Python interpreter")
13709 (description "Bpython is a fancy interface to the Python
13710interpreter. bpython's main features are
13711
13712@enumerate
13713@item in-line syntax highlighting,
13714@item readline-like autocomplete with suggestions displayed as you type,
13715@item expected parameter list for any Python function,
13716@item \"rewind\" function to pop the last line of code from memory and
13717 re-evaluate,
13718@item send the code you've entered off to a pastebin,
13719@item save the code you've entered to a file, and
13720@item auto-indentation.
13721@end enumerate")
13722 (license license:expat)))
13723
13724(define-public bpython2
13725 (let ((base (package-with-python2
13726 (strip-python2-variant bpython))))
13727 (package (inherit base)
13728 (name "bpython2")
13729 (arguments
13730 `(#:python ,python-2
13731 #:phases
13732 (modify-phases %standard-phases
13733 (add-after 'unpack 'remove-failing-test
13734 (lambda _
13735 ;; Remove failing test. FIXME: make it pass
13736 (delete-file "bpython/test/test_args.py")
13737 ;; Disable failing test-cases (renaming inhibits they are
13738 ;; discovered)
13739 (substitute* "bpython/test/test_curtsies_repl.py"
13740 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
13741 (string-append a "xxx_off_" b))
13742 (("^(\\s*def )(test_complex\\W)" _ a b)
13743 (string-append a "xxx_off_" b)))
13744 #t))
13745 (add-before 'build 'rename-scripts
13746 ;; rename the scripts to bypthon2, bpdb2, etc.
13747 (lambda _
13748 (substitute* "setup.py"
13749 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
13750 (string-append name "2" rest "\n"))
13751 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
13752 (string-append name "2" (or sub "") rest "\n")))
13753 #t))))))))
13754
13755(define-public python-pyinotify
13756 (package
13757 (name "python-pyinotify")
13758 (version "0.9.6")
13759 (source (origin
13760 (method url-fetch)
13761 (uri (pypi-uri "pyinotify" version))
13762 (sha256
13763 (base32
13764 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
13765 (build-system python-build-system)
13766 (arguments `(#:tests? #f)) ;no tests
13767 (home-page "https://github.com/seb-m/pyinotify")
13768 (synopsis "Python library for monitoring inotify events")
13769 (description
13770 "@code{pyinotify} provides a Python interface for monitoring
13771file system events on Linux.")
13772 (license license:expat)))
13773
13774(define-public python2-pyinotify
13775 (package-with-python2 python-pyinotify))
13776
13777;; Ada parser uses this version.
13778(define-public python2-quex-0.67.3
13779 (package
13780 (name "python2-quex")
13781 (version "0.67.3")
13782 (source
13783 (origin
13784 (method url-fetch)
13785 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
13786 (version-major+minor version)
13787 "/quex-" version ".zip"))
13788 (sha256
13789 (base32
13790 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
13791 (build-system python-build-system)
13792 (native-inputs
13793 `(("unzip" ,unzip)))
13794 (arguments
13795 `(#:python ,python-2
13796 #:tests? #f
13797 #:phases
13798 (modify-phases %standard-phases
13799 (delete 'configure)
13800 (delete 'build)
13801 (replace 'install
13802 (lambda* (#:key outputs #:allow-other-keys)
13803 (let* ((out (assoc-ref outputs "out"))
13804 (share/quex (string-append out "/share/quex"))
13805 (bin (string-append out "/bin")))
13806 (copy-recursively "." share/quex)
13807 (mkdir-p bin)
13808 (symlink (string-append share/quex "/quex-exe.py")
13809 (string-append bin "/quex"))
13810 #t))))))
13811 (native-search-paths
13812 (list (search-path-specification
13813 (variable "QUEX_PATH")
13814 (files '("share/quex")))))
13815 (home-page "http://quex.sourceforge.net/")
13816 (synopsis "Lexical analyzer generator in Python")
13817 (description "@code{quex} is a lexical analyzer generator in Python.")
13818 (license license:lgpl2.1+))) ; Non-military
13819
13820(define-public python2-quex
13821 (package (inherit python2-quex-0.67.3)
13822 (name "python2-quex")
13823 (version "0.68.1")
13824 (source
13825 (origin
13826 (method url-fetch)
13827 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
13828 (sha256
13829 (base32
13830 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
13831 (file-name (string-append name "-" version ".tar.gz"))))))
13832
13833(define-public python-more-itertools
13834 (package
13835 (name "python-more-itertools")
13836 (version "4.3.0")
13837 (source
13838 (origin
13839 (method url-fetch)
13840 (uri (pypi-uri "more-itertools" version))
13841 (sha256
13842 (base32
13843 "17h3na0rdh8xq30w4b9pizgkdxmm51896bxw600x84jflg9vaxn4"))))
13844 (build-system python-build-system)
13845 (arguments
13846 `(,@(if (any (cute string-prefix? <> (or (%current-system)
13847 (%current-target-system)))
13848 '("armhf" "i686"))
13849 '(#:phases
13850 (modify-phases %standard-phases
13851 ;; This is required for 32-bit hardware.
13852 ;; TODO: Try to remove this when upgrading.
13853 (add-after 'unpack 'patch-test
13854 (lambda _
13855 (substitute* "more_itertools/tests/test_more.py"
13856 (("10 \\*\\* 10") "9 ** 9"))
13857 #t))))
13858 '())))
13859 (propagated-inputs
13860 `(("python-six" ,python-six-bootstrap)))
13861 (home-page "https://github.com/erikrose/more-itertools")
13862 (synopsis "More routines for operating on iterables, beyond itertools")
13863 (description "Python's built-in @code{itertools} module implements a
13864number of iterator building blocks inspired by constructs from APL, Haskell,
13865and SML. @code{more-itertools} includes additional building blocks for
13866working with iterables.")
13867 (license license:expat)))
13868
13869(define-public python2-more-itertools
13870 (package-with-python2 python-more-itertools))
13871
13872(define-public python-latexcodec
13873 (package
13874 (name "python-latexcodec")
13875 (version "1.0.5")
13876 (source
13877 (origin
13878 (method url-fetch)
13879 (uri (pypi-uri "latexcodec" version))
13880 (sha256
13881 (base32
13882 "0zdd1gf24i83ykadx0y30n3001j43scqr2saql3vckk5c39dj1wn"))))
13883 (build-system python-build-system)
13884 (inputs
13885 `(("python-six" ,python-six)))
13886 (home-page "https://readthedocs.org/projects/latexcodec/")
13887 (synopsis "Work with LaTeX code in Python")
13888 (description "Lexer and codec to work with LaTeX code in Python.")
13889 (license license:expat)))
13890
13891(define-public python-pybtex
13892 (package
13893 (name "python-pybtex")
13894 (version "0.21")
13895 (source
13896 (origin
13897 (method url-fetch)
13898 (uri (pypi-uri "pybtex" version))
13899 (sha256
13900 (base32
13901 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
13902 (build-system python-build-system)
13903 (native-inputs
13904 `(("python-nose" ,python-nose)))
13905 (inputs
13906 `(("python-latexcodec" ,python-latexcodec)
13907 ("python-pyyaml" ,python-pyyaml)
13908 ("python-six" ,python-six)))
13909 (arguments
13910 `(#:test-target "nosetests"))
13911 (home-page "https://pybtex.org/")
13912 (synopsis "BibTeX-compatible bibliography processor")
13913 (description "Pybtex is a BibTeX-compatible bibliography processor written
13914in Python. You can simply type pybtex instead of bibtex.")
13915 (license license:expat)))
13916
13917(define-public python-onetimepass
13918 (package
13919 (name "python-onetimepass")
13920 (version "1.0.1")
13921 (source
13922 (origin
13923 (method url-fetch)
13924 (uri (pypi-uri "onetimepass" version))
13925 (sha256
13926 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
13927 (build-system python-build-system)
13928 (propagated-inputs `(("python-six" ,python-six)))
13929 (home-page "https://github.com/tadeck/onetimepass/")
13930 (synopsis "One-time password library")
13931 (description "Python one-time password library for HMAC-based (HOTP) and
13932time-based (TOTP) passwords.")
13933 (license license:expat)))
13934
13935(define-public python-parso
13936 (package
13937 (name "python-parso")
13938 (version "0.3.1")
13939 (source
13940 (origin
13941 (method url-fetch)
13942 (uri (pypi-uri "parso" version))
13943 (sha256
13944 (base32
13945 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
13946 (native-inputs
13947 `(("python-pytest" ,python-pytest)))
13948 (build-system python-build-system)
13949 (home-page "https://github.com/davidhalter/parso")
13950 (synopsis "Python Parser")
13951 (description "Parso is a Python parser that supports error recovery and
13952round-trip parsing for different Python versions (in multiple Python versions).
13953Parso is also able to list multiple syntax errors in your Python file.")
13954 (license license:expat)))
13955
13956(define-public python2-parso
13957 (package-with-python2 python-parso))
13958
13959(define-public python-async-generator
13960 (package
13961 (name "python-async-generator")
13962 (version "1.9")
13963 (source
13964 (origin
13965 (method url-fetch)
13966 (uri (pypi-uri "async_generator" version))
13967 (sha256
13968 (base32
13969 "0wc3hidz1q85cja93k5pzybn0fprfnqyrv4qlkdqdzklc5f4dmdp"))))
13970 (build-system python-build-system)
13971 (native-inputs
13972 `(("python-pytest" ,python-pytest)))
13973 (home-page "https://github.com/python-trio/async_generator")
13974 (synopsis "Async generators and context managers for Python 3.5+")
13975 (description "@code{async_generator} back-ports Python 3.6's native async
13976generators and Python 3.7's context managers into Python 3.5.")
13977 ;; Dual licensed.
13978 (license (list license:expat license:asl2.0))))
13979
13980(define-public python-async-timeout
13981 (package
13982 (name "python-async-timeout")
13983 (version "3.0.1")
13984 (source
13985 (origin
13986 (method url-fetch)
13987 (uri (pypi-uri "async-timeout" version))
13988 (sha256
13989 (base32
13990 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
13991 (build-system python-build-system)
13992 (home-page "https://github.com/aio-libs/async_timeout/")
13993 (synopsis "Timeout context manager for asyncio programs")
13994 (description "@code{async-timeout} provides a timeout timeout context
13995manager compatible with @code{asyncio}.")
13996 (license license:asl2.0)))
13997
13998(define-public python-glob2
13999 (package
14000 (name "python-glob2")
14001 (version "0.6")
14002 (source (origin
14003 (method url-fetch)
14004 (uri (string-append
14005 "https://github.com/miracle2k/python-glob2/archive/"
14006 version
14007 ".tar.gz"))
14008 (sha256
14009 (base32
14010 "0ja168f0dz4kbz4m06dm0rd3acaypk6hjx2km541pw22y9s40mag"))
14011 (file-name (string-append name "-" version ".tar.gz"))))
14012 (build-system python-build-system)
14013 (home-page "https://github.com/miracle2k/python-glob2/")
14014 (synopsis "Extended Version of the python buildin glob module")
14015 (description "This is an extended version of the Python
14016@url{http://docs.python.org/library/glob.html, built-in glob module} which
14017adds:
14018
14019@itemize
14020@item The ability to capture the text matched by glob patterns, and return
14021those matches alongside the file names.
14022@item A recursive @code{**} globbing syntax, akin for example to the
14023@code{globstar} option of Bash.
14024@item The ability to replace the file system functions used, in order to glob
14025on virtual file systems.
14026@item Compatible with Python 2 and Python 3 (tested with 3.3).
14027@end itemize
14028
14029Glob2 currently based on the glob code from Python 3.3.1.")
14030 (license license:bsd-2)))
14031
14032(define-public python2-glob2
14033 (package-with-python2 python-glob2))
14034
14035(define-public python-gipc
14036 (package
14037 (name "python-gipc")
14038 (version "0.6.0")
14039 (source
14040 (origin
14041 (method url-fetch)
14042 (uri (pypi-uri "gipc" version ".zip"))
14043 (sha256
14044 (base32
14045 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14046 (build-system python-build-system)
14047 (native-inputs
14048 `(("unzip" ,unzip)))
14049 (propagated-inputs
14050 `(("python-gevent" ,python-gevent)))
14051 (home-page "http://gehrcke.de/gipc")
14052 (synopsis "Child process management in the context of gevent")
14053 (description "Usage of Python's multiprocessing package in a
14054gevent-powered application may raise problems. With @code{gipc},
14055process-based child processes can safely be created anywhere within a
14056gevent-powered application.")
14057 (license license:expat)))
14058
14059(define-public python2-gipc
14060 (package-with-python2 python-gipc))
14061
14062(define-public python-fusepy
14063 (package
14064 (name "python-fusepy")
14065 (version "2.0.4")
14066 (source
14067 (origin
14068 (method url-fetch)
14069 (uri (pypi-uri "fusepy" version))
14070 (sha256
14071 (base32
14072 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14073 (build-system python-build-system)
14074 (arguments
14075 `(#:phases
14076 (modify-phases %standard-phases
14077 (add-before 'build 'set-library-file-name
14078 (lambda* (#:key inputs #:allow-other-keys)
14079 (let ((fuse (assoc-ref inputs "fuse")))
14080 (substitute* "fuse.py"
14081 (("find_library\\('fuse'\\)")
14082 (string-append "'" fuse "/lib/libfuse.so'")))
14083 #t))))))
14084 (propagated-inputs
14085 `(("fuse" ,fuse)))
14086 (home-page "https://github.com/fusepy/fusepy")
14087 (synopsis "Simple ctypes bindings for FUSE")
14088 (description "Python module that provides a simple interface to FUSE and
14089MacFUSE. The binding is created using the standard @code{ctypes} library.")
14090 (license license:isc)))
14091
14092(define-public python2-fusepy
14093 (package-with-python2 python-fusepy))
14094
14095(define-public python2-gdrivefs
14096 (package
14097 (name "python2-gdrivefs")
14098 (version "0.14.9")
14099 (source
14100 (origin
14101 (method url-fetch)
14102 (uri (pypi-uri "gdrivefs" version))
14103 (sha256
14104 (base32
14105 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
14106 (build-system python-build-system)
14107 (arguments
14108 `(#:python ,python-2
14109 #:phases
14110 (modify-phases %standard-phases
14111 (add-before 'build 'patch-setup-py
14112 (lambda _
14113 ;; Update requirements from dependency==version
14114 ;; to dependency>=version
14115 (substitute* "gdrivefs/resources/requirements.txt"
14116 (("==") ">="))
14117 #t)))))
14118 (native-inputs
14119 `(("python2-gipc" ,python2-gipc)
14120 ("python2-gevent" ,python2-gevent)
14121 ("python2-greenlet" ,python2-greenlet)
14122 ("python2-httplib2" ,python2-httplib2)
14123 ("python2-uritemplate" ,python2-uritemplate)
14124 ("python2-oauth2client" ,python2-oauth2client)
14125 ("python2-six" ,python2-six)))
14126 (propagated-inputs
14127 `(("python2-dateutil" ,python2-dateutil)
14128 ("python2-fusepy" ,python2-fusepy)
14129 ("python2-google-api-client" ,python2-google-api-client)))
14130 (home-page "https://github.com/dsoprea/GDriveFS")
14131 (synopsis "Mount Google Drive as a local file system")
14132 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
14133under Python 2.7.")
14134 (license license:gpl2)))
14135
14136(define-public pybind11
14137 (package
14138 (name "pybind11")
14139 (version "2.2.4")
14140 (source (origin
14141 (method git-fetch)
14142 (uri (git-reference
14143 (url "https://github.com/pybind/pybind11.git")
14144 (commit (string-append "v" version))))
14145 (sha256
14146 (base32
14147 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
14148 (file-name (git-file-name name version))))
14149 (build-system cmake-build-system)
14150 (native-inputs
14151 `(("python" ,python)
14152 ("python-pytest" ,python-pytest)))
14153 (arguments
14154 `(#:test-target "check"))
14155 (home-page "https://github.com/pybind/pybind11/")
14156 (synopsis "Seamless operability between C++11 and Python")
14157 (description "pybind11 is a lightweight header-only library that exposes
14158C++ types in Python and vice versa, mainly to create Python bindings of
14159existing C++ code. Its goals and syntax are similar to the excellent
14160Boost.Python library by David Abrahams: to minimize boilerplate code in
14161traditional extension modules by inferring type information using compile-time
14162introspection.")
14163 (license license:expat)))
14164
14165(define-public python-fasteners
14166 (package
14167 (name "python-fasteners")
14168 (version "0.14.1")
14169 (source
14170 (origin
14171 (method url-fetch)
14172 (uri (pypi-uri "fasteners" version))
14173 (sha256
14174 (base32
14175 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14176 (build-system python-build-system)
14177 (propagated-inputs
14178 `(("python-monotonic" ,python-monotonic)
14179 ("python-six" ,python-six)
14180 ("python-testtools" ,python-testtools)))
14181 (home-page "https://github.com/harlowja/fasteners")
14182 (synopsis "Python package that provides useful locks")
14183 (description
14184 "This package provides a Python program that provides following locks:
14185
14186@itemize
14187@item Locking decorator
14188@item Reader-writer locks
14189@item Inter-process locks
14190@item Generic helpers
14191@end itemize\n")
14192 (properties `((python2-variant . ,(delay python2-fasteners))))
14193 (license license:asl2.0)))
14194
14195(define-public python2-fasteners
14196 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14197 (package
14198 (inherit base)
14199 (propagated-inputs
14200 `(("python2-futures" ,python2-futures)
14201 ,@(package-propagated-inputs base))))))
14202
14203(define-public python-requests-file
14204 (package
14205 (name "python-requests-file")
14206 (version "1.4.3")
14207 (source
14208 (origin
14209 (method url-fetch)
14210 (uri (pypi-uri "requests-file" version))
14211 (sha256
14212 (base32
14213 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14214 (build-system python-build-system)
14215 (propagated-inputs
14216 `(("python-requests" ,python-requests)
14217 ("python-six" ,python-six)))
14218 (home-page
14219 "https://github.com/dashea/requests-file")
14220 (synopsis "File transport adapter for Requests")
14221 (description
14222 "Requests-File is a transport adapter for use with the Requests Python
14223library to allow local filesystem access via file:// URLs.")
14224 (license license:asl2.0)))
14225
14226(define-public python2-requests-file
14227 (package-with-python2 python-requests-file))
14228
14229(define-public python-tldextract
14230 (package
14231 (name "python-tldextract")
14232 (version "2.2.0")
14233 (source
14234 (origin
14235 (method url-fetch)
14236 (uri (pypi-uri "tldextract" version))
14237 (sha256
14238 (base32
14239 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14240 (build-system python-build-system)
14241 (native-inputs
14242 `(("python-pytest" ,python-pytest)
14243 ("python-responses" ,python-responses)))
14244 (propagated-inputs
14245 `(("python-idna" ,python-idna)
14246 ("python-requests" ,python-requests)
14247 ("python-requests-file" ,python-requests-file)))
14248 (home-page
14249 "https://github.com/john-kurkowski/tldextract")
14250 (synopsis
14251 "Separate the TLD from the registered domain and subdomains of a URL")
14252 (description
14253 "TLDExtract accurately separates the TLD from the registered domain and
14254subdomains of a URL, using the Public Suffix List. By default, this includes
14255the public ICANN TLDs and their exceptions. It can optionally support the
14256Public Suffix List's private domains as well.")
14257 (license license:bsd-3)))
14258
14259(define-public python2-tldextract
14260 (package-with-python2 python-tldextract))
14261
14262(define-public python-pynamecheap
14263 (package
14264 (name "python-pynamecheap")
14265 (version "0.0.3")
14266 (source
14267 (origin
14268 (method url-fetch)
14269 (uri (pypi-uri "PyNamecheap" version))
14270 (sha256
14271 (base32
14272 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
14273 (build-system python-build-system)
14274 (propagated-inputs
14275 `(("python-requests" ,python-requests)))
14276 (home-page
14277 "https://github.com/Bemmu/PyNamecheap")
14278 (synopsis
14279 "Namecheap API client in Python")
14280 (description
14281 "PyNamecheap is a Namecheap API client in Python.")
14282 (license license:expat)))
14283
14284(define-public python2-pynamecheap
14285 (package-with-python2 python-pynamecheap))
14286
14287(define-public python-dns-lexicon
14288 (package
14289 (name "python-dns-lexicon")
14290 (version "2.4.0")
14291 (source
14292 (origin
14293 (method url-fetch)
14294 (uri (pypi-uri "dns-lexicon" version))
14295 (sha256
14296 (base32
14297 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
14298 (build-system python-build-system)
14299 (arguments
14300 `(#:tests? #f)) ;requires internet access
14301 (propagated-inputs
14302 `(("python-future" ,python-future)
14303 ("python-pynamecheap" ,python-pynamecheap)
14304 ("python-requests" ,python-requests)
14305 ("python-tldextract" ,python-tldextract)
14306 ("python-urllib3" ,python-urllib3)))
14307 (home-page "https://github.com/AnalogJ/lexicon")
14308 (synopsis
14309 "Manipulate DNS records on various DNS providers")
14310 (description
14311 "Lexicon provides a way to manipulate DNS records on multiple DNS
14312providers in a standardized way. It has a CLI but it can also be used as a
14313Python library. It was designed to be used in automation, specifically with
14314Let's Encrypt.")
14315 (license license:expat)))
14316
14317(define-public python2-dns-lexicon
14318 (package-with-python2 python-dns-lexicon))
14319
14320(define-public python-commandlines
14321 (package
14322 (name "python-commandlines")
14323 (version "0.4.1")
14324 (source
14325 (origin
14326 (method url-fetch)
14327 (uri (pypi-uri "commandlines" version))
14328 (sha256
14329 (base32
14330 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
14331 (build-system python-build-system)
14332 (home-page "https://github.com/chrissimpkins/commandlines")
14333 (synopsis "Command line argument to object parsing library")
14334 (description
14335 "@code{Commandlines} is a Python library for command line application
14336development that supports command line argument parsing, command string
14337validation testing and application logic.")
14338 (license license:expat)))
14339
14340;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
14341;; python-numba. They have a very unflexible relationship.
14342(define-public python-numba
14343 (package
14344 (name "python-numba")
14345 (version "0.39.0")
14346 (source
14347 (origin
14348 (method url-fetch)
14349 (uri (pypi-uri "numba" version))
14350 (sha256
14351 (base32
14352 "1bibvkwga1v8293i9ivl469d8bzgabn3vgr2ig7c1i68v8frsx07"))))
14353 (build-system python-build-system)
14354 (arguments
14355 `(#:modules ((guix build utils)
14356 (guix build python-build-system)
14357 (ice-9 ftw)
14358 (srfi srfi-1)
14359 (srfi srfi-26))
14360 #:phases
14361 (modify-phases %standard-phases
14362 (add-after 'unpack 'disable-proprietary-features
14363 (lambda _
14364 (setenv "NUMBA_DISABLE_HSA" "1")
14365 (setenv "NUMBA_DISABLE_CUDA" "1")
14366 #t))
14367 (add-after 'unpack 'remove-failing-tests
14368 (lambda _
14369 ;; FIXME: these tests fail for unknown reasons:
14370 ;; test_non_writable_pycache, test_non_creatable_pycache, and
14371 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
14372 (substitute* "numba/tests/test_dispatcher.py"
14373 (("def test(_non_writable_pycache)" _ m)
14374 (string-append "def guix_skip" m))
14375 (("def test(_non_creatable_pycache)" _ m)
14376 (string-append "def guix_skip" m))
14377 (("def test(_frozen)" _ m)
14378 (string-append "def guix_skip" m)))
14379
14380 ;; These tests fail because we don't run the tests from the build
14381 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
14382 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
14383 (substitute* "numba/tests/test_pycc.py"
14384 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
14385 (string-append "def guix_skip" m)))
14386 #t))
14387 (replace 'check
14388 (lambda _
14389 (let ((cwd (getcwd)))
14390 (setenv "PYTHONPATH"
14391 (string-append cwd "/build/"
14392 (find (cut string-prefix? "lib" <>)
14393 (scandir (string-append cwd "/build")))
14394 ":"
14395 (getenv "PYTHONPATH")))
14396 ;; Something is wrong with the PYTHONPATH when running the
14397 ;; tests from the build directory, as it complains about not being
14398 ;; able to import certain modules.
14399 (with-directory-excursion "/tmp"
14400 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
14401 #t)))))
14402 (propagated-inputs
14403 `(("python-llvmlite" ,python-llvmlite)
14404 ("python-numpy" ,python-numpy)
14405 ("python-singledispatch" ,python-singledispatch)))
14406 ;; Needed for tests.
14407 (inputs
14408 `(("python-jinja2" ,python-jinja2)
14409 ("python-pygments" ,python-pygments)))
14410 (home-page "https://numba.pydata.org")
14411 (synopsis "Compile Python code using LLVM")
14412 (description "Numba gives you the power to speed up your applications with
14413high performance functions written directly in Python. With a few
14414annotations, array-oriented and math-heavy Python code can be just-in-time
14415compiled to native machine instructions, similar in performance to C, C++ and
14416Fortran, without having to switch languages or Python interpreters.
14417
14418Numba works by generating optimized machine code using the LLVM compiler
14419infrastructure at import time, runtime, or statically (using the included pycc
14420tool).")
14421 (license license:bsd-3)))
14422
14423(define-public python-anndata
14424 (package
14425 (name "python-anndata")
14426 (version "0.6.9")
14427 (source
14428 (origin
14429 (method url-fetch)
14430 (uri (pypi-uri "anndata" version))
14431 (sha256
14432 (base32
14433 "1fh461xyyc7pcrjfgd013bdc2alf53r46ss3gfw3431mbb1gappi"))))
14434 (build-system python-build-system)
14435 (propagated-inputs
14436 `(("python-h5py" ,python-h5py)
14437 ("python-natsort" ,python-natsort)
14438 ("python-pandas" ,python-pandas)
14439 ("python-scipy" ,python-scipy)))
14440 (home-page "https://github.com/theislab/anndata")
14441 (synopsis "Annotated data for data analysis pipelines")
14442 (description "Anndata is a package for simple (functional) high-level APIs
14443for data analysis pipelines. In this context, it provides an efficient,
14444scalable way of keeping track of data together with learned annotations and
14445reduces the code overhead typically encountered when using a mostly
14446object-oriented library such as @code{scikit-learn}.")
14447 (license license:bsd-3)))
14448
14449(define-public python-dill
14450 (package
14451 (name "python-dill")
14452 (version "0.2.8.2")
14453 (source
14454 (origin
14455 (method url-fetch)
14456 (uri (pypi-uri "dill" version))
14457 (sha256
14458 (base32
14459 "1cymzn9fxwdy33h21zkk4gqgzvd25110hh3zdqnvnwa3p52c4kb2"))))
14460 (build-system python-build-system)
14461 ;; FIXME: The check phase fails with "don't know how to make test".
14462 (arguments '(#:tests? #f))
14463 (home-page "https://pypi.org/project/dill")
14464 (synopsis "Serialize all of Python")
14465 (description "Dill extends Python's @code{pickle} module for serializing
14466and de-serializing Python objects to the majority of the built-in Python
14467types. Dill provides the user the same interface as the @code{pickle} module,
14468and also includes some additional features. In addition to pickling Python
14469objects, @code{dill} provides the ability to save the state of an interpreter
14470session in a single command. Hence, it would be feasable to save a
14471interpreter session, close the interpreter, ship the pickled file to another
14472computer, open a new interpreter, unpickle the session and thus continue from
14473the saved state of the original interpreter session.")
14474 (license license:bsd-3)))
14475
14476(define-public python-multiprocess
14477 (package
14478 (name "python-multiprocess")
14479 (version "0.70.6.1")
14480 (source
14481 (origin
14482 (method url-fetch)
14483 (uri (pypi-uri "multiprocess" version))
14484 (sha256
14485 (base32
14486 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
14487 (build-system python-build-system)
14488 (propagated-inputs
14489 `(("python-dill" ,python-dill)))
14490 (home-page "https://pypi.org/project/multiprocess")
14491 (synopsis "Multiprocessing and multithreading in Python")
14492 (description
14493 "This package is a fork of the multiprocessing Python package, a package
14494which supports the spawning of processes using the API of the standard
14495library's @code{threading} module.")
14496 (license license:bsd-3)))
14497
14498(define-public python-toolz
14499 (package
14500 (name "python-toolz")
14501 (version "0.9.0")
14502 (source
14503 (origin
14504 (method url-fetch)
14505 (uri (pypi-uri "toolz" version))
14506 (sha256
14507 (base32
14508 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
14509 (build-system python-build-system)
14510 ;; FIXME: tests cannot be computed: "Can't perform this operation for
14511 ;; unregistered loader type"
14512 (arguments '(#:tests? #f))
14513 (home-page "https://github.com/pytoolz/toolz/")
14514 (synopsis "List processing tools and functional utilities")
14515 (description
14516 "This package provides a set of utility functions for iterators,
14517functions, and dictionaries.")
14518 (license license:bsd-3)))
14519
14520(define-public python2-toolz
14521 (package-with-python2 python-toolz))
14522
14523(define-public python-cytoolz
14524 (package
14525 (name "python-cytoolz")
14526 (version "0.9.0.1")
14527 (source
14528 (origin
14529 (method url-fetch)
14530 (uri (pypi-uri "cytoolz" version))
14531 (sha256
14532 (base32
14533 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
14534 (build-system python-build-system)
14535 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
14536 ;; 'exceptions'"
14537 (arguments '(#:tests? #f))
14538 (propagated-inputs
14539 `(("python-toolz" ,python-toolz)))
14540 (native-inputs
14541 `(("python-cython" ,python-cython)))
14542 (home-page "https://github.com/pytoolz/cytoolz")
14543 (synopsis "High performance functional utilities")
14544 (description
14545 "The cytoolz package implements the same API as provided by toolz. The
14546main differences are that @code{cytoolz} is faster and cytoolz offers a C API
14547that is accessible to other projects developed in Cython.")
14548 (license license:bsd-3)))
14549
14550(define-public python-sortedcontainers
14551 (package
14552 (name "python-sortedcontainers")
14553 (version "2.0.4")
14554 (source
14555 (origin
14556 (method url-fetch)
14557 (uri (pypi-uri "sortedcontainers" version))
14558 (sha256
14559 (base32
14560 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
14561 (build-system python-build-system)
14562 (native-inputs
14563 `(("python-tox" ,python-tox)))
14564 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
14565 (synopsis "Sorted List, Sorted Dict, Sorted Set")
14566 (description
14567 "This package provides a sorted collections library, written in
14568pure-Python.")
14569 (license license:asl2.0)))
14570
14571(define-public python-cloudpickle
14572 (package
14573 (name "python-cloudpickle")
14574 (version "0.6.1")
14575 (source
14576 (origin
14577 (method url-fetch)
14578 (uri (pypi-uri "cloudpickle" version))
14579 (sha256
14580 (base32
14581 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
14582 (build-system python-build-system)
14583 ;; FIXME: there are 5 errors in 122 tests:
14584 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
14585 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
14586 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14587 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14588 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
14589 ;; TypeError: cannot serialize '_io.BufferedRandom' object
14590 (arguments '(#:tests? #f))
14591 (native-inputs
14592 `(("python-pytest" ,python-pytest)
14593 ("python-mock" ,python-mock)
14594 ("python-tornado" ,python-tornado)))
14595 (home-page "https://github.com/cloudpipe/cloudpickle")
14596 (synopsis "Extended pickling support for Python objects")
14597 (description
14598 "Cloudpickle makes it possible to serialize Python constructs not
14599supported by the default pickle module from the Python standard library. It
14600is especially useful for cluster computing where Python expressions are
14601shipped over the network to execute on remote hosts, possibly close to the
14602data.")
14603 (license license:bsd-3)))
14604
14605(define-public python2-cloudpickle
14606 (package-with-python2 python-cloudpickle))
14607
14608(define-public python-locket
14609 (package
14610 (name "python-locket")
14611 (version "0.2.0")
14612 (source
14613 (origin
14614 (method url-fetch)
14615 (uri (pypi-uri "locket" version))
14616 (sha256
14617 (base32
14618 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
14619 (build-system python-build-system)
14620 (home-page "https://github.com/mwilliamson/locket.py")
14621 (synopsis "File-based locks for Python")
14622 (description
14623 "Locket implements a lock that can be used by multiple processes provided
14624they use the same path.")
14625 (license license:bsd-2)))
14626
14627(define-public python2-locket
14628 (package-with-python2 python-locket))
14629
14630(define-public python-blosc
14631 (package
14632 (name "python-blosc")
14633 (version "1.5.1")
14634 (source
14635 (origin
14636 (method url-fetch)
14637 (uri (pypi-uri "blosc" version))
14638 (sha256
14639 (base32
14640 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
14641 (build-system python-build-system)
14642 ;; FIXME: all tests pass, but then this error is printed:
14643 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
14644 (arguments '(#:tests? #f))
14645 (propagated-inputs
14646 `(("python-numpy" ,python-numpy)))
14647 (home-page "https://github.com/blosc/python-blosc")
14648 (synopsis "Python wrapper for the Blosc data compressor library")
14649 (description "Blosc is a high performance compressor optimized for binary
14650data. It has been designed to transmit data to the processor cache faster
14651than the traditional, non-compressed, direct memory fetch approach via a
14652@code{memcpy()} system call.
14653
14654Blosc works well for compressing numerical arrays that contains data with
14655relatively low entropy, like sparse data, time series, grids with
14656regular-spaced values, etc.
14657
14658This Python package wraps the Blosc library.")
14659 (license license:bsd-3)))
14660
14661(define-public python2-blosc
14662 (package-with-python2 python-blosc))
14663
14664(define-public python-partd
14665 (package
14666 (name "python-partd")
14667 (version "0.3.9")
14668 (source
14669 (origin
14670 (method url-fetch)
14671 (uri (pypi-uri "partd" version))
14672 (sha256
14673 (base32
14674 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
14675 (build-system python-build-system)
14676 (propagated-inputs
14677 `(("python-blosc" ,python-blosc)
14678 ("python-locket" ,python-locket)
14679 ("python-numpy" ,python-numpy)
14680 ("python-pandas" ,python-pandas)
14681 ("python-pyzmq" ,python-pyzmq)
14682 ("python-toolz" ,python-toolz)))
14683 (home-page "https://github.com/dask/partd/")
14684 (synopsis "Appendable key-value storage")
14685 (description "Partd stores key-value pairs. Values are raw bytes. We
14686append on old values. Partd excels at shuffling operations.")
14687 (license license:bsd-3)))
14688
14689(define-public python2-partd
14690 (package-with-python2 python-partd))
14691
14692(define-public python-dask
14693 (package
14694 (name "python-dask")
14695 (version "1.0.0")
14696 (source
14697 (origin
14698 (method url-fetch)
14699 (uri (pypi-uri "dask" version))
14700 (sha256
14701 (base32
14702 "1xwz8h020ipwav2p5gcq9pskya1cvzd6hjyvd06dvr3w5lxlmym1"))))
14703 (build-system python-build-system)
14704 ;; A single test out of 5000+ fails. This test is marked as xfail when
14705 ;; pytest-xdist is used.
14706 (arguments
14707 `(#:phases
14708 (modify-phases %standard-phases
14709 (add-after 'unpack 'disable-broken-test
14710 (lambda _
14711 (substitute* "dask/tests/test_threaded.py"
14712 (("def test_interrupt\\(\\)" m)
14713 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14714 m)))
14715 (when (which "python2")
14716 ;; This test fails with recent Pandas:
14717 ;; <https://github.com/dask/dask/issues/3794>.
14718 (substitute* "dask/dataframe/tests/test_dataframe.py"
14719 (("def test_info\\(\\)" m)
14720 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14721 m))))
14722 #t))
14723 (replace 'check
14724 (lambda _ (invoke "pytest" "-vv"))))))
14725 (propagated-inputs
14726 `(("python-cloudpickle" ,python-cloudpickle)
14727 ("python-numpy" ,python-numpy)
14728 ("python-pandas" ,python-pandas)
14729 ("python-partd" ,python-partd)
14730 ("python-toolz" ,python-toolz)
14731 ("python-pyyaml" ,python-pyyaml)))
14732 (native-inputs
14733 `(("python-pytest" ,python-pytest)
14734 ("python-pytest-runner" ,python-pytest-runner)))
14735 (home-page "https://github.com/dask/dask/")
14736 (synopsis "Parallel computing with task scheduling")
14737 (description
14738 "Dask is a flexible parallel computing library for analytics. It
14739consists of two components: dynamic task scheduling optimized for computation,
14740and large data collections like parallel arrays, dataframes, and lists that
14741extend common interfaces like NumPy, Pandas, or Python iterators to
14742larger-than-memory or distributed environments. These parallel collections
14743run on top of the dynamic task schedulers. ")
14744 (license license:bsd-3)))
14745
14746(define-public python2-dask
14747 (package-with-python2 python-dask))
14748
14749(define-public python-ilinkedlist
14750 (package
14751 (name "python-ilinkedlist")
14752 (version "0.4.0")
14753 (source
14754 (origin
14755 (method url-fetch)
14756 (uri (pypi-uri "ilinkedlist" version))
14757 (sha256
14758 (base32
14759 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
14760 (build-system python-build-system)
14761 (native-inputs `(("python-pytest" ,python-pytest)))
14762 (inputs `(("python" ,python)))
14763 (home-page "https://github.com/luther9/ilinkedlist-py")
14764 (synopsis "Immutable linked list library")
14765 (description
14766 "This is a implementation of immutable linked lists for Python. It
14767contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
14768Since a linked list is treated as immutable, it is hashable, and its length
14769can be retrieved in constant time. Some of the terminology is inspired by
14770LISP. It is possible to create an improper list by creating a @code{Pair}
14771with a non-list @code{cdr}.")
14772 (license license:gpl3+)))
14773
14774(define-public python-readlike
14775 (package
14776 (name "python-readlike")
14777 (version "0.1.3")
14778 (source
14779 (origin
14780 (method url-fetch)
14781 (uri (pypi-uri "readlike" version))
14782 (sha256
14783 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
14784 (build-system python-build-system)
14785 (home-page "https://github.com/jangler/readlike")
14786 (synopsis "GNU Readline-like line editing module")
14787 (description
14788 "This Python module provides line editing functions similar to the default
14789Emacs-style ones of GNU Readline. Unlike the Python standard library's
14790@code{readline} package, this one allows access to those capabilties in settings
14791outside of a standard command-line interface. It is especially well-suited to
14792interfacing with Urwid, due to a shared syntax for describing key inputs.
14793
14794Currently, all stateless Readline commands are implemented. Yanking and history
14795are not supported.")
14796 (license license:expat)))
14797
14798(define-public python2-readlike
14799 (package-with-python2 python-readlike))
14800
14801(define-public python-reparser
14802 (package
14803 (name "python-reparser")
14804 (version "1.4.3")
14805 (source
14806 (origin
14807 (method url-fetch)
14808 (uri (pypi-uri "ReParser" version))
14809 (sha256
14810 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
14811 (build-system python-build-system)
14812 (home-page "https://github.com/xmikos/reparser")
14813 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
14814 (description
14815 "This Python library provides a simple lexer/parser for inline markup based
14816on regular expressions.")
14817 (license license:expat)))
14818
14819(define-public python2-reparser
14820 (let ((reparser (package-with-python2
14821 (strip-python2-variant python-reparser))))
14822 (package (inherit reparser)
14823 (propagated-inputs
14824 `(("python2-enum34" ,python2-enum34)
14825 ,@(package-propagated-inputs reparser))))))
14826
14827(define-public python-precis-i18n
14828 (package
14829 (name "python-precis-i18n")
14830 (version "1.0.0")
14831 (source
14832 (origin
14833 (method url-fetch)
14834 (uri (pypi-uri "precis_i18n" version))
14835 (sha256
14836 (base32
14837 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
14838 (build-system python-build-system)
14839 (home-page "https://github.com/byllyfish/precis_i18n")
14840 (synopsis "Implementation of the PRECIS framework")
14841 (description
14842 "This module implements the PRECIS Framework as described in RFC 8264,
14843RFC 8265 and RFC 8266.")
14844 (license license:expat)))
14845
14846(define-public python-wikidata
14847 (package
14848 (name "python-wikidata")
14849 (version "0.6.1")
14850 (source
14851 (origin
14852 (method url-fetch)
14853 (uri (pypi-uri "Wikidata" version))
14854 (sha256
14855 (base32
14856 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
14857 (build-system python-build-system)
14858 (propagated-inputs
14859 `(("python-babel" ,python-babel)))
14860 (home-page "https://github.com/dahlia/wikidata")
14861 (synopsis "Wikidata client library")
14862 (description
14863 "This package provides a Python interface to
14864@url{https://www.wikidata.org/, Wikidata}.")
14865 (properties '((upstream-name . "Wikidata")))
14866 (license license:gpl3+)))
14867
14868(define-public python-attr
14869 (package
14870 (name "python-attr")
14871 (version "0.3.1")
14872 (source
14873 (origin
14874 (method url-fetch)
14875 (uri (pypi-uri "attr" version))
14876 (sha256
14877 (base32
14878 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
14879 (build-system python-build-system)
14880 (home-page "https://github.com/denis-ryzhkov/attr")
14881 (synopsis "Decorator for attributes of target function or class")
14882 (description "Simple decorator to set attributes of target function or
14883class in a @acronym{DRY, Don't Repeat Yourself} way.")
14884 (license license:expat)))