Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / python.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016, 2017 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016, 2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 Nils Gillmann <ng0@n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017, 2018 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016, 2017 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
34 ;;; Copyright © 2016, 2017 Julien Lepiller <julien@lepiller.eu>
35 ;;; Copyright © 2016, 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
36 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39 ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
40 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
41 ;;; Copyright © 2017, 2018 Mathieu Othacehe <m.othacehe@gmail.com>
42 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
44 ;;; Copyright © 2017, 2018 Kei Kebreau <kkebreau@posteo.net>
45 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
47 ;;; Copyright © 2017 Brendan Tildesley <brendan.tildesley@openmailbox.org>
48 ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
49 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
50 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
51 ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
52 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
53 ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
54 ;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
55 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
56 ;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
57 ;;;
58 ;;; This file is part of GNU Guix.
59 ;;;
60 ;;; GNU Guix is free software; you can redistribute it and/or modify it
61 ;;; under the terms of the GNU General Public License as published by
62 ;;; the Free Software Foundation; either version 3 of the License, or (at
63 ;;; your option) any later version.
64 ;;;
65 ;;; GNU Guix is distributed in the hope that it will be useful, but
66 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
67 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
68 ;;; GNU General Public License for more details.
69 ;;;
70 ;;; You should have received a copy of the GNU General Public License
71 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
72
73 (define-module (gnu packages python)
74 #:use-module ((guix licenses) #:prefix license:)
75 #:use-module (gnu packages)
76 #:use-module (gnu packages algebra)
77 #:use-module (gnu packages adns)
78 #:use-module (gnu packages attr)
79 #:use-module (gnu packages backup)
80 #:use-module (gnu packages bash)
81 #:use-module (gnu packages check)
82 #:use-module (gnu packages compression)
83 #:use-module (gnu packages crypto)
84 #:use-module (gnu packages databases)
85 #:use-module (gnu packages file)
86 #:use-module (gnu packages fontutils)
87 #:use-module (gnu packages gcc)
88 #:use-module (gnu packages geo)
89 #:use-module (gnu packages ghostscript)
90 #:use-module (gnu packages gl)
91 #:use-module (gnu packages glib)
92 #:use-module (gnu packages graphviz)
93 #:use-module (gnu packages graphics)
94 #:use-module (gnu packages gstreamer)
95 #:use-module (gnu packages gtk)
96 #:use-module (gnu packages icu4c)
97 #:use-module (gnu packages image)
98 #:use-module (gnu packages imagemagick)
99 #:use-module (gnu packages libevent)
100 #:use-module (gnu packages libffi)
101 #:use-module (gnu packages linux)
102 #:use-module (gnu packages machine-learning)
103 #:use-module (gnu packages man)
104 #:use-module (gnu packages maths)
105 #:use-module (gnu packages multiprecision)
106 #:use-module (gnu packages networking)
107 #:use-module (gnu packages ncurses)
108 #:use-module (gnu packages openstack)
109 #:use-module (gnu packages pcre)
110 #:use-module (gnu packages perl)
111 #:use-module (gnu packages pkg-config)
112 #:use-module (gnu packages python-crypto)
113 #:use-module (gnu packages python-web)
114 #:use-module (gnu packages qt)
115 #:use-module (gnu packages readline)
116 #:use-module (gnu packages sdl)
117 #:use-module (gnu packages search)
118 #:use-module (gnu packages shells)
119 #:use-module (gnu packages ssh)
120 #:use-module (gnu packages statistics)
121 #:use-module (gnu packages terminals)
122 #:use-module (gnu packages tex)
123 #:use-module (gnu packages texinfo)
124 #:use-module (gnu packages time)
125 #:use-module (gnu packages tls)
126 #:use-module (gnu packages version-control)
127 #:use-module (gnu packages video)
128 #:use-module (gnu packages web)
129 #:use-module (gnu packages base)
130 #:use-module (gnu packages xml)
131 #:use-module (gnu packages xorg)
132 #:use-module (gnu packages xdisorg)
133 #:use-module (gnu packages tcl)
134 #:use-module (gnu packages bdw-gc)
135 #:use-module (guix packages)
136 #:use-module (guix download)
137 #:use-module (guix git-download)
138 #:use-module (guix utils)
139 #:use-module (guix build-system gnu)
140 #:use-module (guix build-system cmake)
141 #:use-module (guix build-system python)
142 #:use-module (guix build-system trivial)
143 #:use-module (srfi srfi-1))
144
145 (define-public python-2.7
146 (package
147 (name "python2")
148 (version "2.7.15")
149 (source
150 (origin
151 (method url-fetch)
152 (uri (string-append "https://www.python.org/ftp/python/"
153 version "/Python-" version ".tar.xz"))
154 (sha256
155 (base32
156 "0x2mvz9dp11wj7p5ccvmk9s0hzjk2fa1m462p395l4r6bfnb3n92"))
157 (patches (search-patches "python-2.7-search-paths.patch"
158 "python-2-deterministic-build-info.patch"
159 "python-2.7-site-prefixes.patch"
160 "python-2.7-source-date-epoch.patch"
161 "python-2.7-adjust-tests.patch"))
162 (modules '((guix build utils)))
163 ;; suboptimal to delete failing tests here, but if we delete them in the
164 ;; arguments then we need to make sure to strip out that phase when it
165 ;; gets inherited by python and python-minimal.
166 (snippet
167 '(begin
168 (for-each delete-file
169 '("Lib/test/test_compileall.py"
170 "Lib/test/test_ctypes.py" ; fails on mips64el
171 "Lib/test/test_distutils.py"
172 "Lib/test/test_import.py"
173 "Lib/test/test_shutil.py"
174 "Lib/test/test_socket.py"
175 "Lib/test/test_subprocess.py"))
176 #t))))
177 (outputs '("out"
178 "tk")) ;tkinter; adds 50 MiB to the closure
179 (build-system gnu-build-system)
180 (arguments
181 `(#:test-target "test"
182 #:configure-flags
183 (list "--enable-shared" ;allow embedding
184 "--with-system-ffi" ;build ctypes
185 "--with-ensurepip=install" ;install pip and setuptools
186 "--enable-unicode=ucs4"
187 (string-append "LDFLAGS=-Wl,-rpath="
188 (assoc-ref %outputs "out") "/lib"))
189
190 #:modules ((ice-9 ftw) (ice-9 match)
191 (guix build utils) (guix build gnu-build-system))
192 #:phases
193 (modify-phases %standard-phases
194 (add-before
195 'configure 'patch-lib-shells
196 (lambda _
197 ;; Filter for existing files, since some may not exist in all
198 ;; versions of python that are built with this recipe.
199 (substitute* (filter file-exists?
200 '("Lib/subprocess.py"
201 "Lib/popen2.py"
202 "Lib/distutils/tests/test_spawn.py"
203 "Lib/test/support/__init__.py"
204 "Lib/test/test_subprocess.py"))
205 (("/bin/sh") (which "sh")))
206 #t))
207 (add-before 'configure 'do-not-record-configure-flags
208 (lambda* (#:key configure-flags #:allow-other-keys)
209 ;; Remove configure flags from the installed '_sysconfigdata.py'
210 ;; and 'Makefile' so we don't end up keeping references to the
211 ;; build tools.
212 ;;
213 ;; Preserve at least '--with-system-ffi' since otherwise the
214 ;; thing tries to build libffi, fails, and we end up with a
215 ;; Python that lacks ctypes.
216 (substitute* "configure"
217 (("^CONFIG_ARGS=.*$")
218 (format #f "CONFIG_ARGS='~a'\n"
219 (if (member "--with-system-ffi" configure-flags)
220 "--with-system-ffi"
221 ""))))
222 #t))
223 (add-before
224 'check 'pre-check
225 (lambda _
226 ;; 'Lib/test/test_site.py' needs a valid $HOME
227 (setenv "HOME" (getcwd))
228 #t))
229 (add-after
230 'unpack 'set-source-file-times-to-1980
231 ;; XXX One of the tests uses a ZIP library to pack up some of the
232 ;; source tree, and fails with "ZIP does not support timestamps
233 ;; before 1980". Work around this by setting the file times in the
234 ;; source tree to sometime in early 1980.
235 (lambda _
236 (let ((circa-1980 (* 10 366 24 60 60)))
237 (ftw "." (lambda (file stat flag)
238 (utime file circa-1980 circa-1980)
239 #t))
240 #t)))
241 (add-after 'install 'remove-tests
242 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
243 ;; because these files are used by some libraries out there.
244 (lambda* (#:key outputs #:allow-other-keys)
245 (let ((out (assoc-ref outputs "out")))
246 (match (scandir (string-append out "/lib")
247 (lambda (name)
248 (string-prefix? "python" name)))
249 ((pythonX.Y)
250 (let ((testdir (string-append out "/lib/" pythonX.Y
251 "/test")))
252 (with-directory-excursion testdir
253 (for-each delete-file-recursively
254 (scandir testdir
255 (match-lambda
256 ((or "." "..") #f)
257 (file
258 (not
259 (string-prefix? "test_support."
260 file))))))
261 (call-with-output-file "__init__.py" (const #t))
262 #t)))))))
263 (add-after 'install 'move-tk-inter
264 (lambda* (#:key outputs #:allow-other-keys)
265 ;; When Tkinter support is built move it to a separate output so
266 ;; that the main output doesn't contain a reference to Tcl/Tk.
267 (let ((out (assoc-ref outputs "out"))
268 (tk (assoc-ref outputs "tk")))
269 (when tk
270 (match (find-files out "tkinter.*\\.so")
271 ((tkinter.so)
272 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
273 ;; want it under TK/lib/pythonX.Y/site-packages.
274 (let* ((len (string-length out))
275 (target (string-append
276 tk "/"
277 (string-drop
278 (dirname (dirname tkinter.so))
279 len)
280 "/site-packages")))
281 (install-file tkinter.so target)
282 (delete-file tkinter.so)))))
283 #t))))))
284 (inputs
285 `(("bzip2" ,bzip2)
286 ("gdbm" ,gdbm)
287 ("libffi" ,libffi) ; for ctypes
288 ("sqlite" ,sqlite) ; for sqlite extension
289 ("openssl" ,openssl)
290 ("readline" ,readline)
291 ("zlib" ,zlib)
292 ("tcl" ,tcl)
293 ("tk" ,tk))) ; for tkinter
294 (native-inputs
295 `(("pkg-config" ,pkg-config)))
296 (native-search-paths
297 (list (search-path-specification
298 (variable "PYTHONPATH")
299 (files '("lib/python2.7/site-packages")))))
300 (home-page "https://www.python.org")
301 (synopsis "High-level, dynamically-typed programming language")
302 (description
303 "Python is a remarkably powerful dynamic programming language that
304 is used in a wide variety of application domains. Some of its key
305 distinguishing features include: clear, readable syntax; strong
306 introspection capabilities; intuitive object orientation; natural
307 expression of procedural code; full modularity, supporting hierarchical
308 packages; exception-based error handling; and very high level dynamic
309 data types.")
310 (license license:psfl)))
311
312 ;; Current 2.x version.
313 (define-public python-2 python-2.7)
314
315 (define-public python2-called-python
316 ;; Both 2.x and 3.x used to be called "python". In commit
317 ;; a7714d42de2c3082f3609d1e63c83d703fb39cf9 (March 2018), we renamed the
318 ;; Python 2.x package to "python2".
319 (package
320 (inherit python-2)
321 (name "python")
322 (properties `((superseded . ,python-2)))))
323
324 (define-public python-3.7
325 (package (inherit python-2)
326 (name "python")
327 (version "3.7.0")
328 (source (origin
329 (method url-fetch)
330 (uri (string-append "https://www.python.org/ftp/python/"
331 version "/Python-" version ".tar.xz"))
332 (patches (search-patches
333 "python-fix-tests.patch"
334 "python-3-fix-tests.patch"
335 "python-3-deterministic-build-info.patch"
336 "python-3-search-paths.patch"))
337 (patch-flags '("-p0"))
338 (sha256
339 (base32
340 "0j9mic5c9lbd2b20wka7hily7szz740wy9ilfrczxap63rnrk0h3"))
341 (snippet
342 '(begin
343 (for-each delete-file
344 '("Lib/ctypes/test/test_win32.py" ; fails on aarch64
345 "Lib/test/test_fcntl.py" ; fails on aarch64
346 "Lib/test/test_posix.py")) ; fails on aarch64
347 #t))))
348 (arguments
349 (substitute-keyword-arguments (package-arguments python-2)
350 ((#:phases phases)
351 `(modify-phases ,phases
352 ;; Unset SOURCE_DATE_EPOCH while running the test-suite and set it
353 ;; again afterwards. See <https://bugs.python.org/issue34022>.
354 (add-before 'check 'unset-SOURCE_DATE_EPOCH
355 (lambda _ (unsetenv "SOURCE_DATE_EPOCH") #t))
356 (add-after 'check 'reset-SOURCE_DATE_EPOCH
357 (lambda _ (setenv "SOURCE_DATE_EPOCH" "1") #t))
358 ;; FIXME: Without this phase we have close to 400 files that
359 ;; differ across different builds of this package. With this phase
360 ;; there are 44 files left that differ.
361 (add-after 'remove-tests 'rebuild-bytecode
362 (lambda* (#:key outputs #:allow-other-keys)
363 (let ((out (assoc-ref outputs "out")))
364 ;; Disable hash randomization to ensure the generated .pycs
365 ;; are reproducible.
366 (setenv "PYTHONHASHSEED" "0")
367 (for-each
368 (lambda (opt)
369 (format #t "Compiling with optimization level: ~a\n"
370 (if (null? opt) "none" (car opt)))
371 (for-each (lambda (file)
372 (apply invoke
373 `(,(string-append out "/bin/python3")
374 ,@opt
375 "-m" "compileall"
376 "-f" ; force rebuild
377 ;; Don't build lib2to3, because it's Python 2 code.
378 "-x" "lib2to3/.*"
379 ,file)))
380 (find-files out "\\.py$")))
381 (list '() '("-O") '("-OO")))
382 #t)))))))
383 (native-search-paths
384 (list (search-path-specification
385 (variable "PYTHONPATH")
386 (files (list (string-append "lib/python"
387 (version-major+minor version)
388 "/site-packages"))))))))
389
390 ;; Current 3.x version.
391 (define-public python-3 python-3.7)
392
393 ;; Current major version.
394 (define-public python python-3)
395
396 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
397 ;; Python (Tk -> libxcb -> Python.)
398
399 (define-public python2-minimal
400 (package (inherit python-2)
401 (name "python2-minimal")
402 (outputs '("out"))
403
404 ;; Keep zlib, which is used by 'pip' (via the 'zipimport' module), which
405 ;; is invoked upon 'make install'. 'pip' also expects 'ctypes' and thus
406 ;; libffi.
407 (inputs `(("libffi" ,libffi)
408 ("zlib" ,zlib)))))
409
410 (define-public python-minimal
411 (package (inherit python)
412 (name "python-minimal")
413 (outputs '("out"))
414
415 ;; Build fails due to missing ctypes without libffi.
416 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
417 ;; zlib is required by 'zipimport', used by pip.
418 (inputs `(("libffi" ,libffi)
419 ("openssl" ,openssl)
420 ("zlib" ,zlib)))))
421
422 (define-public python-debug
423 (package
424 (inherit python)
425 (name "python-debug")
426 (outputs '("out" "debug"))
427 (build-system gnu-build-system)
428 (arguments
429 (substitute-keyword-arguments (package-arguments python)
430 ((#:configure-flags flags '())
431 `(cons "--with-pydebug" ,flags))))
432 (synopsis
433 "High-level, dynamically-typed programming language (for debugging)")
434 (description
435 "This variant of Python provides an interpreter built with
436 @code{--with-pydebug} to help develop and debug extensions. See
437 @url{https://pythonextensionpatterns.readthedocs.io/en/latest/debugging/debug.html},
438 for more information.")))
439
440 (define* (wrap-python3 python
441 #:optional
442 (name (string-append (package-name python) "-wrapper")))
443 (package (inherit python)
444 (name name)
445 (source #f)
446 (build-system trivial-build-system)
447 (outputs '("out"))
448 (inputs `(("bash" ,bash)))
449 (propagated-inputs `(("python" ,python)))
450 (arguments
451 `(#:modules ((guix build utils))
452 #:builder
453 (begin
454 (use-modules (guix build utils))
455 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
456 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
457 (mkdir-p bin)
458 (for-each
459 (lambda (old new)
460 (symlink (string-append python old)
461 (string-append bin "/" new)))
462 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
463 `("python" ,"pydoc" ,"idle" ,"pip"))
464 ;; python-config outputs search paths based upon its location,
465 ;; use a bash wrapper to avoid changing its outputs.
466 (let ((bash (string-append (assoc-ref %build-inputs "bash")
467 "/bin/bash"))
468 (old (string-append python "python3-config"))
469 (new (string-append bin "/python-config")))
470 (with-output-to-file new
471 (lambda ()
472 (format #t "#!~a~%" bash)
473 (format #t "exec \"~a\" \"$@\"~%" old)
474 (chmod new #o755)
475 #t)))))))
476 (synopsis "Wrapper for the Python 3 commands")
477 (description
478 "This package provides wrappers for the commands of Python@tie{}3.x such
479 that they can be invoked under their usual name---e.g., @command{python}
480 instead of @command{python3}.")))
481
482 (define-public python-wrapper (wrap-python3 python))
483 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
484
485 (define-public python-psutil
486 (package
487 (name "python-psutil")
488 (version "5.4.3")
489 (source
490 (origin
491 (method url-fetch)
492 (uri (pypi-uri "psutil" version))
493 (sha256
494 (base32
495 "063v69x7spyclyaxrd3gmzj3p16q5ayg97xqhwb1kyn22a9pwip2"))))
496 (build-system python-build-system)
497 (arguments
498 ;; FIXME: some tests does not return and times out.
499 '(#:tests? #f))
500 (home-page "https://www.github.com/giampaolo/psutil")
501 (synopsis "Library for retrieving information on running processes")
502 (description
503 "psutil (Python system and process utilities) is a library for retrieving
504 information on running processes and system utilization (CPU, memory, disks,
505 network) in Python. It is useful mainly for system monitoring, profiling and
506 limiting process resources and management of running processes. It implements
507 many functionalities offered by command line tools such as: ps, top, lsof,
508 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
509 pidof, tty, taskset, pmap.")
510 (properties `((python2-variant . ,(delay python2-psutil))))
511 (license license:bsd-3)))
512
513 (define-public python2-psutil
514 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
515 (package
516 (inherit base)
517 (propagated-inputs
518 `(("python2-enum34" ,python2-enum34) ;optional
519 ,@(package-propagated-inputs base))))))
520
521 (define-public python-shapely
522 (package
523 (name "python-shapely")
524 (version "1.6.3")
525 (source
526 (origin
527 (method url-fetch)
528 (uri (pypi-uri "Shapely" version))
529 (sha256
530 (base32
531 "0svc58dzcw9gj92b4sgq35sdxkf85z0qwlzxarkzq4bp3h8jy58l"))))
532 (build-system python-build-system)
533 (native-inputs
534 `(("python-cython" ,python-cython)
535 ("python-matplotlib" ,python-matplotlib)
536 ("python-pytest" ,python-pytest)
537 ("python-pytest-cov" ,python-pytest-cov)))
538 (inputs
539 `(("geos" ,geos)))
540 (propagated-inputs
541 `(("python-numpy" ,python-numpy)))
542 (arguments
543 `(#:phases
544 (modify-phases %standard-phases
545 (add-after 'unpack 'patch-geos-path
546 (lambda* (#:key inputs #:allow-other-keys)
547 (let ((geos (assoc-ref inputs "geos"))
548 (glibc (assoc-ref inputs ,(if (%current-target-system)
549 "cross-libc" "libc"))))
550 (substitute* "shapely/geos.py"
551 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
552 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
553 geos "/lib/libgeos_c.so'])"))
554 (("free = load_dll\\('c'\\)\\.free")
555 (string-append "free = load_dll('c', fallbacks=['"
556 glibc "/lib/libc.so.6']).free"))))
557 #t)))))
558 (home-page "https://github.com/Toblerity/Shapely")
559 (synopsis "Library for the manipulation and analysis of geometric objects")
560 (description "Shapely is a Python package for manipulation and analysis of
561 planar geometric objects. It is based on the @code{GEOS} library.")
562 (license license:bsd-3)))
563
564 (define-public python-logwrap
565 (package
566 (name "python-logwrap")
567 (version "3.2.1")
568 (source
569 (origin
570 (method url-fetch)
571 (uri (pypi-uri "logwrap" version ".zip"))
572 (sha256
573 (base32
574 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
575 (build-system python-build-system)
576 (propagated-inputs
577 `(("python-six" ,python-six)
578 ("python-typing" ,python-typing)))
579 (native-inputs
580 `(("unzip" ,unzip)
581 ("python-cython" ,python-cython)
582 ("python-pytest" ,python-pytest)
583 ("python-pytest-cov" ,python-pytest-cov)
584 ("python-pytest-runner" ,python-pytest-runner)))
585 (home-page "https://github.com/penguinolog/logwrap")
586 (synopsis "Decorator for logging function arguments")
587 (description "This package provides a decorator to log function arguments
588 and function call return values in a human-readable way.")
589 (license license:asl2.0)))
590
591 (define-public python2-shapely
592 (package-with-python2 python-shapely))
593
594 (define-public python-clyent
595 (package
596 (name "python-clyent")
597 (version "1.2.1")
598 (source
599 (origin
600 (method url-fetch)
601 (uri (pypi-uri "clyent" version))
602 (sha256
603 (base32
604 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
605 (build-system python-build-system)
606 (native-inputs
607 `(("python-mock" ,python-mock)))
608 (home-page "https://github.com/binstar/clyent")
609 (synopsis "Command line client library")
610 (description "Clyent is a Python command line utiliy library. It is used
611 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
612 (license license:bsd-3)))
613
614 (define-public python2-clyent
615 (package-with-python2 python-clyent))
616
617 (define-public python-babel
618 (package
619 (name "python-babel")
620 (version "2.3.4")
621 (source
622 (origin
623 (method url-fetch)
624 (uri (pypi-uri "Babel" version))
625 (sha256
626 (base32
627 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
628 (build-system python-build-system)
629 (propagated-inputs
630 `(("python-pytz" ,python-pytz)))
631 (arguments `(#:tests? #f)) ; no test target
632 (home-page "http://babel.pocoo.org/")
633 (synopsis
634 "Tools for internationalizing Python applications")
635 (description
636 "Babel is composed of two major parts:
637 - tools to build and work with gettext message catalogs
638 - a Python interface to the CLDR (Common Locale Data Repository), providing
639 access to various locale display names, localized number and date formatting,
640 etc. ")
641 (license license:bsd-3)))
642
643 (define-public python2-babel
644 (package-with-python2 python-babel))
645
646 (define-public python2-backport-ssl-match-hostname
647 (package
648 (name "python2-backport-ssl-match-hostname")
649 (version "3.5.0.1")
650 (source
651 (origin
652 (method url-fetch)
653 (uri (string-append
654 "https://pypi.python.org/packages/source/b/"
655 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
656 version ".tar.gz"))
657 (sha256
658 (base32
659 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
660 (build-system python-build-system)
661 (arguments
662 `(#:python ,python-2
663 #:tests? #f)) ; no test target
664 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
665 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
666 (description
667 "This backport brings the ssl.match_hostname() function to users of
668 earlier versions of Python. The function checks the hostname in the
669 certificate returned by the server to which a connection has been established,
670 and verifies that it matches the intended target hostname.")
671 (license license:psfl)))
672
673 (define-public python-hdf4
674 (package
675 (name "python-hdf4")
676 (version "0.9")
677 (source
678 (origin
679 (method url-fetch)
680 (uri (pypi-uri name version))
681 (sha256
682 (base32
683 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
684 (build-system python-build-system)
685 (native-inputs `(("nose" ,python-nose)))
686 (propagated-inputs `(("numpy" ,python-numpy)))
687 (inputs
688 `(("hdf4" ,hdf4)
689 ("libjpeg" ,libjpeg)
690 ("zlib" ,zlib)))
691 (arguments
692 `(#:phases
693 (modify-phases %standard-phases
694 (replace 'check
695 (lambda _
696 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
697 ;; on to import numpy. Somehow this works on their CI system.
698 ;; Let's just manage PYTHONPATH here instead.
699 (substitute* "runexamples.sh"
700 (("export PYTHONPATH=.*") ""))
701 (setenv "PYTHONPATH"
702 (string-append (getcwd) ":"
703 (getenv "PYTHONPATH")))
704 (and (zero? (system* "./runexamples.sh"))
705 (zero? (system* "nosetests" "-v"))))))))
706 (home-page "https://github.com/fhs/python-hdf4")
707 (synopsis "Python interface to the NCSA HDF4 library")
708 (description
709 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
710 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
711 NetCDF files can also be read and modified. Python-HDF4 is a fork of
712 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
713 (license license:expat)))
714
715 (define-public python2-hdf4
716 (package-with-python2 python-hdf4))
717
718 (define-public python-h5py
719 (package
720 (name "python-h5py")
721 (version "2.8.0")
722 (source
723 (origin
724 (method url-fetch)
725 (uri (pypi-uri "h5py" version))
726 (sha256
727 (base32
728 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
729 (build-system python-build-system)
730 (arguments
731 `(#:tests? #f ; no test target
732 #:phases
733 (modify-phases %standard-phases
734 (add-after 'unpack 'fix-hdf5-paths
735 (lambda* (#:key inputs #:allow-other-keys)
736 (let ((prefix (assoc-ref inputs "hdf5")))
737 (substitute* "setup_build.py"
738 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
739 (string-append "['" prefix "/lib" "']"))
740 (("'/opt/local/include', '/usr/local/include'")
741 (string-append "'" prefix "/include" "'")))
742 (substitute* "setup_configure.py"
743 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
744 (string-append "['" prefix "/lib" "']")))
745 #t))))))
746 (propagated-inputs
747 `(("python-six" ,python-six)
748 ("python-numpy" ,python-numpy)))
749 (inputs
750 `(("hdf5" ,hdf5)))
751 (native-inputs
752 `(("python-cython" ,python-cython)
753 ("python-pkgconfig" ,python-pkgconfig)))
754 (home-page "http://www.h5py.org/")
755 (synopsis "Read and write HDF5 files from Python")
756 (description
757 "The h5py package provides both a high- and low-level interface to the
758 HDF5 library from Python. The low-level interface is intended to be a
759 complete wrapping of the HDF5 API, while the high-level component supports
760 access to HDF5 files, datasets and groups using established Python and NumPy
761 concepts.")
762 (license license:bsd-3)))
763
764 (define-public python2-h5py
765 (package-with-python2 python-h5py))
766
767 (define-public python-netcdf4
768 (package
769 (name "python-netcdf4")
770 (version "1.2.9")
771 (source
772 (origin
773 (method url-fetch)
774 (uri (pypi-uri "netCDF4" version))
775 (sha256
776 (base32
777 "1h6jq338amlbk0ilzvjyl7cck80i0bah9a5spn9in71vy2qxm7i5"))))
778 (build-system python-build-system)
779 (native-inputs
780 `(("python-cython" ,python-cython)))
781 (propagated-inputs
782 `(("python-numpy" ,python-numpy)))
783 (inputs
784 `(("netcdf" ,netcdf)
785 ("hdf4" ,hdf4)
786 ("hdf5" ,hdf5)))
787 (arguments
788 '(#:phases
789 (modify-phases %standard-phases
790 (replace 'check
791 (lambda _
792 (setenv "NO_NET" "1") ; disable opendap tests
793 (with-directory-excursion "test"
794 (setenv "PYTHONPATH" ; find and add the library we just built
795 (string-append
796 (car (find-files "../build" "lib.*"
797 #:directories? #:t
798 #:fail-on-error? #:t))
799 ":" (getenv "PYTHONPATH")))
800 (zero? (system* "python" "run_all.py"))))))))
801 (home-page
802 "https://github.com/Unidata/netcdf4-python")
803 (synopsis "Python/numpy interface to the netCDF library")
804 (description "Netcdf4-python is a Python interface to the netCDF C
805 library. netCDF version 4 has many features not found in earlier
806 versions of the library and is implemented on top of HDF5. This module
807 can read and write files in both the new netCDF 4 and the old netCDF 3
808 format, and can create files that are readable by HDF5 clients. The
809 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
810 to users of that module.")
811 ;; The software is mainly ISC, but includes some files covered
812 ;; by the Expat license.
813 (license (list license:isc license:expat))))
814
815 (define-public python2-netcdf4
816 (package-with-python2 python-netcdf4))
817
818 (define-public python-lockfile
819 (package
820 (name "python-lockfile")
821 (version "0.12.2")
822 (source
823 (origin
824 (method url-fetch)
825 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
826 "lockfile-" version ".tar.gz"))
827 (sha256
828 (base32
829 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
830 (build-system python-build-system)
831 (arguments '(#:test-target "check"))
832 (native-inputs
833 `(("python-pbr" ,python-pbr)))
834 (home-page "https://launchpad.net/pylockfile")
835 (synopsis "Platform-independent file locking module")
836 (description
837 "The lockfile package exports a LockFile class which provides a simple
838 API for locking files.")
839 (license license:expat)))
840
841 (define-public python2-lockfile
842 (package-with-python2 python-lockfile))
843
844 (define-public python-setuptools
845 (package
846 (name "python-setuptools")
847 (version "40.0.0")
848 (source
849 (origin
850 (method url-fetch)
851 (uri (pypi-uri "setuptools" version ".zip"))
852 (sha256
853 (base32
854 "0pq116lr14gnc62v76nk0npkm6krb2mpp7p9ab369zgv4n7dnah1"))
855 (modules '((guix build utils)))
856 (snippet
857 '(begin
858 ;; Remove included binaries which are used to build self-extracting
859 ;; installers for Windows.
860 ;; TODO: Find some way to build them ourself so we can include them.
861 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
862 #t))))
863 (build-system python-build-system)
864 ;; FIXME: Tests require pytest, which itself relies on setuptools.
865 ;; One could bootstrap with an internal untested setuptools.
866 (arguments
867 `(#:tests? #f))
868 (home-page "https://pypi.python.org/pypi/setuptools")
869 (synopsis
870 "Library designed to facilitate packaging Python projects")
871 (description
872 "Setuptools is a fully-featured, stable library designed to facilitate
873 packaging Python projects, where packaging includes:
874 Python package and module definitions,
875 distribution package metadata,
876 test hooks,
877 project installation,
878 platform-specific details,
879 Python 3 support.")
880 ;; TODO: setuptools now bundles the following libraries:
881 ;; packaging, pyparsing, six and appdirs. How to unbundle?
882 (license (list license:psfl ; setuptools itself
883 license:expat ; six, appdirs, pyparsing
884 license:asl2.0 ; packaging is dual ASL2/BSD-2
885 license:bsd-2))))
886
887 (define-public python2-setuptools
888 (package-with-python2 python-setuptools))
889
890 (define-public python-uniseg
891 (package
892 (name "python-uniseg")
893 (version "0.7.1")
894 (source
895 (origin
896 (method url-fetch)
897 (uri (pypi-uri "uniseg" version ".zip"))
898 (sha256
899 (base32
900 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
901 (build-system python-build-system)
902 (arguments
903 '(#:tests? #f)) ; The test suite requires network access.
904 (native-inputs
905 `(("unzip" ,unzip)))
906 (home-page
907 "https://bitbucket.org/emptypage/uniseg-python")
908 (synopsis
909 "Python library to determine Unicode text segmentations")
910 (description
911 "Uniseg is a Python package used to determine Unicode text segmentations.
912 Supported segmentations include:
913 @enumerate
914 @item @dfn{Code point} (any value in the Unicode codespace)
915 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
916 multiple Unicode code points, e.g. \"G\" + acute-accent)
917 @item Word break
918 @item Sentence break
919 @item Line break
920 @end enumerate")
921 (license license:expat)))
922
923 (define-public python2-uniseg
924 (package-with-python2 python-uniseg))
925
926 (define-public python-humanfriendly
927 (package
928 (name "python-humanfriendly")
929 (version "4.4.1")
930 (source
931 (origin
932 (method url-fetch)
933 (uri (pypi-uri "humanfriendly" version))
934 (sha256
935 (base32
936 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
937 (build-system python-build-system)
938 (arguments
939 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
940 #:tests? #f))
941 (propagated-inputs
942 `(("python-monotonic" ,python-monotonic)))
943 (home-page "https://humanfriendly.readthedocs.io")
944 (synopsis "Human-friendly input and output in Python")
945 (description
946 "The functions and classes in @code{humanfriendly} can be used to make
947 text interfaces more user-friendly. It includes tools to parse and format
948 numbers, file sizes, and timespans, timers for long-running operations, menus
949 to allow the user to choose from a list of options, and terminal interaction
950 helpers.")
951 (license license:expat)))
952
953 (define-public python2-humanfriendly
954 (package-with-python2 python-humanfriendly))
955
956 (define-public python-capturer
957 (package
958 (name "python-capturer")
959 (version "2.4")
960 (source
961 (origin
962 (method url-fetch)
963 (uri (pypi-uri "capturer" version))
964 (sha256
965 (base32
966 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
967 (build-system python-build-system)
968 (arguments
969 `(#:tests? #f))
970 (propagated-inputs
971 `(("python-humanfriendly" ,python-humanfriendly)))
972 (home-page "https://capturer.readthedocs.io")
973 (synopsis "Capture stdout and stderr streams of the current process")
974 (description
975 "The capturer package makes it easy to capture the stdout and stderr
976 streams of the current process and subprocesses. Output can be relayed
977 to the terminal in real time but is also available to the Python program
978 for additional processing.")
979 (license license:expat)))
980
981 (define-public python2-capturer
982 (package-with-python2 python-capturer))
983
984 (define-public python-verboselogs
985 (package
986 (name "python-verboselogs")
987 (version "1.7")
988 (source
989 (origin
990 (method url-fetch)
991 (uri (pypi-uri "verboselogs" version))
992 (sha256
993 (base32
994 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
995 (build-system python-build-system)
996 (native-inputs
997 `(("python-mock" ,python-mock)
998 ("python-astroid" ,python-astroid)
999 ("python-pylint" ,python-pylint)))
1000 (home-page "https://verboselogs.readthedocs.io")
1001 (synopsis "Verbose logging level for Python's logging module")
1002 (description
1003 "The @code{verboselogs} package extends Python's @code{logging} module to
1004 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1005 (license license:expat)))
1006
1007 (define-public python2-verboselogs
1008 (package-with-python2 python-verboselogs))
1009
1010 (define-public python-coloredlogs
1011 (package
1012 (name "python-coloredlogs")
1013 (version "7.3")
1014 (source
1015 (origin
1016 (method url-fetch)
1017 (uri (pypi-uri "coloredlogs" version))
1018 (sha256
1019 (base32
1020 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
1021 (build-system python-build-system)
1022 (arguments
1023 `(;Tests require some updated modules
1024 #:tests? #f))
1025 (propagated-inputs
1026 `(("python-capturer" ,python-capturer)))
1027 (home-page "https://coloredlogs.readthedocs.io")
1028 (synopsis "Colored stream handler for Python's logging module")
1029 (description
1030 "The @code{coloredlogs} package enables colored terminal output for
1031 Python's logging module. The @code{ColoredFormatter} class inherits from
1032 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
1033 messages in color.")
1034 (license license:expat)))
1035
1036 (define-public python2-coloredlogs
1037 (package-with-python2 python-coloredlogs))
1038
1039 (define-public python-eventlet
1040 (package
1041 (name "python-eventlet")
1042 (version "0.20.1")
1043 (source
1044 (origin
1045 (method url-fetch)
1046 (uri (pypi-uri "eventlet" version))
1047 (sha256
1048 (base32
1049 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1050 (build-system python-build-system)
1051 (propagated-inputs
1052 `(("python-greenlet" ,python-greenlet)))
1053 (arguments
1054 ;; TODO: Requires unpackaged 'enum-compat'.
1055 '(#:tests? #f))
1056 (home-page "http://eventlet.net")
1057 (synopsis "Concurrent networking library for Python")
1058 (description
1059 "Eventlet is a concurrent networking library for Python that
1060 allows you to change how you run your code, not how you write it.
1061 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1062 Coroutines ensure that the developer uses a blocking style of programming
1063 that is similar to threading, but provide the benefits of non-blocking I/O.
1064 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1065 from the Python interpreter, or as a small part of a larger application.")
1066 (license license:expat)))
1067
1068 (define-public python2-eventlet
1069 (let ((base (package-with-python2
1070 (strip-python2-variant python-eventlet))))
1071 (package (inherit base)
1072 (propagated-inputs
1073 `(("python2-enum34" ,python2-enum34)
1074 ,@(package-propagated-inputs base))))))
1075
1076 (define-public python-six
1077 (package
1078 (name "python-six")
1079 (version "1.11.0")
1080 (source
1081 (origin
1082 (method url-fetch)
1083 (uri (pypi-uri "six" version))
1084 (sha256
1085 (base32
1086 "1scqzwc51c875z23phj48gircqjgnn3af8zy2izjwmnlxrxsgs3h"))))
1087 (build-system python-build-system)
1088 (arguments
1089 `(#:phases
1090 (modify-phases %standard-phases
1091 (replace 'check
1092 (lambda _
1093 (invoke "py.test" "-v"))))))
1094 (native-inputs
1095 `(("python-py" ,python-py)
1096 ("python-pytest" ,python-pytest-bootstrap)))
1097 (home-page "https://pypi.python.org/pypi/six/")
1098 (synopsis "Python 2 and 3 compatibility utilities")
1099 (description
1100 "Six is a Python 2 and 3 compatibility library. It provides utility
1101 functions for smoothing over the differences between the Python versions with
1102 the goal of writing Python code that is compatible on both Python versions.
1103 Six supports every Python version since 2.5. It is contained in only one
1104 Python file, so it can be easily copied into your project.")
1105 (license license:x11)))
1106
1107 (define-public python2-six
1108 (package-with-python2 python-six))
1109
1110 (define-public python-six-bootstrap
1111 (package
1112 (inherit python-six)
1113 (name "python-six-bootstrap")
1114 (native-inputs `())
1115 (arguments `(#:tests? #f))))
1116
1117 (define-public python2-six-bootstrap
1118 (package-with-python2 python-six-bootstrap))
1119
1120 (define-public python-schedule
1121 (package
1122 (name "python-schedule")
1123 (version "0.4.3")
1124 (source
1125 (origin
1126 (method url-fetch)
1127 (uri (pypi-uri "schedule" version))
1128 (sha256
1129 (base32
1130 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1131 (build-system python-build-system)
1132 (native-inputs
1133 `(("python-pytest" ,python-pytest)
1134 ("python-mock" ,python-mock)))
1135 (home-page "https://github.com/dbader/schedule")
1136 (synopsis "Schedule periodic function calls in Python")
1137 (description
1138 "Schedule is an in-process scheduler for periodic jobs that uses the
1139 builder pattern for configuration. Schedule lets you run Python functions (or
1140 any other callable) periodically at pre-determined intervals using a simple,
1141 human-friendly syntax.")
1142 (license license:expat)))
1143
1144 (define-public python2-schedule
1145 (package-with-python2 python-schedule))
1146
1147 (define-public python-pandas
1148 (package
1149 (name "python-pandas")
1150 (version "0.23.1")
1151 (source
1152 (origin
1153 (method url-fetch)
1154 (uri (pypi-uri "pandas" version))
1155 (sha256
1156 (base32 "142nvwb01r2wv42y2cz40bx33hd8ffh6s6gynapg859fmzr2mdah"))))
1157 (build-system python-build-system)
1158 (arguments
1159 `(#:modules ((guix build utils)
1160 (guix build python-build-system)
1161 (ice-9 ftw)
1162 (srfi srfi-26))
1163 #:phases (modify-phases %standard-phases
1164 (replace 'check
1165 (lambda _
1166 (let ((build-directory
1167 (string-append
1168 (getcwd) "/build/"
1169 (car (scandir "build"
1170 (cut string-prefix? "lib." <>))))))
1171 (with-directory-excursion build-directory
1172 ;; Delete tests that require "moto" which is not yet in Guix.
1173 (for-each delete-file
1174 '("pandas/tests/io/conftest.py"
1175 "pandas/tests/io/json/test_compression.py"
1176 "pandas/tests/io/test_excel.py"
1177 "pandas/tests/io/test_parquet.py"))
1178 (invoke "pytest" "-v" "pandas" "-k"
1179 (string-append
1180 "not network and not disabled"
1181 ;; XXX: Due to the deleted tests above.
1182 " and not test_read_s3_jsonl")))))))))
1183 (propagated-inputs
1184 `(("python-numpy" ,python-numpy)
1185 ("python-pytz" ,python-pytz)
1186 ("python-dateutil" ,python-dateutil)))
1187 (native-inputs
1188 `(("python-cython" ,python-cython)
1189 ("python-beautifulsoup4" ,python-beautifulsoup4)
1190 ("python-lxml" ,python-lxml)
1191 ("python-html5lib" ,python-html5lib)
1192 ("python-nose" ,python-nose)
1193 ("python-pytest" ,python-pytest)))
1194 (home-page "https://pandas.pydata.org")
1195 (synopsis "Data structures for data analysis, time series, and statistics")
1196 (description
1197 "Pandas is a Python package providing fast, flexible, and expressive data
1198 structures designed to make working with structured (tabular,
1199 multidimensional, potentially heterogeneous) and time series data both easy
1200 and intuitive. It aims to be the fundamental high-level building block for
1201 doing practical, real world data analysis in Python.")
1202 (license license:bsd-3)))
1203
1204 (define-public python2-pandas
1205 (package-with-python2 python-pandas))
1206
1207 (define-public python2-mechanize
1208 (package
1209 (name "python2-mechanize")
1210 (version "0.2.5")
1211 (source
1212 (origin
1213 (method url-fetch)
1214 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1215 version ".tar.gz"))
1216 (sha256
1217 (base32
1218 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1219 (build-system python-build-system)
1220 (arguments
1221 `(#:python ,python-2 ; apparently incompatible with Python 3
1222 #:tests? #f))
1223 ;; test fails with message
1224 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1225 ;; (python-3.3.2) or
1226 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1227 ;; (python-2.7.5).
1228 ;; The source code is from March 2011 and probably not up-to-date
1229 ;; with respect to python unit tests.
1230 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1231 (synopsis
1232 "Stateful programmatic web browsing in Python")
1233 (description
1234 "Mechanize implements stateful programmatic web browsing in Python,
1235 after Andy Lester’s Perl module WWW::Mechanize.")
1236 (license (license:non-copyleft
1237 "file://COPYING"
1238 "See COPYING in the distribution."))))
1239
1240
1241 (define-public python-simplejson
1242 (package
1243 (name "python-simplejson")
1244 (version "3.14.0")
1245 (source
1246 (origin
1247 (method url-fetch)
1248 (uri (pypi-uri "simplejson" version))
1249 (sha256
1250 (base32
1251 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1252 (build-system python-build-system)
1253 (home-page "http://simplejson.readthedocs.org/en/latest/")
1254 (synopsis
1255 "Json library for Python")
1256 (description
1257 "JSON (JavaScript Object Notation) is a subset of JavaScript
1258 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1259 format.
1260
1261 Simplejson exposes an API familiar to users of the standard library marshal
1262 and pickle modules. It is the externally maintained version of the json
1263 library contained in Python 2.6, but maintains compatibility with Python 2.5
1264 and (currently) has significant performance advantages, even without using
1265 the optional C extension for speedups. Simplejson is also supported on
1266 Python 3.3+.")
1267 (license license:x11)))
1268
1269 (define-public python2-simplejson
1270 (package-with-python2 python-simplejson))
1271
1272
1273 (define-public python-pyicu
1274 (package
1275 (name "python-pyicu")
1276 (version "1.9.8")
1277 (source
1278 (origin
1279 (method url-fetch)
1280 (uri (pypi-uri "PyICU" version))
1281 (sha256
1282 (base32
1283 "05nz4p2dpkhwj6y9kik24xbvmfxji39nl0xw0sc0nvp9fgzf6xnd"))))
1284 (build-system python-build-system)
1285 (inputs
1286 `(("icu4c" ,icu4c)))
1287 (native-inputs
1288 `(("python-pytest" ,python-pytest)
1289 ("python-six" ,python-six)))
1290 (home-page "https://github.com/ovalhub/pyicu")
1291 (synopsis "Python extension wrapping the ICU C++ API")
1292 (description
1293 "PyICU is a python extension wrapping the ICU C++ API.")
1294 (properties `((python2-variant . ,(delay python2-pyicu))))
1295 (license license:x11)))
1296
1297 (define-public python2-pyicu
1298 (let ((base (package-with-python2
1299 (strip-python2-variant python-pyicu))))
1300 (package
1301 (inherit base)
1302 (arguments
1303 `(,@(package-arguments base)
1304 #:phases
1305 (modify-phases %standard-phases
1306 (add-before 'check 'delete-failing-test
1307 (λ _
1308 ;; XXX: This fails due to Unicode issues unique to Python 2,
1309 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1310 (delete-file "test/test_Script.py")
1311 #t))))))))
1312
1313 (define-public python2-dogtail
1314 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1315 ;; spaces in indentation" with Python 3.
1316 (package
1317 (name "python2-dogtail")
1318 (version "0.9.9")
1319 (source (origin
1320 (method url-fetch)
1321 (uri (pypi-uri "dogtail" version))
1322 (sha256
1323 (base32
1324 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1325 (build-system python-build-system)
1326 (arguments `(#:python ,python-2
1327 #:tests? #f)) ; invalid command "test"
1328 ;; Currently no offical homepage.
1329 (home-page "https://pypi.python.org/pypi/dogtail/")
1330 (synopsis "GUI test tool and automation framework written in Python")
1331 (description
1332 "Dogtail is a GUI test tool and automation framework written in Python.
1333 It uses Accessibility (a11y) technologies to communicate with desktop
1334 applications. dogtail scripts are written in Python and executed like any
1335 other Python program.")
1336 (license license:gpl2+)))
1337
1338 (define-public python-empy
1339 (package
1340 (name "python-empy")
1341 (version "3.3")
1342 (source (origin
1343 (method url-fetch)
1344 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1345 version ".tar.gz"))
1346 (sha256
1347 (base32
1348 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1349 (build-system python-build-system)
1350 (arguments
1351 `(#:tests? #f)) ;python2 only
1352 (home-page "http://www.alcyone.com/software/empy/")
1353 (synopsis "Templating system for Python")
1354 (description
1355 "EmPy is a system for embedding Python expressions and statements in
1356 template text; it takes an EmPy source file, processes it, and produces
1357 output. This is accomplished via expansions, which are special signals to the
1358 EmPy system and are set off by a special prefix (by default the at sign, @@).
1359 EmPy can expand arbitrary Python expressions and statements in this way, as
1360 well as a variety of special forms. Textual data not explicitly delimited in
1361 this way is sent unaffected to the output, allowing Python to be used in
1362 effect as a markup language. Also supported are callbacks via hooks,
1363 recording and playback via diversions, and dynamic, chainable filters. The
1364 system is highly configurable via command line options and embedded
1365 commands.")
1366 (license license:lgpl2.1+)))
1367
1368 (define-public python2-empy
1369 (package-with-python2 python-empy))
1370
1371 (define-public python2-element-tree
1372 (package
1373 (name "python2-element-tree")
1374 (version "1.2.6")
1375 (source (origin
1376 (method url-fetch)
1377 (uri (string-append
1378 "http://effbot.org/media/downloads/elementtree-"
1379 version "-20050316.tar.gz"))
1380 (sha256
1381 (base32
1382 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1383 (build-system python-build-system)
1384 (arguments
1385 `(#:python ,python-2 ; seems to be part of Python 3
1386 #:tests? #f)) ; no 'test' sub-command
1387 (synopsis "Toolkit for XML processing in Python")
1388 (description
1389 "ElementTree is a Python library supporting lightweight XML processing.")
1390 (home-page "http://effbot.org/zone/element-index.htm")
1391 (license (license:x11-style
1392 "http://docs.python.org/2/license.html"
1393 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1394
1395 (define-public python2-pybugz
1396 (package
1397 (name "python2-pybugz")
1398 (version "0.6.11")
1399 (source (origin
1400 (method url-fetch)
1401 (uri (string-append
1402 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1403 version ".tar.gz"))
1404 (sha256
1405 (base32
1406 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1407 (patches (search-patches "pybugz-stty.patch"
1408 "pybugz-encode-error.patch"))))
1409 (build-system python-build-system)
1410 (arguments
1411 `(#:python ,python-2 ; SyntaxError with Python 3
1412 #:tests? #f)) ; no 'test' sub-command
1413 (propagated-inputs
1414 `(("element-tree" ,python2-element-tree)))
1415 (synopsis "Python and command-line interface to Bugzilla")
1416 (description
1417 "PyBugz is a Python library and command-line tool to query the Bugzilla
1418 bug tracking system. It is meant as an aid to speed up interaction with the
1419 bug tracker.")
1420 (home-page "http://www.liquidx.net/pybugz/")
1421 (license license:gpl2)))
1422
1423 (define-public python2-enum
1424 (package
1425 (name "python2-enum")
1426 (version "0.4.6")
1427 (source (origin
1428 (method url-fetch)
1429 (uri (pypi-uri "enum" version))
1430 (sha256
1431 (base32
1432 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1433 (build-system python-build-system)
1434 (arguments
1435 `(#:python ,python-2))
1436 (home-page "http://pypi.python.org/pypi/enum/")
1437 (synopsis "Robust enumerated type support in Python")
1438 (description
1439 "This provides a module for robust enumerations in Python. It has
1440 been superseded by the Python standard library and is provided only for
1441 compatibility.")
1442 ;; Choice of either license.
1443 (license (list license:gpl3+ license:psfl))))
1444
1445 (define-public python-enum34
1446 (package
1447 (name "python-enum34")
1448 (version "1.1.6")
1449 (source
1450 (origin
1451 (method url-fetch)
1452 (uri (pypi-uri "enum34" version))
1453 (sha256
1454 (base32
1455 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1456 (build-system python-build-system)
1457 (home-page "https://pypi.python.org/pypi/enum34")
1458 (synopsis "Backported Python 3.4 Enum")
1459 (description
1460 "Enum34 is the new Python stdlib enum module available in Python 3.4
1461 backported for previous versions of Python from 2.4 to 3.3.")
1462 (license license:bsd-3)))
1463
1464 (define-public python2-enum34
1465 (package-with-python2 python-enum34))
1466
1467 (define-public python-parse-type
1468 (package
1469 (name "python-parse-type")
1470 (version "0.4.2")
1471 (source
1472 (origin
1473 (method url-fetch)
1474 (uri (pypi-uri "parse_type" version))
1475 (sha256
1476 (base32
1477 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1478 (build-system python-build-system)
1479 (propagated-inputs
1480 `(("python-six" ,python-six)
1481 ("python-parse" ,python-parse)))
1482 (native-inputs
1483 `(("python-pytest" ,python-pytest)
1484 ("python-pytest-runner" ,python-pytest-runner)))
1485 (home-page "https://github.com/jenisys/parse_type")
1486 (synopsis "Extended parse module")
1487 (description
1488 "Parse_type extends the python parse module.")
1489 (properties
1490 `((python2-variant . ,(delay python2-parse-type))))
1491 (license license:bsd-3)))
1492
1493 (define-public python2-parse-type
1494 (let ((base (package-with-python2
1495 (strip-python2-variant python-parse-type))))
1496 (package (inherit base)
1497 (propagated-inputs
1498 `(("python2-enum34" ,python2-enum34)
1499 ,@(package-propagated-inputs base))))))
1500
1501 (define-public python-parse
1502 (package
1503 (name "python-parse")
1504 (version "1.8.2")
1505 (source
1506 (origin
1507 (method url-fetch)
1508 (uri (pypi-uri "parse" version))
1509 (sha256
1510 (base32
1511 "1lj9v1q4imszyhvipb6drsm3xdl35nan011mqxxas1yaypixsj40"))))
1512 (build-system python-build-system)
1513 (arguments
1514 `(#:phases
1515 (modify-phases %standard-phases
1516 (replace 'check
1517 (lambda _ (invoke "python" "test_parse.py"))))))
1518 (home-page "https://github.com/r1chardj0n3s/parse")
1519 (synopsis "Parse strings")
1520 (description
1521 "Parse strings using a specification based on the Python format()
1522 syntax.")
1523 (license license:x11)))
1524
1525 (define-public python-polib
1526 (package
1527 (name "python-polib")
1528 (version "1.0.8")
1529 (source (origin
1530 (method url-fetch)
1531 (uri (pypi-uri "polib" version))
1532 (sha256
1533 (base32
1534 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1535 (build-system python-build-system)
1536 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1537 (synopsis "Manipulate, create and modify gettext files")
1538 (description "Polib can manipulate any gettext format (po, pot and mo)
1539 files. It can be used to create po files from scratch or to modify
1540 existing ones.")
1541 (license license:expat)))
1542
1543 (define-public python2-polib
1544 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1545 (package
1546 (inherit base)
1547 (arguments `(,@(package-arguments base)
1548 ;; Tests don't work with python2.
1549 #:tests? #f)))))
1550
1551 (define-public scons
1552 (package
1553 (name "scons")
1554 (version "3.0.1")
1555 (source (origin
1556 (method url-fetch)
1557 (uri (string-append "mirror://sourceforge/scons/scons/" version
1558 "/scons-" version ".tar.gz"))
1559 (sha256
1560 (base32
1561 "0wzid419mlwqw9llrg8gsx4nkzhqy16m4m40r0xnh6cwscw5wir4"))))
1562 (build-system python-build-system)
1563 (arguments
1564 `(#:use-setuptools? #f ; still relies on distutils
1565 #:tests? #f)) ; no 'python setup.py test' command
1566 (home-page "http://scons.org/")
1567 (synopsis "Software construction tool written in Python")
1568 (description
1569 "SCons is a software construction tool. Think of SCons as an improved,
1570 cross-platform substitute for the classic Make utility with integrated
1571 functionality similar to autoconf/automake and compiler caches such as ccache.
1572 In short, SCons is an easier, more reliable and faster way to build
1573 software.")
1574 (license license:x11)))
1575
1576 (define-public scons-python2
1577 (package
1578 (inherit (package-with-python2 scons))
1579 (name "scons-python2")))
1580
1581 (define-public python-extras
1582 (package
1583 (name "python-extras")
1584 (version "1.0.0")
1585 (source
1586 (origin
1587 (method url-fetch)
1588 (uri (pypi-uri "extras" version))
1589 (sha256
1590 (base32
1591 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1592 (build-system python-build-system)
1593 (arguments
1594 ;; FIXME: Circular dependency on testtools.
1595 '(#:tests? #f))
1596 (home-page "https://github.com/testing-cabal/extras")
1597 (synopsis "Useful extensions to the Python standard library")
1598 (description
1599 "Extras is a set of extensions to the Python standard library.")
1600 (license license:expat)))
1601
1602 (define-public python2-extras
1603 (package-with-python2 python-extras))
1604
1605 (define-public python-mimeparse
1606 (package
1607 (name "python-mimeparse")
1608 (version "0.1.4")
1609 (source
1610 (origin
1611 (method url-fetch)
1612 (uri (string-append
1613 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1614 version ".tar.gz"))
1615 (sha256
1616 (base32
1617 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1618 (build-system python-build-system)
1619 (arguments
1620 '(#:tests? #f)) ; no setup.py test command
1621 (home-page
1622 "https://github.com/dbtsai/python-mimeparse")
1623 (synopsis "Python library for parsing MIME types")
1624 (description
1625 "Mimeparse provides basic functions for parsing MIME type names and
1626 matching them against a list of media-ranges.")
1627 (license license:expat)))
1628
1629 (define-public python2-mimeparse
1630 (package-with-python2 python-mimeparse))
1631
1632 (define-public python-pafy
1633 (package
1634 (name "python-pafy")
1635 (version "0.5.3.1")
1636 (source
1637 (origin
1638 (method url-fetch)
1639 (uri (pypi-uri "pafy" version))
1640 (sha256
1641 (base32
1642 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1643 (build-system python-build-system)
1644 (arguments
1645 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1646 (propagated-inputs
1647 ;; Youtube-dl is a python package which is imported in the file
1648 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1649 `(("youtube-dl" ,youtube-dl)))
1650 (home-page "https://np1.github.io/pafy/")
1651 (synopsis "Retrieve YouTube content and metadata")
1652 (description
1653 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1654 (license license:lgpl3+)))
1655
1656 (define-public python2-funcsigs
1657 (package
1658 (name "python2-funcsigs")
1659 (version "1.0.2")
1660 (source (origin
1661 (method url-fetch)
1662 (uri (pypi-uri "funcsigs" version))
1663 (sha256
1664 (base32
1665 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1666 (build-system python-build-system)
1667 (arguments
1668 `(#:python ,python-2))
1669 (native-inputs
1670 `(("python2-unittest2" ,python2-unittest2)))
1671 (home-page "http://funcsigs.readthedocs.org")
1672 (synopsis "Python function signatures from PEP362")
1673 (description
1674 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1675 (license license:asl2.0)))
1676
1677 (define-public python2-funcsigs-bootstrap
1678 (package
1679 (inherit python2-funcsigs)
1680 (name "python2-funcsigs-bootstrap")
1681 (native-inputs `())
1682 (arguments
1683 `(#:tests? #f
1684 ,@(package-arguments python2-funcsigs)))))
1685
1686 (define-public python-py
1687 (package
1688 (name "python-py")
1689 (version "1.5.4")
1690 (source
1691 (origin
1692 (method url-fetch)
1693 (uri (pypi-uri "py" version))
1694 (sha256
1695 (base32
1696 "1xxvwfn82457djf55f5n2c94699rfqnk43br8fif2r2q8gvrmm9z"))))
1697 (build-system python-build-system)
1698 (arguments
1699 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1700 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1701 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1702 ;; Is this module globally installed?"
1703 '(#:tests? #f))
1704 (native-inputs
1705 `(("python-setuptools-scm" ,python-setuptools-scm)))
1706 (home-page "https://github.com/pytest-dev/py")
1707 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1708 (description
1709 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1710 code introspection, and logging.")
1711 (license license:expat)))
1712
1713 (define-public python2-py
1714 (package-with-python2 python-py))
1715
1716 ;; Recent versions of python-fixtures and python-testrepository need
1717 ;; python-pbr for packaging, which itself needs these two packages for
1718 ;; testing.
1719 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1720 ;; same source, just without any test dependencies and with tests disabled.
1721 ;; python-pbr-minmal is then used to package python-fixtures and
1722 ;; python-testrepository.
1723 ;; Strictly speaking we currently could remove the test-requirements from the
1724 ;; normal python-pbr package (and save this package) since test are disabled
1725 ;; there anyway. But this may change in future.
1726 (define-public python-pbr-minimal
1727 (package
1728 (name "python-pbr-minimal")
1729 (version "3.0.1")
1730 (source
1731 (origin
1732 (method url-fetch)
1733 (uri (pypi-uri "pbr" version))
1734 (sha256
1735 (base32
1736 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1737 (build-system python-build-system)
1738 (arguments
1739 `(#:tests? #f))
1740 (home-page "http://docs.openstack.org/developer/pbr/")
1741 (synopsis "Minimal build of python-pbr used for bootstrapping")
1742 (description
1743 "Used only for bootstrapping python2-pbr, you should not need this.")
1744 (license license:asl2.0)))
1745
1746 (define-public python2-pbr-minimal
1747 (package-with-python2 python-pbr-minimal))
1748
1749 (define-public python-pbr
1750 (package
1751 (inherit python-pbr-minimal)
1752 (name "python-pbr")
1753 (arguments
1754 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1755 (propagated-inputs
1756 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1757 (native-inputs
1758 `(("python-fixtures" ,python-fixtures-bootstrap)
1759 ;; discover, coverage, hacking, subunit
1760 ("python-mock" ,python-mock)
1761 ("python-six" ,python-six)
1762 ("python-sphinx" ,python-sphinx)
1763 ("python-testrepository" ,python-testrepository-bootstrap)
1764 ("python-testresources" ,python-testresources-bootstrap)
1765 ("python-testscenarios" ,python-testscenarios-bootstrap)
1766 ("python-testtools" ,python-testtools-bootstrap)
1767 ("python-virtualenv" ,python-virtualenv)))
1768 (synopsis "Enhance the default behavior of Python’s setuptools")
1769 (description
1770 "Python Build Reasonableness (PBR) is a library that injects some useful
1771 and sensible default behaviors into your setuptools run. It will set
1772 versions, process requirements files and generate AUTHORS and ChangeLog file
1773 from git information.
1774 ")))
1775
1776 (define-public python2-pbr
1777 (package-with-python2 python-pbr))
1778
1779 (define-public python-exif-read
1780 (package
1781 (name "python-exif-read")
1782 (version "2.1.2")
1783 (source (origin
1784 (method url-fetch)
1785 (uri (pypi-uri "ExifRead" version))
1786 (sha256
1787 (base32
1788 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1789 (build-system python-build-system)
1790 (arguments `(#:tests? #f)) ; no tests
1791 (home-page "https://github.com/ianare/exif-py")
1792 (synopsis "Python library to extract EXIF data from image files")
1793 (description
1794 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1795 files.")
1796 (license license:bsd-3)))
1797
1798 (define-public python2-exif-read
1799 (package-with-python2 python-exif-read))
1800
1801 (define-public python-pyld
1802 (package
1803 (name "python-pyld")
1804 (version "1.0.3")
1805 (source (origin
1806 (method url-fetch)
1807 (uri (pypi-uri "PyLD" version))
1808 (sha256
1809 (base32
1810 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1811 (build-system python-build-system)
1812 (home-page "https://github.com/digitalbazaar/pyld")
1813 (synopsis "Python implementation of the JSON-LD specification")
1814 (description
1815 "PyLD is an implementation of the JSON-LD specification.")
1816 (license license:bsd-3)))
1817
1818 (define-public python2-pyld
1819 (package-with-python2 python-pyld))
1820
1821 (define-public python-click
1822 (package
1823 (name "python-click")
1824 (version "6.7")
1825 (source
1826 (origin
1827 (method url-fetch)
1828 (uri (pypi-uri "click" version))
1829 (sha256
1830 (base32
1831 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
1832 (build-system python-build-system)
1833 (arguments
1834 `(;; The tests are fragile, depending on a specific version of pytest:
1835 ;; <https://github.com/pallets/click/issues/823>
1836 #:tests? #f
1837 #:phases
1838 (modify-phases %standard-phases
1839 (add-after 'unpack 'fix-paths
1840 (lambda* (#:key inputs #:allow-other-keys)
1841 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1842 "cross-libc" "libc"))))
1843 (substitute* "click/_unicodefun.py"
1844 (("'locale'")
1845 (string-append "'" glibc "/bin/locale'"))))
1846 #t)))))
1847 (native-inputs
1848 `(("python-pytest" ,python-pytest)))
1849 (home-page "http://click.pocoo.org")
1850 (synopsis "Command line library for Python")
1851 (description
1852 "Click is a Python package for creating command line interfaces in a
1853 composable way with as little code as necessary. Its name stands for
1854 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1855 with sensible defaults out of the box.")
1856 (license license:bsd-3)))
1857
1858 (define-public python2-click
1859 (package-with-python2 python-click))
1860
1861 (define-public python-wheel
1862 (package
1863 (name "python-wheel")
1864 (version "0.30.0a0")
1865 (source
1866 (origin
1867 (method url-fetch)
1868 (uri (pypi-uri "wheel" version))
1869 (sha256
1870 (base32
1871 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
1872 (build-system python-build-system)
1873 (native-inputs
1874 `(("python-jsonschema" ,python-jsonschema)
1875 ("python-pytest-cov" ,python-pytest-cov)))
1876 (home-page "https://bitbucket.org/pypa/wheel/")
1877 (synopsis "Format for built Python packages")
1878 (description
1879 "A wheel is a ZIP-format archive with a specially formatted filename and
1880 the @code{.whl} extension. It is designed to contain all the files for a PEP
1881 376 compatible install in a way that is very close to the on-disk format. Many
1882 packages will be properly installed with only the @code{Unpack} step and the
1883 unpacked archive preserves enough information to @code{Spread} (copy data and
1884 scripts to their final locations) at any later time. Wheel files can be
1885 installed with a newer @code{pip} or with wheel's own command line utility.")
1886 (license license:expat)
1887 (properties `((python2-variant . ,(delay python2-wheel))))))
1888
1889 (define-public python2-wheel
1890 (let ((wheel (package-with-python2
1891 (strip-python2-variant python-wheel))))
1892 (package (inherit wheel)
1893 (native-inputs `(("python2-functools32" ,python2-functools32)
1894 ,@(package-native-inputs wheel))))))
1895
1896 (define-public python-vcversioner
1897 (package
1898 (name "python-vcversioner")
1899 (version "2.16.0.0")
1900 (source
1901 (origin
1902 (method url-fetch)
1903 (uri (pypi-uri "vcversioner" version))
1904 (sha256
1905 (base32
1906 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1907 (build-system python-build-system)
1908 (synopsis "Python library for version number discovery")
1909 (description "Vcversioner is a Python library that inspects tagging
1910 information in a variety of version control systems in order to discover
1911 version numbers.")
1912 (home-page "https://github.com/habnabit/vcversioner")
1913 (license license:isc)))
1914
1915 (define-public python2-vcversioner
1916 (package-with-python2 python-vcversioner))
1917
1918 (define-public python-jsonschema
1919 (package
1920 (name "python-jsonschema")
1921 (version "2.6.0")
1922 (source (origin
1923 (method url-fetch)
1924 (uri
1925 (string-append
1926 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
1927 version ".tar.gz"))
1928 (sha256
1929 (base32
1930 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
1931 (build-system python-build-system)
1932 (arguments
1933 '(#:phases
1934 (modify-phases %standard-phases
1935 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
1936 (native-inputs
1937 `(("python-nose" ,python-nose)
1938 ("python-vcversioner" ,python-vcversioner)))
1939 (home-page "https://github.com/Julian/jsonschema")
1940 (synopsis "Implementation of JSON Schema for Python")
1941 (description
1942 "Jsonschema is an implementation of JSON Schema for Python.")
1943 (license license:expat)
1944 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1945
1946 (define-public python2-jsonschema
1947 (let ((jsonschema (package-with-python2
1948 (strip-python2-variant python-jsonschema))))
1949 (package (inherit jsonschema)
1950 (native-inputs
1951 `(("python2-mock" ,python2-mock)
1952 ,@(package-native-inputs jsonschema)))
1953 (propagated-inputs
1954 `(("python2-functools32" ,python2-functools32))))))
1955
1956 (define-public python-schema
1957 (package
1958 (name "python-schema")
1959 (version "0.6.6")
1960 (source
1961 (origin
1962 (method url-fetch)
1963 (uri (pypi-uri "schema" version))
1964 (sha256
1965 (base32
1966 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
1967 (build-system python-build-system)
1968 (native-inputs
1969 `(("python-pytest" ,python-pytest)))
1970 (home-page "https://github.com/keleshev/schema")
1971 (synopsis "Simple data validation library")
1972 (description
1973 "@code{python-schema} is a library for validating Python data
1974 structures, such as those obtained from config-files, forms, external
1975 services or command-line parsing, converted from JSON/YAML (or
1976 something else) to Python data-types.")
1977 (license license:psfl)))
1978
1979 (define-public python2-schema
1980 (package-with-python2 python-schema))
1981
1982 (define-public python-schema-0.5
1983 (package (inherit python-schema)
1984 (version "0.5.0")
1985 (source
1986 (origin
1987 (method url-fetch)
1988 (uri (pypi-uri "schema" version))
1989 (sha256
1990 (base32
1991 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
1992
1993 (define-public python2-schema-0.5
1994 (package-with-python2 python-schema-0.5))
1995
1996 (define-public python-kitchen
1997 (package
1998 (name "python-kitchen")
1999 (version "1.2.5")
2000 (source
2001 (origin
2002 (method url-fetch)
2003 (uri (pypi-uri "kitchen" version))
2004 (sha256
2005 (base32
2006 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2007 (build-system python-build-system)
2008 (propagated-inputs
2009 `(("python-chardet" ,python-chardet)))
2010 (home-page "https://github.com/fedora-infra/kitchen")
2011 (synopsis "Python API for snippets")
2012 (description "@code{kitchen} module provides a python API for all sorts of
2013 little useful snippets of code that everybody ends up writing for their projects
2014 but never seem big enough to build an independent release. Use kitchen and stop
2015 cutting and pasting that code over and over.")
2016 (license (list license:lgpl2.1+
2017 ;; subprocess.py, test_subprocess.py,
2018 ;; kitchen/pycompat25/defaultdict.py:
2019 license:psfl))))
2020
2021 (define-public python2-kitchen
2022 (package-with-python2 python-kitchen))
2023
2024 (define-public python-unidecode
2025 (package
2026 (name "python-unidecode")
2027 (version "0.04.21")
2028 (source (origin
2029 (method url-fetch)
2030 (uri (pypi-uri "Unidecode" version))
2031 (sha256
2032 (base32
2033 "0lfhp9c5xrbpjvbpr12ji52g1lx04404bzzdg6pvabhzisw6l2i8"))))
2034 (build-system python-build-system)
2035 (home-page "https://pypi.python.org/pypi/Unidecode")
2036 (synopsis "ASCII transliterations of Unicode text")
2037 (description
2038 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2039 useful when integrating with legacy code that doesn't support Unicode, or for
2040 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2041 machine identifiers from human-readable Unicode strings that should still be
2042 somewhat intelligible.")
2043 (license license:gpl2+)))
2044
2045 (define-public python2-unidecode
2046 (package-with-python2 python-unidecode))
2047
2048 (define-public python-pyjwt
2049 (package
2050 (name "python-pyjwt")
2051 (version "1.5.3")
2052 (source
2053 (origin
2054 (method url-fetch)
2055 (uri (pypi-uri "PyJWT" version))
2056 (sha256
2057 (base32
2058 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2059 (modules '((guix build utils)))
2060 (snippet
2061 '(begin
2062 (for-each delete-file-recursively
2063 (find-files "." "\\.pyc$"))
2064 #t))))
2065 (build-system python-build-system)
2066 (native-inputs
2067 `(("python-pytest" ,python-pytest)
2068 ("python-pytest-cov" ,python-pytest-cov)
2069 ("python-pytest-runner" ,python-pytest-runner)))
2070 (home-page "https://github.com/progrium/pyjwt")
2071 (synopsis "JSON Web Token implementation in Python")
2072 (description
2073 "PyJWT is a JSON Web Token implementation written in Python.")
2074 (license license:expat)))
2075
2076 (define-public python2-pyjwt
2077 (package-with-python2 python-pyjwt))
2078
2079 (define-public python-pykka
2080 (package
2081 (name "python-pykka")
2082 (version "1.2.1")
2083 (source
2084 (origin
2085 (method url-fetch)
2086 (uri (pypi-uri "Pykka" version))
2087 (sha256
2088 (base32
2089 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2090 (build-system python-build-system)
2091 (native-inputs
2092 `(("python-mock" ,python-mock)
2093 ("python-nose" ,python-nose)
2094 ("python-gevent" ,python-gevent)
2095 ("python-eventlet" ,python-eventlet)))
2096 (home-page "https://www.pykka.org/")
2097 (synopsis "Pykka is a Python implementation of the actor model")
2098 (description
2099 "Pykka is a Python implementation of the actor model.
2100 The actor model introduces some simple rules to control the sharing
2101 of state and cooperation between execution units, which makes it
2102 easier to build concurrent applications.")
2103 (license license:asl2.0)))
2104
2105 (define-public python2-pykka
2106 (package-with-python2 python-pykka))
2107
2108 (define-public python-itsdangerous
2109 (package
2110 (name "python-itsdangerous")
2111 (version "0.24")
2112 (source
2113 (origin
2114 (method url-fetch)
2115 (uri (string-append
2116 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2117 version ".tar.gz"))
2118 (sha256
2119 (base32
2120 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2121 (build-system python-build-system)
2122 (home-page "https://github.com/mitsuhiko/itsdangerous")
2123 (synopsis "Python library for passing data to/from untrusted environments")
2124 (description
2125 "Itsdangerous provides various helpers to pass trusted data to untrusted
2126 environments and back.")
2127 (license license:bsd-3)))
2128
2129 (define-public python2-itsdangerous
2130 (package-with-python2 python-itsdangerous))
2131
2132 (define-public python-pyyaml
2133 (package
2134 (name "python-pyyaml")
2135 (version "3.13")
2136 (source
2137 (origin
2138 (method url-fetch)
2139 (uri (pypi-uri "PyYAML" version))
2140 (sha256
2141 (base32
2142 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2143 (build-system python-build-system)
2144 (inputs
2145 `(("libyaml" ,libyaml)))
2146 (home-page "http://pyyaml.org/wiki/PyYAML")
2147 (synopsis "YAML parser and emitter for Python")
2148 (description
2149 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2150 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2151 API, and sensible error messages. PyYAML supports standard YAML tags and
2152 provides Python-specific tags that allow to represent an arbitrary Python
2153 object.")
2154 (license license:expat)))
2155
2156 (define-public python2-pyyaml
2157 (package-with-python2 python-pyyaml))
2158
2159 (define-public python-virtualenv
2160 (package
2161 (name "python-virtualenv")
2162 (version "15.0.3")
2163 (source
2164 (origin
2165 (method url-fetch)
2166 (uri (pypi-uri "virtualenv" version))
2167 (sha256
2168 (base32
2169 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
2170 (build-system python-build-system)
2171 (arguments
2172 `(#:phases
2173 (modify-phases %standard-phases
2174 (replace 'check
2175 (lambda _
2176 ;; Disable failing test. See upstream bug report
2177 ;; https://github.com/pypa/virtualenv/issues/957
2178 (substitute* "tests/test_virtualenv.py"
2179 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2180 (zero? (system* "py.test")))))))
2181 (native-inputs
2182 `(("python-mock" ,python-mock)
2183 ("python-pytest" ,python-pytest)))
2184 (home-page "https://virtualenv.pypa.io/")
2185 (synopsis "Virtual Python environment builder")
2186 (description
2187 "Virtualenv is a tool to create isolated Python environments.")
2188 (license license:expat)))
2189
2190 (define-public python2-virtualenv
2191 (package-with-python2 python-virtualenv))
2192
2193 (define-public python-markupsafe
2194 (package
2195 (name "python-markupsafe")
2196 (version "0.23")
2197 (source
2198 (origin
2199 (method url-fetch)
2200 (uri (string-append
2201 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2202 version ".tar.gz"))
2203 (sha256
2204 (base32
2205 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2206 (build-system python-build-system)
2207 (home-page "https://github.com/mitsuhiko/markupsafe")
2208 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2209 (description
2210 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2211 for Python.")
2212 (license license:bsd-3)))
2213
2214 (define-public python2-markupsafe
2215 (package-with-python2 python-markupsafe))
2216
2217 (define-public python-jinja2
2218 (package
2219 (name "python-jinja2")
2220 (version "2.9.6")
2221 (source
2222 (origin
2223 (method url-fetch)
2224 (uri (pypi-uri "Jinja2" version))
2225 (sha256
2226 (base32
2227 "1zzrkywhziqffrzks14kzixz7nd4yh2vc0fb04a68vfd2ai03anx"))))
2228 (build-system python-build-system)
2229 (propagated-inputs
2230 `(("python-markupsafe" ,python-markupsafe)))
2231 (home-page "http://jinja.pocoo.org/")
2232 (synopsis "Python template engine")
2233 (description
2234 "Jinja2 is a small but fast and easy to use stand-alone template engine
2235 written in pure Python.")
2236 (license license:bsd-3)))
2237
2238 (define-public python2-jinja2
2239 (package-with-python2 python-jinja2))
2240
2241 (define-public python-pystache
2242 (package
2243 (name "python-pystache")
2244 (version "0.5.4")
2245 (source (origin
2246 (method url-fetch)
2247 (uri (pypi-uri "pystache" version))
2248 (sha256
2249 (base32
2250 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2251 (build-system python-build-system)
2252 (arguments
2253 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2254 (home-page "http://defunkt.io/pystache/")
2255 (synopsis "Python logic-less template engine")
2256 (description
2257 "Pystache is a Python implementation of the framework agnostic,
2258 logic-free templating system Mustache.")
2259 (license license:expat)
2260 (properties `((python2-variant . ,(delay python2-pystache))))))
2261
2262 (define-public python2-pystache
2263 (package (inherit (package-with-python2
2264 (strip-python2-variant python-pystache)))
2265 (arguments
2266 `(#:python ,python-2
2267 #:phases
2268 (modify-phases %standard-phases
2269 (replace 'check
2270 (lambda _
2271 (zero? (system* "python" "test_pystache.py")))))))))
2272
2273 (define-public python-joblib
2274 (package
2275 (name "python-joblib")
2276 (version "0.10.3")
2277 (source (origin
2278 (method url-fetch)
2279 (uri (pypi-uri "joblib" version))
2280 (sha256
2281 (base32
2282 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2283 (modules '((guix build utils)))
2284 (snippet
2285 '(begin
2286 ;; Remove pre-compiled .pyc files from source.
2287 (for-each delete-file-recursively
2288 (find-files "." "__pycache__" #:directories? #t))
2289 (for-each delete-file (find-files "." "\\.pyc$"))
2290 #t))))
2291 (build-system python-build-system)
2292 (arguments
2293 `(#:phases
2294 (modify-phases %standard-phases
2295 (add-before 'check 'disable-failing-tests
2296 (lambda _
2297 ;; This numpydoc tests fails for unknown reasons
2298 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2299 ;; This numpydoc test depends on matplotlib, which is not a
2300 ;; required input.
2301 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2302 ;; These tests fail to execute sys.executable
2303 (substitute* "joblib/test/test_parallel.py"
2304 (("import nose" line)
2305 (string-append "from nose.plugins.skip import SkipTest\n" line))
2306 (("def test_nested_parallel_warnings" line)
2307 (string-append "@SkipTest\n" line))
2308 (("def test_parallel_with_interactively_defined_functions" line)
2309 (string-append "@SkipTest\n" line)))
2310 #t)))))
2311 ;; Provide nose to enable tests command
2312 (native-inputs
2313 `(("python-nose" ,python-nose)
2314 ("python-sphinx" ,python-sphinx)
2315 ("python-docutils" ,python-docutils)
2316 ("python-numpydoc" ,python-numpydoc)))
2317 (home-page "http://pythonhosted.org/joblib/")
2318 (synopsis "Using Python functions as pipeline jobs")
2319 (description
2320 "Joblib is a set of tools to provide lightweight pipelining in Python.
2321 In particular, joblib offers: transparent disk-caching of the output values
2322 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2323 logging and tracing of the execution.")
2324 (license license:bsd-3)))
2325
2326 (define-public python2-joblib
2327 (package-with-python2 python-joblib))
2328
2329 (define-public python-docutils
2330 (package
2331 (name "python-docutils")
2332 (version "0.14")
2333 (source
2334 (origin
2335 (method url-fetch)
2336 (uri (pypi-uri "docutils" version))
2337 (sha256
2338 (base32
2339 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2340 (build-system python-build-system)
2341 (arguments
2342 '(#:tests? #f)) ; no setup.py test command
2343 (home-page "http://docutils.sourceforge.net/")
2344 (synopsis "Python Documentation Utilities")
2345 (description
2346 "Docutils is a modular system for processing documentation into useful
2347 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2348 reStructuredText.")
2349 ;; Most of the source code is public domain, but some source files are
2350 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2351 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2352
2353 (define-public python2-docutils
2354 (package-with-python2 python-docutils))
2355
2356 (define-public python-pygments
2357 (package
2358 (name "python-pygments")
2359 (version "2.2.0")
2360 (source
2361 (origin
2362 (method url-fetch)
2363 (uri (pypi-uri "Pygments" version))
2364 (sha256
2365 (base32
2366 "1k78qdvir1yb1c634nkv6rbga8wv4289xarghmsbbvzhvr311bnv"))))
2367 (build-system python-build-system)
2368 (arguments
2369 ;; FIXME: Tests require sphinx, which depends on this.
2370 '(#:tests? #f))
2371 (home-page "http://pygments.org/")
2372 (synopsis "Syntax highlighting")
2373 (description
2374 "Pygments is a syntax highlighting package written in Python.")
2375 (license license:bsd-2)))
2376
2377 (define-public python2-pygments
2378 (package-with-python2 python-pygments))
2379
2380 (define-public python-sphinxcontrib-websupport
2381 (package
2382 (name "python-sphinxcontrib-websupport")
2383 (version "1.0.1")
2384 (source (origin
2385 (method url-fetch)
2386 (uri (pypi-uri "sphinxcontrib-websupport" version))
2387 (sha256
2388 (base32
2389 "1f9f0wjpi9nhikbyaz6d19s7qvzdf1nq2g5dsh640fma4q9rd1bs"))))
2390 (build-system python-build-system)
2391 (propagated-inputs
2392 `(("python-mock" ,python-mock)
2393 ("python-pytest" ,python-pytest)
2394 ("python-xapian-bindings" ,python-xapian-bindings)))
2395 ;; Needed for running the test suite
2396 (native-inputs
2397 `(("python-six" ,python-six)
2398 ("python-jinja2" ,python-jinja2)
2399 ("python-docutils" ,python-docutils)
2400 ("python-sphinx" ,python-sphinx)
2401 ("python-sqlalchemy" ,python-sqlalchemy)
2402 ("python-whoosh" ,python-whoosh)))
2403 (home-page "http://sphinx-doc.org/")
2404 (synopsis "Sphinx API for web applications")
2405 (description "This package provides a Python API to easily integrate
2406 Sphinx documentation into your web application. It provides tools to
2407 integrate Sphinx documents in web templates and to handle searches.")
2408 (license license:bsd-3)))
2409
2410 (define-public python-sphinx
2411 (package
2412 (name "python-sphinx")
2413 (version "1.5.1")
2414 (source
2415 (origin
2416 (method url-fetch)
2417 (uri (pypi-uri "Sphinx" version))
2418 (sha256
2419 (base32
2420 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
2421 (build-system python-build-system)
2422 (arguments
2423 `(#:phases
2424 (modify-phases %standard-phases
2425 (replace 'check
2426 (lambda _
2427 ;; Requires Internet access.
2428 (delete-file "tests/test_build_linkcheck.py")
2429 (zero? (system* "make" "test")))))))
2430 (propagated-inputs
2431 `(("python-imagesize" ,python-imagesize)
2432 ("python-sphinx-alabaster-theme"
2433 ,python-sphinx-alabaster-theme)
2434 ("python-babel" ,python-babel)
2435 ("python-snowballstemmer" ,python-snowballstemmer)
2436 ("python-docutils" ,python-docutils)
2437 ("python-jinja2" ,python-jinja2)
2438 ("python-pygments" ,python-pygments)
2439 ("python-requests" ,python-requests)
2440 ("python-six" ,python-six)))
2441 (native-inputs
2442 `(("graphviz" ,graphviz)
2443 ("python-html5lib" ,python-html5lib)
2444 ("python-mock" ,python-mock)
2445 ("python-nose" ,python-nose)))
2446 (home-page "http://sphinx-doc.org/")
2447 (synopsis "Python documentation generator")
2448 (description "Sphinx is a tool that makes it easy to create documentation
2449 for Python projects or other documents consisting of multiple reStructuredText
2450 sources.")
2451 (license license:bsd-3)
2452 (properties `((python2-variant . ,(delay python2-sphinx))))))
2453
2454 (define-public python-sphinx-1.6
2455 (package (inherit python-sphinx)
2456 (name "python-sphinx")
2457 (version "1.6.4")
2458 (source (origin
2459 (method url-fetch)
2460 (uri (pypi-uri "Sphinx" version))
2461 (sha256
2462 (base32
2463 "0gjakw9fv5pwqb5yyclxycs36sapxizk1vx6mkcdizmzgzcfy0gi"))))
2464 (arguments
2465 `(#:phases
2466 (modify-phases %standard-phases
2467 (replace 'check
2468 (lambda _
2469 ;; Requires Internet access.
2470 (delete-file "tests/test_build_linkcheck.py")
2471 (substitute* "tests/test_build_latex.py"
2472 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
2473 "@pytest.mark.skip()"))
2474 (zero? (system* "make" "test")))))))
2475 (propagated-inputs
2476 `(("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)
2477 ,@(package-propagated-inputs python-sphinx)))
2478 (native-inputs
2479 `(("python-pytest" ,python-pytest)
2480 ("imagemagick" ,imagemagick) ; for "convert"
2481 ,@(package-native-inputs python-sphinx)))
2482 (properties `((python2-variant . ,(delay python2-sphinx-1.6))))))
2483
2484 (define-public python2-sphinx-1.6
2485 (let ((base (package-with-python2 (strip-python2-variant python-sphinx-1.6))))
2486 (package
2487 (inherit base)
2488 (propagated-inputs
2489 `(("python2-typing" ,python2-typing)
2490 ,@(package-propagated-inputs base)))
2491 (native-inputs `(("python2-enum34" ,python2-enum34)
2492 ,@(package-native-inputs base))))))
2493
2494 (define-public python-sphinx-1.5.3
2495 (package
2496 (inherit python-sphinx)
2497 (name "python-sphinx")
2498 (version "1.5.3")
2499 (source
2500 (origin
2501 (method url-fetch)
2502 (uri (pypi-uri "Sphinx" version))
2503 (sha256
2504 (base32
2505 "0kw1axswbvaavr8ggyf4qr6hnisnrzlbkkcdada69vk1x9xjassg"))))
2506 (native-inputs
2507 `(("python-pytest" ,python-pytest)
2508 ,@(package-native-inputs python-sphinx)))))
2509
2510 (define-public python2-sphinx
2511 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
2512 (package
2513 (inherit base)
2514 (native-inputs `(("python2-mock" ,python2-mock)
2515 ("python2-enum34" ,python2-enum34)
2516 ,@(package-native-inputs base)))
2517 (propagated-inputs `(("python2-pytz" ,python2-pytz)
2518 ,@(package-propagated-inputs base))))))
2519
2520 (define-public python-sphinx-gallery
2521 (package
2522 (name "python-sphinx-gallery")
2523 (version "0.1.13")
2524 (source (origin
2525 (method url-fetch)
2526 (uri (string-append "https://github.com/sphinx-gallery/sphinx-gallery"
2527 "/archive/v" version ".tar.gz"))
2528 (file-name (string-append name "-" version ".tar.gz"))
2529 (sha256
2530 (base32
2531 "03fs99mcb1r7qp0xixqv07vcz98sk21yq19ffdysi0infdcpzfkd"))))
2532 (build-system python-build-system)
2533 (arguments
2534 ;; FIXME: Tests attempt to download <https://docs.python.org/3/objects.inv>,
2535 ;; <https://docs.scipy.org/doc/numpy/objects.inv>, and
2536 ;; <https://matplotlib.org/objects.inv>.
2537 `(#:tests? #f))
2538 (native-inputs
2539 `(("python-pytest-runner" ,python-pytest-runner)))
2540 (home-page "https://sphinx-gallery.github.io/")
2541 (synopsis "Generate an examples gallery automatically")
2542 (description
2543 "@code{sphinx_gallery} is a Sphinx extension that builds an HTML version
2544 from any set of Python scripts and puts it into an examples gallery.")
2545 (license license:bsd-3)))
2546
2547 (define-public python2-sphinx-gallery
2548 (package-with-python2 python-sphinx-gallery))
2549
2550 (define-public python-sphinx-rtd-theme
2551 (package
2552 (name "python-sphinx-rtd-theme")
2553 (version "0.2.4")
2554 (source
2555 (origin
2556 (method url-fetch)
2557 (uri (pypi-uri "sphinx_rtd_theme" version))
2558 (sha256
2559 (base32
2560 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
2561 (build-system python-build-system)
2562 (arguments '(#:tests? #f)) ; No tests.
2563 (propagated-inputs
2564 `(("python-sphinx" ,python-sphinx)))
2565 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2566 (synopsis "ReadTheDocs.org theme for Sphinx")
2567 (description "A theme for Sphinx used by ReadTheDocs.org.")
2568 (license license:expat)))
2569
2570 (define-public python2-sphinx-rtd-theme
2571 (package-with-python2 python-sphinx-rtd-theme))
2572
2573 (define-public python-guzzle-sphinx-theme
2574 (package
2575 (name "python-guzzle-sphinx-theme")
2576 (version "0.7.11")
2577 (source
2578 (origin
2579 (method url-fetch)
2580 (uri (pypi-uri "guzzle_sphinx_theme" version))
2581 (sha256
2582 (base32
2583 "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
2584 (build-system python-build-system)
2585 (propagated-inputs
2586 `(("python-sphinx" ,python-sphinx)))
2587 (home-page "https://github.com/guzzle/guzzle_sphinx_theme")
2588 (synopsis "Sphinx theme used by Guzzle")
2589 (description "This package provides guzzle_sphinx_theme, a theme for the
2590 Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
2591 and several other projects.")
2592 (license license:expat)))
2593
2594 (define-public python2-guzzle-sphinx-theme
2595 (package-with-python2 python-guzzle-sphinx-theme))
2596
2597 (define-public python-rst.linker
2598 (package
2599 (name "python-rst.linker")
2600 (version "1.10")
2601 (source
2602 (origin
2603 (method url-fetch)
2604 (uri (pypi-uri "rst.linker" version))
2605 (sha256
2606 (base32
2607 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2608 (build-system python-build-system)
2609 (propagated-inputs
2610 `(("python-dateutil" ,python-dateutil)
2611 ("python-six" ,python-six)))
2612 (native-inputs
2613 `(("python-setuptools-scm" ,python-setuptools-scm)))
2614 ;; Test would require path.py, which would introduce a cyclic dependence.
2615 (arguments `(#:tests? #f))
2616 ;; Note: As of version 1.7 the documentation is not worth building.
2617 (home-page "https://github.com/jaraco/rst.linker")
2618 (synopsis "Sphinx plugin to add links and timestamps")
2619 (description "rst.linker allows to automatically replace text by a
2620 reStructuredText external reference or timestamps. It's primary purpose is to
2621 augment the changelog, but it can be used for other documents, too.")
2622 (license license:expat)))
2623
2624 (define-public python2-rst.linker
2625 (package-with-python2 python-rst.linker))
2626
2627 (define-public python-feedgenerator
2628 (package
2629 (name "python-feedgenerator")
2630 (version "1.9")
2631 (source
2632 (origin
2633 (method url-fetch)
2634 (uri (pypi-uri "feedgenerator" version))
2635 (sha256
2636 (base32
2637 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2638 (modules '((guix build utils)))
2639 (snippet
2640 '(begin
2641 ;; Remove pre-compiled .pyc files from source.
2642 (for-each delete-file-recursively
2643 (find-files "." "__pycache__" #:directories? #t))
2644 (for-each delete-file (find-files "." "\\.pyc$"))
2645 #t))))
2646 (build-system python-build-system)
2647 (propagated-inputs
2648 `(("python-pytz" ,python-pytz)
2649 ("python-six" ,python-six)))
2650 (home-page "https://github.com/getpelican/feedgenerator")
2651 (synopsis
2652 "Standalone version of Django's Atom/RSS feed generator")
2653 (description
2654 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2655 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2656 (license license:bsd-3)))
2657
2658 (define-public python2-feedgenerator
2659 (package-with-python2 python-feedgenerator))
2660
2661 (define-public python-blinker
2662 (package
2663 (name "python-blinker")
2664 (version "1.4")
2665 (source
2666 (origin
2667 (method url-fetch)
2668 (uri (pypi-uri "blinker" version))
2669 (sha256
2670 (base32
2671 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2672 (build-system python-build-system)
2673 (home-page "http://pythonhosted.org/blinker/")
2674 (synopsis "Fast, simple object-to-object and broadcast signaling")
2675 (description
2676 "Blinker provides a fast dispatching system that allows any number of
2677 interested parties to subscribe to events, or \"signals\".")
2678 (license license:expat)))
2679
2680 (define-public python2-blinker
2681 (package-with-python2 python-blinker))
2682
2683 (define-public pelican
2684 (package
2685 (name "pelican")
2686 (version "3.6.3")
2687 (source
2688 (origin
2689 (method url-fetch)
2690 (uri (pypi-uri "pelican" version))
2691 (sha256
2692 (base32
2693 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
2694 (build-system python-build-system)
2695 (propagated-inputs
2696 `(("python-feedgenerator" ,python-feedgenerator)
2697 ("python-jinja2" ,python-jinja2)
2698 ("python-pygments" ,python-pygments)
2699 ("python-docutils" ,python-docutils)
2700 ("python-pytz" ,python-pytz)
2701 ("python-blinker" ,python-blinker)
2702 ("python-unidecode" ,python-unidecode)
2703 ("python-six" ,python-six)
2704 ("python-dateutil" ,python-dateutil)
2705 ("python-markdown" ,python-markdown)))
2706 (home-page "http://getpelican.com/")
2707 (arguments
2708 `(;; XXX Requires a lot more packages to do unit tests :P
2709 #:tests? #f
2710 #:phases (modify-phases %standard-phases
2711 (add-before
2712 'install 'adjust-requires
2713 ;; Since feedgenerator is installed from git, it doesn't
2714 ;; conform to the version requirements.
2715 ;;
2716 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2717 ;; version requirement so setuptools doesn't get confused.
2718 (lambda _
2719 (substitute* "setup.py"
2720 (("['\"]feedgenerator.*?['\"]")
2721 "'feedgenerator'")))))))
2722 (synopsis "Python-based static site publishing system")
2723 (description
2724 "Pelican is a tool to generate a static blog from reStructuredText,
2725 Markdown input files, and more. Pelican uses Jinja2 for templating
2726 and is very extensible.")
2727 (license license:agpl3+)))
2728
2729 (define-public python-scikit-image
2730 (package
2731 (name "python-scikit-image")
2732 (version "0.11.3")
2733 (source
2734 (origin
2735 (method url-fetch)
2736 (uri (string-append
2737 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
2738 version ".tar.gz"))
2739 (sha256
2740 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
2741 (build-system python-build-system)
2742 (arguments
2743 ;; TODO: Some tests require running X11 server. Disable them?
2744 '(#:tests? #f))
2745 ;; See DEPENDS.txt for the list of build and run time requiremnts
2746 (propagated-inputs
2747 `(("python-matplotlib" ,python-matplotlib)
2748 ("python-networkx" ,python-networkx)
2749 ("python-scipy" ,python-scipy)
2750 ("python-pillow" ,python-pillow)))
2751 (native-inputs
2752 `(("python-numpy" ,python-numpy)
2753 ("python-cython" ,python-cython)
2754 ("python-six" ,python-six)))
2755 (home-page "http://scikit-image.org/")
2756 (synopsis "Image processing in Python")
2757 (description
2758 "Scikit-image is a collection of algorithms for image processing.")
2759 (license license:bsd-3)))
2760
2761 (define-public python2-scikit-image
2762 (package-with-python2 python-scikit-image))
2763
2764 (define-public python-cython
2765 (package
2766 (name "python-cython")
2767 (version "0.27")
2768 (source
2769 (origin
2770 (method url-fetch)
2771 (uri (pypi-uri "Cython" version))
2772 (sha256
2773 (base32
2774 "02y0pp1nx77b8s1mpxc6da2dccl6wd31pp4ksi9via479qcvacmr"))))
2775 (build-system python-build-system)
2776 ;; we need the full python package and not just the python-wrapper
2777 ;; because we need libpython3.3m.so
2778 (inputs
2779 `(("python" ,python)))
2780 (arguments
2781 `(#:phases
2782 (modify-phases %standard-phases
2783 (add-before 'check 'set-HOME
2784 ;; some tests require access to "$HOME/.cython"
2785 (lambda _ (setenv "HOME" "/tmp") #t))
2786 (replace 'check
2787 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
2788 (home-page "http://cython.org/")
2789 (synopsis "C extensions for Python")
2790 (description "Cython is an optimising static compiler for both the Python
2791 programming language and the extended Cython programming language. It makes
2792 writing C extensions for Python as easy as Python itself.")
2793 (license license:asl2.0)
2794 (properties `((python2-variant . ,(delay python2-cython))))))
2795
2796 (define-public python2-cython
2797 (package (inherit (package-with-python2
2798 (strip-python2-variant python-cython)))
2799 (name "python2-cython")
2800 (inputs
2801 `(("python-2" ,python-2))))) ; this is not automatically changed
2802
2803 ;; The RPython toolchain currently does not support Python 3.
2804 (define-public python2-rpython
2805 (package
2806 (name "python2-rpython")
2807 (version "0.2.1")
2808 (source
2809 (origin
2810 (method url-fetch)
2811 (uri (pypi-uri "rpython" version))
2812 (sha256
2813 (base32
2814 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
2815 (build-system python-build-system)
2816 (arguments `(#:python ,python-2))
2817 (native-inputs
2818 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
2819 (home-page "https://rpython.readthedocs.org")
2820 (synopsis "Framework for implementing interpreters and virtual machines")
2821 (description "RPython is a translation and support framework for
2822 producing implementations of dynamic languages, emphasizing a clean separation
2823 between language specification and implementation aspects.")
2824 (license license:expat)))
2825
2826 ;; NOTE: when upgrading numpy please make sure that python-pandas and
2827 ;; python-scipy still build, as these three packages are often used together.
2828 (define-public python-numpy
2829 (package
2830 (name "python-numpy")
2831 (version "1.14.5")
2832 (source
2833 (origin
2834 (method url-fetch)
2835 (uri (string-append
2836 "https://github.com/numpy/numpy/releases/download/v"
2837 version "/numpy-" version ".tar.gz"))
2838 (sha256
2839 (base32
2840 "0admjpkih63lm19zbbilq8ck4f6ny5kqi03dk3m6b2mnixsh4jhv"))))
2841 (build-system python-build-system)
2842 (inputs
2843 `(("openblas" ,openblas)
2844 ("lapack" ,lapack)))
2845 (native-inputs
2846 `(("python-cython" ,python-cython)
2847 ("python-nose" ,python-nose)
2848 ("gfortran" ,gfortran)))
2849 (arguments
2850 `(#:phases
2851 (modify-phases %standard-phases
2852 (add-before 'build 'configure-blas-lapack
2853 (lambda* (#:key inputs #:allow-other-keys)
2854 (call-with-output-file "site.cfg"
2855 (lambda (port)
2856 (format port
2857 "[openblas]
2858 libraries = openblas
2859 library_dirs = ~a/lib
2860 include_dirs = ~a/include
2861
2862 # backslash-n to make emacs happy
2863 \n[lapack]
2864 lapack_libs = lapack
2865 library_dirs = ~a/lib
2866 include_dirs = ~a/include
2867 "
2868 (assoc-ref inputs "openblas")
2869 (assoc-ref inputs "openblas")
2870 (assoc-ref inputs "lapack")
2871 (assoc-ref inputs "lapack"))))
2872 #t))
2873 (add-before 'build 'fix-executable-paths
2874 (lambda* (#:key inputs #:allow-other-keys)
2875 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
2876 ;; instead of /bin/sh.
2877 (substitute* "numpy/distutils/exec_command.py"
2878 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
2879 (string-append match-start (assoc-ref inputs "bash") match-end)))
2880 ;; Use "gcc" executable, not "cc".
2881 (substitute* "numpy/distutils/system_info.py"
2882 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
2883 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2884 #t))
2885 ;; Tests can only be run after the library has been installed and not
2886 ;; within the source directory.
2887 (delete 'check)
2888 (add-after 'install 'check
2889 (lambda* (#:key outputs inputs #:allow-other-keys)
2890 ;; Make installed package available for running the tests
2891 (add-installed-pythonpath inputs outputs)
2892 (with-directory-excursion "/tmp"
2893 (zero? (system* "python" "-c"
2894 "import numpy; numpy.test(verbose=2)"))))))))
2895 (home-page "http://www.numpy.org/")
2896 (synopsis "Fundamental package for scientific computing with Python")
2897 (description "NumPy is the fundamental package for scientific computing
2898 with Python. It contains among other things: a powerful N-dimensional array
2899 object, sophisticated (broadcasting) functions, tools for integrating C/C++
2900 and Fortran code, useful linear algebra, Fourier transform, and random number
2901 capabilities.")
2902 (license license:bsd-3)))
2903
2904 (define-public python2-numpy
2905 (package-with-python2 python-numpy))
2906
2907 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
2908 ;; interest only for legacy code going back to NumPy's predecessor
2909 ;; Numeric.
2910 (define-public python2-numpy-1.8
2911 (package (inherit python2-numpy)
2912 (version "1.8.2")
2913 (source
2914 (origin
2915 (method url-fetch)
2916 (uri (string-append
2917 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
2918 (file-name (string-append "python2-numpy-" version ".tar.gz"))
2919 (sha256
2920 (base32
2921 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
2922 (arguments
2923 (substitute-keyword-arguments (package-arguments python2-numpy)
2924 ((#:phases phases)
2925 `(modify-phases ,phases
2926 (replace 'configure-blas-lapack
2927 (lambda* (#:key inputs #:allow-other-keys)
2928 (call-with-output-file "site.cfg"
2929 (lambda (port)
2930 (format port
2931 "[openblas]
2932 libraries = openblas,lapack
2933 library_dirs = ~a/lib:~a/lib
2934 include_dirs = ~a/include:~a/include
2935 "
2936 (assoc-ref inputs "openblas")
2937 (assoc-ref inputs "lapack")
2938 (assoc-ref inputs "openblas")
2939 (assoc-ref inputs "lapack"))))
2940 #t))))))
2941 (description "NumPy is the fundamental package for scientific computing
2942 with Python. It contains among other things: a powerful N-dimensional array
2943 object, sophisticated (broadcasting) functions, tools for integrating C/C++
2944 and Fortran code, useful linear algebra, Fourier transform, and random number
2945 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
2946 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
2947 Numeric.")
2948 (license license:bsd-3)))
2949
2950 (define-public python-munch
2951 (package
2952 (name "python-munch")
2953 (version "2.0.4")
2954 (source
2955 (origin
2956 (method url-fetch)
2957 (uri (pypi-uri "munch" version))
2958 (sha256
2959 (base32
2960 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
2961 (build-system python-build-system)
2962 (home-page "https://github.com/Infinidat/munch")
2963 (synopsis "Dot-accessible dictionary")
2964 (description "Munch is a dot-accessible dictionary similar to JavaScript
2965 objects.")
2966 (license license:expat)))
2967
2968 (define-public python2-munch
2969 (package-with-python2 python-munch))
2970
2971 (define-public python-colormath
2972 (package
2973 (name "python-colormath")
2974 (version "3.0.0")
2975 (source
2976 (origin
2977 (method url-fetch)
2978 (uri (pypi-uri "colormath" version))
2979 (sha256
2980 (base32
2981 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
2982 (build-system python-build-system)
2983 (propagated-inputs
2984 `(("python-networkx" ,python-networkx)
2985 ("python-numpy" ,python-numpy)))
2986 (home-page "https://github.com/gtaylor/python-colormath")
2987 (synopsis "Color math and conversion library")
2988 (description
2989 "This is a Python library for color math and conversions.")
2990 (license license:bsd-3)))
2991
2992 (define-public python2-colormath
2993 (package-with-python2 python-colormath))
2994
2995 (define-public python-spectra
2996 (package
2997 (name "python-spectra")
2998 (version "0.0.11")
2999 (source
3000 (origin
3001 (method url-fetch)
3002 (uri (pypi-uri "spectra" version))
3003 (sha256
3004 (base32
3005 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3006 (build-system python-build-system)
3007 (arguments
3008 `(#:phases
3009 (modify-phases %standard-phases
3010 (replace 'check
3011 (lambda _
3012 (zero? (system* "nosetests" "-v")))))))
3013 (propagated-inputs
3014 `(("python-colormath" ,python-colormath)))
3015 (native-inputs
3016 `(("python-nose" ,python-nose)))
3017 (home-page "https://github.com/jsvine/spectra")
3018 (synopsis "Color scales and color conversion")
3019 (description
3020 "This package provides a Python library intended to make color math,
3021 color scales, and color space conversion easy. It has support for:
3022
3023 @enumerate
3024 @item Color scales
3025 @item Color ranges
3026 @item Color blending
3027 @item Brightening/darkening colors
3028 @item Saturating/desaturating colors
3029 @item Conversion to/from multiple color spaces.
3030 @end enumerate\n")
3031 (license license:expat)))
3032
3033 (define-public python2-spectra
3034 (package-with-python2 python-spectra))
3035
3036 (define-public python2-fastlmm
3037 (package
3038 (name "python2-fastlmm")
3039 (version "0.2.21")
3040 (source
3041 (origin
3042 (method url-fetch)
3043 (uri (pypi-uri "fastlmm" version ".zip"))
3044 (sha256
3045 (base32
3046 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3047 (build-system python-build-system)
3048 (arguments
3049 `(#:python ,python-2)) ; only Python 2.7 is supported
3050 (propagated-inputs
3051 `(("python2-numpy" ,python2-numpy)
3052 ("python2-scipy" ,python2-scipy)
3053 ("python2-matplotlib" ,python2-matplotlib)
3054 ("python2-pandas" ,python2-pandas)
3055 ("python2-scikit-learn" ,python2-scikit-learn)
3056 ("python2-pysnptools" ,python2-pysnptools)))
3057 (native-inputs
3058 `(("unzip" ,unzip)
3059 ("python2-cython" ,python2-cython)
3060 ("python2-mock" ,python2-mock)
3061 ("python2-nose" ,python2-nose)))
3062 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3063 (synopsis "Perform genome-wide association studies on large data sets")
3064 (description
3065 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3066 Models, is a program for performing both single-SNP and SNP-set genome-wide
3067 association studies (GWAS) on extremely large data sets.")
3068 (license license:asl2.0)))
3069
3070 (define-public python-numpy-documentation
3071 (package
3072 (name "python-numpy-documentation")
3073 (version (package-version python-numpy))
3074 (source (package-source python-numpy))
3075 (build-system python-build-system)
3076 (native-inputs
3077 `(("python-matplotlib" ,python-matplotlib)
3078 ("python-numpy" ,python-numpy)
3079 ("pkg-config" ,pkg-config)
3080 ("python-sphinx" ,python-sphinx)
3081 ("python-numpydoc" ,python-numpydoc)
3082 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3083 texlive-fonts-ec
3084 texlive-generic-ifxetex
3085 texlive-generic-pdftex
3086 texlive-latex-amsfonts
3087 texlive-latex-capt-of
3088 texlive-latex-cmap
3089 texlive-latex-environ
3090 texlive-latex-eqparbox
3091 texlive-latex-etoolbox
3092 texlive-latex-expdlist
3093 texlive-latex-fancyhdr
3094 texlive-latex-fancyvrb
3095 texlive-latex-fncychap
3096 texlive-latex-float
3097 texlive-latex-framed
3098 texlive-latex-geometry
3099 texlive-latex-graphics
3100 texlive-latex-hyperref
3101 texlive-latex-mdwtools
3102 texlive-latex-multirow
3103 texlive-latex-oberdiek
3104 texlive-latex-parskip
3105 texlive-latex-preview
3106 texlive-latex-tabulary
3107 texlive-latex-threeparttable
3108 texlive-latex-titlesec
3109 texlive-latex-trimspaces
3110 texlive-latex-ucs
3111 texlive-latex-upquote
3112 texlive-latex-url
3113 texlive-latex-varwidth
3114 texlive-latex-wrapfig)))
3115 ("texinfo" ,texinfo)
3116 ("perl" ,perl)
3117 ("scipy-sphinx-theme"
3118 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3119 (method git-fetch)
3120 (uri (git-reference
3121 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3122 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3123 (sha256
3124 (base32
3125 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3126 ,@(package-native-inputs python-numpy)))
3127 (arguments
3128 `(#:tests? #f ; we're only generating the documentation
3129 #:phases
3130 (modify-phases %standard-phases
3131 (delete 'build)
3132 (replace 'install
3133 (lambda* (#:key inputs outputs #:allow-other-keys)
3134 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3135 (doc (string-append
3136 data "/doc/" ,name "-"
3137 ,(package-version python-numpy)))
3138 (info-reader (string-append data "/info"))
3139 (html (string-append doc "/html"))
3140 (scipy-sphinx-theme "scipy-sphinx-theme")
3141 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3142 (pyver ,(string-append "PYVER=")))
3143
3144 ;; FIXME: this is needed to for texlive-union to generate
3145 ;; fonts, which are not found.
3146 (setenv "HOME" "/tmp")
3147
3148 (with-directory-excursion "doc"
3149 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3150 (mkdir-p html)
3151 (system* "make" "html" pyver)
3152 (system* "make" "latex" "PAPER=a4" pyver)
3153 (system* "make" "-C" "build/latex"
3154 "all-pdf" "PAPER=a4" pyver)
3155 ;; FIXME: Generation of the info file fails.
3156 ;; (system* "make" "info" pyver)
3157 ;; (mkdir-p info)
3158 ;; (copy-file "build/texinfo/numpy.info"
3159 ;; (string-append info "/numpy.info"))
3160 (for-each (lambda (file)
3161 (copy-file (string-append "build/latex" file)
3162 (string-append doc file)))
3163 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3164 (with-directory-excursion "build/html"
3165 (for-each (lambda (file)
3166 (let* ((dir (dirname file))
3167 (tgt-dir (string-append html "/" dir)))
3168 (unless (equal? "." dir)
3169 (mkdir-p tgt-dir))
3170 (install-file file html)))
3171 (find-files "." ".*")))))
3172 #t)))))
3173 (home-page (package-home-page python-numpy))
3174 (synopsis "Documentation for the python-numpy package")
3175 (description (package-description python-numpy))
3176 (license (package-license python-numpy))))
3177
3178 (define-public python2-numpy-documentation
3179 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3180 (package
3181 (inherit numpy-documentation)
3182 (native-inputs `(("python2-functools32" ,python2-functools32)
3183 ,@(package-native-inputs numpy-documentation))))))
3184
3185 (define-public python-pygit2
3186 (package
3187 (name "python-pygit2")
3188 (version "0.26.0")
3189 (source
3190 (origin
3191 (method url-fetch)
3192 (uri (pypi-uri "pygit2" version))
3193 (sha256
3194 (base32
3195 "1cbc488ra3kg7r3qky17ms0szi3cda2d96qfkv1l9djsy9hnvw57"))
3196 (patches
3197 (search-patches "python-pygit2-disable-network-tests.patch"))))
3198 (build-system python-build-system)
3199 (propagated-inputs
3200 `(("python-six" ,python-six)
3201 ("python-cffi" ,python-cffi)
3202 ("libgit2" ,libgit2)
3203 ("python-tox" ,python-tox)))
3204 (home-page "https://github.com/libgit2/pygit2")
3205 (synopsis "Python bindings for libgit2")
3206 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3207 library, libgit2 implements Git plumbing.")
3208 ;; GPL2.0 only, with linking exception.
3209 (license license:gpl2)))
3210
3211 (define-public python2-pygit2
3212 (package-with-python2 python-pygit2))
3213
3214 (define-public python-pyparsing
3215 (package
3216 (name "python-pyparsing")
3217 (version "2.2.0")
3218 (source
3219 (origin
3220 (method url-fetch)
3221 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3222 "/pyparsing-" version
3223 "/pyparsing-" version ".tar.gz"))
3224 (sha256
3225 (base32
3226 "016b9gh606aa44sq92jslm89bg874ia0yyiyb643fa6dgbsbqch8"))))
3227 (build-system python-build-system)
3228 (outputs '("out" "doc"))
3229 (arguments
3230 `(#:tests? #f ; no test target
3231 #:phases
3232 (modify-phases %standard-phases
3233 (add-after 'install 'install-doc
3234 (lambda* (#:key outputs #:allow-other-keys)
3235 (let* ((doc (string-append (assoc-ref outputs "doc")
3236 "/share/doc/" ,name "-" ,version))
3237 (html-doc (string-append doc "/html"))
3238 (examples (string-append doc "/examples")))
3239 (mkdir-p html-doc)
3240 (mkdir-p examples)
3241 (for-each
3242 (lambda (dir tgt)
3243 (map (lambda (file)
3244 (install-file file tgt))
3245 (find-files dir ".*")))
3246 (list "docs" "htmldoc" "examples")
3247 (list doc html-doc examples))
3248 #t))))))
3249 (home-page "http://pyparsing.wikispaces.com")
3250 (synopsis "Python parsing class library")
3251 (description
3252 "The pyparsing module is an alternative approach to creating and
3253 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3254 of regular expressions. The pyparsing module provides a library of classes
3255 that client code uses to construct the grammar directly in Python code.")
3256 (license license:expat)))
3257
3258 (define-public python2-pyparsing
3259 (package-with-python2 python-pyparsing))
3260
3261 (define-public python-numpydoc
3262 (package
3263 (name "python-numpydoc")
3264 (version "0.5")
3265 (source
3266 (origin
3267 (method url-fetch)
3268 (uri (string-append
3269 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3270 version ".tar.gz"))
3271 (sha256
3272 (base32
3273 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3274 (modules '((guix build utils)))
3275 (snippet
3276 '(begin
3277 ;; Drop a test requiring matplotlib, which we cannot add as an
3278 ;; input since it would create a circular dependency: Extend the
3279 ;; test for Python 3, where it is already dropped, to Python 2.
3280 (substitute* "numpydoc/tests/test_plot_directive.py"
3281 (("3") "2"))
3282 #t))))
3283 (build-system python-build-system)
3284 (propagated-inputs
3285 `(("python-sphinx" ,python-sphinx)))
3286 (native-inputs
3287 `(("python-nose" ,python-nose)))
3288 (home-page "https://pypi.python.org/pypi/numpydoc")
3289 (synopsis
3290 "Numpy's Sphinx extensions")
3291 (description
3292 "Sphinx extension to support docstrings in Numpy format.")
3293 (license license:bsd-2)))
3294
3295 (define-public python2-numpydoc
3296 (package-with-python2 python-numpydoc))
3297
3298 (define-public python-numexpr
3299 (package
3300 (name "python-numexpr")
3301 (version "2.6.5")
3302 (source
3303 (origin
3304 (method url-fetch)
3305 (uri (pypi-uri "numexpr" version))
3306 (sha256
3307 (base32
3308 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3309 (build-system python-build-system)
3310 (arguments `(#:tests? #f)) ; no tests included
3311 (propagated-inputs
3312 `(("python-numpy" ,python-numpy)))
3313 (home-page "https://github.com/pydata/numexpr")
3314 (synopsis "Fast numerical expression evaluator for NumPy")
3315 (description
3316 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3317 expressions that operate on arrays are accelerated and use less memory than
3318 doing the same calculation in Python. In addition, its multi-threaded
3319 capabilities can make use of all your cores, which may accelerate
3320 computations, most specially if they are not memory-bounded (e.g. those using
3321 transcendental functions).")
3322 (license license:expat)))
3323
3324 (define-public python2-numexpr
3325 (package-with-python2 python-numexpr))
3326
3327 (define-public python-cycler
3328 (package
3329 (name "python-cycler")
3330 (version "0.10.0")
3331 (source (origin
3332 (method url-fetch)
3333 (uri (pypi-uri "cycler" version))
3334 (sha256
3335 (base32
3336 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3337 (build-system python-build-system)
3338 (arguments
3339 ;; XXX: The current version requires 'coveralls' which we don't have.
3340 ;; Enable this for the next release which uses 'python-pytest'.
3341 '(#:tests? #f))
3342 (propagated-inputs
3343 `(("python-six" ,python-six)))
3344 (home-page "http://matplotlib.org/cycler/")
3345 (synopsis "Composable keyword argument iterator")
3346 (description
3347 "When using @code{matplotlib} and plotting more than one line, it is
3348 common to want to be able to want to be able to cycle over one or more artist
3349 styles; but the plotting logic can quickly become involved.
3350 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3351 @code{Cycler} class was developed.")
3352 (license license:bsd-3)))
3353
3354 (define-public python2-cycler
3355 (package-with-python2 python-cycler))
3356
3357 (define-public python-colorspacious
3358 (package
3359 (name "python-colorspacious")
3360 (version "1.1.0")
3361 (source
3362 (origin
3363 (method url-fetch)
3364 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3365 version ".tar.gz"))
3366 (file-name (string-append name "-" version))
3367 (sha256
3368 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3369 (build-system python-build-system)
3370 (propagated-inputs
3371 `(("python-numpy" ,python-numpy)))
3372 (native-inputs
3373 `(("python-nose" ,python-nose)))
3374 (arguments
3375 `(#:phases
3376 (modify-phases %standard-phases
3377 (replace 'check
3378 (lambda _
3379 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
3380 (home-page "https://github.com/njsmith/colorspacious")
3381 (synopsis "Python library for colorspace conversions")
3382 (description "@code{colorspacious} is a Python library that lets you
3383 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3384 (license license:expat)))
3385
3386 (define-public python2-colorspacious
3387 (package-with-python2 python-colorspacious))
3388
3389 (define-public python-matplotlib
3390 (package
3391 (name "python-matplotlib")
3392 (version "2.2.2")
3393 (source
3394 (origin
3395 (method url-fetch)
3396 (uri (pypi-uri "matplotlib" version))
3397 (sha256
3398 (base32
3399 "1s6dv225w3k4fv52h8lfjc7qq5y56i9755ayx0mz48ddi99fzisd"))))
3400 (build-system python-build-system)
3401 (propagated-inputs ; the following packages are all needed at run time
3402 `(("python-cycler" ,python-cycler)
3403 ("python-kiwisolver" ,python-kiwisolver)
3404 ("python-pyparsing" ,python-pyparsing)
3405 ("python-pygobject" ,python-pygobject)
3406 ("gobject-introspection" ,gobject-introspection)
3407 ("python-tkinter" ,python "tk")
3408 ("python-dateutil" ,python-dateutil)
3409 ("python-numpy" ,python-numpy)
3410 ("python-pillow" ,python-pillow)
3411 ("python-pytz" ,python-pytz)
3412 ("python-six" ,python-six)
3413 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3414 ;; from 'gtk+') provides the required 'typelib' files used by
3415 ;; 'gobject-introspection'. The location of these files is set with the
3416 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3417 ;; is done automatically by a 'native-search-path' procedure. However,
3418 ;; at run-time the user must set this variable as follows:
3419 ;;
3420 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3421 ("gtk+" ,gtk+)
3422 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3423 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3424 ;; object. For this reason we need to import both libraries.
3425 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3426 ("python-pycairo" ,python-pycairo)
3427 ("python-pyqt" ,python-pyqt)
3428 ("python-cairocffi" ,python-cairocffi)))
3429 (inputs
3430 `(("libpng" ,libpng)
3431 ("imagemagick" ,imagemagick)
3432 ("freetype" ,freetype)
3433 ("cairo" ,cairo)
3434 ("glib" ,glib)
3435 ;; FIXME: Add backends when available.
3436 ;("python-wxpython" ,python-wxpython)
3437 ("tcl" ,tcl)
3438 ("tk" ,tk)))
3439 (native-inputs
3440 `(("pkg-config" ,pkg-config)
3441 ("python-nose" ,python-nose)
3442 ("python-mock" ,python-mock)))
3443 (arguments
3444 `(#:phases
3445 (modify-phases %standard-phases
3446 (add-before 'build 'configure-environment
3447 (lambda* (#:key outputs inputs #:allow-other-keys)
3448 (let ((cairo (assoc-ref inputs "cairo"))
3449 (gtk+ (assoc-ref inputs "gtk+")))
3450 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3451 ;; has not effect.
3452 (setenv "LD_LIBRARY_PATH"
3453 (string-append cairo "/lib:" gtk+ "/lib"))
3454 (setenv "HOME" (getcwd))
3455 (call-with-output-file "setup.cfg"
3456 (lambda (port)
3457 (format port "[directories]~%
3458 basedirlist = ~a,~a~%
3459 [rc_options]~%
3460 backend = TkAgg~%"
3461 (assoc-ref inputs "tcl")
3462 (assoc-ref inputs "tk")))))
3463 #t)))))
3464 (home-page "http://matplotlib.org")
3465 (synopsis "2D plotting library for Python")
3466 (description
3467 "Matplotlib is a Python 2D plotting library which produces publication
3468 quality figures in a variety of hardcopy formats and interactive environments
3469 across platforms. Matplotlib can be used in Python scripts, the python and
3470 ipython shell, web application servers, and six graphical user interface
3471 toolkits.")
3472 (license license:psfl)
3473 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3474
3475 (define-public python2-matplotlib
3476 (let ((matplotlib (package-with-python2
3477 (strip-python2-variant python-matplotlib))))
3478 (package (inherit matplotlib)
3479 ;; Make sure to use special packages for Python 2 instead
3480 ;; of those automatically rewritten by package-with-python2.
3481 (propagated-inputs
3482 `(("python2-pycairo" ,python2-pycairo)
3483 ("python2-backports-functools-lru-cache"
3484 ,python2-backports-functools-lru-cache)
3485 ("python2-functools32" ,python2-functools32)
3486 ("python2-pygobject-2" ,python2-pygobject-2)
3487 ("python2-subprocess32" ,python2-subprocess32)
3488 ("python2-tkinter" ,python-2 "tk")
3489 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3490 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3491
3492 (define-public python-matplotlib-documentation
3493 (package
3494 (name "python-matplotlib-documentation")
3495 (version (package-version python-matplotlib))
3496 (source (package-source python-matplotlib))
3497 (build-system python-build-system)
3498 (native-inputs
3499 `(("python-matplotlib" ,python-matplotlib)
3500 ("python-colorspacious" ,python-colorspacious)
3501 ("python-sphinx" ,python-sphinx-1.6)
3502 ("python-sphinx-gallery" ,python-sphinx-gallery)
3503 ("python-numpydoc" ,python-numpydoc)
3504 ("python-ipython" ,python-ipython)
3505 ("python-mock" ,python-mock)
3506 ("graphviz" ,graphviz)
3507 ("texlive" ,texlive)
3508 ("texinfo" ,texinfo)
3509 ,@(package-native-inputs python-matplotlib)))
3510 (arguments
3511 `(#:tests? #f ; we're only generating documentation
3512 #:phases
3513 (modify-phases %standard-phases
3514 (replace 'build
3515 (lambda _
3516 (chdir "doc")
3517 ;; Produce pdf in 'A4' format.
3518 (substitute* "conf.py"
3519 (("latex_paper_size = 'letter'") "")
3520 ;; latex_paper_size is deprecated -> set paper size using
3521 ;; latex_elements
3522 (("latex_elements\\['pointsize'\\] = '11pt'" match)
3523 ;; insert at a point where latex_elements{} is defined:
3524 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
3525 (invoke "make" "SPHINXBUILD=sphinx-build" "html" "latex" "texinfo")))
3526 (replace 'install
3527 (lambda* (#:key inputs outputs #:allow-other-keys)
3528 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3529 (doc (string-append data "/doc/python-matplotlib-" ,version))
3530 (info (string-append data "/info"))
3531 (html (string-append doc "/html")))
3532 (mkdir-p html)
3533 (mkdir-p info)
3534 (copy-recursively "build/html" html)
3535 (symlink (string-append html "/_images")
3536 (string-append info "/matplotlib-figures"))
3537 (with-directory-excursion "build/texinfo"
3538 (substitute* "matplotlib.texi"
3539 (("@image\\{([^,]*)" all file)
3540 (string-append "@image{matplotlib-figures/" file)))
3541 (symlink (string-append html "/_images")
3542 "./matplotlib-figures")
3543 (system* "makeinfo" "--no-split"
3544 "-o" "matplotlib.info" "matplotlib.texi"))
3545 (copy-file "build/texinfo/matplotlib.info"
3546 (string-append info "/matplotlib.info"))
3547 (copy-file "build/latex/Matplotlib.pdf"
3548 (string-append doc "/Matplotlib.pdf")))
3549 #t)))))
3550 (home-page (package-home-page python-matplotlib))
3551 (synopsis "Documentation for the python-matplotlib package")
3552 (description (package-description python-matplotlib))
3553 (license (package-license python-matplotlib))))
3554
3555 (define-public python2-matplotlib-documentation
3556 (package-with-python2 python-matplotlib-documentation))
3557
3558 (define-public python2-pysnptools
3559 (package
3560 (name "python2-pysnptools")
3561 (version "0.3.9")
3562 (source
3563 (origin
3564 (method url-fetch)
3565 (uri (pypi-uri "pysnptools" version ".zip"))
3566 (sha256
3567 (base32
3568 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
3569 (build-system python-build-system)
3570 (arguments
3571 `(#:python ,python-2)) ; only Python 2.7 is supported
3572 (propagated-inputs
3573 `(("python2-numpy" ,python2-numpy)
3574 ("python2-scipy" ,python2-scipy)
3575 ("python2-pandas" ,python2-pandas)))
3576 (native-inputs
3577 `(("python2-cython" ,python2-cython)))
3578 (native-inputs
3579 `(("unzip" ,unzip)))
3580 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3581 (synopsis "Library for reading and manipulating genetic data")
3582 (description
3583 "PySnpTools is a library for reading and manipulating genetic data. It
3584 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3585 those files. It can also efficiently manipulate ranges of integers using set
3586 operators such as union, intersection, and difference.")
3587 (license license:asl2.0)))
3588
3589 (define-public python-rpy2
3590 (package
3591 (name "python-rpy2")
3592 (version "2.9.0")
3593 (source
3594 (origin
3595 (method url-fetch)
3596 (uri (pypi-uri "rpy2" version))
3597 (sha256
3598 (base32
3599 "0bqihjrdqwj5r1h86shvfb1p5hfr4a6klv1v54bzfr9r144w3rni"))))
3600 (build-system python-build-system)
3601 (arguments
3602 '(#:modules ((ice-9 ftw)
3603 (srfi srfi-1)
3604 (srfi srfi-26)
3605 (guix build utils)
3606 (guix build python-build-system))
3607 #:phases
3608 (modify-phases %standard-phases
3609 ;; Without this phase the test loader cannot find the directories, in
3610 ;; which it is supposed to look for test files.
3611 (add-after 'unpack 'fix-tests
3612 (lambda* (#:key outputs #:allow-other-keys)
3613 (substitute* "rpy/tests.py"
3614 (("loader.discover\\(")
3615 "loader.discover(rpy_root + '/' +"))
3616 #t))
3617 (replace 'check
3618 (lambda* (#:key outputs inputs #:allow-other-keys)
3619 (let ((cwd (getcwd)))
3620 (setenv "PYTHONPATH"
3621 (string-append cwd "/build/"
3622 (find (cut string-prefix? "lib" <>)
3623 (scandir (string-append cwd "/build")))
3624 ":"
3625 (getenv "PYTHONPATH"))))
3626 ;; FIXME: Even when all tests pass, the check phase will fail.
3627 (system* "python" "-m" "rpy2.tests" "-v"))))))
3628 (propagated-inputs
3629 `(("python-six" ,python-six)
3630 ("python-jinja2" ,python-jinja2)
3631 ("python-pytz" ,python-pytz)))
3632 (inputs
3633 `(("readline" ,readline)
3634 ("icu4c" ,icu4c)
3635 ("pcre" ,pcre)
3636 ("r-minimal" ,r-minimal)
3637 ("r-survival" ,r-survival)
3638 ("r-ggplot2" ,r-ggplot2)
3639 ("r-rsqlite" ,r-rsqlite)
3640 ("r-dplyr" ,r-dplyr)
3641 ("r-dbplyr" ,r-dbplyr)
3642 ("python-numpy" ,python-numpy)))
3643 (native-inputs
3644 `(("zlib" ,zlib)))
3645 (home-page "http://rpy.sourceforge.net/")
3646 (synopsis "Python interface to the R language")
3647 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3648 low-level interface to R from Python, a proposed high-level interface,
3649 including wrappers to graphical libraries, as well as R-like structures and
3650 functions.")
3651 ;; Any of these licenses can be picked for the R interface. The whole
3652 ;; project is released under GPLv2+ according to the license declaration
3653 ;; in "setup.py".
3654 (license (list license:mpl2.0 license:gpl2+ license:lgpl2.1+))))
3655
3656 (define-public python-scipy
3657 (package
3658 (name "python-scipy")
3659 (version "1.0.1")
3660 (source
3661 (origin
3662 (method url-fetch)
3663 (uri (pypi-uri "scipy" version))
3664 (sha256
3665 (base32
3666 "1fj0r7bg0cfk5clvl57ga06y9bfh05iwlv1dqqs1r6pd89wccfc7"))))
3667 (build-system python-build-system)
3668 (propagated-inputs
3669 `(("python-numpy" ,python-numpy)
3670 ("python-matplotlib" ,python-matplotlib)
3671 ("python-pyparsing" ,python-pyparsing)))
3672 (inputs
3673 `(("lapack" ,lapack)
3674 ("openblas" ,openblas)))
3675 (native-inputs
3676 `(("python-cython" ,python-cython)
3677 ("python-pytest" ,python-pytest)
3678 ("python-sphinx" ,python-sphinx)
3679 ("python-numpydoc" ,python-numpydoc)
3680 ("gfortran" ,gfortran)
3681 ("perl" ,perl)
3682 ("which" ,which)))
3683 (outputs '("out" "doc"))
3684 (arguments
3685 `(#:phases
3686 (modify-phases %standard-phases
3687 (add-before 'build 'configure-openblas
3688 (lambda* (#:key inputs #:allow-other-keys)
3689 (call-with-output-file "site.cfg"
3690 (lambda (port)
3691 (format port
3692 "[blas]
3693 libraries = openblas
3694 library_dirs = ~a/lib
3695 include_dirs = ~a/include
3696
3697 # backslash-n to make emacs happy
3698 \n[atlas]
3699 library_dirs = ~a/lib
3700 atlas_libs = openblas
3701 "
3702 (assoc-ref inputs "openblas")
3703 (assoc-ref inputs "openblas")
3704 (assoc-ref inputs "openblas"))))
3705 #t))
3706 (add-after 'install 'install-doc
3707 (lambda* (#:key inputs outputs #:allow-other-keys)
3708 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3709 (doc (string-append data "/doc/" ,name "-" ,version))
3710 (html (string-append doc "/html"))
3711 (pyver ,(string-append "PYVER=" (version-major+minor
3712 (package-version python))))
3713 ;; By default it tries to run sphinx-build through the Python
3714 ;; interpreter which won't work with our shell wrapper.
3715 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
3716 ;; Make installed package available for building the
3717 ;; documentation
3718 (add-installed-pythonpath inputs outputs)
3719 (with-directory-excursion "doc"
3720 ;; Fix generation of images for mathematical expressions.
3721 (substitute* (find-files "source" "conf\\.py")
3722 (("pngmath_use_preview = True")
3723 "pngmath_use_preview = False"))
3724 (mkdir-p html)
3725 (invoke "make" "html" pyver sphinxbuild)
3726 (with-directory-excursion "build/html"
3727 (for-each (lambda (file)
3728 (let* ((dir (dirname file))
3729 (tgt-dir (string-append html "/" dir)))
3730 (install-file file html)))
3731 (find-files "." ".*")))))
3732 #t))
3733 ;; Tests can only be run after the library has been installed and not
3734 ;; within the source directory.
3735 (delete 'check)
3736 (add-after 'install 'check
3737 (lambda* (#:key inputs outputs #:allow-other-keys)
3738 (add-installed-pythonpath inputs outputs)
3739 (with-directory-excursion "/tmp"
3740 (invoke "python" "-c"
3741 "import scipy; scipy.test('full', verbose=2)")))))))
3742 (home-page "https://www.scipy.org/")
3743 (synopsis "The Scipy library provides efficient numerical routines")
3744 (description "The SciPy library is one of the core packages that make up
3745 the SciPy stack. It provides many user-friendly and efficient numerical
3746 routines such as routines for numerical integration and optimization.")
3747 (properties `((python2-variant . ,(delay python2-scipy))))
3748 (license license:bsd-3)))
3749
3750 (define-public python2-scipy
3751 (package-with-python2
3752 (strip-python2-variant python-scipy)))
3753
3754 (define-public python-socksipy-branch
3755 (package
3756 (name "python-socksipy-branch")
3757 (version "1.01")
3758 (source
3759 (origin
3760 (method url-fetch)
3761 (uri (pypi-uri "SocksiPy-branch" version))
3762 (sha256
3763 (base32
3764 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3765 (build-system python-build-system)
3766 (arguments
3767 `(#:tests? #f)) ; There are no tests
3768 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3769 (synopsis "Python SOCKS module")
3770 (description
3771 "SocksiPy - A Python SOCKS client module. It provides a
3772 socket-like interface that supports connections to any TCP
3773 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3774 The original version was developed by Dan Haim, this is a
3775 branch created by Mario Vilas to address some open issues,
3776 as the original project seems to have been abandoned circa 2007.")
3777 (license license:bsd-3)))
3778
3779 (define-public python2-socksipy-branch
3780 (package-with-python2 python-socksipy-branch))
3781
3782 (define-public python-pycodestyle
3783 (package
3784 (name "python-pycodestyle")
3785 (version "2.4.0")
3786 (source
3787 (origin
3788 (method url-fetch)
3789 (uri (pypi-uri "pycodestyle" version))
3790 (sha256
3791 (base32
3792 "0fhy4vnlgpjq4qd1wdnl6pvdw7rah0ypmn8c9mkhz8clsndskz6b"))))
3793 (build-system python-build-system)
3794 (home-page "https://pycodestyle.readthedocs.io/")
3795 (synopsis "Python style guide checker")
3796 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3797 Python code against some of the style conventions in
3798 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3799 (license license:expat)))
3800
3801 (define-public python2-pycodestyle
3802 (package-with-python2 python-pycodestyle))
3803
3804 (define-public python-multidict
3805 (package
3806 (name "python-multidict")
3807 (version "4.2.0")
3808 (source
3809 (origin
3810 (method url-fetch)
3811 (uri (pypi-uri "multidict" version))
3812 (sha256
3813 (base32
3814 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
3815 (build-system python-build-system)
3816 (native-inputs
3817 `(("python-pytest" ,python-pytest)
3818 ("python-pytest-runner" ,python-pytest-runner)))
3819 (home-page "https://github.com/aio-libs/multidict/")
3820 (synopsis "Multidict implementation")
3821 (description "Multidict is dict-like collection of key-value pairs
3822 where key might be occurred more than once in the container.")
3823 (license license:asl2.0)))
3824
3825 (define-public python-orderedmultidict
3826 (package
3827 (name "python-orderedmultidict")
3828 (version "0.7.11")
3829 (source
3830 (origin
3831 (method url-fetch)
3832 (uri (pypi-uri "orderedmultidict" version))
3833 (sha256
3834 (base32
3835 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
3836 (build-system python-build-system)
3837 (arguments
3838 `(#:phases
3839 (modify-phases %standard-phases
3840 (add-after 'unpack 'fix-tests
3841 (lambda _
3842 ;; The package uses nosetest for running the tests.
3843 ;; Adding this initfile allows to run the test suite
3844 ;; without requiring nosetest.
3845 (zero? (system* "touch" "tests/__init__.py")))))))
3846 (propagated-inputs
3847 `(("python-six" ,python-six)))
3848 (native-inputs
3849 `(("python-pycodestyle" ,python-pycodestyle)))
3850 (home-page "https://github.com/gruns/orderedmultidict")
3851 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3852 (description "This package contains a library for ordered multivalue
3853 dictionaries. A multivalue dictionary is a dictionary that can store
3854 multiple values for the same key. An ordered multivalue dictionary is a
3855 multivalue dictionary that retains the order of insertions and deletions.")
3856 (license license:unlicense)))
3857
3858 (define-public python2-orderedmultidict
3859 (package-with-python2 python-orderedmultidict))
3860
3861 (define-public python-autopep8
3862 (package
3863 (name "python-autopep8")
3864 (version "1.3.5")
3865 (source
3866 (origin
3867 (method url-fetch)
3868 (uri (pypi-uri "autopep8" version))
3869 (sha256
3870 (base32
3871 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
3872 (build-system python-build-system)
3873 (propagated-inputs
3874 `(("python-pycodestyle" ,python-pycodestyle)))
3875 (home-page "https://github.com/hhatto/autopep8")
3876 (synopsis "Format Python code according to the PEP 8 style guide")
3877 (description
3878 "@code{autopep8} automatically formats Python code to conform to
3879 the PEP 8 style guide. It uses the pycodestyle utility to determine
3880 what parts of the code needs to be formatted. @code{autopep8} is
3881 capable of fixing most of the formatting issues that can be reported
3882 by pycodestyle.")
3883 (license (license:non-copyleft
3884 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
3885
3886 (define-public python2-autopep8
3887 (package-with-python2 python-autopep8))
3888
3889 (define-public python-distutils-extra
3890 (package
3891 (name "python-distutils-extra")
3892 (version "2.38")
3893 (source
3894 (origin
3895 (method url-fetch)
3896 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3897 version "/+download/python-distutils-extra-"
3898 version ".tar.gz"))
3899 (sha256
3900 (base32
3901 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3902 (build-system python-build-system)
3903 (home-page "https://launchpad.net/python-distutils-extra/")
3904 (synopsis "Enhancements to Python's distutils")
3905 (description
3906 "The python-distutils-extra module enables you to easily integrate
3907 gettext support, themed icons, and scrollkeeper-based documentation into
3908 Python's distutils.")
3909 (license license:gpl2)))
3910
3911 (define-public python2-distutils-extra
3912 (package-with-python2 python-distutils-extra))
3913
3914 (define-public python2-elib.intl
3915 (package
3916 (name "python2-elib.intl")
3917 (version "0.0.3")
3918 (source
3919 (origin
3920 ;; This project doesn't tag releases or publish tarballs, so we take
3921 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3922 (method git-fetch)
3923 (uri (git-reference
3924 (url "https://github.com/dieterv/elib.intl.git")
3925 (commit "d09997cfef")))
3926 (file-name (string-append name "-" version "-checkout"))
3927 (sha256
3928 (base32
3929 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3930 (build-system python-build-system)
3931 (arguments
3932 ;; incompatible with Python 3 (exception syntax)
3933 `(#:python ,python-2
3934 #:tests? #f))
3935 (home-page "https://github.com/dieterv/elib.intl")
3936 (synopsis "Enhanced internationalization for Python")
3937 (description
3938 "The elib.intl module provides enhanced internationalization (I18N)
3939 services for your Python modules and applications.")
3940 (license license:lgpl3+)))
3941
3942 (define-public python-olefile
3943 (package
3944 (name "python-olefile")
3945 (version "0.44")
3946 (source
3947 (origin
3948 (method url-fetch)
3949 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
3950 version ".tar.gz"))
3951 (file-name (string-append name "-" version ".tar.gz"))
3952 (sha256
3953 (base32
3954 "1wmxbrhyqjry2000zx0zdhqdqxhgi06nz7sbzjlh222q2zjv1gpj"))))
3955 (build-system python-build-system)
3956 (home-page
3957 "https://www.decalage.info/python/olefileio")
3958 (synopsis "Read and write Microsoft OLE2 files.")
3959 (description
3960 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
3961 Storage or Compound Document, Microsoft Office). It is an improved version of
3962 the OleFileIO module from PIL, the Python Image Library.")
3963 (license license:bsd-3)))
3964
3965 (define-public python2-olefile
3966 (package-with-python2 python-olefile))
3967
3968 (define-public python-pillow
3969 (package
3970 (name "python-pillow")
3971 (version "4.3.0")
3972 (source
3973 (origin
3974 (method url-fetch)
3975 (uri (pypi-uri "Pillow" version))
3976 (sha256
3977 (base32
3978 "09xmn7rl6840sli2iz1k3fgxfgmri2nqz6vkinmb9mgg8ifp2z59"))
3979 (patch-flags '("-p1" "--binary"))
3980 (patches (search-patches "python-pillow-fix-failing-tests.patch"))))
3981 (build-system python-build-system)
3982 (native-inputs
3983 `(("python-nose" ,python-nose)))
3984 (inputs
3985 `(("freetype" ,freetype)
3986 ("lcms" ,lcms)
3987 ("zlib" ,zlib)
3988 ("libjpeg" ,libjpeg)
3989 ("openjpeg" ,openjpeg)
3990 ("libtiff" ,libtiff)
3991 ("libwebp" ,libwebp)))
3992 (propagated-inputs
3993 `(("python-olefile" ,python-olefile)))
3994 (arguments
3995 `(#:phases (modify-phases %standard-phases
3996 (add-after
3997 'install 'check-installed
3998 (lambda* (#:key outputs inputs #:allow-other-keys)
3999 (begin
4000 (setenv "HOME" (getcwd))
4001 ;; Make installed package available for running the
4002 ;; tests
4003 (add-installed-pythonpath inputs outputs)
4004 (and (zero? (system* "python" "selftest.py"
4005 "--installed"))
4006 (zero? (system* "python" "test-installed.py"))))))
4007 (delete 'check))))
4008 (home-page "https://pypi.python.org/pypi/Pillow")
4009 (synopsis "Fork of the Python Imaging Library")
4010 (description
4011 "The Python Imaging Library adds image processing capabilities to your
4012 Python interpreter. This library provides extensive file format support, an
4013 efficient internal representation, and fairly powerful image processing
4014 capabilities. The core image library is designed for fast access to data
4015 stored in a few basic pixel formats. It should provide a solid foundation for
4016 a general image processing tool.")
4017 (license (license:x11-style
4018 "http://www.pythonware.com/products/pil/license.htm"
4019 "The PIL Software License"))))
4020
4021 (define-public python2-pillow
4022 (package-with-python2 python-pillow))
4023
4024 (define-public python-pycparser
4025 (package
4026 (name "python-pycparser")
4027 (version "2.17")
4028 (source
4029 (origin
4030 (method url-fetch)
4031 (uri (pypi-uri "pycparser" version))
4032 (sha256
4033 (base32
4034 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
4035 (outputs '("out" "doc"))
4036 (build-system python-build-system)
4037 (native-inputs
4038 `(("pkg-config" ,pkg-config)))
4039 (arguments
4040 `(#:phases
4041 (modify-phases %standard-phases
4042 (replace 'check
4043 (lambda _
4044 (with-directory-excursion "tests"
4045 (zero? (system* "python" "all_tests.py")))))
4046 (add-after 'install 'install-doc
4047 (lambda* (#:key outputs #:allow-other-keys)
4048 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4049 (doc (string-append data "/doc/" ,name "-" ,version))
4050 (examples (string-append doc "/examples")))
4051 (mkdir-p examples)
4052 (for-each (lambda (file)
4053 (copy-file (string-append "." file)
4054 (string-append doc file)))
4055 '("/README.rst" "/CHANGES" "/LICENSE"))
4056 (copy-recursively "examples" examples)))))))
4057 (home-page "https://github.com/eliben/pycparser")
4058 (synopsis "C parser in Python")
4059 (description
4060 "Pycparser is a complete parser of the C language, written in pure Python
4061 using the PLY parsing library. It parses C code into an AST and can serve as
4062 a front-end for C compilers or analysis tools.")
4063 (license license:bsd-3)))
4064
4065 (define-public python2-pycparser
4066 (package-with-python2 python-pycparser))
4067
4068 (define-public python-xcffib
4069 (package
4070 (name "python-xcffib")
4071 (version "0.5.1")
4072 (source
4073 (origin
4074 (method url-fetch)
4075 (uri (pypi-uri "xcffib" version))
4076 (sha256
4077 (base32
4078 "09gbnmr5vn58mm8xi3fmd7fz6743cks6c46dphnxzwax6zsxmy60"))))
4079 (build-system python-build-system)
4080 (inputs
4081 `(("libxcb" ,libxcb)))
4082 (propagated-inputs
4083 `(("python-cffi" ,python-cffi) ; used at run time
4084 ("python-six" ,python-six)))
4085 (arguments
4086 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4087 #:tests? #f
4088 #:phases
4089 (modify-phases %standard-phases
4090 (add-after 'unpack 'fix-libxcb-path
4091 (lambda* (#:key inputs #:allow-other-keys)
4092 (let ((libxcb (assoc-ref inputs "libxcb")))
4093 (substitute* '("xcffib/__init__.py")
4094 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4095 #t)))
4096 (add-after 'install 'install-doc
4097 (lambda* (#:key outputs #:allow-other-keys)
4098 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4099 "/doc/" ,name "-" ,version)))
4100 (mkdir-p doc)
4101 (copy-file "README.md"
4102 (string-append doc "/README.md"))
4103 #t))))))
4104 (home-page "https://github.com/tych0/xcffib")
4105 (synopsis "XCB Python bindings")
4106 (description
4107 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4108 support for Python 3 and PyPy. It is based on cffi.")
4109 (license license:expat)))
4110
4111 (define-public python2-xcffib
4112 (package-with-python2 python-xcffib))
4113
4114 (define-public python-cairocffi
4115 (package
4116 (name "python-cairocffi")
4117 (version "0.8.0")
4118 (source
4119 (origin
4120 (method url-fetch)
4121 ;; The archive on pypi is missing the 'utils' directory!
4122 (uri (string-append "https://github.com/Kozea/cairocffi/archive/v"
4123 version ".tar.gz"))
4124 (file-name (string-append name "-" version ".tar.gz"))
4125 (sha256
4126 (base32
4127 "1rk2dvy3fxrga6bvvxc2fi5lbaynm5h4a0w0aaxyn3bc77rszjg9"))
4128 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4129 (build-system python-build-system)
4130 (outputs '("out" "doc"))
4131 (inputs
4132 `(("glib" ,glib)
4133 ("gtk+" ,gtk+)
4134 ("gdk-pixbuf" ,gdk-pixbuf)
4135 ("cairo" ,cairo)
4136 ("pango" ,pango)))
4137 (native-inputs
4138 `(("pkg-config" ,pkg-config)
4139 ("python-pytest" ,python-pytest)
4140 ("python-sphinx" ,python-sphinx)
4141 ("python-docutils" ,python-docutils)))
4142 (propagated-inputs
4143 `(("python-xcffib" ,python-xcffib))) ; used at run time
4144 (arguments
4145 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
4146 #:tests? #t
4147 #:phases
4148 (modify-phases %standard-phases
4149 (add-after 'unpack 'patch-paths
4150 (lambda* (#:key inputs outputs #:allow-other-keys)
4151 (substitute* (find-files "." "\\.py$")
4152 (("dlopen\\(ffi, 'cairo'")
4153 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4154 "/lib/libcairo.so.2'"))
4155 (("dlopen\\(ffi, 'gdk-3'")
4156 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4157 "/lib/libgtk-3.so.0'"))
4158 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4159 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4160 "/lib/libgdk_pixbuf-2.0.so.0'"))
4161 (("dlopen\\(ffi, 'glib-2.0'")
4162 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4163 "/lib/libglib-2.0.so.0'"))
4164 (("dlopen\\(ffi, 'gobject-2.0'")
4165 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4166 "/lib/libgobject-2.0.so.0'"))
4167 (("dlopen\\(ffi, 'pangocairo-1.0'")
4168 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4169 "/lib/libpangocairo-1.0.so.0'"))
4170 (("dlopen\\(ffi, 'pango-1.0'")
4171 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4172 "/lib/libpango-1.0.so.0'")))
4173 #t))
4174 (add-after 'install 'install-doc
4175 (lambda* (#:key inputs outputs #:allow-other-keys)
4176 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4177 (doc (string-append data "/doc/" ,name "-" ,version))
4178 (html (string-append doc "/html")))
4179 (setenv "LD_LIBRARY_PATH"
4180 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4181 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4182 (setenv "LANG" "en_US.UTF-8")
4183 (mkdir-p html)
4184 (for-each (lambda (file)
4185 (copy-file (string-append "." file)
4186 (string-append doc file)))
4187 '("/README.rst" "/CHANGES" "/LICENSE"))
4188 (system* "python" "setup.py" "build_sphinx")
4189 (copy-recursively "docs/_build/html" html)
4190 #t))))))
4191 (home-page "https://github.com/Kozea/cairocffi")
4192 (synopsis "Python bindings and object-oriented API for Cairo")
4193 (description
4194 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4195 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4196 graphics library with support for multiple backends including image buffers,
4197 PNG, PostScript, PDF, and SVG file output.")
4198 (license license:bsd-3)))
4199
4200 (define-public python2-cairocffi
4201 (package-with-python2 python-cairocffi))
4202
4203 (define-public python-decorator
4204 (package
4205 (name "python-decorator")
4206 (version "4.2.1")
4207 (source
4208 (origin
4209 (method url-fetch)
4210 (uri (pypi-uri "decorator" version))
4211 (sha256
4212 (base32 "03iaf116rm3w8b4agb8hzf6z9331mrvi4khfxq35zkx17sgxsikx"))))
4213 (build-system python-build-system)
4214 (arguments '(#:tests? #f)) ; no test target
4215 (home-page "https://pypi.python.org/pypi/decorator/")
4216 (synopsis "Python module to simplify usage of decorators")
4217 (description
4218 "The aim of the decorator module is to simplify the usage of decorators
4219 for the average programmer, and to popularize decorators usage giving examples
4220 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4221 etc. The core of this module is a decorator factory.")
4222 (license license:expat)))
4223
4224 (define-public python2-decorator
4225 (package-with-python2 python-decorator))
4226
4227 (define-public python-drmaa
4228 (package
4229 (name "python-drmaa")
4230 (version "0.7.7")
4231 (source
4232 (origin
4233 (method url-fetch)
4234 (uri (pypi-uri "drmaa" version))
4235 (sha256
4236 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4237 (build-system python-build-system)
4238 ;; The test suite requires libdrmaa which is provided by the cluster
4239 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4240 ;; should be set to the path of the libdrmaa library.
4241 (arguments '(#:tests? #f))
4242 (native-inputs
4243 `(("python-nose" ,python-nose)))
4244 (home-page "https://pypi.python.org/pypi/drmaa")
4245 (synopsis "Python bindings for the DRMAA library")
4246 (description
4247 "A Python package for Distributed Resource Management (DRM) job
4248 submission and control. This package is an implementation of the DRMAA 1.0
4249 Python language binding specification.")
4250 (license license:bsd-3)))
4251
4252 (define-public python2-drmaa
4253 (package-with-python2 python-drmaa))
4254
4255 (define-public python-grako
4256 (package
4257 (name "python-grako")
4258 (version "3.99.9")
4259 (source
4260 (origin
4261 (method url-fetch)
4262 (uri
4263 (pypi-uri "grako" version ".zip"))
4264 (sha256
4265 (base32
4266 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4267 (build-system python-build-system)
4268 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4269 (native-inputs
4270 `(("unzip" ,unzip)
4271 ("python-pytest" ,python-pytest)
4272 ("python-pytest-runner" ,python-pytest-runner)))
4273 (home-page "https://bitbucket.org/neogeny/grako")
4274 (synopsis "EBNF parser generator")
4275 (description
4276 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4277 memoizing PEG/Packrat parser in Python.")
4278 (license license:bsd-3)))
4279
4280 (define-public python2-grako
4281 (package-with-python2 python-grako))
4282
4283 (define-public python-gridmap
4284 (package
4285 (name "python-gridmap")
4286 (version "0.13.0")
4287 (source
4288 (origin
4289 (method url-fetch)
4290 (uri (string-append
4291 "https://github.com/pygridtools/gridmap/archive/v"
4292 version ".tar.gz"))
4293 (file-name (string-append name "-" version ".tar.gz"))
4294 (sha256
4295 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4296 (build-system python-build-system)
4297 (arguments
4298 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4299 (propagated-inputs
4300 `(("python-psutil" ,python-psutil)
4301 ("python-drmaa" ,python-drmaa)
4302 ("python-pyzmq" ,python-pyzmq)))
4303 (home-page "https://github.com/pygridtools/gridmap")
4304 (synopsis "Create jobs on a cluster directly from Python")
4305 (description
4306 "Gridmap is a Python package to allow you to easily create jobs on the
4307 cluster directly from Python. You can directly map Python functions onto the
4308 cluster without needing to write any wrapper code yourself.")
4309 (license license:gpl3+)))
4310
4311 (define-public python2-gridmap
4312 (package-with-python2 python-gridmap))
4313
4314 (define-public python-honcho
4315 (package
4316 (name "python-honcho")
4317 (version "1.0.1")
4318 (source
4319 (origin
4320 (method url-fetch)
4321 (uri (string-append
4322 "https://github.com/nickstenning/honcho/archive/v"
4323 version ".tar.gz"))
4324 (file-name (string-append name "-" version ".tar.gz"))
4325 (sha256
4326 (base32 "0zizn61n5z5hq421hkypk9pw8s6fpxw30f4hsg7k4ivwzy3gjw9j"))))
4327 (build-system python-build-system)
4328 (native-inputs
4329 `(("python-pytest" ,python-pytest)
4330 ("python-mock" ,python-mock)
4331 ("python-tox" ,python-tox)
4332 ("which" ,which))) ;for tests
4333 (propagated-inputs
4334 `(("python-jinja2" ,python-jinja2)))
4335 (arguments
4336 `(#:phases
4337 (modify-phases %standard-phases
4338 (delete 'check)
4339 (add-after 'install 'check
4340 (lambda* (#:key outputs inputs #:allow-other-keys)
4341 ;; fix honcho path in testsuite
4342 (substitute* "tests/conftest.py"
4343 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4344 "/bin/honcho" "'")))
4345 ;; It's easier to run tests after install.
4346 ;; Make installed package available for running the tests
4347 (add-installed-pythonpath inputs outputs)
4348 (zero? (system* "py.test" "-v")))))))
4349 (home-page "https://github.com/nickstenning/honcho")
4350 (synopsis "Manage Procfile-based applications")
4351 (description
4352 "A Procfile is a file which describes how to run an application
4353 consisting of serveral processes. honcho starts all listed processes.
4354 The output of all running processes is collected by honcho and
4355 displayed.")
4356 (license license:expat)))
4357
4358 (define-public python2-honcho
4359 (package-with-python2 python-honcho))
4360
4361 (define-public python-pexpect
4362 (package
4363 (name "python-pexpect")
4364 (version "4.2.1")
4365 (source
4366 (origin
4367 (method url-fetch)
4368 (uri (pypi-uri "pexpect" version))
4369 (sha256
4370 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
4371 (build-system python-build-system)
4372 (arguments
4373 `(#:phases
4374 (modify-phases %standard-phases
4375 (add-before 'check 'prepare-tests
4376 (lambda _
4377 (substitute* (find-files "tests")
4378 (("/bin/ls") (which "ls"))
4379 (("/bin/echo") (which "echo"))
4380 (("/bin/which") (which "which"))
4381 ;; Many tests try to use the /bin directory which
4382 ;; is not present in the build environment.
4383 ;; Use one that's non-empty and unlikely to change.
4384 (("/bin'") "/dev'"))
4385 ;; XXX: Socket connection test gets "Connection reset by peer".
4386 ;; Why does it not work? Delete for now.
4387 (delete-file "tests/test_socket.py")
4388 #t))
4389 (replace 'check (lambda _ (zero? (system* "nosetests" "-v")))))))
4390 (native-inputs
4391 `(("python-nose" ,python-nose)
4392 ("python-pytest" ,python-pytest)
4393 ("man-db" ,man-db)
4394 ("which" ,which)
4395 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4396 (propagated-inputs
4397 `(("python-ptyprocess" ,python-ptyprocess)))
4398 (home-page "http://pexpect.readthedocs.org/")
4399 (synopsis "Controlling interactive console applications")
4400 (description
4401 "Pexpect is a pure Python module for spawning child applications;
4402 controlling them; and responding to expected patterns in their output.
4403 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4404 child application and control it as if a human were typing commands.")
4405 (license license:isc)))
4406
4407 (define-public python2-pexpect
4408 (package-with-python2 python-pexpect))
4409
4410 (define-public python-setuptools-scm
4411 (package
4412 (name "python-setuptools-scm")
4413 (version "1.15.6")
4414 (source (origin
4415 (method url-fetch)
4416 (uri (pypi-uri "setuptools_scm" version))
4417 (sha256
4418 (base32
4419 "0pzvfmx8s20yrgkgwfbxaspz2x1g38qv61jpm0ns91lrb22ldas9"))))
4420 (build-system python-build-system)
4421 (home-page "https://github.com/pypa/setuptools_scm/")
4422 (synopsis "Manage Python package versions in SCM metadata")
4423 (description
4424 "Setuptools_scm handles managing your Python package versions in
4425 @dfn{software configuration management} (SCM) metadata instead of declaring
4426 them as the version argument or in a SCM managed file.")
4427 (license license:expat)))
4428
4429 (define-public python2-setuptools-scm
4430 (package-with-python2 python-setuptools-scm))
4431
4432 (define-public python-pathpy
4433 (package
4434 (name "python-pathpy")
4435 (version "11.0.1")
4436 (source
4437 (origin
4438 (method url-fetch)
4439 (uri (pypi-uri "path.py" version))
4440 (sha256
4441 (base32 "07x15v8c7ry9bvycw294c9yq6ky9v2b0dalvgi6rn38ilh69vsz7"))))
4442 ;; (outputs '("out" "doc"))
4443 (build-system python-build-system)
4444 (propagated-inputs
4445 `(("python-appdirs" ,python-appdirs)))
4446 (native-inputs
4447 `(("python-setuptools-scm" ,python-setuptools-scm)
4448 ("python-sphinx" ,python-sphinx)
4449 ("python-rst.linker" ,python-rst.linker)
4450 ("python-pytest" ,python-pytest)
4451 ("python-pytest-runner" ,python-pytest-runner)))
4452 (arguments
4453 ;; FIXME: Documentation and tests require "jaraco.packaging".
4454 `(#:tests? #f))
4455 ;; #:phases
4456 ;; (modify-phases %standard-phases
4457 ;; (add-after 'build 'build-doc
4458 ;; (lambda _
4459 ;; (setenv "LANG" "en_US.UTF-8")
4460 ;; (zero? (system* "python" "setup.py" "build_sphinx"))))
4461 ;; (add-after 'install 'install-doc
4462 ;; (lambda* (#:key outputs #:allow-other-keys)
4463 ;; (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4464 ;; (doc (string-append data "/doc/" ,name "-" ,version))
4465 ;; (html (string-append doc "/html")))
4466 ;; (mkdir-p html)
4467 ;; (for-each (lambda (file)
4468 ;; (copy-file file (string-append doc "/" file)))
4469 ;; '("README.rst" "CHANGES.rst"))
4470 ;; (copy-recursively "build/sphinx/html" html)))))))
4471 (home-page "https://github.com/jaraco/path.py")
4472 (synopsis "Python module wrapper for built-in os.path")
4473 (description
4474 "@code{path.py} implements path objects as first-class entities, allowing
4475 common operations on files to be invoked on those path objects directly.")
4476 (license license:expat)))
4477
4478 (define-public python2-pathpy
4479 (package-with-python2 python-pathpy))
4480
4481 (define-public python-simplegeneric
4482 (package
4483 (name "python-simplegeneric")
4484 (version "0.8.1")
4485 (source
4486 (origin
4487 (method url-fetch)
4488 (uri (string-append "https://pypi.python.org/packages/source/s/"
4489 "simplegeneric/simplegeneric-" version ".zip"))
4490 (sha256
4491 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4492 (build-system python-build-system)
4493 (native-inputs
4494 `(("unzip" ,unzip)))
4495 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4496 (synopsis "Python module for simple generic functions")
4497 (description
4498 "The simplegeneric module lets you define simple single-dispatch generic
4499 functions, akin to Python’s built-in generic functions like @code{len()},
4500 @code{iter()} and so on. However, instead of using specially-named methods,
4501 these generic functions use simple lookup tables, akin to those used by
4502 e.g. @code{pickle.dump()} and other generic functions found in the Python
4503 standard library.")
4504 (license license:zpl2.1)))
4505
4506 (define-public python2-simplegeneric
4507 (package-with-python2 python-simplegeneric))
4508
4509 (define-public python-ipython-genutils
4510 ;; TODO: This package is retired, check if can be removed, see description.
4511 (package
4512 (name "python-ipython-genutils")
4513 (version "0.1.0")
4514 (source
4515 (origin
4516 (method url-fetch)
4517 (uri (string-append "https://pypi.python.org/packages/source/i/"
4518 "ipython_genutils/ipython_genutils-"
4519 version ".tar.gz"))
4520 (sha256
4521 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4522 (build-system python-build-system)
4523 (arguments `(#:tests? #f)) ; no tests
4524 (home-page "https://ipython.org")
4525 (synopsis "Vestigial utilities from IPython")
4526 (description
4527 "This package provides retired utilities from IPython. No packages
4528 outside IPython/Jupyter should depend on it.
4529
4530 This package shouldn't exist. It contains some common utilities shared by
4531 Jupyter and IPython projects during The Big Split. As soon as possible, those
4532 packages will remove their dependency on this, and this package will go
4533 away.")
4534 (license license:bsd-3)))
4535
4536 (define-public python2-ipython-genutils
4537 (package-with-python2 python-ipython-genutils))
4538
4539 (define-public python-traitlets
4540 (package
4541 (name "python-traitlets")
4542 (version "4.2.0")
4543 (source
4544 (origin
4545 (method url-fetch)
4546 (uri (pypi-uri "traitlets" version))
4547 (sha256
4548 (base32
4549 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
4550 (build-system python-build-system)
4551 (arguments
4552 `(#:phases
4553 (modify-phases %standard-phases
4554 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4555 (propagated-inputs
4556 `(("python-ipython-genutils" ,python-ipython-genutils)
4557 ("python-decorator" ,python-decorator)))
4558 (native-inputs
4559 `(("python-mock" ,python-mock)
4560 ("python-nose" ,python-nose)))
4561 (home-page "https://ipython.org")
4562 (synopsis "Configuration system for Python applications")
4563 (description
4564 "Traitlets is a framework that lets Python classes have attributes with
4565 type checking, dynamically calculated default values, and ‘on change’
4566 callbacks. The package also includes a mechanism to use traitlets for
4567 configuration, loading values from files or from command line arguments. This
4568 is a distinct layer on top of traitlets, so you can use traitlets in your code
4569 without using the configuration machinery.")
4570 (license license:bsd-3)))
4571
4572 (define-public python2-traitlets
4573 (package-with-python2 python-traitlets))
4574
4575 (define-public python-jupyter-core
4576 (package
4577 (name "python-jupyter-core")
4578 (version "4.4.0")
4579 (source
4580 (origin
4581 (method url-fetch)
4582 (uri (string-append (pypi-uri "jupyter_core" version)))
4583 (sha256
4584 (base32
4585 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
4586 (build-system python-build-system)
4587 ;; FIXME: not sure how to run the tests
4588 (arguments `(#:tests? #f))
4589 (propagated-inputs
4590 `(("python-traitlets" ,python-traitlets)))
4591 (home-page "http://jupyter.org/")
4592 (synopsis "Jupyter base package")
4593 (description
4594 "Jupyter core is the base package on which Jupyter projects rely.")
4595 (license license:bsd-3)))
4596
4597 (define-public python2-jupyter-core
4598 (package-with-python2 python-jupyter-core))
4599
4600 (define-public python-jupyter-client
4601 (package
4602 (name "python-jupyter-client")
4603 (version "4.4.0")
4604 (source
4605 (origin
4606 (method url-fetch)
4607 (uri (pypi-uri "jupyter_client" version))
4608 (sha256
4609 (base32
4610 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4611 (build-system python-build-system)
4612 ;; Tests fail because of missing native python kernel which I assume is
4613 ;; provided by the ipython package, which we cannot use because it would
4614 ;; cause a dependency cycle.
4615 (arguments `(#:tests? #f))
4616 (propagated-inputs
4617 `(("python-pyzmq" ,python-pyzmq)
4618 ("python-traitlets" ,python-traitlets)
4619 ("python-jupyter-core" ,python-jupyter-core)))
4620 (home-page "http://jupyter.org/")
4621 (synopsis "Jupyter protocol implementation and client libraries")
4622 (description
4623 "The @code{jupyter_client} package contains the reference implementation
4624 of the Jupyter protocol. It also provides client and kernel management APIs
4625 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4626 installing @code{kernelspec}s for use with Jupyter frontends.")
4627 (license license:bsd-3)))
4628
4629 (define-public python2-jupyter-client
4630 (package-with-python2 python-jupyter-client))
4631
4632 (define-public python-ipykernel
4633 (package
4634 (name "python-ipykernel")
4635 (version "4.5.2")
4636 (source
4637 (origin
4638 (method url-fetch)
4639 (uri (pypi-uri "ipykernel" version))
4640 (sha256
4641 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
4642 (build-system python-build-system)
4643 ;; The tests load a submodule of IPython. However, IPython itself depends
4644 ;; on ipykernel.
4645 (arguments `(#:tests? #f))
4646 (propagated-inputs
4647 ;; imported at runtime during connect
4648 `(("python-jupyter-client" ,python-jupyter-client)))
4649 (home-page "https://ipython.org")
4650 (synopsis "IPython Kernel for Jupyter")
4651 (description
4652 "This package provides the IPython kernel for Jupyter.")
4653 (license license:bsd-3)))
4654
4655 (define-public python2-ipykernel
4656 (package-with-python2 python-ipykernel))
4657
4658 (define-public python-ipython
4659 (package
4660 (name "python-ipython")
4661 (version "5.5.0")
4662 (source
4663 (origin
4664 (method url-fetch)
4665 (uri (pypi-uri "ipython" version ".tar.gz"))
4666 (sha256
4667 (base32 "03qmzpfy00if10i9k8fjkam1s4xg22j73f933x5d228z9n4rwik6"))))
4668 (build-system python-build-system)
4669 (outputs '("out" "doc"))
4670 (propagated-inputs
4671 `(("python-pyzmq" ,python-pyzmq)
4672 ("python-prompt-toolkit" ,python-prompt-toolkit)
4673 ("python-terminado" ,python-terminado)
4674 ("python-matplotlib" ,python-matplotlib)
4675 ("python-numpy" ,python-numpy)
4676 ("python-numpydoc" ,python-numpydoc)
4677 ("python-jinja2" ,python-jinja2)
4678 ("python-jupyter-console"
4679 ;; The python-ipython and python-jupyter-console require each
4680 ;; other. To get the functionality in both packages working, strip
4681 ;; down the python-jupyter-console package when using it as an input
4682 ;; to python-ipython.
4683 ,python-jupyter-console-minimal)
4684 ("python-mistune" ,python-mistune)
4685 ("python-pexpect" ,python-pexpect)
4686 ("python-pickleshare" ,python-pickleshare)
4687 ("python-simplegeneric" ,python-simplegeneric)
4688 ("python-jsonschema" ,python-jsonschema)
4689 ("python-traitlets" ,python-traitlets)
4690 ("python-ipykernel" ,python-ipykernel)
4691 ("python-nbformat" ,python-nbformat)
4692 ("python-pygments" ,python-pygments)))
4693 (inputs
4694 `(("readline" ,readline)
4695 ("which" ,which)))
4696 (native-inputs
4697 `(("graphviz" ,graphviz)
4698 ("pkg-config" ,pkg-config)
4699 ("python-requests" ,python-requests) ;; for tests
4700 ("python-testpath" ,python-testpath)
4701 ("python-nose" ,python-nose)
4702 ("python-sphinx" ,python-sphinx)
4703 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
4704 ;; FIXME: It's possible that a smaller union would work just as well.
4705 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
4706 texlive-fonts-ec
4707 texlive-generic-ifxetex
4708 texlive-generic-pdftex
4709 texlive-latex-amsfonts
4710 texlive-latex-capt-of
4711 texlive-latex-cmap
4712 texlive-latex-environ
4713 texlive-latex-eqparbox
4714 texlive-latex-etoolbox
4715 texlive-latex-expdlist
4716 texlive-latex-fancyhdr
4717 texlive-latex-fancyvrb
4718 texlive-latex-fncychap
4719 texlive-latex-float
4720 texlive-latex-framed
4721 texlive-latex-geometry
4722 texlive-latex-graphics
4723 texlive-latex-hyperref
4724 texlive-latex-mdwtools
4725 texlive-latex-multirow
4726 texlive-latex-oberdiek
4727 texlive-latex-parskip
4728 texlive-latex-preview
4729 texlive-latex-tabulary
4730 texlive-latex-threeparttable
4731 texlive-latex-titlesec
4732 texlive-latex-trimspaces
4733 texlive-latex-ucs
4734 texlive-latex-upquote
4735 texlive-latex-url
4736 texlive-latex-varwidth
4737 texlive-latex-wrapfig)))
4738 ("texinfo" ,texinfo)))
4739 (arguments
4740 `(#:phases
4741 (modify-phases %standard-phases
4742 (add-after
4743 'install 'install-doc
4744 (lambda* (#:key inputs outputs #:allow-other-keys)
4745 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4746 (doc (string-append data "/doc/" ,name "-" ,version))
4747 (html (string-append doc "/html"))
4748 (man1 (string-append data "/man/man1"))
4749 (info (string-append data "/info"))
4750 (examples (string-append doc "/examples"))
4751 (python-arg (string-append "PYTHON=" (which "python"))))
4752 (setenv "LANG" "en_US.utf8")
4753 ;; Make installed package available for running the tests
4754 (add-installed-pythonpath inputs outputs)
4755 (with-directory-excursion "docs"
4756 ;; FIXME: pdf fails to build
4757 ;;(system* "make" "pdf" "PAPER=a4")
4758 (system* "make" python-arg "html")
4759 (system* "make" python-arg "info"))
4760 (copy-recursively "docs/man" man1)
4761 (copy-recursively "examples" examples)
4762 (copy-recursively "docs/build/html" html)
4763 ;; (copy-file "docs/build/latex/ipython.pdf"
4764 ;; (string-append doc "/ipython.pdf"))
4765 (mkdir-p info)
4766 (copy-file "docs/build/texinfo/ipython.info"
4767 (string-append info "/ipython.info"))
4768 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4769 ;; Tests can only be run after the library has been installed and not
4770 ;; within the source directory.
4771 (delete 'check)
4772 (add-after
4773 'install 'check
4774 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4775 (if tests?
4776 (with-directory-excursion "/tmp"
4777 ;; Make installed package available for running the tests
4778 (add-installed-pythonpath inputs outputs)
4779 (setenv "HOME" "/tmp/") ;; required by a test
4780 (zero? (system* (string-append (assoc-ref outputs "out")
4781 "/bin/iptest"))))
4782 #t)))
4783 (add-before
4784 'install 'fix-tests
4785 (lambda* (#:key inputs #:allow-other-keys)
4786 (substitute* "./IPython/utils/_process_posix.py"
4787 (("/usr/bin/env', 'which") (which "which")))
4788 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4789 (("#!/usr/bin/env python")
4790 (string-append "#!" (which "python"))))
4791 ;; Disable 1 failing test
4792 (substitute* "./IPython/core/tests/test_magic.py"
4793 (("def test_dirops\\(\\):" all)
4794 (string-append "@dec.skipif(True)\n" all))))))))
4795 (home-page "https://ipython.org")
4796 (synopsis "IPython is a tool for interactive computing in Python")
4797 (description
4798 "IPython provides a rich architecture for interactive computing with:
4799 Powerful interactive shells, a browser-based notebook, support for interactive
4800 data visualization, embeddable interpreters and tools for parallel
4801 computing.")
4802 (license license:bsd-3)
4803 (properties `((python2-variant . ,(delay python2-ipython))))))
4804
4805 (define-public python2-ipython
4806 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4807 (package
4808 (inherit ipython)
4809 ;; FIXME: add pyreadline once available.
4810 (propagated-inputs
4811 `(("python2-backports-shutil-get-terminal-size"
4812 ,python2-backports-shutil-get-terminal-size)
4813 ("python2-pathlib2" ,python2-pathlib2)
4814 ,@(package-propagated-inputs ipython)))
4815 (native-inputs
4816 `(("python2-mock" ,python2-mock)
4817 ,@(package-native-inputs ipython))))))
4818
4819 (define-public python-urwid
4820 (package
4821 (name "python-urwid")
4822 (version "2.0.1")
4823 (source
4824 (origin
4825 (method url-fetch)
4826 (uri (pypi-uri "urwid" version))
4827 (sha256
4828 (base32
4829 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
4830 (build-system python-build-system)
4831 (home-page "http://urwid.org")
4832 (synopsis "Console user interface library for Python")
4833 (description
4834 "Urwid is a curses-based UI/widget library for Python. It includes many
4835 features useful for text console applications.")
4836 (license license:lgpl2.1+)))
4837
4838 (define-public python2-urwid
4839 (package-with-python2 python-urwid))
4840
4841 (define-public python-urwidtrees
4842 (package
4843 (name "python-urwidtrees")
4844 (version "1.0.2")
4845 (source
4846 (origin
4847 (method url-fetch)
4848 ;; package author intends on distributing via github rather than pypi:
4849 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4850 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4851 version ".tar.gz"))
4852 (file-name (string-append name "-" version ".tar.gz"))
4853 (sha256
4854 (base32
4855 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
4856 (build-system python-build-system)
4857 (arguments
4858 '(#:tests? #f)) ; no tests
4859 (propagated-inputs `(("python-urwid" ,python-urwid)))
4860 (home-page "https://github.com/pazz/urwidtrees")
4861 (synopsis "Tree widgets for urwid")
4862 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4863 toolkit. Use it to build trees of widgets.")
4864 (license license:gpl3+)))
4865
4866 (define-public python2-urwidtrees
4867 (package-with-python2 python-urwidtrees))
4868
4869 (define-public python-dbus
4870 (package
4871 (name "python-dbus")
4872 (version "1.2.0")
4873 (source
4874 (origin
4875 (method url-fetch)
4876 (uri (string-append
4877 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
4878 version ".tar.gz"))
4879 (sha256
4880 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
4881 (build-system gnu-build-system)
4882 (arguments
4883 '(#:phases
4884 (modify-phases %standard-phases
4885 (add-before
4886 'check 'pre-check
4887 (lambda _
4888 ;; XXX: For the missing '/etc/machine-id'.
4889 (substitute* "test/run-test.sh"
4890 (("DBUS_FATAL_WARNINGS=1")
4891 "DBUS_FATAL_WARNINGS=0"))
4892 #t)))))
4893 (native-inputs
4894 `(("pkg-config" ,pkg-config)))
4895 (inputs
4896 `(("python" ,python)
4897 ("dbus-glib" ,dbus-glib)))
4898 (synopsis "Python bindings for D-bus")
4899 (description "python-dbus provides bindings for libdbus, the reference
4900 implementation of D-Bus.")
4901 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
4902 (license license:expat)))
4903
4904 (define-public python2-dbus
4905 (package (inherit python-dbus)
4906 (name "python2-dbus")
4907 (inputs `(("python" ,python-2)
4908 ,@(alist-delete "python"
4909 (package-inputs python-dbus)
4910 equal?)))
4911 ;; FIXME: on Python 2, the test_utf8 fails with:
4912 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4913 (arguments `(#:tests? #f))))
4914
4915 (define-public python-lxml
4916 (package
4917 (name "python-lxml")
4918 (version "3.8.0")
4919 (source
4920 (origin
4921 (method url-fetch)
4922 (uri (pypi-uri "lxml" version))
4923 (sha256
4924 (base32
4925 "15nvf6n285n282682qyw3wihsncb0x5amdhyi4b83bfa2nz74vvk"))))
4926 (build-system python-build-system)
4927 (inputs
4928 `(("libxml2" ,libxml2)
4929 ("libxslt" ,libxslt)))
4930 (home-page "http://lxml.de/")
4931 (synopsis
4932 "Python XML processing library")
4933 (description
4934 "The lxml XML toolkit is a Pythonic binding for the C libraries
4935 libxml2 and libxslt.")
4936 (license license:bsd-3))) ; and a few more, see LICENSES.txt
4937
4938 (define-public python2-lxml
4939 (package-with-python2 python-lxml))
4940
4941 ;; beautifulsoup4 has a totally different namespace than 3.x,
4942 ;; and pypi seems to put it under its own name, so I guess we should too
4943 (define-public python-beautifulsoup4
4944 (package
4945 (name "python-beautifulsoup4")
4946 (version "4.5.3")
4947 (source
4948 (origin
4949 (method url-fetch)
4950 (uri (pypi-uri "beautifulsoup4" version))
4951 (sha256
4952 (base32
4953 "0glaw1vyxnbp03fni7h5496n6iib0n5iim4gax1n0ngscs9s075j"))))
4954 (build-system python-build-system)
4955 (arguments
4956 `(#:phases
4957 (modify-phases %standard-phases
4958 ;; The Python 2 source is the definitive source of beautifulsoup4. We
4959 ;; must use this conversion script when building with Python 3. The
4960 ;; conversion script also runs the tests.
4961 ;; For more information, see the file 'convert-py3k' in the source
4962 ;; distribution.
4963 (replace 'check
4964 (lambda _ (zero? (system* "./convert-py3k")))))))
4965 (home-page
4966 "https://www.crummy.com/software/BeautifulSoup/bs4/")
4967 (synopsis
4968 "Python screen-scraping library")
4969 (description
4970 "Beautiful Soup is a Python library designed for rapidly setting up
4971 screen-scraping projects. It offers Pythonic idioms for navigating,
4972 searching, and modifying a parse tree, providing a toolkit for
4973 dissecting a document and extracting what you need. It automatically
4974 converts incoming documents to Unicode and outgoing documents to UTF-8.")
4975 (license license:expat)
4976 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
4977
4978 (define-public python2-beautifulsoup4
4979 (package
4980 (inherit (package-with-python2
4981 (strip-python2-variant python-beautifulsoup4)))
4982 (arguments `(#:python ,python-2))))
4983
4984 (define-public python-netifaces
4985 (package
4986 (name "python-netifaces")
4987 (version "0.10.7")
4988 (source
4989 (origin
4990 (method url-fetch)
4991 (uri (pypi-uri "netifaces" version))
4992 (sha256
4993 (base32
4994 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
4995 (build-system python-build-system)
4996 (home-page "https://github.com/al45tair/netifaces")
4997 (synopsis
4998 "Python module for portable network interface information")
4999 (description
5000 "Netifaces is a Python module providing information on network
5001 interfaces in an easy and portable manner.")
5002 (license license:expat)))
5003
5004 (define-public python2-netifaces
5005 (package-with-python2 python-netifaces))
5006
5007 (define-public python-networkx
5008 (package
5009 (name "python-networkx")
5010 (version "2.1")
5011 (source
5012 (origin
5013 (method url-fetch)
5014 (uri (pypi-uri "networkx" version ".zip"))
5015 (sha256
5016 (base32 "1ccb8mfz4m821k9y0cigkbq42q2sbb4dj5fbjshp0awp32j2q9v4"))))
5017 (build-system python-build-system)
5018 ;; python-decorator is needed at runtime
5019 (propagated-inputs
5020 `(("python-decorator" ,python-decorator)))
5021 (native-inputs
5022 `(("python-nose" ,python-nose)
5023 ("unzip" ,unzip)))
5024 (home-page "http://networkx.github.io/")
5025 (synopsis "Python module for creating and manipulating graphs and networks")
5026 (description
5027 "NetworkX is a Python package for the creation, manipulation, and study
5028 of the structure, dynamics, and functions of complex networks.")
5029 (license license:bsd-3)))
5030
5031 (define-public python2-networkx
5032 (package-with-python2 python-networkx))
5033
5034 ;; Define new package, because the current version of python-colormath does
5035 ;; not build against 2.0.
5036 (define-public python-networkx2
5037 (package (inherit python-networkx)
5038 (name "python-networkx2")
5039 (version "2.0")
5040 (source
5041 (origin
5042 (method url-fetch)
5043 (uri (pypi-uri "networkx" version ".zip"))
5044 (sha256
5045 (base32
5046 "1ajl2jp8qry9nyjzzkqpy0vmsr14d23z1qk7y0vr5iwjbpvzhpyd"))
5047 (patches
5048 (search-patches "python-networkx2-reproducible-build.patch"))))))
5049
5050 (define-public python2-networkx2
5051 (package-with-python2 python-networkx2))
5052
5053 (define-public python-datrie
5054 (package
5055 (name "python-datrie")
5056 (version "0.7.1")
5057 (source
5058 (origin
5059 (method url-fetch)
5060 (uri (pypi-uri "datrie" version))
5061 (sha256
5062 (base32
5063 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
5064 (build-system python-build-system)
5065 (native-inputs
5066 `(("python-cython" ,python-cython)
5067 ("python-hypothesis" ,python-hypothesis)
5068 ("python-pytest" ,python-pytest)
5069 ("python-pytest-runner" ,python-pytest-runner)))
5070 (home-page "https://github.com/kmike/datrie")
5071 (synopsis "Fast, efficiently stored trie for Python")
5072 (description
5073 "This package provides a fast, efficiently stored trie implementation for
5074 Python.")
5075 (license license:lgpl2.1+)))
5076
5077 (define-public snakemake
5078 (package
5079 (name "snakemake")
5080 (version "5.2.0")
5081 (source
5082 (origin
5083 (method url-fetch)
5084 (uri (pypi-uri "snakemake" version))
5085 (sha256
5086 (base32 "0a1i5v5qxbmmpznp7my9nva8y7pxp8pjrwk2gxgisdskg35sq8s1"))))
5087 (build-system python-build-system)
5088 (arguments
5089 ;; TODO: Package missing test dependencies.
5090 '(#:tests? #f
5091 #:phases
5092 (modify-phases %standard-phases
5093 ;; For cluster execution Snakemake will call Python. Since there is
5094 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5095 ;; this by calling the snakemake wrapper instead.
5096 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5097 (lambda* (#:key outputs #:allow-other-keys)
5098 (substitute* "snakemake/executors.py"
5099 (("\\{sys.executable\\} -m snakemake")
5100 (string-append (assoc-ref outputs "out")
5101 "/bin/snakemake")))
5102 #t)))))
5103 (propagated-inputs
5104 `(("python-wrapt" ,python-wrapt)
5105 ("python-requests" ,python-requests)
5106 ("python-appdirs" ,python-appdirs)
5107 ("python-configargparse" ,python-configargparse)
5108 ("python-datrie" ,python-datrie)
5109 ("python-docutils" ,python-docutils)
5110 ("python-jinja2" ,python-jinja2)
5111 ("python-jsonschema" ,python-jsonschema)
5112 ("python-networkx" ,python-networkx)
5113 ("python-pyyaml" ,python-pyyaml)
5114 ("python-ratelimiter" ,python-ratelimiter)))
5115 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
5116 (synopsis "Python-based execution environment for make-like workflows")
5117 (description
5118 "Snakemake aims to reduce the complexity of creating workflows by
5119 providing a clean and modern domain specific specification language (DSL) in
5120 Python style, together with a fast and comfortable execution environment.")
5121 (license license:expat)))
5122
5123 ;; This is currently needed for the pigx-* packages.
5124 (define-public snakemake-4
5125 (package (inherit snakemake)
5126 (version "4.4.0")
5127 (source
5128 (origin
5129 (method url-fetch)
5130 (uri (pypi-uri "snakemake" version))
5131 (sha256
5132 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5133 (propagated-inputs
5134 `(("python-wrapt" ,python-wrapt)
5135 ("python-requests" ,python-requests)
5136 ("python-appdirs" ,python-appdirs)
5137 ("python-configargparse" ,python-configargparse)
5138 ("python-pyyaml" ,python-pyyaml)
5139 ("python-ratelimiter" ,python-ratelimiter)))))
5140
5141 (define-public python-pyqrcode
5142 (package
5143 (name "python-pyqrcode")
5144 (version "1.2.1")
5145 (source
5146 (origin
5147 (method url-fetch)
5148 (uri (pypi-uri "PyQRCode" version))
5149 (sha256
5150 (base32
5151 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5152 (build-system python-build-system)
5153 (home-page
5154 "https://github.com/mnooner256/pyqrcode")
5155 (synopsis "QR code generator")
5156 (description
5157 "Pyqrcode is a QR code generator written purely in Python with
5158 SVG, EPS, PNG and terminal output.")
5159 (license license:bsd-3)))
5160
5161 (define-public python-seaborn
5162 (package
5163 (name "python-seaborn")
5164 (version "0.7.1")
5165 (source
5166 (origin
5167 (method url-fetch)
5168 (uri (pypi-uri "seaborn" version))
5169 (sha256
5170 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
5171 (build-system python-build-system)
5172 (arguments
5173 '(#:tests? #f)) ; Tests requires a running X11 server.
5174 (propagated-inputs
5175 `(("python-pandas" ,python-pandas)
5176 ("python-matplotlib" ,python-matplotlib)
5177 ("python-scipy" ,python-scipy)))
5178 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5179 (synopsis "Statistical data visualization")
5180 (description
5181 "Seaborn is a library for making attractive and informative statistical
5182 graphics in Python. It is built on top of matplotlib and tightly integrated
5183 with the PyData stack, including support for numpy and pandas data structures
5184 and statistical routines from scipy and statsmodels.")
5185 (license license:bsd-3)
5186 (properties `((python2-variant . ,(delay python2-seaborn))))))
5187
5188 (define-public python2-seaborn
5189 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5190 (package
5191 (inherit base)
5192 (propagated-inputs `(("python2-pytz" ,python2-pytz)
5193 ,@(package-propagated-inputs base))))))
5194
5195 (define-public python-mpmath
5196 (package
5197 (name "python-mpmath")
5198 (version "0.19")
5199 (source (origin
5200 (method url-fetch)
5201 (uri (string-append "http://mpmath.org/files/mpmath-"
5202 version ".tar.gz"))
5203 (sha256
5204 (base32
5205 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5206 (build-system python-build-system)
5207 (arguments
5208 '(#:phases
5209 (modify-phases %standard-phases
5210 (replace 'check
5211 (lambda _
5212 (zero?
5213 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
5214 (home-page "http://mpmath.org")
5215 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5216 (description
5217 "@code{mpmath} can be used as an arbitrary-precision substitute for
5218 Python's float/complex types and math/cmath modules, but also does much
5219 more advanced mathematics.")
5220 (license license:bsd-3)))
5221
5222 (define-public python2-mpmath
5223 (package-with-python2 python-mpmath))
5224
5225 (define-public python-bigfloat
5226 (package
5227 (name "python-bigfloat")
5228 (version "0.3.0")
5229 (source
5230 (origin
5231 (method url-fetch)
5232 (uri (pypi-uri "bigfloat" version))
5233 (sha256
5234 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
5235 (build-system python-build-system)
5236 (inputs
5237 `(("mpfr" ,mpfr)))
5238 (home-page "https://github.com/mdickinson/bigfloat")
5239 (synopsis "Arbitrary precision floating-point arithmetic for Python")
5240 (description
5241 "This packages provides a Python interface to the MPFR library for
5242 multiprecision arithmetic.")
5243 (license license:lgpl3+)))
5244
5245 (define-public python2-bigfloat
5246 (package-with-python2 python-bigfloat))
5247
5248 (define-public python-sympy
5249 (package
5250 (name "python-sympy")
5251 (version "1.1.1")
5252 (source
5253 (origin
5254 (method url-fetch)
5255 (uri (string-append
5256 "https://github.com/sympy/sympy/releases/download/sympy-"
5257 version "/sympy-" version ".tar.gz"))
5258 (sha256
5259 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
5260 (build-system python-build-system)
5261 (arguments
5262 `(#:phases
5263 (modify-phases %standard-phases
5264 ;; Run the core tests after installation. By default it would run
5265 ;; *all* tests, which take a very long time to complete and are known
5266 ;; to be flaky.
5267 (delete 'check)
5268 (add-after 'install 'check
5269 (lambda* (#:key outputs #:allow-other-keys)
5270 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
5271 #t)))))
5272 (propagated-inputs
5273 `(("python-mpmath" ,python-mpmath)))
5274 (home-page "http://www.sympy.org/")
5275 (synopsis "Python library for symbolic mathematics")
5276 (description
5277 "SymPy is a Python library for symbolic mathematics. It aims to become a
5278 full-featured computer algebra system (CAS) while keeping the code as simple
5279 as possible in order to be comprehensible and easily extensible.")
5280 (license license:bsd-3)))
5281
5282 (define-public python2-sympy
5283 (package
5284 (inherit (package-with-python2 python-sympy))
5285 (arguments
5286 `(#:phases
5287 (modify-phases %standard-phases
5288 ;; Run the core tests after installation. By default it would run
5289 ;; *all* tests, which take a very long time to complete and are known
5290 ;; to be flaky.
5291 (delete 'check)
5292 (add-after 'install 'check
5293 (lambda* (#:key outputs #:allow-other-keys)
5294 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
5295 #t)))))))
5296
5297 (define-public python-q
5298 (package
5299 (name "python-q")
5300 (version "2.6")
5301 (source
5302 (origin
5303 (method url-fetch)
5304 (uri (pypi-uri "q" version))
5305 (sha256
5306 (base32
5307 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5308 (build-system python-build-system)
5309 (home-page "https://github.com/zestyping/q")
5310 (synopsis "Quick-and-dirty debugging output for tired programmers")
5311 (description
5312 "q is a Python module for \"print\" style of debugging Python code. It
5313 provides convenient short API for print out of values, tracebacks, and
5314 falling into the Python interpreter.")
5315 (license license:asl2.0)))
5316
5317 (define-public python2-q
5318 (package-with-python2 python-q))
5319
5320 (define-public python2-xlib
5321 (package
5322 (name "python2-xlib")
5323 (version "0.14")
5324 (source (origin
5325 (method url-fetch)
5326 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5327 "/" version "/"
5328 "python-xlib-" version ".tar.gz"))
5329 (sha256
5330 (base32
5331 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5332 (build-system python-build-system)
5333 (arguments
5334 `(#:python ,python-2 ;Python 2 only
5335 #:tests? #f)) ;no tests
5336 (home-page "http://python-xlib.sourceforge.net/")
5337 (synopsis "Python X11 client library")
5338 (description
5339 "The Python X Library is intended to be a fully functional X client
5340 library for Python programs. It is useful to implement low-level X clients.
5341 It is written entirely in Python.")
5342 (license license:gpl2+)))
5343
5344 (define-public python-singledispatch
5345 (package
5346 (name "python-singledispatch")
5347 (version "3.4.0.3")
5348 (source
5349 (origin
5350 (method url-fetch)
5351 (uri (pypi-uri "singledispatch" version))
5352 (sha256
5353 (base32
5354 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5355 (build-system python-build-system)
5356 (native-inputs
5357 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5358 (home-page
5359 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5360 (synopsis "Backport of singledispatch feature from Python 3.4")
5361 (description
5362 "This library brings functools.singledispatch from Python 3.4 to Python
5363 2.6-3.3.")
5364 (license license:expat)))
5365
5366 (define-public python2-singledispatch
5367 (package-with-python2 python-singledispatch))
5368
5369 ;; the python- version can be removed with python-3.5
5370 (define-public python-backports-abc
5371 (package
5372 (name "python-backports-abc")
5373 (version "0.5")
5374 (source
5375 (origin
5376 (method url-fetch)
5377 (uri (pypi-uri "backports_abc" version))
5378 (sha256
5379 (base32
5380 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5381 (build-system python-build-system)
5382 (home-page "https://github.com/cython/backports_abc")
5383 (synopsis "Backport of additions to the 'collections.abc' module")
5384 (description
5385 "Python-backports-abc provides a backport of additions to the
5386 'collections.abc' module in Python-3.5.")
5387 (license license:psfl)))
5388
5389 (define-public python2-backports-abc
5390 (package-with-python2 python-backports-abc))
5391
5392 (define-public python-backports-csv
5393 (package
5394 (name "python-backports-csv")
5395 (version "1.0.5")
5396 (source
5397 (origin
5398 (method url-fetch)
5399 (uri (pypi-uri "backports.csv" version))
5400 (sha256
5401 (base32
5402 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
5403 (build-system python-build-system)
5404 (home-page "https://github.com/ryanhiebert/backports.csv")
5405 (synopsis "Backport of Python 3's csv module for Python 2")
5406 (description
5407 "Provides a backport of Python 3's @code{csv} module for parsing
5408 comma separated values. The API of the @code{csv} module in Python 2
5409 is drastically different from the @code{csv} module in Python 3.
5410 This is due, for the most part, to the difference between str in
5411 Python 2 and Python 3.")
5412 (license license:psfl)))
5413
5414 (define-public python2-backports-csv
5415 (package-with-python2 python-backports-csv))
5416
5417 (define-public python2-backports-shutil-get-terminal-size
5418 (package
5419 (name "python2-backports-shutil-get-terminal-size")
5420 (version "1.0.0")
5421 (source
5422 (origin
5423 (method url-fetch)
5424 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
5425 (sha256
5426 (base32
5427 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
5428 (build-system python-build-system)
5429 (arguments
5430 `(#:python ,python-2
5431 #:phases
5432 (modify-phases %standard-phases
5433 (replace 'check
5434 (lambda _
5435 (zero? (system* "py.test" "-v")))))))
5436 (native-inputs
5437 `(("python2-pytest" ,python2-pytest)))
5438 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
5439 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
5440 (description
5441 "This package provides a backport of the @code{get_terminal_size
5442 function} from Python 3.3's @code{shutil}.
5443 Unlike the original version it is written in pure Python rather than C,
5444 so it might be a tiny bit slower.")
5445 (license license:expat)))
5446
5447 (define-public python-waf
5448 (package
5449 (name "python-waf")
5450 (version "1.9.8")
5451 (source (origin
5452 (method url-fetch)
5453 (uri (string-append "https://waf.io/"
5454 "waf-" version ".tar.bz2"))
5455 (sha256
5456 (base32
5457 "0wl4cnmp06lfxqjxaan58bqxn27smhydz0sg5prrfbl3bsw4gv6q"))))
5458 (build-system python-build-system)
5459 (arguments
5460 '(#:phases
5461 (modify-phases %standard-phases
5462 (replace 'build
5463 (lambda _
5464 (invoke "python" "waf-light" "configure" "build")))
5465 (replace 'check
5466 (lambda _
5467 (invoke "python" "waf" "--version")))
5468 (replace 'install
5469 (lambda _
5470 (copy-file "waf" %output)
5471 #t)))))
5472 (home-page "https://waf.io/")
5473 (synopsis "Python-based build system")
5474 (description
5475 "Waf is a Python-based framework for configuring, compiling and installing
5476 applications.")
5477 (license license:bsd-3)))
5478
5479 (define-public python2-waf
5480 (package-with-python2 python-waf))
5481
5482 (define-public python-pyzmq
5483 (package
5484 (name "python-pyzmq")
5485 (version "15.1.0")
5486 (source
5487 (origin
5488 (method url-fetch)
5489 (uri (pypi-uri "pyzmq" version))
5490 (sha256
5491 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
5492 (build-system python-build-system)
5493 (arguments
5494 `(#:configure-flags
5495 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5496 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5497 ;; --inplace' for 'python setup.py test' to work.
5498 #:tests? #f))
5499 (inputs
5500 `(("zeromq" ,zeromq)))
5501 (native-inputs
5502 `(("pkg-config" ,pkg-config)
5503 ("python-nose" ,python-nose)))
5504 (home-page "https://github.com/zeromq/pyzmq")
5505 (synopsis "Python bindings for 0MQ")
5506 (description
5507 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5508 (license license:bsd-4)))
5509
5510 (define-public python2-pyzmq
5511 (package-with-python2 python-pyzmq))
5512
5513 (define-public python-pep8
5514 (package
5515 (name "python-pep8")
5516 (version "1.7.0")
5517 (source
5518 (origin
5519 (method url-fetch)
5520 (uri (pypi-uri "pep8" version))
5521 (sha256
5522 (base32
5523 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5524 (build-system python-build-system)
5525 (home-page "http://pep8.readthedocs.org/")
5526 (synopsis "Python style guide checker")
5527 (description
5528 "This tools checks Python code against some of the style conventions in
5529 PEP 8.")
5530 (license license:expat)))
5531
5532 (define-public python2-pep8
5533 (package-with-python2 python-pep8))
5534
5535 (define-public python-pyflakes
5536 (package
5537 (name "python-pyflakes")
5538 (version "2.0.0")
5539 (source
5540 (origin
5541 (method url-fetch)
5542 (uri (pypi-uri "pyflakes" version))
5543 (sha256
5544 (base32
5545 "0jba28czyvimdc72llms3f17swp3i8jdcabf5w0j00adfbn64xls"))))
5546 (build-system python-build-system)
5547 (home-page
5548 "https://github.com/pyflakes/pyflakes")
5549 (synopsis "Passive checker of Python programs")
5550 (description
5551 "Pyflakes statically checks Python source code for common errors.")
5552 (license license:expat)))
5553
5554 (define-public python2-pyflakes
5555 (package-with-python2 python-pyflakes))
5556
5557 (define-public python-mccabe
5558 (package
5559 (name "python-mccabe")
5560 (version "0.6.1")
5561 (source
5562 (origin
5563 (method url-fetch)
5564 (uri (pypi-uri "mccabe" version))
5565 (sha256
5566 (base32
5567 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
5568 (build-system python-build-system)
5569 (native-inputs
5570 `(("python-pytest" ,python-pytest-bootstrap)
5571 ("python-pytest-runner" ,python-pytest-runner)))
5572 (home-page "https://github.com/flintwork/mccabe")
5573 (synopsis "McCabe checker, plugin for flake8")
5574 (description
5575 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5576 complexity of Python source code.")
5577 (license license:expat)))
5578
5579 (define-public python2-mccabe
5580 (package-with-python2 python-mccabe))
5581
5582 (define-public python-mccabe-0.2.1
5583 (package (inherit python-mccabe)
5584 (version "0.2.1")
5585 (source
5586 (origin
5587 (method url-fetch)
5588 (uri (pypi-uri "mccabe" version))
5589 (sha256
5590 (base32
5591 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5592
5593 (define-public python2-mccabe-0.2.1
5594 (package-with-python2 python-mccabe-0.2.1))
5595
5596 ;; Flake8 2.4.1 requires an older version of pep8.
5597 ;; This should be removed ASAP.
5598 (define-public python-pep8-1.5.7
5599 (package (inherit python-pep8)
5600 (version "1.5.7")
5601 (source
5602 (origin
5603 (method url-fetch)
5604 (uri (string-append
5605 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5606 version
5607 ".tar.gz"))
5608 (sha256
5609 (base32
5610 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
5611 (arguments
5612 ;; XXX Tests not compatible with Python 3.5.
5613 '(#:tests? #f))))
5614
5615 (define-public python2-pep8-1.5.7
5616 (package-with-python2 python-pep8-1.5.7))
5617
5618 ;; Flake8 2.4.1 requires an older version of pyflakes.
5619 ;; This should be removed ASAP.
5620 (define-public python-pyflakes-0.8.1
5621 (package (inherit python-pyflakes)
5622 (version "0.8.1")
5623 (source
5624 (origin
5625 (method url-fetch)
5626 (uri (string-append
5627 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5628 version
5629 ".tar.gz"))
5630 (sha256
5631 (base32
5632 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
5633 (arguments
5634 ;; XXX Tests not compatible with Python 3.5.
5635 '(#:tests? #f))))
5636
5637 (define-public python2-pyflakes-0.8.1
5638 (package-with-python2 python-pyflakes-0.8.1))
5639
5640 (define-public python-flake8
5641 (package
5642 (name "python-flake8")
5643 (version "3.5.0")
5644 (source
5645 (origin
5646 (method url-fetch)
5647 (uri (pypi-uri "flake8" version))
5648 (sha256
5649 (base32
5650 "184b33grvvjmiwlv9kyd7yng9qv5ld24154j70z332xxg9gjclvj"))))
5651 (build-system python-build-system)
5652 (arguments
5653 `(#:phases
5654 (modify-phases %standard-phases
5655 (delete 'check)
5656 (add-after 'install 'check
5657 (lambda* (#:key inputs outputs #:allow-other-keys)
5658 (add-installed-pythonpath inputs outputs)
5659 (zero? (system* "pytest" "-v")))))))
5660 (propagated-inputs
5661 `(("python-pycodestyle" ,python-pycodestyle)
5662 ("python-pyflakes" ,python-pyflakes)
5663 ;; flake8 depends on a newer setuptools than provided by python.
5664 ("python-setuptools" ,python-setuptools)
5665 ("python-mccabe" ,python-mccabe)))
5666 (native-inputs
5667 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
5668 ("python-pytest" ,python-pytest-bootstrap)
5669 ("python-pytest-runner" ,python-pytest-runner)))
5670 (home-page "https://gitlab.com/pycqa/flake8")
5671 (synopsis
5672 "The modular source code checker: pep8, pyflakes and co")
5673 (description
5674 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5675 (properties `((python2-variant . ,(delay python2-flake8))))
5676 (license license:expat)))
5677
5678 (define-public python2-flake8
5679 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
5680 (package (inherit base)
5681 (propagated-inputs
5682 `(("python2-configparser" ,python2-configparser)
5683 ("python2-enum34" ,python2-enum34)
5684 ,@(package-propagated-inputs base))))))
5685
5686 ;; python-hacking requires flake8 <2.6.0.
5687 (define-public python-flake8-2.5
5688 (package
5689 (inherit python-flake8)
5690 (version "2.5.5")
5691 (source (origin
5692 (method url-fetch)
5693 (uri (pypi-uri "flake8" version))
5694 (sha256
5695 (base32
5696 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
5697 (propagated-inputs
5698 `(("python-pep8" ,python-pep8)
5699 ,@(package-propagated-inputs python-flake8)))
5700 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
5701
5702 (define-public python2-flake8-2.5
5703 (package
5704 (inherit python2-flake8)
5705 (version (package-version python-flake8-2.5))
5706 (source (origin
5707 (inherit (package-source python-flake8-2.5))))
5708 (propagated-inputs
5709 `(("python2-pep8" ,python2-pep8)
5710 ,@(package-propagated-inputs python2-flake8)))))
5711
5712 (define-public python-flake8-polyfill
5713 (package
5714 (name "python-flake8-polyfill")
5715 (version "1.0.2")
5716 (source
5717 (origin
5718 (method url-fetch)
5719 (uri (pypi-uri "flake8-polyfill" version))
5720 (sha256
5721 (base32
5722 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
5723 (build-system python-build-system)
5724 (arguments
5725 '(#:phases
5726 (modify-phases %standard-phases
5727 (replace 'check
5728 (lambda _
5729 (setenv "PYTHONPATH"
5730 (string-append (getcwd) "/build/lib:"
5731 (getenv "PYTHONPATH")))
5732 (zero? (system* "py.test" "-v")))))))
5733 (native-inputs
5734 `(("python-flake8" ,python-flake8)
5735 ("python-mock" ,python-mock)
5736 ("python-pep8" ,python-pep8)
5737 ("python-pycodestyle" ,python-pycodestyle)
5738 ("python-pytest" ,python-pytest)))
5739 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
5740 (synopsis "Polyfill package for Flake8 plugins")
5741 (description
5742 "This package that provides some compatibility helpers for Flake8
5743 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
5744 (license license:expat)))
5745
5746 (define-public python2-flake8-polyfill
5747 (package-with-python2 python-flake8-polyfill))
5748
5749 (define-public python-mistune
5750 (package
5751 (name "python-mistune")
5752 (version "0.8.3")
5753 (source
5754 (origin
5755 (method url-fetch)
5756 (uri (pypi-uri "mistune" version))
5757 (sha256
5758 (base32
5759 "06b662p6kf46wh2jsabaqhaq4bz1srh2zxkrnx4yg96azlxw645w"))))
5760 (build-system python-build-system)
5761 (native-inputs
5762 `(("python-nose" ,python-nose)
5763 ("python-cython" ,python-cython)))
5764 (home-page "https://github.com/lepture/mistune")
5765 (synopsis "Markdown parser in pure Python")
5766 (description "This package provides a fast markdown parser in pure
5767 Python.")
5768 (license license:bsd-3)))
5769
5770 (define-public python2-mistune
5771 (package-with-python2 python-mistune))
5772
5773 (define-public python-markdown
5774 (package
5775 (name "python-markdown")
5776 (version "2.6.11")
5777 (source
5778 (origin
5779 (method url-fetch)
5780 (uri (pypi-uri "Markdown" version))
5781 (sha256
5782 (base32
5783 "108g80ryzykh8bj0i7jfp71510wrcixdi771lf2asyghgyf8cmm8"))))
5784 (build-system python-build-system)
5785 (arguments
5786 `(#:phases
5787 (modify-phases %standard-phases
5788 (replace 'check
5789 (lambda _
5790 (zero? (system* "python" "run-tests.py")))))))
5791 (native-inputs
5792 `(("python-nose" ,python-nose)
5793 ("python-pyyaml" ,python-pyyaml)))
5794 (home-page "https://pythonhosted.org/Markdown/")
5795 (synopsis "Python implementation of Markdown")
5796 (description
5797 "This package provides a Python implementation of John Gruber's
5798 Markdown. The library features international input, various Markdown
5799 extensions, and several HTML output formats. A command line wrapper
5800 markdown_py is also provided to convert Markdown files to HTML.")
5801 (license license:bsd-3)))
5802
5803 (define-public python2-markdown
5804 (package-with-python2 python-markdown))
5805
5806 (define-public python-ptyprocess
5807 (package
5808 (name "python-ptyprocess")
5809 (version "0.5.2")
5810 (source
5811 (origin
5812 (method url-fetch)
5813 (uri (pypi-uri "ptyprocess" version))
5814 (sha256
5815 (base32
5816 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
5817 (build-system python-build-system)
5818 (native-inputs
5819 `(("python-nose" ,python-nose)))
5820 (arguments
5821 `(#:phases
5822 (modify-phases %standard-phases
5823 (replace 'check
5824 (lambda _
5825 (zero? (system* "nosetests")))))))
5826 (home-page "https://github.com/pexpect/ptyprocess")
5827 (synopsis "Run a subprocess in a pseudo terminal")
5828 (description
5829 "This package provides a Python library used to launch a subprocess in a
5830 pseudo terminal (pty), and interact with both the process and its pty.")
5831 (license license:isc)))
5832
5833 (define-public python2-ptyprocess
5834 (package-with-python2 python-ptyprocess))
5835
5836 (define-public python-cram
5837 (package
5838 (name "python-cram")
5839 (version "0.7")
5840 (home-page "https://bitheap.org/cram/")
5841 (source (origin
5842 (method url-fetch)
5843 (uri (list (string-append home-page "cram-"
5844 version ".tar.gz")
5845 (pypi-uri "cram" version)))
5846 (sha256
5847 (base32
5848 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
5849 (arguments
5850 '(#:phases
5851 (modify-phases %standard-phases
5852 (add-after 'unpack 'patch-source
5853 (lambda _
5854 (substitute* (find-files "cram" ".*\\.py$")
5855 ;; Replace default shell path.
5856 (("/bin/sh") (which "sh")))
5857 (substitute* (find-files "tests" ".*\\.t$")
5858 (("md5") "md5sum")
5859 (("/bin/bash") (which "bash"))
5860 (("/bin/sh") (which "sh")))
5861 (substitute* "cram/_test.py"
5862 ;; This hack works around a bug triggered by substituting
5863 ;; the /bin/sh paths. "tests/usage.t" compares the output of
5864 ;; "cram -h", which breaks the output at 80 characters. This
5865 ;; causes the line showing the default shell to break into two
5866 ;; lines, but the test expects a single line...
5867 (("env\\['COLUMNS'\\] = '80'")
5868 "env['COLUMNS'] = '160'"))
5869 #t))
5870 (delete 'check)
5871 (add-after 'install 'check
5872 ;; The test phase uses the built library and executable.
5873 ;; It's easier to run it after install since the build
5874 ;; directory contains version-specific PATH.
5875 (lambda* (#:key inputs outputs #:allow-other-keys)
5876 (add-installed-pythonpath inputs outputs)
5877 (setenv "PATH" (string-append (getenv "PATH") ":"
5878 (assoc-ref outputs "out") "/bin"))
5879 (zero? (system* "make" "test")))))))
5880 (build-system python-build-system)
5881 (native-inputs
5882 `(("python-coverage" ,python-coverage)
5883 ("which" ,which)))
5884 (synopsis "Simple testing framework for command line applications")
5885 (description
5886 "Cram is a functional testing framework for command line applications.
5887 Cram tests look like snippets of interactive shell sessions. Cram runs each
5888 command and compares the command output in the test with the command’s actual
5889 output.")
5890 (license license:gpl2+)))
5891
5892 (define-public python2-cram
5893 (package-with-python2 python-cram))
5894
5895 (define-public python-straight-plugin
5896 (package
5897 (name "python-straight-plugin")
5898 (version "1.4.1")
5899 (source
5900 (origin
5901 (method url-fetch)
5902 (uri (pypi-uri "straight.plugin" version))
5903 (sha256
5904 (base32
5905 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
5906 (build-system python-build-system)
5907 (home-page "https://github.com/ironfroggy/straight.plugin")
5908 (synopsis "Simple namespaced plugin facility")
5909 (description "Straight Plugin provides a type of plugin you can create from
5910 almost any existing Python modules, and an easy way for outside developers to
5911 add functionality and customization to your projects with their own plugins.")
5912 (license license:expat)))
5913
5914 (define-public python2-straight-plugin
5915 (package-with-python2 python-straight-plugin))
5916
5917 (define-public python-fonttools
5918 (package
5919 (name "python-fonttools")
5920 (version "3.28.0")
5921 (source (origin
5922 (method url-fetch)
5923 (uri (pypi-uri "fonttools" version ".zip"))
5924 (sha256
5925 (base32
5926 "0vsvjhidpb5kywpjgz1j3fywzkddxkb0afqai18qa3h6lqjyxwpb"))))
5927 (build-system python-build-system)
5928 (native-inputs
5929 `(("unzip" ,unzip)
5930 ("python-pytest" ,python-pytest)
5931 ("python-pytest-runner" ,python-pytest-runner)))
5932 (home-page "https://github.com/behdad/fonttools")
5933 (synopsis "Tools to manipulate font files")
5934 (description
5935 "FontTools/TTX is a library to manipulate font files from Python. It
5936 supports reading and writing of TrueType/OpenType fonts, reading and writing
5937 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5938 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5939 from an XML-based format.")
5940 (license license:expat)))
5941
5942 (define-public python2-fonttools
5943 (package-with-python2 python-fonttools))
5944
5945 (define-public python-ly
5946 (package
5947 (name "python-ly")
5948 (version "0.9.5")
5949 (source
5950 (origin
5951 (method url-fetch)
5952 (uri (pypi-uri name version))
5953 (sha256
5954 (base32
5955 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
5956 (build-system python-build-system)
5957 (arguments
5958 ;; FIXME: Some tests need network access.
5959 '(#:tests? #f))
5960 (synopsis "Tool and library for manipulating LilyPond files")
5961 (description "This package provides a Python library to parse, manipulate
5962 or create documents in LilyPond format. A command line program ly is also
5963 provided that can be used to do various manipulations with LilyPond files.")
5964 (home-page "https://pypi.python.org/pypi/python-ly")
5965 (license license:gpl2+)))
5966
5967 (define-public python-appdirs
5968 (package
5969 (name "python-appdirs")
5970 (version "1.4.3")
5971 (source
5972 (origin
5973 (method url-fetch)
5974 (uri (pypi-uri "appdirs" version))
5975 (sha256
5976 (base32
5977 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
5978 (build-system python-build-system)
5979 (home-page "https://github.com/ActiveState/appdirs")
5980 (synopsis
5981 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5982 (description
5983 "This module provides a portable way of finding out where user data
5984 should be stored on various operating systems.")
5985 (license license:expat)))
5986
5987 (define-public python2-appdirs
5988 (package-with-python2 python-appdirs))
5989
5990 (define-public python-llfuse
5991 (package
5992 (name "python-llfuse")
5993 (version "1.3.3")
5994 (source (origin
5995 (method url-fetch)
5996 (uri (pypi-uri "llfuse" version ".tar.bz2"))
5997 (sha256
5998 (base32
5999 "1rqww632y2zz71xmr6ch7yq80kvza9mhqr2z773k0d8l1lwzl575"))))
6000 (build-system python-build-system)
6001 (inputs
6002 `(("fuse" ,fuse)
6003 ("attr" ,attr)))
6004 (native-inputs
6005 `(("pkg-config" ,pkg-config)))
6006 (synopsis "Python bindings for FUSE")
6007 (description
6008 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6009 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6010 (license license:lgpl2.0+)
6011 (properties `((python2-variant . ,(delay python2-llfuse))))))
6012
6013 (define-public python2-llfuse
6014 (package (inherit (package-with-python2
6015 (strip-python2-variant python-llfuse)))
6016 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6017
6018 ;; For attic-0.16
6019 (define-public python-llfuse-0.41
6020 (package (inherit python-llfuse)
6021 (version "0.41.1")
6022 (source (origin
6023 (method url-fetch)
6024 (uri (string-append
6025 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6026 "llfuse-" version ".tar.bz2"))
6027 (sha256
6028 (base32
6029 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6030 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6031 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6032 (license (list license:expat license:lgpl2.0+))))
6033
6034 (define-public python-msgpack
6035 (package
6036 (name "python-msgpack")
6037 (version "0.5.6")
6038 (source (origin
6039 (method url-fetch)
6040 (uri (pypi-uri "msgpack" version))
6041 (sha256
6042 (base32
6043 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6044 (build-system python-build-system)
6045 (arguments
6046 `(#:modules ((guix build utils)
6047 (guix build python-build-system)
6048 (ice-9 ftw)
6049 (srfi srfi-1)
6050 (srfi srfi-26))
6051 #:phases
6052 (modify-phases %standard-phases
6053 (replace 'check
6054 (lambda _
6055 (let ((cwd (getcwd)))
6056 (setenv "PYTHONPATH"
6057 (string-append cwd "/build/"
6058 (find (cut string-prefix? "lib" <>)
6059 (scandir (string-append cwd "/build")))
6060 ":"
6061 (getenv "PYTHONPATH")))
6062 (invoke "pytest" "-v" "test")))))))
6063 (native-inputs
6064 `(("python-pytest" ,python-pytest)))
6065 (synopsis "MessagePack (de)serializer")
6066 (description "MessagePack is a fast, compact binary serialization format,
6067 suitable for similar data to JSON. This package provides CPython bindings for
6068 reading and writing MessagePack data.")
6069 (home-page "https://pypi.python.org/pypi/msgpack/")
6070 (license license:asl2.0)))
6071
6072 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6073 ;; release 0.5. Some packages like borg still call it by the old name for now.
6074 ;; <https://bugs.gnu.org/30662>
6075 (define-public python-msgpack-transitional
6076 (package
6077 (inherit python-msgpack)
6078 (name "python-msgpack-transitional")
6079 (arguments
6080 (substitute-keyword-arguments (package-arguments python-msgpack)
6081 ((#:phases phases)
6082 `(modify-phases ,phases
6083 (add-after 'unpack 'configure-transitional
6084 (lambda _
6085 ;; Keep using the old name.
6086 (substitute* "setup.py"
6087 (("TRANSITIONAL = False")
6088 "TRANSITIONAL = 1"))
6089 #t))))))))
6090
6091 (define-public python2-msgpack
6092 (package-with-python2 python-msgpack))
6093
6094 (define-public python-netaddr
6095 (package
6096 (name "python-netaddr")
6097 (version "0.7.19")
6098 (source
6099 (origin
6100 (method url-fetch)
6101 (uri (pypi-uri "netaddr" version))
6102 (sha256
6103 (base32
6104 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6105 (build-system python-build-system)
6106 (arguments `(#:tests? #f)) ;; No tests.
6107 (home-page "https://github.com/drkjam/netaddr/")
6108 (synopsis "Pythonic manipulation of network addresses")
6109 (description
6110 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6111 and MAC network addresses.")
6112 (license license:bsd-3)))
6113
6114 (define-public python2-netaddr
6115 (package-with-python2 python-netaddr))
6116
6117 (define-public python-wrapt
6118 (package
6119 (name "python-wrapt")
6120 (version "1.10.11")
6121 (source
6122 (origin
6123 (method url-fetch)
6124 (uri (pypi-uri "wrapt" version))
6125 (sha256
6126 (base32
6127 "1ip3dwib39xhp79kblskgvz3fjzcwxgx3fs3ahdixhpjg7a61mfl"))))
6128 (build-system python-build-system)
6129 (arguments
6130 ;; Tests are not included in the tarball, they are only available in the
6131 ;; git repository.
6132 `(#:tests? #f))
6133 (home-page "https://github.com/GrahamDumpleton/wrapt")
6134 (synopsis "Module for decorators, wrappers and monkey patching")
6135 (description
6136 "The aim of the wrapt module is to provide a transparent object proxy for
6137 Python, which can be used as the basis for the construction of function
6138 wrappers and decorator functions.")
6139 (license license:bsd-2)))
6140
6141 (define-public python2-wrapt
6142 (package-with-python2 python-wrapt))
6143
6144 (define-public python-xlrd
6145 (package
6146 (name "python-xlrd")
6147 (version "1.0.0")
6148 (source (origin
6149 (method url-fetch)
6150 (uri (pypi-uri "xlrd" version))
6151 (sha256
6152 (base32
6153 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6154 (build-system python-build-system)
6155 (arguments
6156 `(#:phases
6157 (modify-phases %standard-phases
6158 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6159 ;; run tests instead for now.
6160 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
6161 (native-inputs `(("python-nose" ,python-nose)))
6162 (home-page "http://www.python-excel.org/")
6163 (synopsis "Library for extracting data from Excel files")
6164 (description "This packages provides a library to extract data from
6165 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6166 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6167 Unicode-aware. It is not intended as an end-user tool.")
6168 (license license:bsd-3)))
6169
6170 (define-public python2-xlrd
6171 (package-with-python2 python-xlrd))
6172
6173 (define-public python-prettytable
6174 (package
6175 (name "python-prettytable")
6176 (version "0.7.2")
6177 (source
6178 (origin
6179 (method url-fetch)
6180 (uri (string-append
6181 "https://pypi.python.org/packages/source/P/PrettyTable/"
6182 "prettytable-" version ".tar.bz2"))
6183 (sha256
6184 (base32
6185 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6186 (build-system python-build-system)
6187 (home-page "http://code.google.com/p/prettytable/")
6188 (synopsis "Display tabular data in an ASCII table format")
6189 (description
6190 "A library designed to represent tabular data in visually appealing ASCII
6191 tables. PrettyTable allows for selection of which columns are to be printed,
6192 independent alignment of columns (left or right justified or centred) and
6193 printing of sub-tables by specifying a row range.")
6194 (license license:bsd-3)))
6195
6196 (define-public python2-prettytable
6197 (package-with-python2 python-prettytable))
6198
6199 (define-public python-tables
6200 (package
6201 (name "python-tables")
6202 (version "3.2.2")
6203 (source
6204 (origin
6205 (method url-fetch)
6206 (uri (pypi-uri "tables" version))
6207 (sha256
6208 (base32
6209 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
6210 (modules '((guix build utils)))
6211 (snippet
6212 '(begin
6213 ;; Remove pre-compiled .pyc files from source.
6214 (for-each delete-file-recursively
6215 (find-files "." "__pycache__" #:directories? #t))
6216 (for-each delete-file (find-files "." "\\.pyc$"))
6217 #t))))
6218 (build-system python-build-system)
6219 (arguments
6220 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6221 ;; or "check", so we must override the build and check phases.
6222 #:phases
6223 (modify-phases %standard-phases
6224 (add-after 'unpack 'use-gcc
6225 (lambda _
6226 (substitute* "setup.py"
6227 (("compiler = new_compiler\\(\\)" line)
6228 (string-append line
6229 "\ncompiler.set_executables(compiler='gcc',"
6230 "compiler_so='gcc',"
6231 "linker_exe='gcc',"
6232 "linker_so='gcc -shared')")))
6233 #t))
6234 (replace 'build
6235 (lambda* (#:key inputs #:allow-other-keys)
6236 (zero? (system* "python" "setup.py" "build"
6237 (string-append "--hdf5="
6238 (assoc-ref inputs "hdf5"))))))
6239 (replace 'check
6240 (lambda* (#:key inputs #:allow-other-keys)
6241 (zero? (system* "python" "setup.py" "check"
6242 (string-append "--hdf5="
6243 (assoc-ref inputs "hdf5")))))))))
6244 (propagated-inputs
6245 `(("python-numexpr" ,python-numexpr)
6246 ("python-numpy" ,python-numpy)))
6247 (native-inputs
6248 `(("python-cython" ,python-cython)
6249 ("pkg-config" ,pkg-config)))
6250 (inputs
6251 `(("hdf5" ,hdf5)
6252 ("bzip2" ,bzip2)
6253 ("zlib" ,zlib)))
6254 (home-page "http://www.pytables.org/")
6255 (synopsis "Hierarchical datasets for Python")
6256 (description "PyTables is a package for managing hierarchical datasets and
6257 designed to efficiently cope with extremely large amounts of data.")
6258 (license license:bsd-3)))
6259
6260 (define-public python2-tables
6261 (package-with-python2 python-tables))
6262
6263 (define-public python-pyasn1
6264 (package
6265 (name "python-pyasn1")
6266 (version "0.4.3")
6267 (source
6268 (origin
6269 (method url-fetch)
6270 (uri (pypi-uri "pyasn1" version))
6271 (sha256
6272 (base32
6273 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
6274 (build-system python-build-system)
6275 (home-page "http://pyasn1.sourceforge.net/")
6276 (synopsis "ASN.1 types and codecs")
6277 (description
6278 "This is an implementation of ASN.1 types and codecs in Python. It is
6279 suitable for a wide range of protocols based on the ASN.1 specification.")
6280 (license license:bsd-2)))
6281
6282 (define-public python2-pyasn1
6283 (package-with-python2 python-pyasn1))
6284
6285 (define-public python-pyasn1-modules
6286 (package
6287 (name "python-pyasn1-modules")
6288 (version "0.2.2")
6289 (source
6290 (origin
6291 (method url-fetch)
6292 (uri (pypi-uri "pyasn1-modules" version))
6293 (sha256
6294 (base32
6295 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
6296 (build-system python-build-system)
6297 (propagated-inputs
6298 `(("python-pyasn1" ,python-pyasn1)))
6299 (home-page "https://sourceforge.net/projects/pyasn1/")
6300 (synopsis "ASN.1 codec implementations")
6301 (description
6302 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6303 implementations of ASN.1-based codecs and protocols.")
6304 (license license:bsd-3)))
6305
6306 (define-public python2-pyasn1-modules
6307 (package-with-python2 python-pyasn1-modules))
6308
6309 (define-public python-ipaddress
6310 (package
6311 (name "python-ipaddress")
6312 (version "1.0.19")
6313 (source (origin
6314 (method url-fetch)
6315 (uri (pypi-uri "ipaddress" version))
6316 (sha256
6317 (base32
6318 "10agaa1cys1bk1ycpl2w8lky9vjx8h1xh1z29mg0niqx0638c390"))))
6319 (build-system python-build-system)
6320 (home-page "https://github.com/phihag/ipaddress")
6321 (synopsis "IP address manipulation library")
6322 (description
6323 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6324 in Python. This library is used to create, poke at, and manipulate IPv4 and
6325 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6326 module to older versions of Python.")
6327 (license license:psfl)))
6328
6329 (define-public python2-ipaddress
6330 (package-with-python2 python-ipaddress))
6331
6332 (define-public python2-ipaddr
6333 (package
6334 (name "python2-ipaddr")
6335 (version "2.1.11")
6336 (source
6337 (origin
6338 (method url-fetch)
6339 (uri (pypi-uri "ipaddr" version))
6340 (sha256
6341 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6342 (build-system python-build-system)
6343 (arguments
6344 `(#:python ,python-2 ;version 2 only
6345 #:phases
6346 (modify-phases %standard-phases
6347 (replace 'check
6348 (lambda* _
6349 (zero? (system* "python" "ipaddr_test.py")))))))
6350 (home-page "https://github.com/google/ipaddr-py")
6351 (synopsis "IP address manipulation library")
6352 (description
6353 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6354 IPv6 addresses and networks.
6355
6356 For new implementations you may prefer to use the standard module
6357 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
6358 versions of Python.")
6359 (license license:asl2.0)))
6360
6361 (define-public python-idna
6362 (package
6363 (name "python-idna")
6364 (version "2.6")
6365 (source
6366 (origin
6367 (method url-fetch)
6368 (uri (pypi-uri "idna" version))
6369 (sha256
6370 (base32
6371 "13qaab6d0s15gknz8v3zbcfmbj6v86hn9pjxgkdf62ch13imssic"))))
6372 (build-system python-build-system)
6373 (home-page "https://github.com/kjd/idna")
6374 (synopsis "Internationalized domain names in applications")
6375 (description
6376 "This is a library to support the Internationalised Domain Names in
6377 Applications (IDNA) protocol as specified in RFC 5891. This version of the
6378 protocol is often referred to as “IDNA2008” and can produce different results
6379 from the earlier standard from 2003. The library is also intended to act as a
6380 suitable drop-in replacement for the “encodings.idna” module that comes with
6381 the Python standard library but currently only supports the older 2003
6382 specification.")
6383 (license license:bsd-4)))
6384
6385 (define-public python2-idna
6386 (package-with-python2 python-idna))
6387
6388 (define-public python-idna-ssl
6389 (package
6390 (name "python-idna-ssl")
6391 (version "1.0.1")
6392 (source
6393 (origin
6394 (method url-fetch)
6395 (uri (pypi-uri "idna-ssl" version))
6396 (sha256
6397 (base32
6398 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
6399 (build-system python-build-system)
6400 (arguments
6401 `(#:tests? #f)) ;circular dependency with python-aiohttp
6402 (home-page "https://github.com/aio-libs/idna-ssl")
6403 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
6404 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
6405 domains support.")
6406 (license license:expat)))
6407
6408 (define-public python-pretend
6409 (package
6410 (name "python-pretend")
6411 (version "1.0.9")
6412 (source
6413 (origin
6414 (method url-fetch)
6415 (uri (string-append "https://pypi.python.org/packages/source/p/"
6416 "pretend/pretend-" version ".tar.gz"))
6417 (sha256
6418 (base32
6419 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
6420 (build-system python-build-system)
6421 (home-page "https://github.com/alex/pretend")
6422 (synopsis "Library for stubbing in Python")
6423 (description
6424 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6425 technique for writing tests. You may hear the term mixed up with mocks,
6426 fakes, or doubles. Basically, a stub is an object that returns pre-canned
6427 responses, rather than doing any computation.")
6428 (license license:bsd-3)))
6429
6430 (define-public python2-pretend
6431 (package-with-python2 python-pretend))
6432
6433 (define-public python-pip
6434 (package
6435 (name "python-pip")
6436 (version "9.0.1")
6437 (source
6438 (origin
6439 (method url-fetch)
6440 (uri (pypi-uri "pip" version))
6441 (sha256
6442 (base32
6443 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
6444 (build-system python-build-system)
6445 (arguments
6446 '(#:tests? #f)) ; there are no tests in the pypi archive.
6447 (home-page "https://pip.pypa.io/")
6448 (synopsis "Package manager for Python software")
6449 (description
6450 "Pip is a package manager for Python software, that finds packages on the
6451 Python Package Index (PyPI).")
6452 (license license:expat)))
6453
6454 (define-public python2-pip
6455 (package-with-python2 python-pip))
6456
6457 (define-public python-tlsh
6458 (package
6459 (name "python-tlsh")
6460 (version "3.4.4")
6461 (home-page "https://github.com/trendmicro/tlsh")
6462 (source (origin
6463 (method url-fetch)
6464 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6465 version ".tar.gz"))
6466 (sha256
6467 (base32
6468 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6469 (file-name (string-append name "-" version ".tar.gz"))))
6470 (build-system cmake-build-system)
6471 (arguments
6472 '(#:out-of-source? #f
6473 #:phases (modify-phases %standard-phases
6474 (replace
6475 'install
6476 (lambda* (#:key outputs #:allow-other-keys)
6477 ;; Build and install the Python bindings. The underlying
6478 ;; C++ library is apparently not meant to be installed.
6479 (let ((out (assoc-ref outputs "out")))
6480 (with-directory-excursion "py_ext"
6481 (and (system* "python" "setup.py" "build")
6482 (system* "python" "setup.py" "install"
6483 (string-append "--prefix=" out))))))))))
6484 (inputs `(("python" ,python-wrapper))) ;for the bindings
6485 (synopsis "Fuzzy matching library for Python")
6486 (description
6487 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6488 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6489 value which can be used for similarity comparisons. Similar objects have
6490 similar hash values, which allows for the detection of similar objects by
6491 comparing their hash values. The byte stream should have a sufficient amount
6492 of complexity; for example, a byte stream of identical bytes will not generate
6493 a hash value.")
6494 (license license:asl2.0)))
6495
6496 (define-public python2-tlsh
6497 (package
6498 (inherit python-tlsh)
6499 (name "python2-tlsh")
6500 (inputs `(("python" ,python-2)))))
6501
6502 (define-public python-termcolor
6503 (package
6504 (name "python-termcolor")
6505 (version "1.1.0")
6506 (source
6507 (origin
6508 (method url-fetch)
6509 (uri (pypi-uri "termcolor" version))
6510 (sha256
6511 (base32
6512 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6513 (build-system python-build-system)
6514 (arguments
6515 ;; There are no tests.
6516 `(#:tests? #f))
6517 (home-page "https://pypi.python.org/pypi/termcolor")
6518 (synopsis "ANSII Color formatting for terminal output")
6519 (description
6520 "This package provides ANSII Color formatting for output in terminals.")
6521 (license license:expat)))
6522
6523 (define-public python2-termcolor
6524 (package-with-python2 python-termcolor))
6525
6526 (define-public python-libarchive-c
6527 (package
6528 (name "python-libarchive-c")
6529 (version "2.2")
6530 (source (origin
6531 (method url-fetch)
6532 (uri (pypi-uri "libarchive-c" version))
6533 (sha256
6534 (base32
6535 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
6536 (build-system python-build-system)
6537 (arguments
6538 '(#:phases (modify-phases %standard-phases
6539 (add-before
6540 'build 'reference-libarchive
6541 (lambda* (#:key inputs #:allow-other-keys)
6542 ;; Retain the absolute file name of libarchive.so.
6543 (let ((libarchive (assoc-ref inputs "libarchive")))
6544 (substitute* "libarchive/ffi.py"
6545 (("find_library\\('archive'\\)")
6546 (string-append "'" libarchive
6547 "/lib/libarchive.so'")))))))))
6548 (inputs
6549 `(("libarchive" ,libarchive)))
6550 (home-page "https://github.com/Changaco/python-libarchive-c")
6551 (synopsis "Python interface to libarchive")
6552 (description
6553 "This package provides Python bindings to libarchive, a C library to
6554 access possibly compressed archives in many different formats. It uses
6555 Python's @code{ctypes} foreign function interface (FFI).")
6556 (license license:lgpl2.0+)))
6557
6558 (define-public python2-libarchive-c
6559 (package-with-python2 python-libarchive-c))
6560
6561 (define-public python-file
6562 (package
6563 (inherit file)
6564 (name "python-file")
6565 (build-system python-build-system)
6566 (arguments
6567 '(#:tests? #f ;no tests
6568 #:configure-flags '("--single-version-externally-managed" "--root=/")
6569 #:phases (modify-phases %standard-phases
6570 (add-before 'build 'change-directory
6571 (lambda _
6572 (chdir "python")
6573 #t))
6574 (add-before 'build 'set-library-file-name
6575 (lambda* (#:key inputs #:allow-other-keys)
6576 (let ((file (assoc-ref inputs "file")))
6577 (substitute* "magic.py"
6578 (("find_library\\('magic'\\)")
6579 (string-append "'" file "/lib/libmagic.so'")))
6580 #t))))))
6581 (inputs `(("file" ,file)))
6582 (self-native-input? #f)
6583 (synopsis "Python bindings to the libmagic file type guesser. Note that
6584 this module and the python-magic module both provide a \"magic.py\" file;
6585 these two modules, which are different and were developed separately, both
6586 serve the same purpose: provide Python bindings for libmagic.")))
6587
6588 (define-public python2-file
6589 (package-with-python2 python-file))
6590
6591 (define-public python-debian
6592 (package
6593 (name "python-debian")
6594 (version "0.1.28")
6595 (source
6596 (origin
6597 (method url-fetch)
6598 (uri (pypi-uri name version))
6599 (sha256
6600 (base32
6601 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
6602 (build-system python-build-system)
6603 (propagated-inputs
6604 `(("python-six" ,python-six)))
6605 (home-page "http://packages.debian.org/sid/python-debian")
6606 (synopsis "Debian package related modules")
6607 (description
6608 ;; XXX: Use @enumerate instead of @itemize to work around
6609 ;; <http://bugs.gnu.org/21772>.
6610 "This package provides Python modules that abstract many formats of
6611 Debian-related files, such as:
6612
6613 @enumerate
6614 @item Debtags information;
6615 @item @file{debian/changelog} files;
6616 @item packages files, pdiffs;
6617 @item control files of single or multiple RFC822-style paragraphs---e.g.
6618 @file{debian/control}, @file{.changes}, @file{.dsc};
6619 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6620 contained files and meta-information.
6621 @end enumerate\n")
6622
6623 ;; Modules are either GPLv2+ or GPLv3+.
6624 (license license:gpl3+)))
6625
6626 (define-public python2-debian
6627 (package-with-python2 python-debian))
6628
6629 (define-public python-nbformat
6630 (package
6631 (name "python-nbformat")
6632 (version "4.4.0")
6633 (source
6634 (origin
6635 (method url-fetch)
6636 (uri (pypi-uri "nbformat" version))
6637 (sha256
6638 (base32
6639 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
6640 (build-system python-build-system)
6641 (arguments `(#:tests? #f)) ; no test target
6642 (propagated-inputs
6643 `(("python-ipython-genutils" ,python-ipython-genutils)
6644 ("python-jsonschema" ,python-jsonschema)
6645 ("python-jupyter-core" ,python-jupyter-core)
6646 ("python-traitlets" ,python-traitlets)))
6647 (home-page "http://jupyter.org")
6648 (synopsis "Jupyter Notebook format")
6649 (description "This package provides the reference implementation of the
6650 Jupyter Notebook format and Python APIs for working with notebooks.")
6651 (license license:bsd-3)))
6652
6653 (define-public python2-nbformat
6654 (package-with-python2 python-nbformat))
6655
6656 (define-public python-bleach
6657 (package
6658 (name "python-bleach")
6659 (version "1.4.3")
6660 (source
6661 (origin
6662 (method url-fetch)
6663 (uri (pypi-uri "bleach" version))
6664 (sha256
6665 (base32
6666 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6667 (build-system python-build-system)
6668 (propagated-inputs
6669 `(("python-html5lib" ,python-html5lib-0.9)
6670 ("python-six" ,python-six)))
6671 (native-inputs
6672 `(("python-nose" ,python-nose)))
6673 (home-page "https://github.com/jsocol/bleach")
6674 (synopsis "Whitelist-based HTML-sanitizing tool")
6675 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6676 (license license:asl2.0)))
6677
6678 (define-public python2-bleach
6679 (package-with-python2 python-bleach))
6680
6681 (define-public python-entrypoints
6682 (package
6683 (name "python-entrypoints")
6684 (version "0.2.3")
6685 (source
6686 (origin
6687 (method url-fetch)
6688 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
6689 version ".tar.gz"))
6690 (file-name (string-append name "-" version ".tar.gz"))
6691 (sha256
6692 (base32
6693 "1pdvgfr5bxyvnfvxbsd3zi0dh3il71pc4k6rinx6zpps91b84a56"))))
6694 (build-system python-build-system)
6695 ;; The package does not come with a setup.py file, so we have to generate
6696 ;; one ourselves.
6697 (arguments
6698 `(#:tests? #f
6699 #:phases
6700 (modify-phases %standard-phases
6701 (add-after 'unpack 'create-setup.py
6702 (lambda _
6703 (call-with-output-file "setup.py"
6704 (lambda (port)
6705 (format port "\
6706 from setuptools import setup
6707 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6708 " ,version))))))))
6709 (home-page "https://github.com/takluyver/entrypoints")
6710 (synopsis "Discover and load entry points from installed Python packages")
6711 (description "Entry points are a way for Python packages to advertise
6712 objects with some common interface. The most common examples are
6713 @code{console_scripts} entry points, which define shell commands by
6714 identifying a Python function to run. The @code{entrypoints} module contains
6715 functions to find and load entry points.")
6716 (license license:expat)))
6717
6718 (define-public python2-entrypoints
6719 (package-with-python2 python-entrypoints))
6720
6721 (define-public python-nbconvert
6722 (package
6723 (name "python-nbconvert")
6724 (version "5.0.0b1")
6725 (source
6726 (origin
6727 (method url-fetch)
6728 (uri (pypi-uri "nbconvert" version))
6729 (sha256
6730 (base32
6731 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6732 (build-system python-build-system)
6733 (arguments
6734 `(;; The "bdist_egg" target is disabled by default, causing the installation
6735 ;; to fail.
6736 #:configure-flags (list "bdist_egg")
6737 ;; FIXME: 5 failures, 40 errors.
6738 #:tests? #f))
6739 ;; #:phases
6740 ;; (modify-phases %standard-phases
6741 ;; (replace 'check
6742 ;; (lambda _
6743 ;; (zero? (system* "py.test" "-v")))))
6744 (native-inputs
6745 `(("python-pytest" ,python-pytest)))
6746 (propagated-inputs
6747 `(("python-bleach" ,python-bleach)
6748 ("python-entrypoints" ,python-entrypoints)
6749 ("python-jinja2" ,python-jinja2)
6750 ("python-jupyter-core" ,python-jupyter-core)
6751 ("python-mistune" ,python-mistune)
6752 ("python-nbformat" ,python-nbformat)
6753 ("python-pygments" ,python-pygments)
6754 ("python-traitlets" ,python-traitlets)))
6755 (home-page "http://jupyter.org")
6756 (synopsis "Converting Jupyter Notebooks")
6757 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6758 notebooks to various other formats via Jinja templates. It allows you to
6759 convert an @code{.ipynb} notebook file into various static formats including:
6760
6761 @enumerate
6762 @item HTML
6763 @item LaTeX
6764 @item PDF
6765 @item Reveal JS
6766 @item Markdown (md)
6767 @item ReStructured Text (rst)
6768 @item executable script
6769 @end enumerate\n")
6770 (license license:bsd-3)))
6771
6772 (define-public python2-nbconvert
6773 (package-with-python2 python-nbconvert))
6774
6775 (define-public python-notebook
6776 (package
6777 (name "python-notebook")
6778 (version "4.2.3")
6779 (source (origin
6780 (method url-fetch)
6781 (uri (pypi-uri "notebook" version))
6782 (sha256
6783 (base32
6784 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
6785 (build-system python-build-system)
6786 (arguments
6787 `(#:phases
6788 (modify-phases %standard-phases
6789 (replace 'check
6790 (lambda _
6791 ;; HOME must be set for tests
6792 (setenv "HOME" "/tmp")
6793 (zero? (system* "nosetests")))))))
6794 (propagated-inputs
6795 `(("python-jupyter-core" ,python-jupyter-core)
6796 ("python-nbformat" ,python-nbformat)
6797 ("python-nbconvert" ,python-nbconvert)
6798 ("python-ipython" ,python-ipython)))
6799 (native-inputs
6800 `(("python-nose" ,python-nose)
6801 ("python-sphinx" ,python-sphinx)
6802 ("python-requests" ,python-requests)))
6803 (home-page "http://jupyter.org/")
6804 (synopsis "Web-based notebook environment for interactive computing")
6805 (description
6806 "The Jupyter HTML notebook is a web-based notebook environment for
6807 interactive computing.")
6808 (properties `((python2-variant . ,(delay python2-notebook))))
6809 (license license:bsd-3)))
6810
6811 (define-public python2-notebook
6812 (let ((base (package-with-python2
6813 (strip-python2-variant python-notebook))))
6814 (package (inherit base)
6815 (native-inputs
6816 `(("python2-mock" ,python2-mock)
6817 ,@(package-native-inputs base)))
6818 (arguments
6819 (substitute-keyword-arguments (package-arguments base)
6820 ((#:phases phases)
6821 `(modify-phases ,phases
6822 (add-before 'check 'disable-test-case
6823 ;; The test requires network access to localhost. Curiously it
6824 ;; fails with Python 2 only. Simply make the test-case return
6825 ;; immediately.
6826 (lambda _
6827 (substitute*
6828 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
6829 (("formats = self.nbconvert_api") "return #")))))))))))
6830
6831 (define-public python-widgetsnbextension
6832 (package
6833 (name "python-widgetsnbextension")
6834 (version "1.2.6")
6835 (source
6836 (origin
6837 (method url-fetch)
6838 (uri (pypi-uri "widgetsnbextension" version))
6839 (sha256
6840 (base32
6841 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
6842 (build-system python-build-system)
6843 (propagated-inputs
6844 `(("python-notebook" ,python-notebook)))
6845 (native-inputs
6846 `(("python-certifi" ,python-certifi)
6847 ("python-nose" ,python-nose)))
6848 (home-page "https://ipython.org")
6849 (synopsis "IPython HTML widgets for Jupyter")
6850 (description "This package provides interactive HTML widgets for Jupyter
6851 notebooks.")
6852 (license license:bsd-3)))
6853
6854 (define-public python2-widgetsnbextension
6855 (package-with-python2 python-widgetsnbextension))
6856
6857 (define-public python-ipywidgets
6858 (package
6859 (name "python-ipywidgets")
6860 (version "5.2.2")
6861 (source
6862 (origin
6863 (method url-fetch)
6864 (uri (pypi-uri "ipywidgets" version))
6865 (sha256
6866 (base32
6867 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
6868 (build-system python-build-system)
6869 ;; FIXME: it's not clear how to run the tests.
6870 (arguments `(#:tests? #f))
6871 (propagated-inputs
6872 `(("python-ipykernel" ,python-ipykernel)
6873 ("python-ipython" ,python-ipython)
6874 ("python-traitlets" ,python-traitlets)
6875 ("python-widgetsnbextension" ,python-widgetsnbextension)))
6876 (home-page "https://ipython.org")
6877 (synopsis "IPython HTML widgets for Jupyter")
6878 (description "Ipywidgets are interactive HTML widgets for Jupyter
6879 notebooks and the IPython kernel. Notebooks come alive when interactive
6880 widgets are used. Users gain control of their data and can visualize changes
6881 in the data.")
6882 (license license:bsd-3)))
6883
6884 (define-public python2-ipywidgets
6885 (package-with-python2 python-ipywidgets))
6886
6887 (define-public python-jupyter-console
6888 (package
6889 (name "python-jupyter-console")
6890 (version "5.2.0")
6891 (source
6892 (origin
6893 (method url-fetch)
6894 (uri (pypi-uri "jupyter_console" version))
6895 (sha256
6896 (base32
6897 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
6898 (build-system python-build-system)
6899 ;; FIXME: it's not clear how to run the tests.
6900 (arguments `(#:tests? #f))
6901 (propagated-inputs
6902 `(("python-ipykernel" ,python-ipykernel)
6903 ("python-ipython" ,python-ipython)
6904 ("python-jupyter-client" ,python-jupyter-client)
6905 ("python-prompt-toolkit" ,python-prompt-toolkit)
6906 ("python-pygments" ,python-pygments)))
6907 (home-page "https://jupyter.org")
6908 (synopsis "Jupyter terminal console")
6909 (description "This package provides a terminal-based console frontend for
6910 Jupyter kernels. It also allows for console-based interaction with non-Python
6911 Jupyter kernels such as IJulia and IRKernel.")
6912 (license license:bsd-3)))
6913
6914 (define-public python2-jupyter-console
6915 (package-with-python2 python-jupyter-console))
6916
6917 ;; The python-ipython and python-jupyter-console require each other. To get
6918 ;; the functionality in both packages working, strip down the
6919 ;; python-jupyter-console package when using it as an input to python-ipython.
6920 (define python-jupyter-console-minimal
6921 (package
6922 (inherit python-jupyter-console)
6923 (name "python-jupyter-console-minimal")
6924 (arguments
6925 (substitute-keyword-arguments
6926 (package-arguments python-jupyter-console)
6927 ((#:phases phases)
6928 `(modify-phases ,phases
6929 (add-after 'install 'delete-bin
6930 (lambda* (#:key outputs #:allow-other-keys)
6931 ;; Delete the bin files, to avoid conflicts in profiles
6932 ;; where python-ipython and python-jupyter-console are
6933 ;; both present.
6934 (delete-file-recursively
6935 (string-append
6936 (assoc-ref outputs "out") "/bin"))))))))
6937 ;; Remove the python-ipython propagated input, to avoid the cycle
6938 (propagated-inputs
6939 (alist-delete
6940 "python-ipython"
6941 (package-propagated-inputs python-jupyter-console)))))
6942
6943 (define-public jupyter
6944 (package
6945 (name "jupyter")
6946 (version "1.0.0")
6947 (source
6948 (origin
6949 (method url-fetch)
6950 (uri (pypi-uri "jupyter" version))
6951 (sha256
6952 (base32
6953 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
6954 (build-system python-build-system)
6955 ;; FIXME: it's not clear how to run the tests.
6956 (arguments `(#:tests? #f))
6957 (propagated-inputs
6958 `(("python-ipykernel" ,python-ipykernel)
6959 ("python-ipywidgets" ,python-ipywidgets)
6960 ("python-jupyter-console" ,python-jupyter-console)
6961 ("python-nbconvert" ,python-nbconvert)
6962 ("python-notebook" ,python-notebook)))
6963
6964 (native-search-paths
6965 (list (search-path-specification
6966 (variable "JUPYTER_PATH")
6967 (files '("share/jupyter")))))
6968
6969 (home-page "http://jupyter.org")
6970 (synopsis "Web application for interactive documents")
6971 (description
6972 "The Jupyter Notebook is a web application that allows you to create and
6973 share documents that contain live code, equations, visualizations and
6974 explanatory text. Uses include: data cleaning and transformation, numerical
6975 simulation, statistical modeling, machine learning and much more.")
6976 (license license:bsd-3)))
6977
6978 (define-public python-chardet
6979 (package
6980 (name "python-chardet")
6981 (version "3.0.4")
6982 (source
6983 (origin
6984 (method url-fetch)
6985 (uri (pypi-uri "chardet" version))
6986 (sha256
6987 (base32
6988 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
6989 (native-inputs
6990 `(("python-hypothesis" ,python-hypothesis)
6991 ("python-pytest" ,python-pytest)
6992 ("python-pytest-runner" ,python-pytest-runner)))
6993 (build-system python-build-system)
6994 (home-page "https://github.com/chardet/chardet")
6995 (synopsis "Universal encoding detector for Python 2 and 3")
6996 (description
6997 "This package provides @code{chardet}, a Python module that can
6998 automatically detect a wide range of file encodings.")
6999 (license license:lgpl2.1+)))
7000
7001 (define-public python2-chardet
7002 (package-with-python2 python-chardet))
7003
7004 (define-public python-docopt
7005 (package
7006 (name "python-docopt")
7007 (version "0.6.2")
7008 (source
7009 (origin
7010 (method url-fetch)
7011 ;; The release on PyPI does not include tests.
7012 (uri (string-append
7013 "https://github.com/docopt/docopt/archive/"
7014 version ".tar.gz"))
7015 (file-name (string-append name "-" version ".tar.gz"))
7016 (sha256
7017 (base32
7018 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7019 (build-system python-build-system)
7020 (native-inputs
7021 `(("python-pytest" ,python-pytest)))
7022 (arguments
7023 `(#:phases
7024 (modify-phases %standard-phases
7025 (replace 'check
7026 (lambda _ (zero? (system* "py.test")))))))
7027 (home-page "http://docopt.org")
7028 (synopsis "Command-line interface description language for Python")
7029 (description "This library allows the user to define a command-line
7030 interface from a program's help message rather than specifying it
7031 programatically with command-line parsers like @code{getopt} and
7032 @code{argparse}.")
7033 (license license:expat)))
7034
7035 (define-public python2-docopt
7036 (package-with-python2 python-docopt))
7037
7038 (define-public python-pythondialog
7039 (package
7040 (name "python-pythondialog")
7041 (version "3.4.0")
7042 (source
7043 (origin
7044 (method url-fetch)
7045 (uri (pypi-uri "pythondialog" version))
7046 (sha256
7047 (base32
7048 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7049 (build-system python-build-system)
7050 (arguments
7051 `(#:phases
7052 (modify-phases %standard-phases
7053 (add-after 'unpack 'patch-path
7054 (lambda* (#:key inputs #:allow-other-keys)
7055 (let* ((dialog (assoc-ref inputs "dialog")))
7056 ;; Since this library really wants to grovel the search path, we
7057 ;; must hardcode dialog's store path into it.
7058 (substitute* "dialog.py"
7059 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7060 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7061 #t))))
7062 #:tests? #f)) ; no test suite
7063 (propagated-inputs
7064 `(("dialog" ,dialog)))
7065 (home-page "http://pythondialog.sourceforge.net/")
7066 (synopsis "Python interface to the UNIX dialog utility")
7067 (description "A Python wrapper for the dialog utility. Its purpose is to
7068 provide an easy to use, pythonic and comprehensive Python interface to dialog.
7069 This allows one to make simple text-mode user interfaces on Unix-like systems")
7070 (license license:lgpl2.1)
7071 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7072
7073 (define-public python2-pythondialog
7074 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7075 (package
7076 (inherit base)
7077 (version (package-version python-pythondialog))
7078 (source (origin
7079 (method url-fetch)
7080 (uri (pypi-uri "python2-pythondialog" version))
7081 (sha256
7082 (base32
7083 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7084
7085 (define-public python-configobj
7086 (package
7087 (name "python-configobj")
7088 (version "5.0.6")
7089 (source (origin
7090 (method url-fetch)
7091 (uri (string-append
7092 "https://pypi.python.org/packages/source/c/configobj/"
7093 "configobj-" version ".tar.gz"))
7094 (sha256
7095 (base32
7096 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7097 ;; Patch setup.py so it looks for python-setuptools, which is
7098 ;; required to parse the keyword 'install_requires' in setup.py.
7099 (patches (search-patches "python-configobj-setuptools.patch"))))
7100 (build-system python-build-system)
7101 (propagated-inputs
7102 `(("python-six" ,python-six)))
7103 (synopsis "Config file reading, writing and validation")
7104 (description "ConfigObj is a simple but powerful config file reader and
7105 writer: an ini file round tripper. Its main feature is that it is very easy to
7106 use, with a straightforward programmer’s interface and a simple syntax for
7107 config files.")
7108 (home-page "https://github.com/DiffSK/configobj")
7109 (license license:bsd-3)))
7110
7111 (define-public python2-configobj
7112 (package-with-python2 python-configobj))
7113
7114 (define-public python-configargparse
7115 (package
7116 (name "python-configargparse")
7117 (version "0.12.0")
7118 (source (origin
7119 (method url-fetch)
7120 (uri (string-append
7121 "https://pypi.io/packages/source/C/ConfigArgParse/"
7122 "ConfigArgParse-" version ".tar.gz"))
7123 (sha256
7124 (base32
7125 "0fgkiqh6r3rbkdq3k8c48m85g52k96686rw3a6jg4lcncrkpvk98"))))
7126 (build-system python-build-system)
7127 (native-inputs
7128 `(("python-pyyaml" ,python-pyyaml)))
7129 (arguments
7130 `(#:phases
7131 (modify-phases %standard-phases
7132 (replace 'check
7133 (lambda _
7134 ;; Bypass setuptools-shim because one test relies on "setup.py"
7135 ;; being the first argument passed to the python call.
7136 ;;
7137 ;; NOTE: Many tests do not run because they rely on Python's
7138 ;; built-in test.test_argparse, but we remove the unit tests from
7139 ;; our Python installation.
7140 (zero? (system* "python" "setup.py" "test")))))))
7141 (synopsis "Replacement for argparse")
7142 (description "A drop-in replacement for argparse that allows options to also
7143 be set via config files and/or environment variables.")
7144 (home-page "https://github.com/bw2/ConfigArgParse")
7145 (license license:expat)))
7146
7147 (define-public python2-configargparse
7148 (package-with-python2 python-configargparse))
7149
7150 (define-public python-contextlib2
7151 (package
7152 (name "python-contextlib2")
7153 (version "0.4.0")
7154 (source
7155 (origin
7156 (method url-fetch)
7157 (uri (pypi-uri "contextlib2" version))
7158 (sha256
7159 (base32
7160 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7161 (build-system python-build-system)
7162 (arguments
7163 `(#:phases
7164 (modify-phases %standard-phases
7165 (replace 'check
7166 (lambda _ (zero?
7167 (system*
7168 "python" "test_contextlib2.py" "-v")))))))
7169 (home-page "http://contextlib2.readthedocs.org/")
7170 (synopsis "Tools for decorators and context managers")
7171 (description "This module is primarily a backport of the Python
7172 3.2 contextlib to earlier Python versions. Like contextlib, it
7173 provides utilities for common tasks involving decorators and context
7174 managers. It also contains additional features that are not part of
7175 the standard library.")
7176 (license license:psfl)))
7177
7178 (define-public python2-contextlib2
7179 (package-with-python2 python-contextlib2))
7180
7181 (define-public python-texttable
7182 (package
7183 (name "python-texttable")
7184 (version "0.8.7")
7185 (source
7186 (origin
7187 (method url-fetch)
7188 (uri (pypi-uri "texttable" version))
7189 (sha256
7190 (base32
7191 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
7192 (build-system python-build-system)
7193 (arguments '(#:tests? #f)) ; no tests
7194 (home-page "https://github.com/foutaise/texttable/")
7195 (synopsis "Python module for creating simple ASCII tables")
7196 (description "Texttable is a Python module for creating simple ASCII
7197 tables.")
7198 (license license:lgpl2.1+)))
7199
7200 (define-public python2-texttable
7201 (package-with-python2 python-texttable))
7202
7203 (define-public python-atomicwrites
7204 (package
7205 (name "python-atomicwrites")
7206 (version "1.1.5")
7207 (source (origin
7208 (method url-fetch)
7209 (uri (pypi-uri "atomicwrites" version))
7210 (sha256
7211 (base32
7212 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
7213 (build-system python-build-system)
7214 (synopsis "Atomic file writes in Python")
7215 (description "Library for atomic file writes using platform dependent tools
7216 for atomic file system operations.")
7217 (home-page "https://github.com/untitaker/python-atomicwrites")
7218 (license license:expat)))
7219
7220 (define-public python2-atomicwrites
7221 (package-with-python2 python-atomicwrites))
7222
7223 (define-public python-click-threading
7224 (package
7225 (name "python-click-threading")
7226 (version "0.4.4")
7227 (source (origin
7228 (method url-fetch)
7229 (uri (pypi-uri "click-threading" version))
7230 (sha256
7231 (base32
7232 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
7233 (build-system python-build-system)
7234 (propagated-inputs
7235 `(("python-click" ,python-click)))
7236 (synopsis "Utilities for multithreading in Click")
7237 (description "This package provides utilities for multithreading in Click
7238 applications.")
7239 (home-page "https://github.com/click-contrib/click-threading")
7240 (license license:expat)))
7241
7242 (define-public python-click-log
7243 (package
7244 (name "python-click-log")
7245 (version "0.3.2")
7246 (source (origin
7247 (method url-fetch)
7248 (uri (pypi-uri "click-log" version))
7249 (sha256
7250 (base32
7251 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
7252 (build-system python-build-system)
7253 (propagated-inputs
7254 `(("python-click" ,python-click)))
7255 (synopsis "Logging for click applications")
7256 (description "This package provides a Python library for logging Click
7257 applications.")
7258 (home-page "https://github.com/click-contrib/click-log")
7259 (license license:expat)))
7260
7261 (define-public python-apipkg
7262 (package
7263 (name "python-apipkg")
7264 (version "1.4")
7265 (source (origin
7266 (method url-fetch)
7267 (uri (pypi-uri "apipkg" version))
7268 (sha256
7269 (base32
7270 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7271 (build-system python-build-system)
7272 (native-inputs
7273 `(("python-pytest" ,python-pytest)))
7274 (synopsis "Namespace control and lazy-import mechanism")
7275 (description "With apipkg you can control the exported namespace of a Python
7276 package and greatly reduce the number of imports for your users. It is a small
7277 pure Python module that works on virtually all Python versions.")
7278 (home-page "https://bitbucket.org/hpk42/apipkg")
7279 (license license:expat)))
7280
7281 (define-public python2-apipkg
7282 (package-with-python2 python-apipkg))
7283
7284 (define-public python-execnet
7285 (package
7286 (name "python-execnet")
7287 (version "1.4.1")
7288 (source (origin
7289 (method url-fetch)
7290 (uri (pypi-uri "execnet" version))
7291 (sha256
7292 (base32
7293 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7294 (build-system python-build-system)
7295 (arguments
7296 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7297 ;; The two test failures are caused by the lack of an `ssh` executable.
7298 ;; The test suite can be run with pytest after the 'install' phase.
7299 #:tests? #f))
7300 (native-inputs
7301 `(("python-pytest" ,python-pytest)
7302 ("python-setuptools-scm" ,python-setuptools-scm)))
7303 (propagated-inputs
7304 `(("python-apipkg" ,python-apipkg)))
7305 (synopsis "Rapid multi-Python deployment")
7306 (description "Execnet provides a share-nothing model with
7307 channel-send/receive communication for distributing execution across many
7308 Python interpreters across version, platform and network barriers. It has a
7309 minimal and fast API targeting the following uses:
7310 @enumerate
7311 @item distribute tasks to (many) local or remote CPUs
7312 @item write and deploy hybrid multi-process applications
7313 @item write scripts to administer multiple environments
7314 @end enumerate")
7315 (home-page "http://codespeak.net/execnet/")
7316 (license license:expat)))
7317
7318 (define-public python2-execnet
7319 (package-with-python2 python-execnet))
7320
7321 (define-public python-icalendar
7322 (package
7323 (name "python-icalendar")
7324 (version "4.0.1")
7325 (source (origin
7326 (method url-fetch)
7327 (uri (pypi-uri "icalendar" version))
7328 (sha256
7329 (base32
7330 "139y79y6ijl39m5bj771r43vpah9s4ly7d1k76la6hrx7l144ak8"))))
7331 (build-system python-build-system)
7332 (propagated-inputs
7333 `(("python-dateutil" ,python-dateutil)
7334 ("python-pytz" ,python-pytz)))
7335 (synopsis "Python library for parsing iCalendar files")
7336 (description "The icalendar package is a parser/generator of iCalendar
7337 files for use with Python.")
7338 (home-page "https://github.com/collective/icalendar")
7339 (license license:bsd-2)))
7340
7341 (define-public python-sphinxcontrib-newsfeed
7342 (package
7343 (name "python-sphinxcontrib-newsfeed")
7344 (version "0.1.4")
7345 (source (origin
7346 (method url-fetch)
7347 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7348 (sha256
7349 (base32
7350 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7351 (arguments '(#:tests? #f)) ; No tests.
7352 (build-system python-build-system)
7353 (propagated-inputs
7354 `(("python-sphinx" ,python-sphinx)))
7355 (synopsis "News Feed extension for Sphinx")
7356 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7357 Blog, News or Announcements section to a Sphinx website.")
7358 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7359 (license license:bsd-2)))
7360
7361 (define-public python-args
7362 (package
7363 (name "python-args")
7364 (version "0.1.0")
7365 (source (origin
7366 (method url-fetch)
7367 (uri (pypi-uri "args" version))
7368 (sha256
7369 (base32
7370 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7371 (build-system python-build-system)
7372 (home-page "https://github.com/kennethreitz/args")
7373 (synopsis "Command-line argument parser")
7374 (description
7375 "This library provides a Python module to parse command-line arguments.")
7376 (license license:bsd-3)))
7377
7378 (define-public python2-args
7379 (package-with-python2 python-args))
7380
7381 (define-public python-clint
7382 (package
7383 (name "python-clint")
7384 (version "0.5.1")
7385 (source (origin
7386 (method url-fetch)
7387 (uri (pypi-uri "clint" version))
7388 (sha256
7389 (base32
7390 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7391 (build-system python-build-system)
7392 (arguments
7393 '(#:phases
7394 (modify-phases %standard-phases
7395 (replace 'check
7396 (lambda _
7397 (zero? (system* "py.test" "-v")))))))
7398 (native-inputs
7399 `(("python-pytest" ,python-pytest)))
7400 (propagated-inputs
7401 `(("python-args" ,python-args)))
7402 (home-page "https://github.com/kennethreitz/clint")
7403 (synopsis "Command-line interface tools")
7404 (description
7405 "Clint is a Python module filled with a set of tools for developing
7406 command-line applications, including tools for colored and indented
7407 output, progress bar display, and pipes.")
7408 (license license:isc)))
7409
7410 (define-public python2-clint
7411 (package-with-python2 python-clint))
7412
7413 (define-public python-astor
7414 (package
7415 (name "python-astor")
7416 (version "0.5")
7417 (source (origin
7418 (method url-fetch)
7419 (uri (pypi-uri "astor" version))
7420 (sha256
7421 (base32
7422 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7423 (build-system python-build-system)
7424 (home-page "https://github.com/berkerpeksag/astor")
7425 (synopsis "Read and write Python ASTs")
7426 (description
7427 "Astor is designed to allow easy manipulation of Python source via the
7428 Abstract Syntax Tree.")
7429 (license license:bsd-3)))
7430
7431 (define-public python2-astor
7432 (package-with-python2 python-astor))
7433
7434 (define-public python-rply
7435 (package
7436 (name "python-rply")
7437 (version "0.7.5")
7438 (source (origin
7439 (method url-fetch)
7440 (uri (pypi-uri "rply" version))
7441 (sha256
7442 (base32
7443 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
7444 (build-system python-build-system)
7445 (propagated-inputs
7446 `(("python-appdirs" ,python-appdirs)))
7447 (home-page "https://github.com/alex/rply")
7448 (synopsis "Parser generator for Python")
7449 (description
7450 "This package provides a pure Python based parser generator, that also
7451 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7452 with a new public API, and RPython support.")
7453 (license license:bsd-3)))
7454
7455 (define-public python2-rply
7456 (package-with-python2 python-rply))
7457
7458 (define-public python-hy
7459 (package
7460 (name "python-hy")
7461 (version "0.13.0")
7462 (source (origin
7463 (method url-fetch)
7464 (uri (pypi-uri "hy" version))
7465 (sha256
7466 (base32
7467 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
7468 (build-system python-build-system)
7469 (arguments
7470 '(#:phases
7471 (modify-phases %standard-phases
7472 (replace 'check
7473 (lambda _
7474 ;; Tests require write access to HOME.
7475 (setenv "HOME" "/tmp")
7476 (zero? (system* "nosetests")))))))
7477 (native-inputs
7478 `(("python-coverage" ,python-coverage)
7479 ("python-nose" ,python-nose)))
7480 (propagated-inputs
7481 `(("python-astor" ,python-astor)
7482 ("python-clint" ,python-clint)
7483 ("python-rply" ,python-rply)))
7484 (home-page "http://hylang.org/")
7485 (synopsis "Lisp frontend to Python")
7486 (description
7487 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7488 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7489 Python at your fingertips, in Lisp form.")
7490 (license license:expat)))
7491
7492 (define-public python2-hy
7493 (package-with-python2 python-hy))
7494
7495 (define-public python2-functools32
7496 (package
7497 (name "python2-functools32")
7498 (version "3.2.3-2")
7499 (source
7500 (origin
7501 (method url-fetch)
7502 (uri (pypi-uri "functools32" version))
7503 (sha256
7504 (base32
7505 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7506 (build-system python-build-system)
7507 (arguments
7508 `(#:python ,python-2
7509 #:tests? #f)) ; no test target
7510 (home-page "https://github.com/MiCHiLU/python-functools32")
7511 (synopsis
7512 "Backport of the functools module from Python 3.2.3")
7513 (description
7514 "This package is a backport of the @code{functools} module from Python
7515 3.2.3 for use with older versions of Python and PyPy.")
7516 (license license:expat)))
7517
7518 (define-public python2-subprocess32
7519 (package
7520 (name "python2-subprocess32")
7521 (version "3.2.7")
7522 (source (origin
7523 (method url-fetch)
7524 (uri (pypi-uri "subprocess32" version))
7525 (sha256
7526 (base32
7527 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
7528 (patches
7529 (search-patches "python2-subprocess32-disable-input-test.patch"))))
7530 (build-system python-build-system)
7531 (arguments
7532 `(#:python ,python-2
7533 ;; The test suite fails with Python > 2.7.13:
7534 ;; import test.support
7535 ;; ImportError: No module named support
7536 #:tests? #f
7537 #:phases
7538 (modify-phases %standard-phases
7539 (add-after 'unpack 'patch-/bin/sh
7540 (lambda _
7541 (substitute* '("subprocess32.py"
7542 "test_subprocess32.py")
7543 (("/bin/sh") (which "sh")))
7544 #t)))))
7545 (home-page "https://github.com/google/python-subprocess32")
7546 (synopsis "Backport of the subprocess module from Python 3.2")
7547 (description
7548 "This is a backport of the @code{subprocess} standard library module
7549 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
7550 new features. On POSIX systems it is guaranteed to be reliable when used
7551 in threaded applications. It includes timeout support from Python 3.3 but
7552 otherwise matches 3.2’s API.")
7553 (license license:psfl)))
7554
7555 (define-public python2-futures
7556 (package
7557 (name "python2-futures")
7558 (version "3.0.5")
7559 (source
7560 (origin
7561 (method url-fetch)
7562 (uri (pypi-uri "futures" version))
7563 (sha256
7564 (base32
7565 "1pw1z4329xvlabdpwqa6b7v2fxf7hl64m4cgr22ckbym8m8m4hh5"))))
7566 (build-system python-build-system)
7567 (arguments `(#:python ,python-2))
7568 (home-page "https://github.com/agronholm/pythonfutures")
7569 (synopsis
7570 "Backport of the concurrent.futures package from Python 3.2")
7571 (description
7572 "The concurrent.futures module provides a high-level interface for
7573 asynchronously executing callables. This package backports the
7574 concurrent.futures package from Python 3.2")
7575 (license license:bsd-3)))
7576
7577 (define-public python-promise
7578 (package
7579 (name "python-promise")
7580 (version "0.4.2")
7581 (source
7582 (origin
7583 (method url-fetch)
7584 (uri (pypi-uri "promise" version))
7585 (sha256
7586 (base32
7587 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7588 (build-system python-build-system)
7589 ;; Tests wants python-futures, which is a python2 only program, and
7590 ;; can't be found by python-promise at test time.
7591 (arguments `(#:tests? #f))
7592 (home-page "https://github.com/syrusakbary/promise")
7593 (synopsis "Promises/A+ implementation for Python")
7594 (description
7595 "Promises/A+ implementation for Python")
7596 (properties `((python2-variant . ,(delay python2-promise))))
7597 (license license:expat)))
7598
7599 (define-public python2-promise
7600 (let ((promise (package-with-python2
7601 (strip-python2-variant python-promise))))
7602 (package (inherit promise)
7603 (arguments (substitute-keyword-arguments (package-arguments promise)
7604 ((#:tests? _) #t)))
7605 (native-inputs
7606 `(("python2-futures" ,python2-futures)
7607 ("python2-pytest" ,python2-pytest)
7608 ,@(package-native-inputs promise))))))
7609
7610 (define-public python-colorama
7611 (package
7612 (name "python-colorama")
7613 (version "0.3.9")
7614 (source
7615 (origin
7616 (method url-fetch)
7617 (uri (pypi-uri "colorama" version))
7618 (sha256
7619 (base32
7620 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
7621 (build-system python-build-system)
7622 (synopsis "Colored terminal text rendering for Python")
7623 (description "Colorama is a Python library for rendering colored terminal
7624 text.")
7625 (home-page "https://pypi.python.org/pypi/colorama")
7626 (license license:bsd-3)))
7627
7628 (define-public python2-colorama
7629 (package-with-python2 python-colorama))
7630
7631 (define-public python-rsa
7632 (package
7633 (name "python-rsa")
7634 (version "3.4.2")
7635 (source
7636 (origin
7637 (method url-fetch)
7638 (uri (pypi-uri "rsa" version))
7639 (sha256
7640 (base32
7641 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
7642 (build-system python-build-system)
7643 (propagated-inputs
7644 `(("python-pyasn1" ,python-pyasn1)))
7645 (synopsis "Pure-Python RSA implementation")
7646 (description "Python-RSA is a pure-Python RSA implementation. It supports
7647 encryption and decryption, signing and verifying signatures, and key
7648 generation according to PKCS#1 version 1.5. It can be used as a Python
7649 library as well as on the command line.")
7650 (home-page "https://stuvel.eu/rsa")
7651 (license license:asl2.0)))
7652
7653 (define-public python2-rsa
7654 (package-with-python2 python-rsa))
7655
7656 (define-public python-pluggy
7657 (package
7658 (name "python-pluggy")
7659 (version "0.6.0")
7660 (source
7661 (origin
7662 (method url-fetch)
7663 (uri (pypi-uri "pluggy" version))
7664 (sha256
7665 (base32
7666 "1zqckndfn85l1cd8pndw212zg1bq9fkg1nnj32kp2mppppsyg2kz"))))
7667 (build-system python-build-system)
7668 (synopsis "Plugin and hook calling mechanism for Python")
7669 (description "Pluggy is an extraction of the plugin manager as used by
7670 Pytest but stripped of Pytest specific details.")
7671 (home-page "https://pypi.python.org/pypi/pluggy")
7672 (license license:expat)))
7673
7674 (define-public python2-pluggy
7675 (package-with-python2 python-pluggy))
7676
7677 (define-public python-tox
7678 (package
7679 (name "python-tox")
7680 (version "2.8.1")
7681 (source
7682 (origin
7683 (method url-fetch)
7684 (uri (pypi-uri "tox" version))
7685 (sha256
7686 (base32
7687 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
7688 (build-system python-build-system)
7689 (arguments
7690 ;; FIXME: Tests require pytest-timeout, which itself requires
7691 ;; pytest>=2.8.0 for installation.
7692 '(#:tests? #f))
7693 (propagated-inputs
7694 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
7695 ("python-py" ,python-py)
7696 ("python-virtualenv" ,python-virtualenv)))
7697 (native-inputs
7698 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
7699 ("python-pytest" ,python-pytest) ; >= 2.3.5
7700 ("python-setuptools-scm" ,python-setuptools-scm)))
7701 (home-page "http://tox.testrun.org/")
7702 (synopsis "Virtualenv-based automation of test activities")
7703 (description "Tox is a generic virtualenv management and test command line
7704 tool. It can be used to check that a package installs correctly with
7705 different Python versions and interpreters, or run tests in each type of
7706 supported environment, or act as a frontend to continuous integration
7707 servers.")
7708 (license license:expat)))
7709
7710 (define-public python2-tox
7711 (package-with-python2 python-tox))
7712
7713 (define-public python-jmespath
7714 (package
7715 (name "python-jmespath")
7716 (version "0.9.3")
7717 (source
7718 (origin
7719 (method url-fetch)
7720 (uri (pypi-uri "jmespath" version))
7721 (sha256
7722 (base32
7723 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
7724 (build-system python-build-system)
7725 (native-inputs
7726 `(("python-nose" ,python-nose)))
7727 (synopsis "JSON Matching Expressions")
7728 (description "JMESPath (pronounced “james path”) is a Python library that
7729 allows one to declaratively specify how to extract elements from a JSON
7730 document.")
7731 (home-page "https://github.com/jmespath/jmespath.py")
7732 (license license:expat)))
7733
7734 (define-public python2-jmespath
7735 (package-with-python2 python-jmespath))
7736
7737 (define-public python-botocore
7738 (package
7739 (name "python-botocore")
7740 (version "1.8.43")
7741 (source
7742 (origin
7743 (method url-fetch)
7744 (uri (pypi-uri "botocore" version))
7745 (sha256
7746 (base32
7747 "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg"))))
7748 (build-system python-build-system)
7749 (arguments
7750 ;; FIXME: Many tests are failing.
7751 '(#:tests? #f))
7752 (propagated-inputs
7753 `(("python-dateutil" ,python-dateutil)
7754 ("python-docutils" ,python-docutils)
7755 ("python-jmespath" ,python-jmespath)))
7756 (native-inputs
7757 `(("python-mock" ,python-mock)
7758 ("python-nose" ,python-nose)
7759 ("behave" ,behave)
7760 ("python-tox" ,python-tox)
7761 ("python-wheel" ,python-wheel)))
7762 (home-page "https://github.com/boto/botocore")
7763 (synopsis "Low-level interface to AWS")
7764 (description "Botocore is a Python library that provides a low-level
7765 interface to the Amazon Web Services (AWS) API.")
7766 (license license:asl2.0)))
7767
7768 (define-public python2-botocore
7769 (package-with-python2 python-botocore))
7770
7771 (define-public python-xdo
7772 (package
7773 (name "python-xdo")
7774 (version "0.3")
7775 (source (origin
7776 (method url-fetch)
7777 (uri (string-append
7778 "http://http.debian.net/debian/pool/main/p/python-xdo/"
7779 "python-xdo_" version ".orig.tar.gz"))
7780 (sha256
7781 (base32
7782 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
7783 (build-system python-build-system)
7784 (arguments
7785 '(#:phases
7786 (modify-phases %standard-phases
7787 (add-before 'install 'patch-libxdo-path
7788 ;; Hardcode the path of dynamically loaded libxdo library.
7789 (lambda* (#:key inputs #:allow-other-keys)
7790 (let ((libxdo (string-append
7791 (assoc-ref inputs "xdotool")
7792 "/lib/libxdo.so")))
7793 (substitute* "xdo/_xdo.py"
7794 (("find_library\\(\"xdo\"\\)")
7795 (simple-format #f "\"~a\"" libxdo)))
7796 #t))))
7797 #:tests? #f)) ; no tests provided
7798 (propagated-inputs
7799 `(("python-six" ,python-six)))
7800 (inputs
7801 `(("xdotool" ,xdotool)
7802 ("libX11" ,libx11)))
7803 (home-page "https://tracker.debian.org/pkg/python-xdo")
7804 (synopsis "Python library for simulating X11 keyboard/mouse input")
7805 (description "Provides bindings to libxdo for manipulating X11 via simulated
7806 input. (Note that this is mostly a legacy library; you may wish to look at
7807 python-xdo for newer bindings.)")
7808 (license license:bsd-3)))
7809
7810 (define-public python2-xdo
7811 (package-with-python2 python-xdo))
7812
7813 (define-public python-mako
7814 (package
7815 (name "python-mako")
7816 (version "1.0.7")
7817 (source
7818 (origin
7819 (method url-fetch)
7820 (uri (pypi-uri "Mako" version))
7821 (sha256
7822 (base32
7823 "1bi5gnr8r8dva06qpyx4kgjc6spm2k1y908183nbbaylggjzs0jf"))))
7824 (build-system python-build-system)
7825 (propagated-inputs
7826 `(("python-markupsafe" ,python-markupsafe)))
7827 (native-inputs
7828 `(("python-mock" ,python-mock)
7829 ("python-nose" ,python-nose)
7830 ("python-pytest" ,python-pytest)))
7831 (home-page "http://www.makotemplates.org/")
7832 (synopsis "Templating language for Python")
7833 (description "Mako is a templating language for Python that compiles
7834 templates into Python modules.")
7835 (license license:expat)))
7836
7837 (define-public python2-mako
7838 (package-with-python2 python-mako))
7839
7840 (define-public python-waitress
7841 (package
7842 (name "python-waitress")
7843 (version "1.1.0")
7844 (source
7845 (origin
7846 (method url-fetch)
7847 (uri (pypi-uri "waitress" version))
7848 (patches (search-patches "python-waitress-fix-tests.patch"))
7849 (sha256
7850 (base32
7851 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
7852 (build-system python-build-system)
7853 (home-page "https://github.com/Pylons/waitress")
7854 (synopsis "Waitress WSGI server")
7855 (description "Waitress is meant to be a production-quality pure-Python WSGI
7856 server with very acceptable performance.")
7857 (license license:zpl2.1)))
7858
7859 (define-public python2-waitress
7860 (package-with-python2 python-waitress))
7861
7862 (define-public python-pyquery
7863 (package
7864 (name "python-pyquery")
7865 (version "1.2.17")
7866 (source
7867 (origin
7868 (method url-fetch)
7869 (uri (pypi-uri "pyquery" version))
7870 (sha256
7871 (base32
7872 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
7873 (build-system python-build-system)
7874 (native-inputs
7875 `(("python-webob" ,python-webob)
7876 ("python-webtest" ,python-webtest)))
7877 (propagated-inputs
7878 `(("python-lxml" ,python-lxml)
7879 ("python-cssselect" ,python-cssselect)))
7880 (home-page "https://github.com/gawel/pyquery")
7881 (synopsis "Make jQuery-like queries on xml documents")
7882 (description "pyquery allows you to make jQuery queries on xml documents.
7883 The API is as much as possible the similar to jQuery. pyquery uses lxml for
7884 fast xml and html manipulation.")
7885 (license license:bsd-3)))
7886
7887 (define-public python2-pyquery
7888 (package-with-python2 python-pyquery))
7889
7890 (define-public python-anyjson
7891 (package
7892 (name "python-anyjson")
7893 (version "0.3.3")
7894 (source
7895 (origin
7896 (method url-fetch)
7897 (uri (pypi-uri "anyjson" version))
7898 (sha256
7899 (base32
7900 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
7901 (build-system python-build-system)
7902 (arguments
7903 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
7904 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
7905 ;; whatever) so this transformation needs to be done before the tests
7906 ;; can be run. Maybe we could add a build step to transform beforehand
7907 ;; but it could be annoying/difficult.
7908 ;; We can enable tests for the Python 2 version, though, and do below.
7909 #:tests? #f))
7910 (home-page "https://bitbucket.org/runeh/anyjson/")
7911 (synopsis
7912 "Wraps best available JSON implementation in a common interface")
7913 (description
7914 "Anyjson loads whichever is the fastest JSON module installed
7915 and provides a uniform API regardless of which JSON implementation is used.")
7916 (license license:bsd-3)
7917 (properties `((python2-variant . ,(delay python2-anyjson))))))
7918
7919 (define-public python2-anyjson
7920 (let ((anyjson (package-with-python2
7921 (strip-python2-variant python-anyjson))))
7922 (package
7923 (inherit anyjson)
7924 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
7925 #:tests? #t
7926 ,@(package-arguments anyjson)))
7927 (native-inputs `(("python2-nose" ,python2-nose))))))
7928
7929 (define-public python-amqp
7930 (package
7931 (name "python-amqp")
7932 (version "1.4.9")
7933 (source
7934 (origin
7935 (method url-fetch)
7936 (uri (pypi-uri "amqp" version))
7937 (sha256
7938 (base32
7939 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
7940 (build-system python-build-system)
7941 (native-inputs
7942 `(("python-nose" ,python-nose)
7943 ("python-mock" ,python-mock)))
7944 (home-page "https://github.com/celery/py-amqp")
7945 (synopsis
7946 "Low-level AMQP client for Python (fork of amqplib)")
7947 (description
7948 "This is a fork of amqplib which was originally written by Barry Pederson.
7949 It is maintained by the Celery project, and used by kombu as a pure python
7950 alternative when librabbitmq is not available.")
7951 (license license:lgpl2.1+)
7952 (properties `((python2-variant . ,(delay python2-amqp))))))
7953
7954 (define-public python2-amqp
7955 (let ((amqp (package-with-python2
7956 (strip-python2-variant python-amqp))))
7957 (package
7958 (inherit amqp)
7959 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
7960 ;; unmaintained. Weirdly, does not do this on the python 3
7961 ;; version?
7962 #:tests? #f
7963 ,@(package-arguments amqp))))))
7964
7965 (define-public python-txamqp
7966 (package
7967 (name "python-txamqp")
7968 (version "0.8.0")
7969 (source
7970 (origin
7971 (method url-fetch)
7972 (uri (pypi-uri "txAMQP" version))
7973 (sha256
7974 (base32
7975 "1r43a66dd547mz40ikymm8y3d480cidy560fj81qc0jk4lncgmmr"))))
7976 (build-system python-build-system)
7977 (propagated-inputs
7978 `(("python-six" ,python-six)
7979 ("python-twisted" ,python-twisted)))
7980 (home-page "https://github.com/txamqp/txamqp")
7981 (synopsis "Communicate with AMQP peers and brokers using Twisted")
7982 (description
7983 "This package provides a Python library for communicating with AMQP peers
7984 and brokers using the asynchronous networking framework Twisted. It contains
7985 all the necessary code to connect, send and receive messages to/from an
7986 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
7987 also includes support for using Thrift RPC over AMQP in Twisted
7988 applications.")
7989 (license license:asl2.0)))
7990
7991 (define-public python2-txamqp
7992 (package-with-python2 python-txamqp))
7993
7994 (define-public python-kombu
7995 (package
7996 (name "python-kombu")
7997 (version "3.0.37")
7998 (source
7999 (origin
8000 (method url-fetch)
8001 (uri (pypi-uri "kombu" version))
8002 (sha256
8003 (base32
8004 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
8005 (build-system python-build-system)
8006 (native-inputs
8007 `(("python-mock" ,python-mock)
8008 ("python-nose" ,python-nose)))
8009 (propagated-inputs
8010 `(("python-anyjson" ,python-anyjson)
8011 ("python-amqp" ,python-amqp)
8012 ("python-redis" ,python-redis)))
8013 (home-page "http://kombu.readthedocs.org")
8014 (synopsis "Message passing library for Python")
8015 (description "The aim of Kombu is to make messaging in Python as easy as
8016 possible by providing an idiomatic high-level interface for the AMQ protocol,
8017 and also provide proven and tested solutions to common messaging problems.
8018 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8019 message orientation, queuing, routing, reliability and security, for which the
8020 RabbitMQ messaging server is the most popular implementation.")
8021 (license license:bsd-3)
8022 (properties `((python2-variant . ,(delay python2-kombu))))))
8023
8024 (define-public python2-kombu
8025 (let ((kombu (package-with-python2
8026 (strip-python2-variant python-kombu))))
8027 (package
8028 (inherit kombu)
8029 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8030 ;; It works fine on the python3 variant.
8031 #:tests? #f
8032 ,@(package-arguments kombu)))
8033 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8034 ,@(package-native-inputs kombu))))))
8035
8036 (define-public python-billiard
8037 (package
8038 (name "python-billiard")
8039 (version "3.3.0.23")
8040 (source
8041 (origin
8042 (method url-fetch)
8043 (uri (pypi-uri "billiard" version))
8044 (sha256
8045 (base32
8046 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
8047 (build-system python-build-system)
8048 (native-inputs
8049 `(("python-nose" ,python-nose)))
8050 (home-page "https://github.com/celery/billiard")
8051 (synopsis
8052 "Python multiprocessing fork with improvements and bugfixes")
8053 (description
8054 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8055 multiprocessing package itself is a renamed and updated version of R Oudkerk's
8056 pyprocessing package. This standalone variant is intended to be compatible with
8057 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8058 (license license:bsd-3)
8059 (properties `((python2-variant . ,(delay python2-billiard))))))
8060
8061 (define-public python2-billiard
8062 (let ((billiard (package-with-python2
8063 (strip-python2-variant python-billiard))))
8064 (package
8065 (inherit billiard)
8066 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8067 ("python2-mock" ,python2-mock)
8068 ,@(package-native-inputs billiard))))))
8069
8070 (define-public python-celery
8071 (package
8072 (name "python-celery")
8073 (version "3.1.24")
8074 (source
8075 (origin
8076 (method url-fetch)
8077 (uri (pypi-uri "celery" version))
8078 (sha256
8079 (base32
8080 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
8081 (build-system python-build-system)
8082 (arguments
8083 `(#:phases
8084 (modify-phases %standard-phases
8085 ;; These tests break with Python 3.5:
8086 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
8087 (replace 'check
8088 (lambda _
8089 (zero?
8090 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
8091 (native-inputs
8092 `(("python-nose" ,python-nose)))
8093 (propagated-inputs
8094 `(("python-pytz" ,python-pytz)
8095 ("python-billiard" ,python-billiard)
8096 ("python-kombu" ,python-kombu)))
8097 (home-page "http://celeryproject.org")
8098 (synopsis "Distributed Task Queue")
8099 (description "Celery is an asynchronous task queue/job queue based on
8100 distributed message passing. It is focused on real-time operation, but
8101 supports scheduling as well. The execution units, called tasks, are executed
8102 concurrently on a single or more worker servers using multiprocessing,
8103 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8104 synchronously (wait until ready).")
8105 (license license:bsd-3)
8106 (properties `((python2-variant . ,(delay python2-celery))))))
8107
8108 (define-public python2-celery
8109 (let ((celery (package-with-python2
8110 (strip-python2-variant python-celery))))
8111 (package
8112 (inherit celery)
8113 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8114 ("python2-mock" ,python2-mock)
8115 ,@(package-native-inputs celery))))))
8116
8117 (define-public python-translitcodec
8118 (package
8119 (name "python-translitcodec")
8120 (version "0.4.0")
8121 (source
8122 (origin
8123 (method url-fetch)
8124 (uri (pypi-uri "translitcodec" version))
8125 (sha256
8126 (base32
8127 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8128 (build-system python-build-system)
8129 (arguments
8130 `(#:tests? #f)) ; no tests provided
8131 (home-page
8132 "https://github.com/claudep/translitcodec")
8133 (synopsis
8134 "Unicode to 8-bit charset transliteration codec")
8135 (description
8136 "This package contains codecs for transliterating ISO 10646 texts into
8137 best-effort representations using smaller coded character sets (ASCII,
8138 ISO 8859, etc.).")
8139 (license license:expat)))
8140
8141 (define-public python2-translitcodec
8142 (package-with-python2 python-translitcodec))
8143
8144 (define-public python-editor
8145 (package
8146 (name "python-editor")
8147 (version "0.5")
8148 (source
8149 (origin
8150 (method url-fetch)
8151 (uri (pypi-uri "python-editor" version))
8152 (sha256
8153 (base32
8154 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8155 (build-system python-build-system)
8156 (home-page
8157 "https://github.com/fmoo/python-editor")
8158 (synopsis
8159 "Programmatically open an editor, capture the result")
8160 (description
8161 "python-editor is a library that provides the editor module for
8162 programmatically interfacing with your system's $EDITOR.")
8163 (license license:asl2.0)))
8164
8165 (define-public python2-editor
8166 (package-with-python2 python-editor))
8167
8168 (define-public python-sphinxcontrib-programoutput
8169 (package
8170 (name "python-sphinxcontrib-programoutput")
8171 (version "0.10")
8172 (source (origin
8173 (method url-fetch)
8174 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8175 (sha256
8176 (base32
8177 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
8178 (build-system python-build-system)
8179 (arguments
8180 ;; FIXME: Many tests are failing and the upstream is gone.
8181 '(#:tests? #f))
8182 (propagated-inputs
8183 `(("python-sphinx" ,python-sphinx)))
8184 (synopsis "Sphinx extension to include program output")
8185 (description "A Sphinx extension to literally insert the output of arbitrary
8186 commands into documents, helping you to keep your command examples up to date.")
8187 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8188 (license license:bsd-2)))
8189
8190 (define-public python2-sphinxcontrib-programoutput
8191 (package-with-python2 python-sphinxcontrib-programoutput))
8192
8193 (define-public python-sphinx-repoze-autointerface
8194 (package
8195 (name "python-sphinx-repoze-autointerface")
8196 (version "0.8")
8197 (source (origin
8198 (method url-fetch)
8199 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8200 (sha256
8201 (base32
8202 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8203 (build-system python-build-system)
8204 (arguments '(#:tests? #f)) ; No tests.
8205 (propagated-inputs
8206 `(("python-sphinx" ,python-sphinx)
8207 ("python-zope-interface" ,python-zope-interface)))
8208 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8209 (description "This package defines an extension for the Sphinx documentation
8210 system. The extension allows generation of API documentation by
8211 introspection of @code{zope.interface} instances in code.")
8212 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8213 (license license:repoze)))
8214
8215 (define-public python2-sphinx-repoze-autointerface
8216 (package-with-python2 python-sphinx-repoze-autointerface))
8217
8218 (define-public python-vobject
8219 (package
8220 (name "python-vobject")
8221 (version "0.9.5")
8222 (source (origin
8223 (method url-fetch)
8224 (uri (pypi-uri "vobject" version))
8225 (sha256
8226 (base32
8227 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
8228 (build-system python-build-system)
8229 (arguments
8230 '(;; The test suite relies on some non-portable Windows interfaces.
8231 #:tests? #f))
8232 (propagated-inputs
8233 `(("python-dateutil" ,python-dateutil)
8234 ("python-pyicu" ,python-pyicu)))
8235 (synopsis "Parse and generate vCard and vCalendar files")
8236 (description "Vobject is intended to be a full featured Python package for
8237 parsing and generating vCard and vCalendar files. Currently, iCalendar files
8238 are supported and well tested. vCard 3.0 files are supported, and all data
8239 should be imported, but only a few components are understood in a sophisticated
8240 way.")
8241 (home-page "http://eventable.github.io/vobject/")
8242 (license license:asl2.0)))
8243
8244 (define-public python2-vobject
8245 (package-with-python2 python-vobject))
8246
8247 (define-public python-munkres
8248 (package
8249 (name "python-munkres")
8250 (version "1.0.8")
8251 (source (origin
8252 (method url-fetch)
8253 (uri (pypi-uri "munkres" version))
8254 (sha256
8255 (base32
8256 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
8257 (build-system python-build-system)
8258 (arguments
8259 '(#:tests? #f)) ; no test suite
8260 (home-page "http://software.clapper.org/munkres/")
8261 (synopsis "Implementation of the Munkres algorithm")
8262 (description "The Munkres module provides an implementation of the Munkres
8263 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8264 useful for solving the Assignment Problem.")
8265 (license license:bsd-3)))
8266
8267 (define-public python2-munkres
8268 (package-with-python2 python-munkres))
8269
8270 (define-public python-whoosh
8271 (package
8272 (name "python-whoosh")
8273 (version "2.7.4")
8274 (source
8275 (origin
8276 (method url-fetch)
8277 (uri (pypi-uri "Whoosh" version))
8278 (sha256
8279 (base32
8280 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8281 (build-system python-build-system)
8282 (native-inputs
8283 `(("python-pytest" ,python-pytest)))
8284 (home-page "https://bitbucket.org/mchaput/whoosh")
8285 (synopsis "Full text indexing, search, and spell checking library")
8286 (description
8287 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8288 checking library.")
8289 (license license:bsd-2)))
8290
8291 (define-public python2-whoosh
8292 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8293 (package (inherit whoosh)
8294 (propagated-inputs
8295 `(("python2-backport-ssl-match-hostname"
8296 ,python2-backport-ssl-match-hostname)
8297 ,@(package-propagated-inputs whoosh))))))
8298
8299 (define-public python-pathlib
8300 (package
8301 (name "python-pathlib")
8302 (version "1.0.1")
8303 (source (origin
8304 (method url-fetch)
8305 (uri (pypi-uri "pathlib" version))
8306 (sha256
8307 (base32
8308 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8309 (build-system python-build-system)
8310 ;; The tests depend on the internal "test" module, which does not provide
8311 ;; a stable interface.
8312 (arguments `(#:tests? #f))
8313 (home-page "https://pathlib.readthedocs.org/")
8314 (synopsis "Object-oriented file system paths")
8315 (description "Pathlib offers a set of classes to handle file system paths.
8316 It offers the following advantages over using string objects:
8317
8318 @enumerate
8319 @item No more cumbersome use of os and os.path functions. Everything can
8320 be done easily through operators, attribute accesses, and method calls.
8321 @item Embodies the semantics of different path types. For example,
8322 comparing Windows paths ignores casing.
8323 @item Well-defined semantics, eliminating any inconsistencies or
8324 ambiguities (forward vs. backward slashes, etc.).
8325 @end enumerate
8326
8327 Note: In Python 3.4, pathlib is now part of the standard library. For other
8328 Python versions please consider python-pathlib2 instead, which tracks the
8329 standard library module. This module (python-pathlib) isn't maintained
8330 anymore.")
8331 (license license:expat)))
8332
8333 (define-public python2-pathlib
8334 (package-with-python2 python-pathlib))
8335
8336 (define-public python2-pathlib2
8337 (package
8338 (name "python2-pathlib2")
8339 (version "2.3.2")
8340 (source (origin
8341 (method url-fetch)
8342 (uri (pypi-uri "pathlib2" version))
8343 (sha256
8344 (base32
8345 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
8346 (build-system python-build-system)
8347 ;; We only need the the Python 2 variant, since for Python 3 our minimum
8348 ;; version is 3.4 which already includes this package as part of the
8349 ;; standard library.
8350 (arguments
8351 `(#:python ,python-2))
8352 (propagated-inputs
8353 `(("python2-scandir" ,python2-scandir)
8354 ("python2-six" ,python2-six)))
8355 (home-page "https://pypi.python.org/pypi/pathlib2/")
8356 (synopsis "Object-oriented file system paths - backport of standard
8357 pathlib module")
8358 (description "The goal of pathlib2 is to provide a backport of standard
8359 pathlib module which tracks the standard library module, so all the newest
8360 features of the standard pathlib can be used also on older Python versions.
8361
8362 Pathlib offers a set of classes to handle file system paths. It offers the
8363 following advantages over using string objects:
8364
8365 @enumerate
8366 @item No more cumbersome use of os and os.path functions. Everything can
8367 be done easily through operators, attribute accesses, and method calls.
8368 @item Embodies the semantics of different path types. For example,
8369 comparing Windows paths ignores casing.
8370 @item Well-defined semantics, eliminating any inconsistencies or
8371 ambiguities (forward vs. backward slashes, etc.).
8372 @end enumerate")
8373 (license license:expat)))
8374
8375 (define-public python-jellyfish
8376 (package
8377 (name "python-jellyfish")
8378 (version "0.5.6")
8379 (source (origin
8380 (method url-fetch)
8381 (uri (pypi-uri "jellyfish" version))
8382 (sha256
8383 (base32
8384 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
8385 (build-system python-build-system)
8386 (native-inputs
8387 `(("python-pytest" ,python-pytest)))
8388 (home-page "https://github.com/jamesturk/jellyfish")
8389 (synopsis "Approximate and phonetic matching of strings")
8390 (description "Jellyfish uses a variety of string comparison and phonetic
8391 encoding algorithms to do fuzzy string matching.")
8392 (license license:bsd-2)
8393 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8394
8395 (define-public python2-jellyfish
8396 (let ((jellyfish (package-with-python2
8397 (strip-python2-variant python-jellyfish))))
8398 (package (inherit jellyfish)
8399 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
8400 ,@(package-native-inputs jellyfish))))))
8401
8402 (define-public python2-unicodecsv
8403 (package
8404 (name "python2-unicodecsv")
8405 (version "0.14.1")
8406 (source (origin
8407 (method url-fetch)
8408 ;; The test suite is not included in the PyPi release.
8409 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8410 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8411 "archive/" version ".tar.gz"))
8412 (file-name (string-append name "-" version ".tar.gz"))
8413 (sha256
8414 (base32
8415 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8416 (build-system python-build-system)
8417 (arguments
8418 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8419 #:python ,python-2))
8420 (native-inputs
8421 `(("python2-unittest2" ,python2-unittest2)))
8422 (home-page "https://github.com/jdunck/python-unicodecsv")
8423 (synopsis "Unicode CSV module for Python 2")
8424 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8425 module, adding support for Unicode strings.")
8426 (license license:bsd-2)))
8427
8428 (define-public python-rarfile
8429 (package
8430 (name "python-rarfile")
8431 (version "2.8")
8432 (source (origin
8433 (method url-fetch)
8434 (uri (pypi-uri "rarfile" version))
8435 (sha256
8436 (base32
8437 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
8438 (build-system python-build-system)
8439 (arguments
8440 '(#:phases
8441 (modify-phases %standard-phases
8442 (replace 'check
8443 ;; Many tests fail, but the installation proceeds.
8444 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
8445 (native-inputs
8446 `(("which" ,which))) ; required for tests
8447 (propagated-inputs
8448 `(("libarchive" ,libarchive)))
8449 (home-page "https://github.com/markokr/rarfile")
8450 (synopsis "RAR archive reader for Python")
8451 (description "This is Python module for RAR archive reading. The interface
8452 is made as zipfile like as possible.")
8453 (license license:isc)))
8454
8455 (define-public python2-rarfile
8456 (package-with-python2 python-rarfile))
8457
8458 (define-public python-magic
8459 (package
8460 (name "python-magic")
8461 (version "0.4.15")
8462 (source
8463 (origin
8464 (method url-fetch)
8465 (uri (pypi-uri "python-magic" version))
8466 (sha256
8467 (base32
8468 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
8469 (file-name (string-append name "-" version "-checkout"))))
8470 (build-system python-build-system)
8471 (arguments
8472 ;; The tests are unreliable, so don't run them. The tests fail
8473 ;; under Python3 because they were written for Python2 and
8474 ;; contain import statements that do not work in Python3. One of
8475 ;; the tests fails under Python2 because its assertions are
8476 ;; overly stringent; it relies on comparing output strings which
8477 ;; are brittle and can change depending on the version of
8478 ;; libmagic being used and the system on which the test is
8479 ;; running. In my case, under GuixSD 0.10.0, only one test
8480 ;; failed, and it seems to have failed only because the version
8481 ;; of libmagic that is packaged in Guix outputs a slightly
8482 ;; different (but not wrong) string than the one that the test
8483 ;; expected.
8484 '(#:tests? #f
8485 #:phases (modify-phases %standard-phases
8486 ;; Replace a specific method call with a hard-coded
8487 ;; path to the necessary libmagic.so file in the
8488 ;; store. If we don't do this, then the method call
8489 ;; will fail to find the libmagic.so file, which in
8490 ;; turn will cause any application using
8491 ;; python-magic to fail.
8492 (add-before 'build 'hard-code-path-to-libmagic
8493 (lambda* (#:key inputs #:allow-other-keys)
8494 (let ((file (assoc-ref inputs "file")))
8495 (substitute* "magic.py"
8496 (("ctypes.util.find_library\\('magic'\\)")
8497 (string-append "'" file "/lib/libmagic.so'")))
8498 #t)))
8499 (add-before 'install 'disable-egg-compression
8500 (lambda _
8501 (let ((port (open-file "setup.cfg" "a")))
8502 (display "\n[easy_install]\nzip_ok = 0\n"
8503 port)
8504 (close-port port)
8505 #t))))))
8506 (inputs
8507 ;; python-magic needs to be able to find libmagic.so.
8508 `(("file" ,file)))
8509 (home-page
8510 "https://github.com/ahupp/python-magic")
8511 (synopsis
8512 "File type identification using libmagic")
8513 (description
8514 "This module uses ctypes to access the libmagic file type
8515 identification library. It makes use of the local magic database and
8516 supports both textual and MIME-type output. Note that this module and
8517 the python-file module both provide a \"magic.py\" file; these two
8518 modules, which are different and were developed separately, both serve
8519 the same purpose: to provide Python bindings for libmagic.")
8520 (license license:expat)))
8521
8522 (define-public python2-magic
8523 (package-with-python2 python-magic))
8524
8525 (define-public python2-s3cmd
8526 (package
8527 (name "python2-s3cmd")
8528 (version "1.6.1")
8529 (source
8530 (origin
8531 (method url-fetch)
8532 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
8533 "s3cmd-" version ".tar.gz"))
8534 (sha256
8535 (base32
8536 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8537 (build-system python-build-system)
8538 (arguments
8539 ;; s3cmd is written for python2 only and contains no tests.
8540 `(#:python ,python-2
8541 #:tests? #f))
8542 (propagated-inputs
8543 `(("python2-dateutil" ,python2-dateutil)
8544 ;; The python-file package also provides a magic.py module.
8545 ;; This is an unfortunate state of affairs; however, s3cmd
8546 ;; fails to install if it cannot find specifically the
8547 ;; python-magic package. Thus we include it, instead of using
8548 ;; python-file. Ironically, s3cmd sometimes works better
8549 ;; without libmagic bindings at all:
8550 ;; https://github.com/s3tools/s3cmd/issues/198
8551 ("python2-magic" ,python2-magic)))
8552 (home-page "http://s3tools.org/s3cmd")
8553 (synopsis "Command line tool for S3-compatible storage services")
8554 (description
8555 "S3cmd is a command line tool for uploading, retrieving and managing data
8556 in storage services that are compatible with the Amazon Simple Storage
8557 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
8558 GnuPG encryption, and more. It also supports management of Amazon's
8559 CloudFront content delivery network.")
8560 (license license:gpl2+)))
8561
8562 (define-public python-pkgconfig
8563 (package
8564 (name "python-pkgconfig")
8565 (version "1.1.0")
8566 (source
8567 (origin
8568 (method url-fetch)
8569 (uri (pypi-uri "pkgconfig" version))
8570 (sha256
8571 (base32
8572 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
8573 (build-system python-build-system)
8574 (native-inputs
8575 `(("python-nose" ,python-nose)))
8576 (inputs
8577 `(("pkg-config" ,pkg-config)))
8578 (arguments
8579 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
8580 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
8581 #:tests? #f
8582 ;; Hard-code the path to pkg-config.
8583 #:phases
8584 (modify-phases %standard-phases
8585 (add-before
8586 'build 'patch
8587 (lambda _
8588 (substitute* "pkgconfig/pkgconfig.py"
8589 (("cmd = 'pkg-config")
8590 (string-append "cmd = '" (which "pkg-config"))))
8591 #t)))))
8592 (home-page "https://github.com/matze/pkgconfig")
8593 (synopsis "Python interface for pkg-config")
8594 (description "This module provides a Python interface to pkg-config. It
8595 can be used to find all pkg-config packages, check if a package exists,
8596 check if a package meets certain version requirements, query CFLAGS and
8597 LDFLAGS and parse the output to build extensions with setup.py.")
8598 (license license:expat)))
8599
8600 (define-public python2-pkgconfig
8601 (package-with-python2 python-pkgconfig))
8602
8603 (define-public python-bz2file
8604 (package
8605 (name "python-bz2file")
8606 (version "0.98")
8607 (source
8608 (origin
8609 (method url-fetch)
8610 (uri (pypi-uri "bz2file" version))
8611 (sha256
8612 (base32
8613 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
8614 (build-system python-build-system)
8615 (arguments
8616 `(#:tests? #f)) ; Tests use deprecated python modules.
8617 (home-page "https://github.com/nvawda/bz2file")
8618 (synopsis "Read and write bzip2-compressed files")
8619 (description
8620 "Bz2file is a Python library for reading and writing bzip2-compressed
8621 files. It contains a drop-in replacement for the I/O interface in the
8622 standard library's @code{bz2} module, including features from the latest
8623 development version of CPython that are not available in older releases.")
8624 (license license:asl2.0)
8625 (properties `((python2-variant . ,(delay python2-bz2file))))))
8626
8627 (define-public python2-bz2file
8628 (let ((base (package-with-python2
8629 (strip-python2-variant python-bz2file))))
8630 (package
8631 (inherit base)
8632 (arguments
8633 `(#:python ,python-2
8634 #:phases
8635 (modify-phases %standard-phases
8636 ;; 'python setup.py test' does not work as of 0.98.
8637 ;; There is only the one test file, so we run it directly.
8638 (replace 'check
8639 (lambda _ (zero? (system* "python"
8640 "test_bz2file.py"))))))))))
8641
8642 (define-public python-future
8643 (package
8644 (name "python-future")
8645 (version "0.16.0")
8646 (source
8647 (origin
8648 (method url-fetch)
8649 (uri (pypi-uri "future" version))
8650 (sha256
8651 (base32
8652 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
8653 (build-system python-build-system)
8654 ;; Many tests connect to the network or are otherwise flawed.
8655 ;; https://github.com/PythonCharmers/python-future/issues/210
8656 (arguments
8657 `(#:tests? #f))
8658 (home-page "http://python-future.org")
8659 (synopsis "Single-source support for Python 3 and 2")
8660 (description
8661 "@code{python-future} is the missing compatibility layer between Python 2 and
8662 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
8663 to support both Python 2 and Python 3 with minimal overhead.")
8664 (license license:expat)))
8665
8666 (define-public python2-future
8667 (package-with-python2 python-future))
8668
8669 (define-public python-cysignals
8670 (package
8671 (name "python-cysignals")
8672 (version "1.1.0")
8673 (source
8674 (origin
8675 (method url-fetch)
8676 (uri (pypi-uri "cysignals" version ".tar.bz2"))
8677 (sha256
8678 (base32
8679 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
8680 (build-system python-build-system)
8681 (native-inputs
8682 `(("python-cython" ,python-cython)
8683 ("python-sphinx" ,python-sphinx)))
8684 (inputs
8685 `(("pari-gp" ,pari-gp)))
8686 (arguments
8687 `(#:modules ((guix build python-build-system)
8688 ((guix build gnu-build-system) #:prefix gnu:)
8689 (guix build utils))
8690 ;; FIXME: Tests are executed after installation and currently fail
8691 ;; when not installing into standard locations; the author is working
8692 ;; on a fix.
8693 #:tests? #f
8694 #:phases
8695 (modify-phases %standard-phases
8696 (add-before
8697 'build 'configure
8698 (assoc-ref gnu:%standard-phases 'configure)))))
8699 (home-page
8700 "https://github.com/sagemath/cysignals")
8701 (synopsis
8702 "Handling of interrupts and signals for Cython")
8703 (description
8704 "The cysignals package provides mechanisms to handle interrupts (and
8705 other signals and errors) in Cython code, using two related approaches,
8706 for mixed Cython/Python code or external C libraries and pure Cython code,
8707 respectively.")
8708 (license license:lgpl3+)))
8709
8710 (define-public python2-cysignals
8711 (package-with-python2 python-cysignals))
8712
8713 (define-public python2-shedskin
8714 (package
8715 (name "python2-shedskin")
8716 (version "0.9.4")
8717 (source
8718 (origin
8719 (method url-fetch)
8720 (uri (string-append "https://github.com/shedskin/shedskin/"
8721 "releases/download/v" version
8722 "/shedskin-" version ".tgz"))
8723 (sha256
8724 (base32
8725 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
8726 (build-system python-build-system)
8727 (arguments
8728 `(#:python ,python-2
8729 #:phases (modify-phases %standard-phases
8730 (add-after 'unpack 'fix-resulting-include-libs
8731 (lambda* (#:key inputs #:allow-other-keys)
8732 (let ((libgc (assoc-ref inputs "libgc"))
8733 (pcre (assoc-ref inputs "pcre")))
8734 (substitute* "shedskin/makefile.py"
8735 (("variable == 'CCFLAGS':[ ]*")
8736 (string-append "variable == 'CCFLAGS':\n"
8737 " line += ' -I " pcre "/include"
8738 " -I " libgc "/include'"))
8739 (("variable == 'LFLAGS':[ ]*")
8740 (string-append "variable == 'LFLAGS':\n"
8741 " line += ' -L" pcre "/lib"
8742 " -L " libgc "/lib'")))
8743 #t))))))
8744 (inputs `(("pcre" ,pcre)
8745 ("libgc" ,libgc)))
8746 (home-page "https://shedskin.github.io/")
8747 (synopsis "Experimental Python-2 to C++ Compiler")
8748 (description (string-append "This is an experimental compiler for a subset of
8749 Python. It generates C++ code and a Makefile."))
8750 (license (list license:gpl3 license:bsd-3 license:expat))))
8751
8752 (define-public python2-rope
8753 (package
8754 (name "python2-rope")
8755 (version "0.10.3")
8756 (source
8757 (origin
8758 (method url-fetch)
8759 (uri (pypi-uri "rope" version))
8760 (sha256
8761 (base32
8762 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
8763 (arguments
8764 ;; Rope is currently python-2 only.
8765 ;; https://github.com/python-rope/rope/issues/57
8766 `(#:python ,python-2))
8767 (build-system python-build-system)
8768 (native-inputs
8769 `(("python2-unittest2" ,python2-unittest2)))
8770 (home-page "https://github.com/python-rope/rope")
8771 (synopsis "Refactoring library for Python")
8772 (description "Rope is a refactoring library for Python. It facilitates
8773 the renaming, moving and extracting of attributes, functions, modules, fields
8774 and parameters in Python 2 source code. These refactorings can also be applied
8775 to occurrences in strings and comments.")
8776 (license license:gpl2)))
8777
8778 (define-public python-py3status
8779 (package
8780 (name "python-py3status")
8781 (version "3.7")
8782 (source
8783 (origin
8784 (method url-fetch)
8785 (uri (pypi-uri "py3status" version))
8786 (sha256
8787 (base32
8788 "0shxcfz4wcczj0mhwp4w0dvwd2fdd9bgprq8slim1519iiqzgwhq"))))
8789 (build-system python-build-system)
8790 (inputs
8791 `(("file" ,file)))
8792 (arguments
8793 '(#:phases
8794 (modify-phases %standard-phases
8795 ;; 'file' is used for detection of configuration file encoding
8796 ;; let's make link the dependency to particular input
8797 (add-before 'build 'patch-file-path
8798 (lambda* (#:key inputs #:allow-other-keys)
8799 (let ((file-path (assoc-ref inputs "file")))
8800 (substitute* "py3status/parse_config.py"
8801 (("\\['file', '-b'")
8802 (string-append "['" file-path "/bin/file', '-b'")))
8803 #t))))
8804 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
8805 (home-page "https://github.com/ultrabug/py3status")
8806 (synopsis "Extensible i3status wrapper written in Python")
8807 (description "py3status is an i3status wrapper which extends i3status
8808 functionality in a modular way, allowing you to extend your panel with your
8809 own code, responding to click events and updating clock every second.")
8810 (license license:bsd-3)))
8811
8812 (define-public python-tblib
8813 (package
8814 (name "python-tblib")
8815 (version "1.3.2")
8816 (source (origin
8817 (method url-fetch)
8818 (uri (pypi-uri "tblib" version))
8819 (sha256 (base32
8820 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
8821 (build-system python-build-system)
8822 (arguments
8823 `(#:phases
8824 (modify-phases %standard-phases
8825 (replace 'check
8826 (lambda _
8827 ;; Upstream runs tests after installation and the package itself
8828 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
8829 ;; found.
8830 (setenv "PYTHONPATH"
8831 (string-append (getcwd) "/build/lib:"
8832 (getenv "PYTHONPATH")))
8833 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
8834 (native-inputs
8835 `(("python-pytest" ,python-pytest)
8836 ("python-six" ,python-six)))
8837 (home-page "https://github.com/ionelmc/python-tblib")
8838 (synopsis "Traceback serialization library")
8839 (description
8840 "Traceback serialization allows you to:
8841
8842 @enumerate
8843 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
8844 different processes. This allows better error handling when running code over
8845 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
8846
8847 @item Parse traceback strings and raise with the parsed tracebacks.
8848 @end enumerate\n")
8849 (license license:bsd-3)))
8850
8851 (define-public python2-tblib
8852 (package-with-python2 python-tblib))
8853
8854 (define-public python-greenlet
8855 (package
8856 (name "python-greenlet")
8857 (version "0.4.11")
8858 (source (origin
8859 (method url-fetch)
8860 (uri (pypi-uri "greenlet" version))
8861 (sha256
8862 (base32
8863 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
8864 (build-system python-build-system)
8865 (home-page "https://greenlet.readthedocs.io/")
8866 (synopsis "Lightweight in-process concurrent programming")
8867 (description
8868 "Greenlet package is a spin-off of Stackless, a version of CPython
8869 that supports micro-threads called \"tasklets\". Tasklets run
8870 pseudo-concurrently (typically in a single or a few OS-level threads) and
8871 are synchronized with data exchanges on \"channels\".")
8872 (license (list license:psfl license:expat))))
8873
8874 (define-public python2-greenlet
8875 (package-with-python2 python-greenlet))
8876
8877 (define-public python-gevent
8878 (package
8879 (name "python-gevent")
8880 (version "1.2.2")
8881 (source (origin
8882 (method url-fetch)
8883 (uri (pypi-uri "gevent" version))
8884 (sha256
8885 (base32
8886 "0bbbjvi423y9k9xagrcsimnayaqymg6f2dj76m9z3mjpkjpci4a7"))
8887 (modules '((guix build utils)))
8888 (snippet
8889 '(begin
8890 ;; unbunding libev and c-ares
8891 (delete-file-recursively "deps")
8892 #t))))
8893 (build-system python-build-system)
8894 (arguments
8895 `(#:modules ((ice-9 ftw)
8896 (srfi srfi-26)
8897 (guix build utils)
8898 (guix build python-build-system))
8899 #:phases (modify-phases %standard-phases
8900 (add-after 'unpack 'unpack-libev
8901 (lambda* (#:key inputs #:allow-other-keys)
8902 (mkdir-p "deps/libev")
8903 ;; FIXME: gevent requires building libev, even though
8904 ;; it only links against the proper one.
8905 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
8906 "--strip-components=1" "-C" "deps/libev")))
8907 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
8908 (lambda _
8909 (substitute* "src/gevent/subprocess.py"
8910 (("/bin/sh") (which "sh")))
8911 (for-each (lambda (file)
8912 (substitute* file
8913 (("/bin/sh") (which "sh"))
8914 (("/bin/true") (which "true"))))
8915 (find-files "src/greentest" "\\.py$"))
8916 #t))
8917 (add-before 'build 'do-not-use-bundled-sources
8918 (lambda _
8919 (setenv "CONFIG_SHELL" (which "bash"))
8920 (setenv "LIBEV_EMBED" "false")
8921 (setenv "CARES_EMBED" "false")
8922 (setenv "EMBED" "false")
8923 #t))
8924 (replace 'check
8925 (lambda _
8926 ;; Make sure the build directory is on PYTHONPATH.
8927 (setenv "PYTHONPATH"
8928 (string-append
8929 (getenv "PYTHONPATH") ":"
8930 (getcwd) "/build/"
8931 (car (scandir "build" (cut string-prefix? "lib." <>)))))
8932 (with-directory-excursion "src/greentest"
8933 ;; XXX: Many tests require network access. Instead we only
8934 ;; run known-good tests. Unfortunately we cannot use
8935 ;; recursion here since this directory also contains
8936 ;; Python-version-specific subfolders.
8937 (apply invoke "python" "testrunner.py" "--config"
8938 "known_failures.py"
8939 (scandir "." (cut regexp-exec
8940 (make-regexp "test_+(subprocess|core)")
8941 <>)))))))))
8942 (propagated-inputs
8943 `(("python-greenlet" ,python-greenlet)))
8944 (native-inputs
8945 `(("libev-source" ,(package-source libev))
8946 ("python-six" ,python-six)))
8947 (inputs
8948 `(("c-ares" ,c-ares)
8949 ("libev" ,libev)))
8950 (home-page "http://www.gevent.org/")
8951 (synopsis "Coroutine-based network library")
8952 (description
8953 "gevent is a coroutine-based Python networking library that uses greenlet
8954 to provide a high-level synchronous API on top of the libev event loop.")
8955 (license license:expat)))
8956
8957 (define-public python2-gevent
8958 (package-with-python2 python-gevent))
8959
8960 (define-public python-fastimport
8961 (package
8962 (name "python-fastimport")
8963 (version "0.9.6")
8964 (source
8965 (origin
8966 (method url-fetch)
8967 (uri (pypi-uri "fastimport" version))
8968 (sha256
8969 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
8970 (build-system python-build-system)
8971 (home-page "https://github.com/jelmer/python-fastimport")
8972 (synopsis "VCS fastimport parser and generator in Python")
8973 (description "This package provides a parser for and generator of the Git
8974 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
8975 format.")
8976 (license license:gpl2+)))
8977
8978 (define-public python2-fastimport
8979 (package-with-python2 python-fastimport))
8980
8981 (define-public python-twisted
8982 (package
8983 (name "python-twisted")
8984 (version "17.1.0")
8985 (source (origin
8986 (method url-fetch)
8987 (uri (pypi-uri "Twisted" version ".tar.bz2"))
8988 (sha256
8989 (base32
8990 "1p245mg15hkxp7hy5cyq2fgvlgjkb4cg0gwkwd148nzy1bbi3wnv"))))
8991 (build-system python-build-system)
8992 (arguments
8993 '(#:tests? #f)) ; FIXME: Some tests are failing.
8994 ;; #:phases
8995 ;; (modify-phases %standard-phases
8996 ;; (replace 'check
8997 ;; (lambda _
8998 ;; (zero? (system* "./bin/trial" "twisted")))))
8999 (propagated-inputs
9000 `(("python-zope-interface" ,python-zope-interface)
9001 ("python-incremental" ,python-incremental)
9002 ("python-constantly" ,python-constantly)
9003 ("python-automat" ,python-automat)))
9004 (home-page "https://twistedmatrix.com/")
9005 (synopsis "Asynchronous networking framework written in Python")
9006 (description
9007 "Twisted is an extensible framework for Python programming, with special
9008 focus on event-based network programming and multiprotocol integration.")
9009 (license license:expat)))
9010
9011 (define-public python2-twisted
9012 (package-with-python2 python-twisted))
9013
9014 (define-public python-pika
9015 (package
9016 (name "python-pika")
9017 (version "0.10.0")
9018 (source
9019 (origin
9020 (method url-fetch)
9021 (uri (pypi-uri "pika" version))
9022 (sha256
9023 (base32
9024 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
9025 (build-system python-build-system)
9026 (native-inputs
9027 `(("python-pyev" ,python-pyev)
9028 ("python-tornado" ,python-tornado)
9029 ("python-twisted" ,python-twisted)))
9030 (home-page "https://pika.readthedocs.org")
9031 (synopsis "Pure Python AMQP Client Library")
9032 (description
9033 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9034 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9035 network support library.")
9036 (license license:bsd-3)))
9037
9038 (define-public python2-pika
9039 (package-with-python2 python-pika))
9040
9041 (define-public python-ply
9042 (package
9043 (name "python-ply")
9044 (version "3.10")
9045 (source
9046 (origin
9047 (method url-fetch)
9048 (uri (pypi-uri "ply" version))
9049 (sha256
9050 (base32
9051 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9052 (build-system python-build-system)
9053 (home-page "http://www.dabeaz.com/ply/")
9054 (synopsis "Python Lex & Yacc")
9055 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9056 It uses LR parsing and does extensive error checking.")
9057 (license license:bsd-3)))
9058
9059 (define-public python2-ply
9060 (package-with-python2 python-ply))
9061
9062 (define-public python-tabulate
9063 (package
9064 (name "python-tabulate")
9065 (version "0.7.7")
9066 (source (origin
9067 (method url-fetch)
9068 (uri (pypi-uri "tabulate" version))
9069 (sha256
9070 (base32
9071 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
9072 (build-system python-build-system)
9073 (arguments
9074 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
9075 ;; and the latest release is not tagged in the upstream repository.
9076 '(#:tests? #f))
9077 (home-page "https://bitbucket.org/astanin/python-tabulate")
9078 (synopsis "Pretty-print tabular data")
9079 (description
9080 "Tabulate is a library and command-line utility to pretty-print tabular
9081 data in Python.")
9082 (license license:expat)))
9083
9084 (define-public python2-tabulate
9085 (package-with-python2 python-tabulate))
9086
9087 (define-public python-kazoo
9088 (package
9089 (name "python-kazoo")
9090 (version "2.4.0")
9091 (source
9092 (origin
9093 (method url-fetch)
9094 (uri (pypi-uri "kazoo" version))
9095 (sha256
9096 (base32
9097 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
9098 (build-system python-build-system)
9099 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9100 (propagated-inputs
9101 `(("python-six" ,python-six)))
9102 (home-page "https://kazoo.readthedocs.org")
9103 (synopsis "High-level Zookeeper client library")
9104 (description
9105 "Kazoo is a Python client library for the Apache Zookeeper distributed
9106 application service. It is designed to be easy to use and to avoid common
9107 programming errors.")
9108 (license license:asl2.0)))
9109
9110 (define-public python2-kazoo
9111 (package-with-python2 python-kazoo))
9112
9113 (define-public python-pykafka
9114 (package
9115 (name "python-pykafka")
9116 (version "2.4.0")
9117 (source (origin
9118 (method url-fetch)
9119 (uri (string-append
9120 "https://pypi.python.org/packages/8b/3e/"
9121 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
9122 "pykafka-" version ".tar.gz"))
9123 (sha256
9124 (base32
9125 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9126 (build-system python-build-system)
9127 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9128 (propagated-inputs
9129 `(("python-gevent" ,python-gevent)
9130 ("python-kazoo" ,python-kazoo)
9131 ("python-tabulate" ,python-tabulate)))
9132 (inputs
9133 `(("librdkafka" ,librdkafka)))
9134 (home-page "https://pykafka.readthedocs.io/")
9135 (synopsis "Apache Kafka client for Python")
9136 (description
9137 "PyKafka is a client for the Apache Kafka distributed messaging system.
9138 It includes Python implementations of Kafka producers and consumers, which
9139 are optionally backed by a C extension built on librdkafka.")
9140 (license license:asl2.0)))
9141
9142 (define-public python2-pykafka
9143 (package-with-python2 python-pykafka))
9144
9145 (define-public python-wcwidth
9146 (package
9147 (name "python-wcwidth")
9148 (version "0.1.7")
9149 (source
9150 (origin
9151 (method url-fetch)
9152 (uri (pypi-uri "wcwidth" version))
9153 (sha256
9154 (base32
9155 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
9156 (build-system python-build-system)
9157 (home-page "https://github.com/jquast/wcwidth")
9158 (synopsis "Measure number of terminal column cells of wide-character codes")
9159 (description "Wcwidth measures the number of terminal column cells of
9160 wide-character codes. It is useful for those implementing a terminal emulator,
9161 or programs that carefully produce output to be interpreted by one. It is a
9162 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9163 specified in POSIX.1-2001 and POSIX.1-2008.")
9164 (license license:expat)))
9165
9166 (define-public python2-wcwidth
9167 (package-with-python2 python-wcwidth))
9168
9169 (define-public python2-jsonrpclib
9170 (package
9171 (name "python2-jsonrpclib")
9172 (version "0.1.7")
9173 (source (origin
9174 (method url-fetch)
9175 (uri (string-append
9176 "https://pypi.python.org/packages/source/j/jsonrpclib/"
9177 "jsonrpclib-" version ".tar.gz"))
9178 (sha256
9179 (base32
9180 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9181 (build-system python-build-system)
9182 (arguments
9183 `(#:tests? #f
9184 #:python ,python-2))
9185 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9186 (synopsis "Implementation of JSON-RPC specification for Python")
9187 (description
9188 "This library is an implementation of the JSON-RPC specification.
9189 It supports both the original 1.0 specification, as well as the
9190 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9191 etc.")
9192 (license license:asl2.0)))
9193
9194 (define-public python-chai
9195 (package
9196 (name "python-chai")
9197 (version "1.1.2")
9198 (source (origin
9199 (method url-fetch)
9200 (uri (pypi-uri "chai" version))
9201 (sha256
9202 (base32
9203 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
9204 (build-system python-build-system)
9205 (home-page "https://github.com/agoragames/chai")
9206 (synopsis "Mocking framework for Python")
9207 (description
9208 "Chai provides an api for mocking, stubbing and spying your python
9209 objects, patterned after the Mocha library for Ruby.")
9210 (license license:bsd-3)))
9211
9212 (define-public python2-chai
9213 (package-with-python2 python-chai))
9214
9215 (define-public python-inflection
9216 (package
9217 (name "python-inflection")
9218 (version "0.3.1")
9219 (source
9220 (origin (method url-fetch)
9221 (uri (pypi-uri "inflection" version))
9222 (sha256
9223 (base32
9224 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9225 (build-system python-build-system)
9226 (native-inputs
9227 `(("python-pytest" ,python-pytest)))
9228 (home-page "https://github.com/jpvanhal/inflection")
9229 (synopsis "Python string transformation library")
9230 (description
9231 "Inflection is a string transformation library. It singularizes
9232 and pluralizes English words, and transforms strings from CamelCase to
9233 underscored string.")
9234 (license license:expat)))
9235
9236 (define-public python2-inflection
9237 (package-with-python2 python-inflection))
9238
9239 (define-public python-pylev
9240 (package
9241 (name "python-pylev")
9242 (version "1.3.0")
9243 (source (origin
9244 (method url-fetch)
9245 (uri (pypi-uri "pylev" version))
9246 (sha256
9247 (base32
9248 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9249 (build-system python-build-system)
9250 (home-page "https://github.com/toastdriven/pylev")
9251 (synopsis "Levenshtein distance implementation in Python")
9252 (description "Pure Python Levenshtein implementation, based off the
9253 Wikipedia code samples at
9254 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9255 (license license:bsd-3)))
9256
9257 (define-public python2-pylev
9258 (package-with-python2 python-pylev))
9259
9260 (define-public python-cleo
9261 (package
9262 (name "python-cleo")
9263 (version "0.6.1")
9264 (source (origin
9265 (method url-fetch)
9266 (uri (pypi-uri "cleo" version))
9267 (sha256
9268 (base32
9269 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
9270 (build-system python-build-system)
9271 (native-inputs
9272 `(;; For testing
9273 ("python-mock" ,python-mock)
9274 ("python-pytest-mock" ,python-pytest-mock)
9275 ("python-pytest" ,python-pytest)))
9276 (propagated-inputs
9277 `(("python-backpack" ,python-backpack)
9278 ("python-pastel" ,python-pastel)
9279 ("python-pylev" ,python-pylev)))
9280 (home-page "https://github.com/sdispater/cleo")
9281 (synopsis "Command-line arguments library for Python")
9282 (description
9283 "Cleo allows you to create command-line commands with signature in
9284 docstring and colored output.")
9285 (license license:expat)))
9286
9287 (define-public python2-cleo
9288 (package-with-python2 python-cleo))
9289
9290 (define-public python-lazy-object-proxy
9291 (package
9292 (name "python-lazy-object-proxy")
9293 (version "1.2.2")
9294 (source (origin
9295 (method url-fetch)
9296 (uri (pypi-uri "lazy-object-proxy" version))
9297 (sha256
9298 (base32
9299 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
9300 (build-system python-build-system)
9301 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9302 (synopsis "Lazy object proxy for python")
9303 (description
9304 "Lazy object proxy is an object that wraps a callable but defers the call
9305 until the object is actually required, and caches the result of said call.")
9306 (license license:bsd-2)))
9307
9308 (define-public python2-lazy-object-proxy
9309 (package-with-python2 python-lazy-object-proxy))
9310
9311 (define-public python-dnspython
9312 (package
9313 (name "python-dnspython")
9314 (version "1.15.0")
9315 (source (origin
9316 (method url-fetch)
9317 (uri (string-append "http://www.dnspython.org/kits/"
9318 version "/dnspython-" version ".tar.gz"))
9319 (sha256
9320 (base32
9321 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
9322 (build-system python-build-system)
9323 (arguments '(#:tests? #f)) ; XXX: requires internet access
9324 (home-page "http://www.dnspython.org")
9325 (synopsis "DNS toolkit for Python")
9326 (description
9327 "dnspython is a DNS toolkit for Python. It supports almost all record
9328 types. It can be used for queries, zone transfers, and dynamic updates.
9329 It supports TSIG authenticated messages and EDNS0.")
9330 (license license:expat)))
9331
9332 (define-public python2-dnspython
9333 (package-with-python2 python-dnspython))
9334
9335 (define-public python-email-validator
9336 (package
9337 (name "python-email-validator")
9338 (version "1.0.2")
9339 (source
9340 (origin (method url-fetch)
9341 (uri (pypi-uri "email_validator" version))
9342 (sha256
9343 (base32
9344 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
9345 (build-system python-build-system)
9346 (arguments
9347 '(#:phases
9348 (modify-phases %standard-phases
9349 (add-before 'build 'use-dnspython
9350 (lambda _
9351 (substitute* "setup.py"
9352 (("dnspython3") "dnspython"))
9353 #t)))))
9354 (propagated-inputs
9355 `(("python-dnspython" ,python-dnspython)
9356 ("python-idna" ,python-idna)))
9357 (home-page "https://github.com/JoshData/python-email-validator")
9358 (synopsis "Email address validation library for Python")
9359 (description
9360 "This library validates email address syntax and deliverability.")
9361 (license license:cc0)))
9362
9363 (define-public python2-email-validator
9364 (package-with-python2 python-email-validator))
9365
9366 (define-public python-ukpostcodeparser
9367 (package
9368 (name "python-ukpostcodeparser")
9369 (version "1.0.3")
9370 (source (origin
9371 (method url-fetch)
9372 (uri (pypi-uri "UkPostcodeParser" version))
9373 (sha256
9374 (base32
9375 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9376 (build-system python-build-system)
9377 (home-page "https://github.com/hamstah/ukpostcodeparser")
9378 (synopsis "UK Postcode parser for Python")
9379 (description
9380 "This library provides the @code{parse_uk_postcode} function for
9381 parsing UK postcodes.")
9382 (license license:expat)))
9383
9384 (define-public python2-ukpostcodeparser
9385 (package-with-python2 python-ukpostcodeparser))
9386
9387 (define-public python-faker
9388 (package
9389 (name "python-faker")
9390 (version "0.7.9")
9391 (source (origin
9392 (method url-fetch)
9393 (uri (pypi-uri "Faker" version))
9394 (sha256
9395 (base32
9396 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
9397 (patches
9398 (search-patches "python-faker-fix-build-32bit.patch"))
9399 (modules '((guix build utils)))
9400 (snippet
9401 '(begin
9402 (for-each delete-file (find-files "." "\\.pyc$"))
9403 #t))))
9404 (build-system python-build-system)
9405 (arguments
9406 '(#:phases
9407 (modify-phases %standard-phases
9408 (replace 'check
9409 (lambda _
9410 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
9411 (native-inputs
9412 `(;; For testing
9413 ("python-email-validator" ,python-email-validator)
9414 ("python-mock" ,python-mock)
9415 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
9416 (propagated-inputs
9417 `(("python-dateutil" ,python-dateutil)
9418 ("python-six" ,python-six)))
9419 (home-page "https://github.com/joke2k/faker")
9420 (synopsis "Python package that generates fake data")
9421 (description
9422 "Faker is a Python package that generates fake data such as names,
9423 addresses, and phone numbers.")
9424 (license license:expat)
9425 (properties `((python2-variant . ,(delay python2-faker))))))
9426
9427 (define-public python2-faker
9428 (let ((base (package-with-python2 (strip-python2-variant
9429 python-faker))))
9430 (package
9431 (inherit base)
9432 (propagated-inputs
9433 `(("python2-ipaddress" ,python2-ipaddress)
9434 ,@(package-propagated-inputs base))))))
9435
9436 (define-public python-pyaml
9437 (package
9438 (name "python-pyaml")
9439 (version "17.7.2")
9440 (source (origin
9441 (method url-fetch)
9442 (uri (pypi-uri "pyaml" version))
9443 (sha256
9444 (base32
9445 "132grrw0ajq4nrappi3ldbkb952k7yn9b6c7csi2rmvzm1g6ppp2"))))
9446 (build-system python-build-system)
9447 (native-inputs
9448 `(("python-unidecode" ,python-unidecode)))
9449 (propagated-inputs
9450 `(("python-pyyaml" ,python-pyyaml)))
9451 (home-page "https://github.com/mk-fg/pretty-yaml")
9452 (synopsis "YAML pretty-print library for Python")
9453 (description
9454 "pyaml is a PyYAML based python module to produce pretty and readable
9455 YAML-serialized data.")
9456 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
9457
9458 (define-public python2-pyaml
9459 (package-with-python2 python-pyaml))
9460
9461 (define-public python-backpack
9462 (package
9463 (name "python-backpack")
9464 (version "0.1")
9465 (source
9466 (origin
9467 (method url-fetch)
9468 (uri (pypi-uri "backpack" version))
9469 (sha256
9470 (base32
9471 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
9472 (build-system python-build-system)
9473 (native-inputs
9474 `(("python-pytest" ,python-pytest)
9475 ("python-nose" ,python-nose)))
9476 (propagated-inputs
9477 `(("python-simplejson" ,python-simplejson)))
9478 (home-page "https://github.com/sdispater/backpack")
9479 (synopsis "Utilities for working with Python collections")
9480 (description "Backpack provides some useful utilities for working with
9481 collections of data.")
9482 (license license:expat)))
9483
9484 (define-public python2-backpack
9485 (package-with-python2 python-backpack))
9486
9487 (define-public python-prompt-toolkit
9488 (package
9489 (name "python-prompt-toolkit")
9490 (version "1.0.15")
9491 (source
9492 (origin
9493 (method url-fetch)
9494 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9495 (sha256
9496 (base32
9497 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))
9498 (build-system python-build-system)
9499 (arguments
9500 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
9501 (propagated-inputs
9502 `(("python-wcwidth" ,python-wcwidth)
9503 ("python-six" ,python-six)
9504 ("python-pygments" ,python-pygments)))
9505 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
9506 (synopsis "Library for building command line interfaces in Python")
9507 (description
9508 "Prompt-Toolkit is a library for building interactive command line
9509 interfaces in Python. It's like GNU Readline but it also features syntax
9510 highlighting while typing, out-of-the-box multi-line input editing, advanced
9511 code completion, incremental search, support for Chinese double-width
9512 characters, mouse support, and auto suggestions.")
9513 (license license:bsd-3)))
9514
9515 (define-public python2-prompt-toolkit
9516 (package-with-python2 python-prompt-toolkit))
9517
9518 (define-public python-jedi
9519 (package
9520 (name "python-jedi")
9521 (version "0.12.0")
9522 (source
9523 (origin
9524 (method url-fetch)
9525 (uri (pypi-uri "jedi" version))
9526 (sha256
9527 (base32
9528 "1bcr7csx4xil1iwmk03d79jis0bkmgi9k0kir3xa4rmwqsagcwhr"))))
9529 (build-system python-build-system)
9530 (arguments
9531 `(#:phases
9532 (modify-phases %standard-phases
9533 (replace 'check (lambda _
9534 (invoke "py.test" "-vv"))))))
9535 (native-inputs
9536 `(("python-pytest" ,python-pytest)
9537 ("python-parso" ,python-parso)
9538 ("python-docopt" ,python-docopt)))
9539 (home-page "https://github.com/davidhalter/jedi")
9540 (synopsis
9541 "Autocompletion for Python that can be used for text editors")
9542 (description
9543 "Jedi is an autocompletion tool for Python that can be used for text
9544 editors.")
9545 (license license:expat)))
9546
9547 (define-public python2-jedi
9548 (package-with-python2 python-jedi))
9549
9550 (define-public ptpython
9551 (package
9552 (name "ptpython")
9553 (version "0.34")
9554 (source (origin
9555 (method url-fetch)
9556 (uri (pypi-uri "ptpython" version))
9557 (sha256
9558 (base32
9559 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
9560 (build-system python-build-system)
9561 (arguments
9562 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
9563 (propagated-inputs
9564 `(("python-docopt" ,python-docopt)
9565 ("python-jedi" ,python-jedi)
9566 ("python-prompt-toolkit" ,python-prompt-toolkit)
9567 ("python-pygments" ,python-pygments)))
9568 (home-page "https://github.com/jonathanslenders/ptpython")
9569 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
9570 (description
9571 "ptpython is a Python read-eval-print loop with IDE-like features.
9572 It supports syntax highlighting, multiline editing, autocompletion, mouse,
9573 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
9574 etc.")
9575 (license license:bsd-3)
9576 (properties `((python2-variant . ,(delay ptpython-2))))))
9577
9578 (define-public ptpython-2
9579 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
9580 (package
9581 (inherit base)
9582 (name "ptpython2"))))
9583
9584 (define-public python-stem
9585 (package
9586 (name "python-stem")
9587 (version "1.6.0")
9588 (source
9589 (origin
9590 (method url-fetch)
9591 (uri (pypi-uri "stem" version))
9592 (sha256
9593 (base32
9594 "1va9p3ij7lxg6ixfsvaql06dn11l3fgpxmss1dhlvafm7sqizznp"))))
9595 (build-system python-build-system)
9596 (arguments
9597 `(#:phases
9598 (modify-phases %standard-phases
9599 (add-before 'check 'fix-test-environment
9600 (lambda _
9601 ;; Fixes: FileNotFoundError: [Errno 2] No such file or directory:
9602 ;; '/tmp/guix-build-python-stem-1.6.0.drv-0/stem-1.6.0/.gitignore'.
9603 (with-output-to-file ".gitignore"
9604 (lambda _ (format #t "%")))
9605 #t))
9606 (replace 'check
9607 (lambda _
9608 (invoke "./run_tests.py" "--unit")
9609 #t)))))
9610 (native-inputs
9611 `(("python-mock" ,python-mock)
9612 ("python-pep8" ,python-pep8)
9613 ("python-pyflakes" ,python-pyflakes)))
9614 (home-page "https://stem.torproject.org/")
9615 (synopsis
9616 "Python controller library that allows applications to interact with Tor")
9617 (description
9618 "Stem is a Python controller library for Tor. With it you can use Tor's
9619 control protocol to script against the Tor process and read descriptor data
9620 relays publish about themselves.")
9621 (license license:lgpl3)))
9622
9623 (define-public python2-stem
9624 (package-with-python2 python-stem))
9625
9626 (define-public python-pyserial
9627 (package
9628 (name "python-pyserial")
9629 (version "3.1.1")
9630 (source
9631 (origin
9632 (method url-fetch)
9633 (uri (pypi-uri "pyserial" version))
9634 (sha256
9635 (base32
9636 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
9637 (build-system python-build-system)
9638 (arguments
9639 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
9640 ;; #:phases
9641 ;; (modify-phases %standard-phases
9642 ;; (replace 'check
9643 ;; (lambda _
9644 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
9645 (home-page
9646 "https://github.com/pyserial/pyserial")
9647 (synopsis "Python Serial Port Bindings")
9648 (description "@code{pyserial} provide serial port bindings for Python. It
9649 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
9650 and/or Xon/Xoff. The port is accessed in RAW mode.")
9651 (license license:bsd-3)))
9652
9653 (define-public python2-pyserial
9654 (package-with-python2 python-pyserial))
9655
9656 (define-public python-kivy
9657 (package
9658 (name "python-kivy")
9659 (version "1.10.0")
9660 (source
9661 (origin
9662 (method url-fetch)
9663 (uri (pypi-uri "Kivy" version))
9664 (file-name (string-append name "-" version ".tar.gz"))
9665 (sha256
9666 (base32
9667 "1394zh6kvf7k5d8vlzxcsfcailr3q59xwg9b1n7qaf25bvyq1h98"))))
9668 (build-system python-build-system)
9669 (arguments
9670 `(#:tests? #f ; Tests require many optional packages
9671 #:phases
9672 (modify-phases %standard-phases
9673 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
9674 (lambda* (#:key inputs #:allow-other-keys)
9675 (setenv "KIVY_SDL2_PATH"
9676 (string-append (assoc-ref inputs "sdl-union")
9677 "/include/SDL2"))
9678 #t)))))
9679 (native-inputs
9680 `(("git" ,git)
9681 ("pkg-config" ,pkg-config)
9682 ("python-cython" ,python-cython)))
9683 (inputs
9684 `(("gstreamer" ,gstreamer)
9685 ("mesa" ,mesa)
9686 ("sdl-union"
9687 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
9688 (home-page "http://kivy.org")
9689 (synopsis
9690 "Multitouch application framework")
9691 (description
9692 "A software library for rapid development of
9693 hardware-accelerated multitouch applications.")
9694 (license license:expat)))
9695
9696 (define-public python2-kivy
9697 (package-with-python2 python-kivy))
9698
9699 (define-public python-kivy-next
9700 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
9701 (revision "1"))
9702 (package (inherit python-kivy)
9703 (name "python-kivy-next")
9704 (version (string-append "1.9.1-" revision "."
9705 (string-take commit 7)))
9706 (source
9707 (origin
9708 (method git-fetch)
9709 (uri (git-reference
9710 (url "https://github.com/kivy/kivy")
9711 (commit commit)))
9712 (file-name (string-append name "-" version "-checkout"))
9713 (sha256
9714 (base32
9715 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
9716
9717 (define-public python2-kivy-next
9718 (package-with-python2 python-kivy-next))
9719
9720 (define-public python-binaryornot
9721 (package
9722 (name "python-binaryornot")
9723 (version "0.4.0")
9724 (source (origin
9725 (method url-fetch)
9726 (uri (pypi-uri "binaryornot" version))
9727 (sha256
9728 (base32
9729 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
9730 (build-system python-build-system)
9731 (propagated-inputs
9732 `(("python-chardet" ,python-chardet)
9733 ("python-hypothesis" ,python-hypothesis)))
9734 (home-page "https://github.com/audreyr/binaryornot")
9735 (synopsis "Package to check if a file is binary or text")
9736 (description "Ultra-lightweight pure Python package to check if a file is
9737 binary or text.")
9738 (license license:bsd-3)
9739 (properties `((python2-variant . ,(delay python2-binaryornot))))))
9740
9741 (define-public python2-binaryornot
9742 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
9743 (package (inherit base)
9744 (propagated-inputs
9745 `(("python2-enum34" ,python2-enum34)
9746 ,@(package-propagated-inputs base))))))
9747
9748 (define-public python-nltk
9749 (package
9750 (name "python-nltk")
9751 (version "3.2.1")
9752 (source (origin
9753 (method url-fetch)
9754 (uri (pypi-uri "nltk" version))
9755 (sha256
9756 (base32
9757 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
9758 (build-system python-build-system)
9759 (arguments
9760 '(;; The tests require some extra resources to be downloaded.
9761 ;; TODO Try packaging these resources.
9762 #:tests? #f))
9763 (home-page "http://nltk.org/")
9764 (synopsis "Natural Language Toolkit")
9765 (description "It provides interfaces to over 50 corpora and lexical
9766 resources such as WordNet, along with a suite of text processing libraries
9767 for classification, tokenization, stemming, tagging, parsing, and semantic
9768 reasoning, wrappers for natural language processing libraries.")
9769 (license license:asl2.0)))
9770
9771 (define-public python2-nltk
9772 (package-with-python2 python-nltk))
9773
9774 (define-public python-pymongo
9775 (package
9776 (name "python-pymongo")
9777 (version "3.3.0")
9778 (source (origin
9779 (method url-fetch)
9780 (uri (pypi-uri "pymongo" version))
9781 (sha256
9782 (base32
9783 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
9784 (build-system python-build-system)
9785 (propagated-inputs
9786 `(("python-certifi" ,python-certifi)))
9787 (home-page "https://github.com/mongodb/mongo-python-driver")
9788 (synopsis "Python driver for MongoDB")
9789 (description "Python driver for MongoDB.")
9790 (license license:asl2.0)))
9791
9792 (define-public python2-pymongo
9793 (package-with-python2 python-pymongo))
9794
9795 (define-public python-sh
9796 (package
9797 (name "python-sh")
9798 (version "1.11")
9799 (source (origin
9800 (method url-fetch)
9801 (uri (pypi-uri "sh" version))
9802 (sha256
9803 (base32
9804 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
9805 (build-system python-build-system)
9806 (arguments
9807 `(#:tests? #f)) ; no tests
9808 (home-page "https://github.com/amoffat/sh")
9809 (synopsis "Python subprocess interface")
9810 (description "Abstracts process invocation by providing a function
9811 interface for programs.")
9812 (license license:expat)))
9813
9814 (define-public python2-sh
9815 (package-with-python2 python-sh))
9816
9817 (define-public python-consul
9818 (package
9819 (name "python-consul")
9820 (version "0.6.1")
9821 (source
9822 (origin
9823 (method url-fetch)
9824 (uri (pypi-uri "python-consul" version))
9825 (sha256
9826 (base32
9827 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
9828 (build-system python-build-system)
9829 (arguments
9830 '(#:tests? #f)) ; The tests are not distributed
9831 (propagated-inputs
9832 `(("python-requests" ,python-requests)
9833 ("python-six" ,python-six)))
9834 (home-page "https://github.com/cablehead/python-consul")
9835 (synopsis "Python client for Consul")
9836 (description
9837 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
9838 discovery, monitoring and configuration.")
9839 (license license:expat)))
9840
9841 (define-public python2-consul
9842 (package-with-python2 python-consul))
9843
9844 (define-public python-schematics
9845 (package
9846 (name "python-schematics")
9847 (version "1.1.1")
9848 (source
9849 (origin
9850 (method url-fetch)
9851 (uri (string-append
9852 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
9853 (file-name (string-append name "-" version ".tar.gz"))
9854 (sha256
9855 (base32
9856 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
9857 (build-system python-build-system)
9858 (propagated-inputs
9859 `(("python-six" ,python-six)))
9860 (arguments
9861 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
9862 ; version requirements (eg python-coveralls)
9863 (home-page "https://github.com/schematics/schematics")
9864 (synopsis "Python Data Structures for Humans")
9865 (description "Python Data Structures for Humans.")
9866 (license license:bsd-3)))
9867
9868 (define-public python2-schematics
9869 (package-with-python2 python-schematics))
9870
9871 (define-public python-odfpy
9872 (package
9873 (name "python-odfpy")
9874 (version "1.3.3")
9875 (source (origin
9876 (method url-fetch)
9877 (uri (pypi-uri "odfpy" version))
9878 (sha256
9879 (base32
9880 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
9881 (arguments
9882 `(#:modules ((srfi srfi-1)
9883 (guix build python-build-system)
9884 (guix build utils))
9885 #:phases
9886 (modify-phases %standard-phases
9887 (replace 'check
9888 ;; The test runner invokes python2 and python3 for test*.py.
9889 ;; To avoid having both in inputs, we replicate it here.
9890 (lambda _
9891 (every (lambda (test-file)
9892 (zero? (system* "python" test-file)))
9893 (find-files "tests" "^test.*\\.py$")))))))
9894 (build-system python-build-system)
9895 (home-page "https://github.com/eea/odfpy")
9896 (synopsis "Python API and tools to manipulate OpenDocument files")
9897 (description "Collection of libraries and utility programs written in
9898 Python to manipulate OpenDocument 1.2 files.")
9899 (license
9900 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
9901 ;; number of files with other licenses.
9902 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
9903
9904 (define-public python2-odfpy
9905 (package-with-python2 python-odfpy))
9906
9907 (define-public python-natsort
9908 (package
9909 (name "python-natsort")
9910 (version "5.0.2")
9911 (source (origin
9912 (method url-fetch)
9913 (uri (pypi-uri "natsort" version))
9914 (sha256
9915 (base32
9916 "0bh6j0l8iapjnsgg3bs6q075cnzjl6zw1vlgqyv3qrygm2cxypkn"))))
9917 (build-system python-build-system)
9918 (arguments
9919 `(#:phases
9920 (modify-phases %standard-phases
9921 (add-before 'check 'set-cachedir
9922 ;; Tests require write access to $HOME by default
9923 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
9924 (native-inputs
9925 `(("python-hypothesis" ,python-hypothesis)
9926 ("python-pytest-cache" ,python-pytest-cache)
9927 ("python-pytest-cov" ,python-pytest-cov)
9928 ("python-pytest-flakes" ,python-pytest-flakes)
9929 ("python-pytest-pep8" ,python-pytest-pep8)))
9930 (propagated-inputs ; TODO: Add python-fastnumbers.
9931 `(("python-pyicu" ,python-pyicu)))
9932 (home-page "https://github.com/SethMMorton/natsort")
9933 (synopsis "Natural sorting for python and shell")
9934 (description
9935 "Natsort lets you apply natural sorting on lists instead of
9936 lexicographical. If you use the built-in @code{sorted} method in python
9937 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
9938 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
9939 function @code{natsorted} that identifies numbers and sorts them separately
9940 from strings. It can also sort version numbers, real numbers, mixed types
9941 and more, and comes with a shell command @command{natsort} that exposes this
9942 functionality in the command line.")
9943 (license license:expat)
9944 (properties `((python2-variant . ,(delay python2-natsort))))))
9945
9946 (define-public python2-natsort
9947 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
9948 (package (inherit base)
9949 (native-inputs
9950 `(("python2-pathlib" ,python2-pathlib)
9951 ("python2-mock" ,python2-mock)
9952 ("python2-enum34" ,python2-enum34)
9953 ,@(package-native-inputs base))))))
9954
9955 (define-public python-glances
9956 (package
9957 (name "python-glances")
9958 (version "2.7.1")
9959 (source
9960 (origin
9961 (method url-fetch)
9962 (uri (pypi-uri "Glances" version))
9963 (sha256
9964 (base32
9965 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
9966 (build-system python-build-system)
9967 (propagated-inputs
9968 `(("python-psutil" ,python-psutil)))
9969 (home-page
9970 "https://github.com/nicolargo/glances")
9971 (synopsis
9972 "A cross-platform curses-based monitoring tool")
9973 (description
9974 "Glances is a curses-based monitoring tool for a wide variety of platforms.
9975 Glances uses the PsUtil library to get information from your system. It monitors
9976 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
9977 (license license:lgpl3+)))
9978
9979 (define-public python2-glances
9980 (package-with-python2 python-glances))
9981
9982 (define-public python-graphql-core
9983 (package
9984 (name "python-graphql-core")
9985 (version "0.5.3")
9986 (source
9987 (origin
9988 (method url-fetch)
9989 (uri (pypi-uri "graphql-core" version))
9990 (sha256
9991 (base32
9992 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
9993 (build-system python-build-system)
9994 (arguments
9995 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
9996 #:phases
9997 (modify-phases %standard-phases
9998 (add-after 'unpack 'patch-hardcoded-version
9999 (lambda _ (substitute*
10000 "setup.py"
10001 (("'gevent==1.1rc1'") "'gevent'"))
10002 #t)))))
10003 (native-inputs
10004 `(("python-gevent" ,python-gevent)
10005 ("python-mock" ,python-mock)
10006 ("python-pytest-mock" ,python-pytest-mock)))
10007 (propagated-inputs
10008 `(("python-promise" ,python-promise)
10009 ("python-six" ,python-six)))
10010 (home-page "https://github.com/graphql-python/graphql-core")
10011 (synopsis "GraphQL implementation for Python")
10012 (description
10013 "GraphQL implementation for Python. GraphQL is a data query language and
10014 runtime designed and used to request and deliver data to mobile and web apps.
10015 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10016 to Python.")
10017 (license license:expat)))
10018
10019 (define-public python2-graphql-core
10020 (package-with-python2 python-graphql-core))
10021
10022 (define-public python-graphql-relay
10023 (package
10024 (name "python-graphql-relay")
10025 (version "0.4.5")
10026 (source
10027 (origin
10028 (method url-fetch)
10029 (uri (pypi-uri "graphql-relay" version))
10030 (sha256
10031 (base32
10032 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10033 (build-system python-build-system)
10034 (arguments
10035 '(#:tests? #f)) ; The tests are not distributed
10036 (propagated-inputs
10037 `(("python-graphql-core" ,python-graphql-core)
10038 ("python-promise" ,python-promise)
10039 ("python-six" ,python-six)))
10040 (home-page "https://github.com/graphql-python/graphql-relay-py")
10041 (synopsis "Relay implementation for Python")
10042 (description
10043 "This is a library to allow the easy creation of Relay-compliant servers
10044 using the GraphQL Python reference implementation of a GraphQL server. It
10045 should be noted that the code is a exact port of the original
10046 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10047 from Facebook.")
10048 (license license:expat)))
10049
10050 (define-public python2-graphql-relay
10051 (package-with-python2 python-graphql-relay))
10052
10053 (define-public python-graphene
10054 (package
10055 (name "python-graphene")
10056 (version "0.10.2")
10057 (source
10058 (origin
10059 (method url-fetch)
10060 (uri (pypi-uri "graphene" version))
10061 (sha256
10062 (base32
10063 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10064 (build-system python-build-system)
10065 (propagated-inputs
10066 `(("python-graphql-core" ,python-graphql-core)
10067 ("python-graphql-relay" ,python-graphql-relay)
10068 ("python-iso8601" ,python-iso8601)
10069 ("python-promise" ,python-promise)
10070 ("python-six" ,python-six)))
10071 (arguments
10072 `(#:tests? #f)) ; no tests/ in the PyPI tarball
10073 (home-page "http://graphene-python.org/")
10074 (synopsis "GraphQL Framework for Python")
10075 (description
10076 "Graphene is a Python library for building GraphQL schemas/types.
10077 A GraphQL schema describes your data model, and provides a GraphQL server
10078 with an associated set of resolve methods that know how to fetch data.")
10079 (properties `((python2-variant . ,(delay python2-graphene))))
10080 (license license:expat)))
10081
10082 (define-public python2-graphene
10083 (let ((base (package-with-python2
10084 (strip-python2-variant python-graphene))))
10085 (package (inherit base)
10086 (native-inputs
10087 `(("python2-sqlalchemy" ,python2-sqlalchemy)
10088 ,@(package-native-inputs base))))))
10089
10090 (define-public python-nautilus
10091 (package
10092 (name "python-nautilus")
10093 (version "0.4.9")
10094 (source
10095 (origin
10096 (method url-fetch)
10097 (uri (pypi-uri "nautilus" version))
10098 (sha256
10099 (base32
10100 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
10101 (build-system python-build-system)
10102 (arguments `(#:tests? #f)) ; fails to import test modules
10103 (propagated-inputs
10104 `(("python-bcrypt" ,python-bcrypt)
10105 ("python-click" ,python-click)
10106 ("python-consul" ,python-consul)
10107 ("python-graphene" ,python-graphene)
10108 ("python-jinja2" ,python-jinja2)
10109 ("python-peewee" ,python-peewee)
10110 ("python-pika" ,python-pika)
10111 ("python-tornado" ,python-tornado)
10112 ("python-wtforms" ,python-wtforms)))
10113 (native-inputs
10114 `(("python-nose2" ,python-nose2)))
10115 (home-page "https://github.com/AlecAivazis/nautilus")
10116 (synopsis "Library for creating microservice applications")
10117 (description
10118 "Nautilus is a framework for flux based microservices that looks to
10119 provide extendible implementations of common aspects of a cloud so that you can
10120 focus on building massively scalable web applications.")
10121 (license license:expat)))
10122
10123 (define-public python-snowballstemmer
10124 (package
10125 (name "python-snowballstemmer")
10126 (version "1.2.1")
10127 (source (origin
10128 (method url-fetch)
10129 (uri (pypi-uri "snowballstemmer" version))
10130 (sha256
10131 (base32
10132 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
10133 (build-system python-build-system)
10134 (arguments
10135 `(;; No tests exist
10136 #:tests? #f))
10137 (home-page "https://github.com/shibukawa/snowball_py")
10138 (synopsis "Snowball stemming library collection for Python")
10139 (description "This package provides 16 word stemmer algorithms generated
10140 from Snowball algorithms. It includes the 15 original ones plus the Poerter
10141 English stemmer.")
10142 (license license:bsd-3)))
10143
10144 (define-public python2-snowballstemmer
10145 (package-with-python2 python-snowballstemmer))
10146
10147 (define-public python-sphinx-cloud-sptheme
10148 (package
10149 (name "python-sphinx-cloud-sptheme")
10150 (version "1.8.0")
10151 (source (origin
10152 (method url-fetch)
10153 (uri (pypi-uri "cloud_sptheme" version))
10154 (sha256
10155 (base32
10156 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
10157 (build-system python-build-system)
10158 ;; FIXME: The 'pypi' release archive does not contain tests.
10159 (arguments '(#:tests? #f))
10160 (native-inputs
10161 `(("python-sphinx" ,python-sphinx)))
10162 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
10163 (synopsis "'Cloud' theme for Sphinx documenter")
10164 (description "This package contains the \"Cloud\" theme for Sphinx and some
10165 related extensions.")
10166 (license license:bsd-3)))
10167
10168 (define-public python2-sphinx-cloud-sptheme
10169 (package-with-python2 python-sphinx-cloud-sptheme))
10170
10171 (define-public python-sphinx-alabaster-theme
10172 (package
10173 (name "python-sphinx-alabaster-theme")
10174 (version "0.7.9")
10175 (source (origin
10176 (method url-fetch)
10177 (uri (pypi-uri "alabaster" version))
10178 (sha256
10179 (base32
10180 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
10181 (build-system python-build-system)
10182 (propagated-inputs
10183 `(("python-pygments" ,python-pygments)))
10184 (home-page "https://alabaster.readthedocs.io/")
10185 (synopsis "Configurable sidebar-enabled Sphinx theme")
10186 (description "Alabaster is a visually (c)lean, responsive, configurable
10187 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
10188 (license license:bsd-3)))
10189
10190 (define-public python2-sphinx-alabaster-theme
10191 (package-with-python2 python-sphinx-alabaster-theme))
10192
10193 (define-public python-setproctitle
10194 (package
10195 (name "python-setproctitle")
10196 (version "1.1.10")
10197 (source
10198 (origin
10199 (method url-fetch)
10200 (uri (pypi-uri "setproctitle" version))
10201 (sha256
10202 (base32
10203 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
10204 (build-system python-build-system)
10205 (arguments
10206 '(#:phases
10207 (modify-phases %standard-phases
10208 (add-before 'check 'patch-Makefile
10209 ;; Stricly this is only required for the python2 variant.
10210 ;; But adding a phase in an inherited package seems to be
10211 ;; cumbersum. So we patch even for python3.
10212 (lambda _
10213 (let ((nose (assoc-ref %build-inputs "python2-nose")))
10214 (when nose
10215 (substitute* "Makefile"
10216 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
10217 (string-append nose "/bin/nosetests "))))
10218 #t)))
10219 (replace 'check
10220 (lambda _
10221 (setenv "PYTHON" (or (which "python3") (which "python")))
10222 (setenv "PYCONFIG" (or (which "python3-config")
10223 (which "python-config")))
10224 (setenv "CC" "gcc")
10225 ;; No need to extend PYTHONPATH to find the built package, since
10226 ;; the Makefile will build anyway
10227 (zero? (system* "make" "check")))))))
10228 (native-inputs
10229 `(("procps" ,procps))) ; required for tests
10230 (home-page
10231 "https://github.com/dvarrazzo/py-setproctitle")
10232 (synopsis
10233 "Setproctitle implementation for Python to customize the process title")
10234 (description "The library allows a process to change its title (as displayed
10235 by system tools such as ps and top).
10236
10237 Changing the title is mostly useful in multi-process systems, for
10238 example when a master process is forked: changing the children's title
10239 allows to identify the task each process is busy with. The technique
10240 is used by PostgreSQL and the OpenSSH Server for example.")
10241 (license license:bsd-3)
10242 (properties `((python2-variant . ,(delay python2-setproctitle))))))
10243
10244 (define-public python2-setproctitle
10245 (let ((base (package-with-python2
10246 (strip-python2-variant python-setproctitle))))
10247 (package
10248 (inherit base)
10249 (native-inputs `(("python2-nose" ,python2-nose)
10250 ,@(package-native-inputs base))))))
10251
10252 (define-public python-validictory
10253 (package
10254 (name "python-validictory")
10255 (version "1.0.1")
10256 (source
10257 (origin
10258 (method url-fetch)
10259 (uri (pypi-uri "validictory" version))
10260 (sha256
10261 (base32
10262 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
10263 (build-system python-build-system)
10264 (arguments
10265 '(#:phases
10266 (modify-phases %standard-phases
10267 (add-after 'unpack 'bootstrap
10268 ;; Move the tests out of the package directory to avoid
10269 ;; packaging them.
10270 (lambda* _
10271 (rename-file "validictory/tests" "tests")
10272 (delete-file "tests/__init__.py")))
10273 (replace 'check
10274 (lambda _
10275 ;; Extend PYTHONPATH so the built package will be found.
10276 (setenv "PYTHONPATH"
10277 (string-append (getcwd) "/build/lib:"
10278 (getenv "PYTHONPATH")))
10279 (zero? (system* "py.test" "-vv" )))))))
10280 (native-inputs
10281 `(("python-pytest" ,python-pytest)))
10282 (home-page
10283 "https://github.com/jamesturk/validictory")
10284 (synopsis "General purpose Python data validator")
10285 (description "It allows validation of arbitrary Python data structures.
10286
10287 The schema format is based on the JSON Schema
10288 proposal (http://json-schema.org), so combined with json the library is also
10289 useful as a validator for JSON data.")
10290 (license license:expat)))
10291
10292 (define-public python2-validictory
10293 (package-with-python2 python-validictory))
10294
10295 (define-public python-pyev
10296 (package
10297 (name "python-pyev")
10298 (version "0.9.0")
10299 (source
10300 (origin
10301 (method url-fetch)
10302 (uri (pypi-uri "pyev" version))
10303 (sha256
10304 (base32
10305 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
10306 (build-system python-build-system)
10307 (arguments
10308 `(#:tests? #f ; no test suite
10309 #:phases
10310 (modify-phases %standard-phases
10311 (add-after 'unpack 'patch
10312 (lambda* (#:key inputs #:allow-other-keys)
10313 (let ((libev (string-append (assoc-ref inputs "libev")
10314 "/lib/libev.so.4")))
10315 (substitute* "setup.py"
10316 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
10317 (string-append "libev_dll_name = \"" libev "\"")))))))))
10318 (inputs
10319 `(("libev" ,libev)))
10320 (home-page "http://pythonhosted.org/pyev/")
10321 (synopsis "Python libev interface")
10322 (description "Pyev provides a Python interface to libev.")
10323 (license license:gpl3)))
10324
10325 (define-public python2-pyev
10326 (package-with-python2 python-pyev))
10327
10328 (define-public python-imagesize
10329 (package
10330 (name "python-imagesize")
10331 (version "0.7.1")
10332 (source
10333 (origin
10334 (method url-fetch)
10335 (uri (pypi-uri "imagesize" version))
10336 (sha256
10337 (base32
10338 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
10339 (build-system python-build-system)
10340 (arguments
10341 '(;; Test files are not distributed on PyPi:
10342 ;; https://github.com/shibukawa/imagesize_py/issues/7
10343 #:tests? #f))
10344 (home-page "https://github.com/shibukawa/imagesize_py")
10345 (synopsis "Gets image size of files in variaous formats in Python")
10346 (description
10347 "This package allows determination of image size from
10348 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
10349 (license license:expat)))
10350
10351 (define-public python2-imagesize
10352 (package-with-python2 python-imagesize))
10353
10354 (define-public python-termstyle
10355 (package
10356 (name "python-termstyle")
10357 (version "0.1.11")
10358 (source
10359 (origin
10360 (method url-fetch)
10361 (uri (pypi-uri "termstyle" version))
10362 (sha256
10363 (base32
10364 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
10365 (build-system python-build-system)
10366 (arguments
10367 '(#:phases
10368 (modify-phases %standard-phases
10369 (replace 'check
10370 (lambda _
10371 (zero? (system* "python" "test3.py")))))))
10372 (home-page "https://github.com/gfxmonk/termstyle")
10373 (synopsis "Console text coloring for Python")
10374 (description "This package provides console text coloring for Python.")
10375 (license license:bsd-3)))
10376
10377 (define-public python-argcomplete
10378 (package
10379 (name "python-argcomplete")
10380 (version "1.7.0")
10381 (source
10382 (origin
10383 (method url-fetch)
10384 (uri (pypi-uri "argcomplete" version))
10385 (sha256
10386 (base32
10387 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
10388 (build-system python-build-system)
10389 (native-inputs
10390 `(("python-pexpect" ,python-pexpect)
10391 ("tcsh" ,tcsh)
10392 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
10393 (home-page "https://github.com/kislyuk/argcomplete")
10394 (synopsis "Shell tab completion for Python argparse")
10395 (description "argcomplete provides extensible command line tab completion
10396 of arguments and options for Python scripts using @code{argparse}. It's
10397 particularly useful for programs with many options or sub-parsers that can
10398 dynamically suggest completions; for example, when browsing resources over the
10399 network.")
10400 (license license:asl2.0)))
10401
10402 (define-public python2-argcomplete
10403 (package-with-python2 python-argcomplete))
10404
10405 (define-public python-xopen
10406 (package
10407 (name "python-xopen")
10408 (version "0.3.3")
10409 (source
10410 (origin
10411 (method url-fetch)
10412 (uri (pypi-uri "xopen" version))
10413 (sha256
10414 (base32
10415 "1a0wbil552wsmklwd89ssmgz3pjd86qa9i7jh8wqb9wslc8a2qjr"))
10416 (file-name (string-append name "-" version ".tar.gz"))))
10417 (build-system python-build-system)
10418 (home-page "https://github.com/marcelm/xopen/")
10419 (synopsis "Open compressed files transparently")
10420 (description "This module provides an @code{xopen} function that works like
10421 Python's built-in @code{open} function, but can also deal with compressed files.
10422 Supported compression formats are gzip, bzip2 and, xz, and are automatically
10423 recognized by their file extensions. The focus is on being as efficient as
10424 possible on all supported Python versions.")
10425 (license license:expat)))
10426
10427 (define-public python2-xopen
10428 (let ((base (package-with-python2
10429 (strip-python2-variant python-xopen))))
10430 (package
10431 (inherit base)
10432 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
10433 ,@(package-propagated-inputs base))))))
10434
10435 (define-public python2-cheetah
10436 (package
10437 (name "python2-cheetah")
10438 (version "2.4.4")
10439 (source
10440 (origin
10441 (method url-fetch)
10442 (uri (pypi-uri "Cheetah" version))
10443 (sha256
10444 (base32
10445 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
10446 (build-system python-build-system)
10447 (arguments
10448 `(#:python ,python-2))
10449 (propagated-inputs
10450 `(("python2-markdown" ,python2-markdown)))
10451 (home-page "https://pythonhosted.org/Cheetah/")
10452 (synopsis "Template engine")
10453 (description "Cheetah is a text-based template engine and Python code
10454 generator.
10455
10456 Cheetah can be used as a standalone templating utility or referenced as
10457 a library from other Python applications. It has many potential uses,
10458 but web developers looking for a viable alternative to ASP, JSP, PHP and
10459 PSP are expected to be its principle user group.
10460
10461 Features:
10462 @enumerate
10463 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
10464 text-based format.
10465 @item Cleanly separates content, graphic design, and program code.
10466 @item Blends the power and flexibility of Python with a simple template language
10467 that non-programmers can understand.
10468 @item Gives template writers full access to any Python data structure, module,
10469 function, object, or method in their templates.
10470 @item Makes code reuse easy by providing an object-orientated interface to
10471 templates that is accessible from Python code or other Cheetah templates.
10472 One template can subclass another and selectively reimplement sections of it.
10473 @item Provides a simple, yet powerful, caching mechanism that can dramatically
10474 improve the performance of a dynamic website.
10475 @item Compiles templates into optimized, yet readable, Python code.
10476 @end enumerate")
10477 (license (license:x11-style "file://LICENSE"))))
10478
10479 (define-public python-dulwich
10480 (package
10481 (name "python-dulwich")
10482 (version "0.18.6")
10483 (source
10484 (origin
10485 (method url-fetch)
10486 (uri (list (string-append "https://www.dulwich.io/releases/"
10487 "dulwich-" version ".tar.gz")
10488 (pypi-uri "dulwich" version)))
10489 (sha256
10490 (base32
10491 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
10492 (build-system python-build-system)
10493 (arguments
10494 `(#:phases
10495 (modify-phases %standard-phases
10496 (add-before 'check 'fix-tests
10497 (lambda* (#:key inputs #:allow-other-keys)
10498 ;; The tests use Popen with a custom environment which doesn't
10499 ;; include PATH.
10500 (substitute* "dulwich/tests/compat/utils.py"
10501 (("'git'") (string-append "'"
10502 (which "git")
10503 "'")))
10504 (substitute* '("dulwich/tests/test_repository.py"
10505 "dulwich/tests/test_hooks.py")
10506 (("#!/bin/sh") (string-append "#!" (which "sh"))))
10507 (setenv "TEST_RUNNER" "unittest")
10508 (setenv "PYTHONHASHSEED" "random")
10509 #t)))))
10510 (propagated-inputs
10511 `(("python-fastimport" ,python-fastimport)))
10512 (native-inputs
10513 `(("python-mock" ,python-mock)
10514 ("python-geventhttpclient" ,python-geventhttpclient)
10515 ("git" ,git)))
10516 (home-page "https://www.dulwich.io/")
10517 (synopsis "Git implementation in Python")
10518 (description "Dulwich is an implementation of the Git file formats and
10519 protocols written in pure Python.")
10520 ;; Can be used with either license.
10521 (license (list license:asl2.0 license:gpl2+))))
10522
10523 (define-public python2-dulwich
10524 (package-with-python2 python-dulwich))
10525
10526 (define-public python-pbkdf2
10527 (package
10528 (name "python-pbkdf2")
10529 (version "1.3")
10530 (source
10531 (origin
10532 (method url-fetch)
10533 (uri (pypi-uri "pbkdf2" version))
10534 (sha256
10535 (base32
10536 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
10537 (build-system python-build-system)
10538 (arguments
10539 '(#:phases
10540 (modify-phases %standard-phases
10541 (replace 'check
10542 (lambda _
10543 (setenv "PYTHONPATH"
10544 (string-append (getcwd) "/build/lib:"
10545 (getenv "PYTHONPATH")))
10546 (zero? (system* "python" "test/test_pbkdf2.py")))))))
10547 (propagated-inputs
10548 `(("python-pycrypto" ,python-pycrypto))) ; optional
10549 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
10550 (synopsis "Password-based key derivation")
10551 (description "This module implements the password-based key derivation
10552 function, PBKDF2, specified in RSA PKCS#5 v2.0.
10553
10554 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
10555 is part of the RSA Public Key Cryptography Standards series. The provided
10556 implementation takes a password or a passphrase and a salt value (and
10557 optionally a iteration count, a digest module, and a MAC module) and provides
10558 a file-like object from which an arbitrarly-sized key can be read.")
10559 (license license:expat)))
10560
10561 (define-public python2-pbkdf2
10562 (package-with-python2 python-pbkdf2))
10563
10564 (define-public python-qrcode
10565 (package
10566 (name "python-qrcode")
10567 (version "6.0")
10568 (source
10569 (origin
10570 (method url-fetch)
10571 (uri (pypi-uri "qrcode" version))
10572 (sha256
10573 (base32
10574 "1gz1g2n9kqwqkak78aavr354z1v3yyiksk7q6xp5hi1zr6s0syq3"))))
10575 (build-system python-build-system)
10576 (arguments
10577 ;; FIXME: Tests require packaging 'pymaging'.
10578 '(#:tests? #f))
10579 (propagated-inputs
10580 `(("python-lxml" ,python-lxml) ; for SVG output
10581 ("python-pillow" ,python-pillow) ; for PNG output
10582 ("python-six" ,python-six)))
10583 (inputs
10584 `(;; The setup.cfg file needs to be used, and support for this requires
10585 ;; at least version 30.3.0 of setuptools
10586 ("python-setuptools" ,python-setuptools)))
10587 (home-page "https://github.com/lincolnloop/python-qrcode")
10588 (synopsis "QR Code image generator")
10589 (description "This package provides a pure Python QR Code generator
10590 module. It uses the Python Imaging Library (PIL) to allow for the generation
10591 of QR Codes.
10592
10593 In addition this package provides a command line tool to generate QR codes and
10594 either write these QR codes to a file or do the output as ascii art at the
10595 console.")
10596 (license license:bsd-3)))
10597
10598 (define-public python2-qrcode
10599 (package-with-python2 python-qrcode))
10600
10601 (define-public python-rst2ansi
10602 (package
10603 (name "python-rst2ansi")
10604 (version "0.1.5")
10605 (source
10606 (origin
10607 (method url-fetch)
10608 (uri (pypi-uri "rst2ansi" version))
10609 (sha256
10610 (base32
10611 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
10612 (build-system python-build-system)
10613 (propagated-inputs
10614 `(("python-docutils" ,python-docutils)))
10615 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
10616 (synopsis "Convert RST to ANSI-decorated console output")
10617 (description
10618 "Python module dedicated to rendering RST (reStructuredText) documents
10619 to ansi-escaped strings suitable for display in a terminal.")
10620 (license license:expat)))
10621
10622 (define-public python-ansi2html
10623 (package
10624 (name "python-ansi2html")
10625 (version "1.2.0")
10626 (source
10627 (origin
10628 (method url-fetch)
10629 (uri (pypi-uri "ansi2html" version))
10630 (sha256
10631 (base32
10632 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
10633 (build-system python-build-system)
10634 (native-inputs
10635 `(("python-mock" ,python-mock)
10636 ("python-nose" ,python-nose)))
10637 (propagated-inputs
10638 `(("python-six" ,python-six)))
10639 (home-page "https://github.com/ralphbean/ansi2html")
10640 (synopsis "Convert ANSI-decorated console output to HTML")
10641 (description
10642 "@command{ansi2html} is a Python library and command line utility for
10643 convering text with ANSI color codes to HTML or LaTeX.")
10644 (license license:gpl3+)))
10645
10646 (define-public python2-ansi2html
10647 (package-with-python2 python-ansi2html))
10648
10649 (define-public python-ddt
10650 (package
10651 (name "python-ddt")
10652 (version "1.1.3")
10653 (source
10654 (origin
10655 (method url-fetch)
10656 (uri (pypi-uri "ddt" version))
10657 (sha256
10658 (base32
10659 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
10660 (build-system python-build-system)
10661 (native-inputs
10662 `(("python-mock" ,python-mock)
10663 ("python-nose" ,python-nose)))
10664 (propagated-inputs
10665 `(("python-six" ,python-six)
10666 ("python-pyyaml" ,python-pyyaml)))
10667 (home-page "https://github.com/txels/ddt")
10668 (synopsis "Data-Driven Tests")
10669 (description
10670 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
10671 running it with different test data, and make it appear as multiple test
10672 cases.")
10673 (license license:expat)))
10674
10675 (define-public python2-ddt
10676 (package-with-python2 python-ddt))
10677
10678 (define-public python-pycosat
10679 (package
10680 (name "python-pycosat")
10681 (version "0.6.1")
10682 (source
10683 (origin
10684 (method url-fetch)
10685 (uri (pypi-uri "pycosat" version))
10686 (sha256
10687 (base32
10688 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
10689 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
10690 (build-system python-build-system)
10691 (home-page "https://github.com/ContinuumIO/pycosat")
10692 (synopsis "Bindings to picosat (a SAT solver)")
10693 (description
10694 "This package provides efficient Python bindings to @code{picosat} on
10695 the C level. When importing pycosat, the @code{picosat} solver becomes part
10696 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
10697 Problem} (SAT) solver.")
10698 (license license:expat)))
10699
10700 (define-public python2-pycosat
10701 (package-with-python2 python-pycosat))
10702
10703 (define-public python2-ruamel.ordereddict
10704 (package
10705 (name "python2-ruamel.ordereddict")
10706 (version "0.4.9")
10707 (source
10708 (origin
10709 (method url-fetch)
10710 (uri (pypi-uri "ruamel.ordereddict" version))
10711 (sha256
10712 (base32
10713 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
10714 (build-system python-build-system)
10715 (arguments
10716 `(#:python ,python-2
10717 #:phases
10718 (modify-phases %standard-phases
10719 (delete 'check)
10720 (add-after 'install 'check
10721 (lambda* (#:key inputs outputs #:allow-other-keys)
10722 (add-installed-pythonpath inputs outputs)
10723 (zero? (system* "python" "test/testordereddict.py")))))))
10724 (home-page "https://bitbucket.org/ruamel/ordereddict")
10725 (synopsis "Version of dict that keeps keys in insertion order")
10726 (description
10727 "This is an implementation of an ordered dictionary with @dfn{Key
10728 Insertion Order} (KIO: updates of values do not affect the position of the
10729 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
10730 removed and put at the back). The standard library module @code{OrderedDict},
10731 implemented later, implements a subset of @code{ordereddict} functionality.
10732 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
10733 Order} (KSO, no sorting function can be specified, but a transform can be
10734 specified to apply on the key before comparison (e.g. @code{string.lower})).")
10735 (license license:expat)))
10736
10737 (define-public python-pypeg2
10738 (package
10739 (name "python-pypeg2")
10740 (version "2.15.2")
10741 (source
10742 (origin
10743 (method url-fetch)
10744 (uri (pypi-uri "pyPEG2" version))
10745 (sha256
10746 (base32
10747 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
10748 (build-system python-build-system)
10749 (propagated-inputs `(("python-lxml" ,python-lxml)))
10750 (arguments
10751 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
10752 '(#:tests? #f))
10753 (home-page "https://fdik.org/pyPEG/")
10754 (synopsis "Parsering Expression Grammars in Python")
10755 (description "PyPEG is an intrinsic parser interpreter framework for
10756 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
10757 parse many formal languages.")
10758 (license license:gpl2)))
10759
10760 (define-public python-incremental
10761 (package
10762 (name "python-incremental")
10763 (version "17.5.0")
10764 (source
10765 (origin
10766 (method url-fetch)
10767 (uri (pypi-uri "incremental" version))
10768 (sha256
10769 (base32
10770 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
10771 (build-system python-build-system)
10772 (home-page "https://github.com/hawkowl/incremental")
10773 (synopsis "Library for versioning Python projects")
10774 (description "Incremental is a small library that versions your Python
10775 projects.")
10776 (license license:expat)))
10777
10778 (define-public python2-incremental
10779 (package-with-python2 python-incremental))
10780
10781 (define-public python-invoke
10782 (package
10783 (name "python-invoke")
10784 (home-page "http://www.pyinvoke.org/")
10785 (version "1.1.0")
10786 (source (origin
10787 (method url-fetch)
10788 (uri (pypi-uri "invoke" version))
10789 (sha256
10790 (base32
10791 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
10792 (build-system python-build-system)
10793 (arguments
10794 ;; XXX: Requires many dependencies that are not yet in Guix.
10795 `(#:tests? #f))
10796 (synopsis "Pythonic task execution")
10797 (description
10798 "Invoke is a Python task execution tool and library, drawing inspiration
10799 from various sources to arrive at a powerful and clean feature set. It is
10800 evolved from the Fabric project, but focuses on local and abstract concerns
10801 instead of servers and network commands.")
10802 (license license:bsd-3)))
10803
10804 (define-public python2-invoke
10805 (package-with-python2 python-invoke))
10806
10807 (define-public python-automat
10808 (package
10809 (name "python-automat")
10810 (version "0.6.0")
10811 (source (origin
10812 (method url-fetch)
10813 (uri (pypi-uri "Automat" version))
10814 (sha256
10815 (base32
10816 "1a7nsrljysfmdqmpn2apfa1gg6rfah4y9sizvns8gb08rx7d07rw"))))
10817 (build-system python-build-system)
10818 ;; We disable the tests because they require python-twisted, while
10819 ;; python-twisted depends on python-automat. Twisted is optional, but the
10820 ;; tests fail if it is not available. Also see
10821 ;; <https://github.com/glyph/automat/issues/71>.
10822 (arguments '(#:tests? #f))
10823 (native-inputs
10824 `(("python-m2r" ,python-m2r)
10825 ("python-setuptools-scm" ,python-setuptools-scm)
10826 ("python-graphviz" ,python-graphviz)))
10827 (propagated-inputs
10828 `(("python-six" ,python-six)
10829 ("python-attrs" ,python-attrs)))
10830 (home-page "https://github.com/glyph/Automat")
10831 (synopsis "Self-service finite-state machines")
10832 (description "Automat is a library for concise, idiomatic Python
10833 expression of finite-state automata (particularly deterministic finite-state
10834 transducers).")
10835 (license license:expat)))
10836
10837 (define-public python2-automat
10838 (package-with-python2 python-automat))
10839
10840 (define-public python-m2r
10841 (package
10842 (name "python-m2r")
10843 (version "0.1.12")
10844 (source (origin
10845 (method url-fetch)
10846 (uri (pypi-uri "m2r" version))
10847 (sha256
10848 (base32
10849 "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd"))))
10850 (build-system python-build-system)
10851 (propagated-inputs
10852 `(("python-docutils" ,python-docutils)
10853 ("python-mistune" ,python-mistune)))
10854 (native-inputs
10855 `(("python-pygments" ,python-pygments)
10856 ("python-mock" ,python-mock)))
10857 (home-page "https://github.com/miyakogi/m2r")
10858 (synopsis "Markdown to reStructuredText converter")
10859 (description "M2R converts a markdown file including reST markups to valid
10860 reST format.")
10861 (license license:expat)))
10862
10863 (define-public python2-m2r
10864 (package-with-python2 python-m2r))
10865
10866 (define-public python-constantly
10867 (package
10868 (name "python-constantly")
10869 (version "15.1.0")
10870 (source (origin
10871 (method url-fetch)
10872 (uri (pypi-uri "constantly" version))
10873 (sha256
10874 (base32
10875 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
10876 (build-system python-build-system)
10877 (home-page "https://github.com/twisted/constantly")
10878 (synopsis "Symbolic constants in Python")
10879 (description "Constantly is a Python library that provides symbolic
10880 constant support. It includes collections and constants with text, numeric,
10881 and bit flag values.")
10882 (license license:expat)))
10883
10884 (define-public python2-constantly
10885 (package-with-python2 python-constantly))
10886
10887 (define-public python-attrs
10888 (package
10889 (name "python-attrs")
10890 (version "17.4.0")
10891 (source (origin
10892 (method url-fetch)
10893 (uri (pypi-uri "attrs" version))
10894 (sha256
10895 (base32
10896 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
10897 (build-system python-build-system)
10898 (native-inputs
10899 `(("python-coverage" ,python-coverage)
10900 ("python-hypothesis" ,python-hypothesis)
10901 ("python-pytest" ,python-pytest)
10902 ("python-six" ,python-six)
10903 ("python-sphinx" ,python-sphinx)
10904 ("python-zope-interface" ,python-zope-interface)))
10905 (home-page "https://github.com/python-attrs/attrs/")
10906 (synopsis "Attributes without boilerplate")
10907 (description "@code{attrs} is a Python package with class decorators that
10908 ease the chores of implementing the most common attribute-related object
10909 protocols.")
10910 (license license:expat)))
10911
10912 (define-public python2-attrs
10913 (package-with-python2 python-attrs))
10914
10915 (define-public python-attrs-bootstrap
10916 (package
10917 (inherit python-attrs)
10918 (name "python-attrs-bootstrap")
10919 (native-inputs `())
10920 (arguments `(#:tests? #f))))
10921
10922 (define-public python2-attrs-bootstrap
10923 (package-with-python2 python-attrs-bootstrap))
10924
10925 (define-public python2-cliapp
10926 (package
10927 (name "python2-cliapp")
10928 (version "1.20170823")
10929 (source
10930 (origin
10931 (method url-fetch)
10932 (uri (string-append
10933 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
10934 version ".tar.gz"))
10935 (sha256
10936 (base32
10937 "1i9gik0xrj6jmi95s5w988jl1y265baz5xm5pbqdyvsh8h9ln6yq"))))
10938 (build-system python-build-system)
10939 (arguments
10940 `(#:python ,python-2
10941 #:phases
10942 (modify-phases %standard-phases
10943 ;; check phase needs to be run before the build phase. If not,
10944 ;; coverage-test-runner looks for tests for the built source files,
10945 ;; and fails.
10946 (delete 'check)
10947 (add-before 'build 'check
10948 (lambda _
10949 ;; Disable python3 tests
10950 (substitute* "check"
10951 (("python3") "# python3"))
10952 (zero? (system* "./check")))))))
10953 (native-inputs
10954 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
10955 ("python2-pep8" ,python2-pep8)))
10956 (propagated-inputs
10957 `(("python2-pyaml" ,python2-pyaml)))
10958 (home-page "https://liw.fi/cliapp/")
10959 (synopsis "Python framework for command line programs")
10960 (description "@code{python2-cliapp} is a python framework for
10961 command line programs. It contains the typical stuff such programs
10962 need to do, such as parsing the command line for options, and
10963 iterating over input files.")
10964 (license license:gpl2+)))
10965
10966 (define-public python2-ttystatus
10967 (package
10968 (name "python2-ttystatus")
10969 (version "0.35")
10970 (source
10971 (origin
10972 (method url-fetch)
10973 (uri (string-append
10974 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
10975 version ".tar.gz"))
10976 (sha256
10977 (base32
10978 "0vivqbw7ddhsq1zj3g9cvvv4f0phl0pis2smsnwcr2szz2fk3hl6"))))
10979 (build-system python-build-system)
10980 (native-inputs
10981 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
10982 ("python2-pep8" ,python2-pep8)))
10983 (arguments
10984 `(#:python ,python-2
10985 #:phases
10986 (modify-phases %standard-phases
10987 ;; check phase needs to be run before the build phase. If not,
10988 ;; coverage-test-runner looks for tests for the built source files,
10989 ;; and fails.
10990 (delete 'check)
10991 (add-before 'build 'check
10992 (lambda _
10993 (zero? (system* "make" "check")))))))
10994 (home-page "https://liw.fi/ttystatus/")
10995 (synopsis "Python library for showing progress reporting and
10996 status updates on terminals")
10997 (description "@code{python2-ttystatus} is a python library for
10998 showing progress reporting and status updates on terminals, for
10999 command line programs. Output is automatically adapted to the width
11000 of the terminal: truncated if it does not fit, and resized if the
11001 terminal size changes.")
11002 (license license:gpl3+)))
11003
11004 (define-public python2-tracing
11005 (package
11006 (name "python2-tracing")
11007 (version "0.10")
11008 (source
11009 (origin
11010 (method url-fetch)
11011 (uri (string-append
11012 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
11013 version ".tar.gz"))
11014 (sha256
11015 (base32
11016 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
11017 (build-system python-build-system)
11018 (arguments
11019 `(#:python ,python-2))
11020 (home-page "https://liw.fi/tracing/")
11021 (synopsis "Python debug logging helper")
11022 (description "@code{python2-tracing} is a python library for
11023 logging debug messages. It provides a way to turn debugging messages
11024 on and off, based on the filename they occur in. It is much faster
11025 than using @code{logging.Filter} to accomplish the same thing, which
11026 matters when code is run in production mode. The actual logging still
11027 happens using the @code{logging} library.")
11028 (license license:gpl3+)))
11029
11030 (define-public python2-larch
11031 (package
11032 (name "python2-larch")
11033 (version "1.20151025")
11034 (source
11035 (origin
11036 (method url-fetch)
11037 (uri (string-append
11038 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
11039 version ".tar.gz"))
11040 (patches (search-patches
11041 "python2-larch-coverage-4.0a6-compatibility.patch"))
11042 (sha256
11043 (base32
11044 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
11045 (build-system python-build-system)
11046 (arguments
11047 `(#:python ,python-2
11048 #:phases
11049 (modify-phases %standard-phases
11050 ;; check phase needs to be run before the build phase. If not,
11051 ;; coverage-test-runner looks for tests for the built source files,
11052 ;; and fails.
11053 (delete 'check)
11054 (add-before 'build 'check
11055 (lambda _
11056 (zero? (system* "make" "check")))))))
11057 (native-inputs
11058 `(("cmdtest" ,cmdtest)
11059 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
11060 (propagated-inputs
11061 `(("python2-tracing" ,python2-tracing)))
11062 (home-page "https://liw.fi/larch/")
11063 (synopsis "Python copy-on-write B-tree library")
11064 (description "@code{python2-larch} is an implementation of
11065 particular kind of B-tree, based on research by Ohad Rodeh. See
11066 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
11067 on the data structure.
11068
11069 The distinctive feature of this B-tree is that a node is never
11070 (conceptually) modified. Instead, all updates are done by
11071 copy-on-write. This makes it easy to clone a tree, and modify only the
11072 clone, while other processes access the original tree.")
11073 (license license:gpl3+)))
11074
11075 (define-public python-astroid
11076 (package
11077 (name "python-astroid")
11078 (version "1.5.3")
11079 (source
11080 (origin
11081 (method url-fetch)
11082 (uri (string-append
11083 "https://github.com/PyCQA/astroid/archive/astroid-"
11084 version ".tar.gz"))
11085 (sha256
11086 (base32
11087 "0isn5p7f9n48hmksgbrj7dkm9dyglnayzn5jngk37qywg8a74ngn"))))
11088 (build-system python-build-system)
11089 (propagated-inputs
11090 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
11091 ("python-six" ,python-six)
11092 ("python-wrapt" ,python-wrapt)))
11093 (arguments
11094 `(#:phases
11095 (modify-phases %standard-phases
11096 (replace 'check
11097 (lambda _
11098 (zero? (system* "python" "-m" "unittest" "discover"
11099 "-p" "unittest*.py")))))))
11100 (home-page "https://github.com/PyCQA/astroid")
11101 (synopsis "Common base representation of python source code for pylint and
11102 other projects")
11103 (description "@code{python-astroid} provides a common base representation
11104 of python source code for projects such as pychecker, pyreverse, pylint, etc.
11105
11106 It provides a compatible representation which comes from the _ast module. It
11107 rebuilds the tree generated by the builtin _ast module by recursively walking
11108 down the AST and building an extended ast. The new node classes have
11109 additional methods and attributes for different usages. They include some
11110 support for static inference and local name scopes. Furthermore, astroid
11111 builds partial trees by inspecting living objects.")
11112 (license license:lgpl2.1+)
11113 (properties `((python2-variant . ,(delay python2-astroid))))))
11114
11115 (define-public python2-astroid
11116 (let ((base (package-with-python2
11117 (strip-python2-variant python-astroid))))
11118 (package (inherit base)
11119 (propagated-inputs
11120 `(("python2-backports-functools-lru-cache"
11121 ,python2-backports-functools-lru-cache)
11122 ("python2-enum34" ,python2-enum34)
11123 ("python2-singledispatch" ,python2-singledispatch)
11124 ,@(package-propagated-inputs base))))))
11125
11126 (define-public python-isort
11127 (package
11128 (name "python-isort")
11129 (version "4.2.5")
11130 (source
11131 (origin
11132 (method url-fetch)
11133 (uri (string-append
11134 "https://github.com/timothycrosley/isort/archive/"
11135 version ".tar.gz"))
11136 (file-name (string-append name "-" version ".tar.gz"))
11137 (sha256
11138 (base32
11139 "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh"))))
11140 (build-system python-build-system)
11141 (native-inputs
11142 `(("python-mock" ,python-mock)
11143 ("python-pytest" ,python-pytest)))
11144 (home-page "https://github.com/timothycrosley/isort")
11145 (synopsis "Python utility/library to sort python imports")
11146 (description "@code{python-isort} is a python utility/library to sort
11147 imports alphabetically, and automatically separated into sections. It
11148 provides a command line utility, a python library and plugins for various
11149 editors.")
11150 (license license:expat)))
11151
11152 (define-public python2-isort
11153 (package-with-python2 python-isort))
11154
11155 (define-public python2-backports-functools-lru-cache
11156 (package
11157 (name "python2-backports-functools-lru-cache")
11158 (version "1.3")
11159 (source
11160 (origin
11161 (method url-fetch)
11162 ;; only the pypi tarballs contain the necessary metadata
11163 (uri (pypi-uri "backports.functools_lru_cache" version))
11164 (sha256
11165 (base32
11166 "158ysf2hb0q4p4695abfiym9x1ywg0dgh8a3apd7gqaaxjy22jj4"))))
11167 (build-system python-build-system)
11168 (native-inputs
11169 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
11170 (arguments
11171 `(#:python ,python-2))
11172 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
11173 (synopsis "Backport of functools.lru_cache from Python 3.3")
11174 (description "@code{python2-backports-functools-lru-cache} is a backport
11175 of @code{functools.lru_cache} from python 3.3.")
11176 (license license:expat)))
11177
11178 (define-public python-configparser
11179 (package
11180 (name "python-configparser")
11181 (version "3.5.0")
11182 (source
11183 (origin
11184 (method url-fetch)
11185 (uri (string-append
11186 "https://bitbucket.org/ambv/configparser/get/"
11187 version ".tar.bz2"))
11188 (file-name (string-append name "-" version ".tar.gz"))
11189 (sha256
11190 (base32
11191 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
11192 (build-system python-build-system)
11193 (home-page "http://docs.python.org/py3k/library/configparser.html")
11194 (synopsis "Backport of configparser from python 3.5")
11195 (description "@code{python-configparser} is a backport of
11196 @code{configparser} from Python 3.5 so that it can be used directly
11197 in other versions.")
11198 (license license:expat)))
11199
11200 (define-public python2-configparser
11201 (package-with-python2 python-configparser))
11202
11203 (define-public python-mando
11204 (package
11205 (name "python-mando")
11206 (version "0.6.4")
11207 (source (origin
11208 (method url-fetch)
11209 (uri (pypi-uri "mando" version))
11210 (sha256
11211 (base32
11212 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
11213 (build-system python-build-system)
11214 (propagated-inputs
11215 `(("python-rst2ansi" ,python-rst2ansi)
11216 ("python-six" ,python-six)))
11217 (native-inputs
11218 `(("python-pytest" ,python-pytest)))
11219 (home-page "https://mando.readthedocs.org/")
11220 (synopsis
11221 "Wrapper around argparse, allowing creation of complete CLI applications")
11222 (description
11223 "This package is a wrapper around argparse, allowing you to write complete CLI
11224 applications in seconds while maintaining all the flexibility.")
11225 (license license:expat)))
11226
11227 (define-public python2-mando
11228 (package-with-python2 python-mando))
11229
11230 (define-public python-fudge
11231 (package
11232 (name "python-fudge")
11233 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
11234 ;; package, which is currently the only use of this package.
11235 (version "0.9.6")
11236 (source
11237 (origin
11238 (method url-fetch)
11239 (uri (pypi-uri "fudge" version))
11240 (sha256
11241 (base32
11242 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
11243 (build-system python-build-system)
11244 (arguments
11245 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
11246 (home-page "https://github.com/fudge-py/fudge")
11247 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
11248 (description
11249 "Fudge is a Python module for using fake objects (mocks and stubs) to
11250 test real ones.
11251
11252 In readable Python code, you declare the methods available on your fake object
11253 and how they should be called. Then you inject that into your application and
11254 start testing. This declarative approach means you don’t have to record and
11255 playback actions and you don’t have to inspect your fakes after running code.
11256 If the fake object was used incorrectly then you’ll see an informative
11257 exception message with a traceback that points to the culprit.")
11258 (license license:expat)))
11259
11260 (define-public python2-fudge
11261 (package-with-python2 python-fudge))
11262
11263 (define-public python-mwclient
11264 (package
11265 (name "python-mwclient")
11266 (version "0.8.4")
11267 (source
11268 (origin
11269 (method url-fetch)
11270 ;; The PyPI version wouldn't contain tests.
11271 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
11272 "v" version ".tar.gz"))
11273 (file-name (string-append name "-" version ".tar.gz"))
11274 (sha256
11275 (base32
11276 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
11277 (build-system python-build-system)
11278 (propagated-inputs
11279 `(("python-requests" ,python-requests)
11280 ("python-requests-oauthlib"
11281 ,python-requests-oauthlib)
11282 ("python-six" ,python-six)))
11283 (native-inputs
11284 `(("python-mock" ,python-mock)
11285 ("python-pytest" ,python-pytest)
11286 ("python-pytest-pep8" ,python-pytest-pep8)
11287 ("python-pytest-cache" ,python-pytest-cache)
11288 ("python-pytest-cov" ,python-pytest-cov)
11289 ("python-responses" ,python-responses)))
11290 (home-page "https://github.com/btongminh/mwclient")
11291 (synopsis "MediaWiki API client")
11292 (description "This package provides a MediaWiki API client.")
11293 (license license:expat)))
11294
11295 (define-public python2-mwclient
11296 (package-with-python2 python-mwclient))
11297
11298 (define-public python-utils
11299 (package
11300 (name "python-utils")
11301 (version "2.1.0")
11302 (source (origin
11303 (method url-fetch)
11304 (uri (pypi-uri "python-utils" version))
11305 (sha256
11306 (base32
11307 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
11308 (build-system python-build-system)
11309 (native-inputs
11310 `(("pytest-runner" ,python-pytest-runner)
11311 ("pytest" ,python-pytest)
11312 ("six" ,python-six)))
11313 (home-page "https://github.com/WoLpH/python-utils")
11314 (synopsis "Convenient utilities not included with the standard Python install")
11315 (description
11316 "Python Utils is a collection of small Python functions and classes which
11317 make common patterns shorter and easier.")
11318 (license license:bsd-2)))
11319
11320 (define-public python2-utils
11321 (package-with-python2 python-utils))
11322
11323 (define-public python-sphinx-me
11324 (package
11325 (name "python-sphinx-me")
11326 (version "0.3")
11327 (source
11328 (origin
11329 (method url-fetch)
11330 (uri (pypi-uri "sphinx-me" version))
11331 (sha256
11332 (base32
11333 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
11334 (build-system python-build-system)
11335 (home-page "https://github.com/stephenmcd/sphinx-me")
11336 (synopsis "Create a Sphinx documentation shell")
11337 (description
11338 "Create a Sphinx documentation shell for your project and include the
11339 README file as the documentation index. It handles extracting the required
11340 meta data such as the project name, author and version from your project for
11341 use in your Sphinx docs.")
11342 (license license:bsd-2)))
11343
11344 (define-public python2-sphinx-me
11345 (package-with-python2 python-sphinx-me))
11346
11347 (define-public python-diff-match-patch
11348 (package
11349 (name "python-diff-match-patch")
11350 (version "20121119")
11351 (source
11352 (origin
11353 (method url-fetch)
11354 (uri (pypi-uri "diff-match-patch" version))
11355 (sha256
11356 (base32
11357 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
11358 (build-system python-build-system)
11359 (home-page "https://code.google.com/p/google-diff-match-patch")
11360 (synopsis "Synchronize plain text")
11361 (description "Diff Match and Patch libraries offer robust algorithms to
11362 perform the operations required for synchronizing plain text.")
11363 (license license:asl2.0)))
11364
11365 (define-public python2-diff-match-patch
11366 (package-with-python2 python-diff-match-patch))
11367
11368 (define-public python-dirsync
11369 (package
11370 (name "python-dirsync")
11371 (version "2.2.2")
11372 (source
11373 (origin
11374 (method url-fetch)
11375 (uri (pypi-uri "dirsync" version ".zip"))
11376 (sha256
11377 (base32
11378 "1hcdvmkwd5512zbxpin0k7bx5bkgzy3swjx7d0kj1y45af6r75v2"))))
11379 (build-system python-build-system)
11380 (native-inputs
11381 `(("unzip" ,unzip)))
11382 (propagated-inputs
11383 `(("six" ,python-six)))
11384 (home-page "https://bitbucket.org/tkhyn/dirsync")
11385 (synopsis "Advanced directory tree synchronisation tool")
11386 (description "Advanced directory tree synchronisation tool.")
11387 (license license:expat)))
11388
11389 (define-public python2-dirsync
11390 (package-with-python2 python-dirsync))
11391
11392 (define-public python-levenshtein
11393 (package
11394 (name "python-levenshtein")
11395 (version "0.12.0")
11396 (source
11397 (origin
11398 (method url-fetch)
11399 (uri (pypi-uri "python-Levenshtein" version))
11400 (sha256
11401 (base32
11402 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
11403 (build-system python-build-system)
11404 (home-page "https://github.com/ztane/python-Levenshtein")
11405 (synopsis "Fast computation of Levenshtein distance and string similarity")
11406 (description
11407 "The Levenshtein Python C extension module contains functions for fast computation of
11408 @enumerate
11409 @item Levenshtein (edit) distance, and edit operations
11410 @item string similarity
11411 @item approximate median strings, and generally string averaging
11412 @item string sequence and set similarity
11413 @end enumerate
11414 It supports both normal and Unicode strings.")
11415 (license license:gpl2+)))
11416
11417 (define-public python2-levenshtein
11418 (package-with-python2 python-levenshtein))
11419
11420 (define-public python-scandir
11421 (package
11422 (name "python-scandir")
11423 (version "1.7")
11424 (source
11425 (origin
11426 (method url-fetch)
11427 (uri (pypi-uri "scandir" version))
11428 (sha256
11429 (base32 "0gbnhjzg42rj87ljv9kb648rfxph69ly3c8r9841dxy4d7l5pmdj"))))
11430 (build-system python-build-system)
11431 (arguments
11432 `(#:phases (modify-phases %standard-phases
11433 (replace 'check
11434 (lambda _
11435 (invoke "python" "test/run_tests.py"))))))
11436 (home-page "https://github.com/benhoyt/scandir")
11437 (synopsis "Directory iteration function")
11438 (description
11439 "Directory iteration function like os.listdir(), except that instead of
11440 returning a list of bare filenames, it yields DirEntry objects that include
11441 file type and stat information along with the name. Using scandir() increases
11442 the speed of os.walk() by 2-20 times (depending on the platform and file
11443 system) by avoiding unnecessary calls to os.stat() in most cases.
11444
11445 This package is part of the Python standard library since version 3.5.")
11446 (license license:bsd-3)))
11447
11448 (define-public python2-scandir
11449 (package-with-python2 python-scandir))
11450
11451 (define-public python2-stemming
11452 (package
11453 (name "python2-stemming")
11454 (version "1.0.1")
11455 (source
11456 (origin
11457 (method url-fetch)
11458 (uri (pypi-uri "stemming" version))
11459 (sha256
11460 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
11461 (build-system python-build-system)
11462 (arguments
11463 `(#:python ,python-2))
11464 (home-page "https://bitbucket.org/mchaput/stemming/overview")
11465 (synopsis "Python implementations of various stemming algorithms")
11466 (description
11467 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
11468 stemming algorithms for English. These implementations are straightforward and
11469 efficient, unlike some Python versions of the same algorithms available on the
11470 Web. This package is an extraction of the stemming code included in the Whoosh
11471 search engine.")
11472 (license license:public-domain)))
11473
11474 (define-public python-factory-boy
11475 (package
11476 (name "python-factory-boy")
11477 (version "2.8.1")
11478 (source
11479 (origin
11480 (method url-fetch)
11481 (uri (pypi-uri "factory_boy" version))
11482 (sha256
11483 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
11484 (build-system python-build-system)
11485 (arguments
11486 ;; Tests are not included in the tarball.
11487 `(#:tests? #f))
11488 (propagated-inputs
11489 `(("faker" ,python-faker)))
11490 (home-page "https://github.com/benhoyt/scandir")
11491 (synopsis "Versatile test fixtures replacement")
11492 (description
11493 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
11494
11495 As a fixtures replacement tool, it aims to replace static, hard to maintain
11496 fixtures with easy-to-use factories for complex object.
11497
11498 Instead of building an exhaustive test setup with every possible combination
11499 of corner cases, factory_boy allows you to use objects customized for the
11500 current test, while only declaring the test-specific fields")
11501 (license license:expat)))
11502
11503 (define-public python2-factory-boy
11504 (package-with-python2 python-factory-boy))
11505
11506 (define-public python-translate-toolkit
11507 (package
11508 (name "python-translate-toolkit")
11509 (version "2.1.0")
11510 (source
11511 (origin
11512 (method url-fetch)
11513 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
11514 (sha256
11515 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
11516 (build-system python-build-system)
11517 (native-inputs
11518 `(("python-pytest" ,python-pytest)
11519 ("python-sphinx" ,python-sphinx)))
11520 (propagated-inputs
11521 `(("python-babel" ,python-babel)
11522 ("python-beautifulsoup4" ,python-beautifulsoup4)
11523 ("python-chardet" ,python-chardet)
11524 ("python-diff-match-patch" ,python-diff-match-patch)
11525 ("python-levenshtein" ,python-levenshtein)
11526 ("python-lxml" ,python-lxml)
11527 ("python-six" ,python-six)
11528 ("python-vobject" ,python-vobject)
11529 ("python-pyyaml" ,python-pyyaml)))
11530 (arguments
11531 ;; TODO: tests are not run, because they end with
11532 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
11533 ;; 'parse_funcs'
11534 ;; during test setup.
11535 `(#:tests? #f))
11536 (home-page "http://toolkit.translatehouse.org")
11537 (synopsis "Tools and API for translation and localization engineering")
11538 (description
11539 "Tools and API for translation and localization engineering. It contains
11540 several utilities, as well as an API for building localization tools.")
11541 (license license:gpl2+)))
11542
11543 (define-public python2-translate-toolkit
11544 (package-with-python2 python-translate-toolkit))
11545
11546 (define-public python-packaging
11547 (package
11548 (name "python-packaging")
11549 (version "16.8")
11550 (source
11551 (origin
11552 (method url-fetch)
11553 (uri (pypi-uri "packaging" version))
11554 (sha256
11555 (base32
11556 "17k1xbjshackwvbsnxqixbph8rbqhz4bf4g3al5xyzhavxgq6l2x"))))
11557 (build-system python-build-system)
11558 (native-inputs
11559 `(("python-pretend" ,python-pretend)
11560 ("python-pytest" ,python-pytest)))
11561 (propagated-inputs
11562 `(("python-pyparsing" ,python-pyparsing)
11563 ("python-six" ,python-six)))
11564 (home-page "https://github.com/pypa/packaging")
11565 (synopsis "Core utilities for Python packages")
11566 (description "Packaging is a Python module for dealing with Python packages.
11567 It offers an interface for working with package versions, names, and dependency
11568 information.")
11569 ;; From 'LICENSE': This software is made available under the terms of
11570 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
11571 ;; Contributions to this software is made under the terms of *both* these
11572 ;; licenses.
11573 (license (list license:asl2.0 license:bsd-2))))
11574
11575 (define-public python2-packaging
11576 (package-with-python2 python-packaging))
11577
11578 (define-public python-relatorio
11579 (package
11580 (name "python-relatorio")
11581 (version "0.8.0")
11582 (source
11583 (origin
11584 (method url-fetch)
11585 (uri (pypi-uri "relatorio" version))
11586 (sha256
11587 (base32
11588 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
11589 (build-system python-build-system)
11590 (propagated-inputs
11591 `(("python-lxml" ,python-lxml)
11592 ("python-genshi" ,python-genshi)))
11593 (native-inputs
11594 `(("python-magic" ,python-magic)))
11595 (home-page "https://relatorio.tryton.org/")
11596 (synopsis "Templating library able to output ODT and PDF files")
11597 (description "Relatorio is a templating library which provides a way to
11598 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
11599 for more filetypes can be easily added by creating plugins for them.")
11600 (license license:gpl3+)))
11601
11602 (define-public python2-relatorio
11603 (package-with-python2 python-relatorio))
11604
11605 (define-public python-radon
11606 (package
11607 (name "python-radon")
11608 (version "2.2.0")
11609 (source
11610 (origin
11611 (method url-fetch)
11612 (uri (pypi-uri "radon" version))
11613 (sha256
11614 (base32
11615 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
11616 (build-system python-build-system)
11617 (arguments
11618 `(#:phases (modify-phases %standard-phases
11619 (replace 'check
11620 (lambda _
11621 (invoke "python" "radon/tests/run.py"))))))
11622 (propagated-inputs
11623 `(("python-colorama" ,python-colorama)
11624 ("python-flake8-polyfill" ,python-flake8-polyfill)
11625 ("python-mando" ,python-mando)))
11626 (native-inputs
11627 `(("python-pytest" ,python-pytest)
11628 ("python-pytest-mock" ,python-pytest-mock)))
11629 (home-page "https://radon.readthedocs.org/")
11630 (synopsis "Code Metrics in Python")
11631 (description "Radon is a Python tool which computes various code metrics.
11632 Supported metrics are:
11633 @itemize @bullet
11634 @item raw metrics: SLOC, comment lines, blank lines, &c.
11635 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
11636 @item Halstead metrics (all of them)
11637 @item the Maintainability Index (a Visual Studio metric)
11638 @end itemize")
11639 (license license:expat)))
11640
11641 (define-public python2-radon
11642 (package-with-python2 python-radon))
11643
11644 (define-public python-sure
11645 (package
11646 (name "python-sure")
11647 (version "1.4.6")
11648 (source
11649 (origin
11650 (method url-fetch)
11651 (uri (pypi-uri "sure" version))
11652 (sha256
11653 (base32
11654 "1iyqsy2d6radi88g1qf0lziy5b39h5cpb3g5jiqyb4xi46ig3x1z"))))
11655 (build-system python-build-system)
11656 (propagated-inputs
11657 `(("python-mock" ,python-mock)
11658 ("python-six" ,python-six)))
11659 (native-inputs
11660 `(("python-nose" ,python-nose)))
11661 (home-page "https://github.com/gabrielfalcao/sure")
11662 (synopsis "Automated testing library in python for python")
11663 (description
11664 "Sure is a python library that leverages a DSL for writing assertions.
11665 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
11666 (license license:gpl3+)))
11667
11668 (define-public python2-sure
11669 (package-with-python2 python-sure))
11670
11671 (define-public python2-couleur
11672 ;; This package does not seem to support python3 at all, hence,
11673 ;; only the python2 variant definition is provided.
11674 (package
11675 (name "python2-couleur")
11676 (version "0.6.2")
11677 (source
11678 (origin
11679 (method url-fetch)
11680 (uri (pypi-uri "couleur" version))
11681 (sha256
11682 (base32
11683 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
11684 (build-system python-build-system)
11685 (arguments
11686 `(#:python ,python-2))
11687 (home-page "https://github.com/gabrielfalcao/couleur")
11688 (synopsis
11689 "ANSI terminal tool for python, colored shell and other handy fancy features")
11690 (description
11691 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
11692 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
11693 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
11694 ;; https://github.com/gabrielfalcao/couleur/issues/11
11695 (license license:lgpl3+)))
11696
11697 (define-public python-misaka
11698 (package
11699 (name "python-misaka")
11700 (version "2.1.0")
11701 (source
11702 (origin
11703 (method url-fetch)
11704 (uri (pypi-uri "misaka" version))
11705 (sha256
11706 (base32
11707 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
11708 (build-system python-build-system)
11709 (arguments
11710 `(;; Line 37 of setup.py calls self.run_command('develop')
11711 ;; in the 'check' phase. This command seems to be trying
11712 ;; to write to
11713 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
11714 ;; for which it does not have the permission to write.
11715 #:tests? #f))
11716 (propagated-inputs
11717 `(("python-cffi" ,python-cffi)))
11718 (home-page "https://github.com/FSX/misaka")
11719 (synopsis "Python binding for Hoedown")
11720 (description
11721 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
11722 library written in C. It features a fast HTML renderer and functionality to make custom
11723 renderers (e.g. man pages or LaTeX).")
11724 (license license:expat)))
11725
11726 (define-public python2-misaka
11727 (package-with-python2 python-misaka))
11728
11729 (define-public python2-steadymark
11730 ;; This is forced into being a python2 only variant
11731 ;; due to its dependence on couleur that has no support
11732 ;; for python3
11733 (package
11734 (name "python2-steadymark")
11735 (version "0.7.3")
11736 (source
11737 (origin
11738 (method url-fetch)
11739 (uri (pypi-uri "steadymark" version))
11740 (sha256
11741 (base32
11742 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
11743 (build-system python-build-system)
11744 (native-inputs
11745 `(("python-couleur" ,python2-couleur)
11746 ("python-sure" ,python2-sure)
11747 ("python-misaka" ,python2-misaka)))
11748 (arguments
11749 `(#:python ,python-2
11750 #:phases
11751 (modify-phases %standard-phases
11752 (add-before 'build 'patch-setup-py
11753 (lambda _
11754 ;; Update requirements from dependency==version
11755 ;; to dependency>=version
11756 (substitute* "setup.py"
11757 (("==") ">="))
11758 #t)))))
11759 (home-page "https://github.com/gabrielfalcao/steadymark")
11760 (synopsis "Markdown-based test runner for python")
11761 (description
11762 "@code{Steadymark} allows documentation to be written in github-flavoured
11763 markdown. The documentation may contain snippets of code surrounded by python
11764 code blocks and @code{Steadymark} will find these snippets and run them, making
11765 sure that there are no old malfunctional examples in the documentation examples.")
11766 (license license:expat)))
11767
11768 (define-public python-jsonpointer
11769 (package
11770 (name "python-jsonpointer")
11771 (version "1.10")
11772 (source
11773 (origin
11774 (method url-fetch)
11775 (uri (pypi-uri "jsonpointer" version))
11776 (sha256
11777 (base32
11778 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
11779 (build-system python-build-system)
11780 (home-page "https://github.com/stefankoegl/python-json-pointer")
11781 (synopsis "Identify specific nodes in a JSON document")
11782 (description "@code{jsonpointer} allows you to access specific nodes
11783 by path in a JSON document (see RFC 6901).")
11784 (license license:bsd-3)))
11785
11786 (define-public python2-jsonpointer
11787 (package-with-python2 python-jsonpointer))
11788
11789 (define-public python-jsonpatch
11790 (package
11791 (name "python-jsonpatch")
11792 (version "1.16")
11793 (source
11794 (origin
11795 (method url-fetch)
11796 ;; pypi version lacks tests.js
11797 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
11798 "archive/v" version ".tar.gz"))
11799 (file-name (string-append name "-" version ".tar.gz"))
11800 (sha256
11801 (base32
11802 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
11803 (build-system python-build-system)
11804 (native-inputs
11805 `(("python-jsonpointer" ,python-jsonpointer)))
11806 (home-page "https://github.com/stefankoegl/python-json-patch")
11807 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
11808 (description "@code{jsonpatch} is a library and program that allows
11809 applying JSON Patches according to RFC 6902.")
11810 (license license:bsd-3)))
11811
11812 (define-public python2-jsonpatch
11813 (package-with-python2 python-jsonpatch))
11814
11815 (define-public python-jsonpatch-0.4
11816 (package (inherit python-jsonpatch)
11817 (name "python-jsonpatch")
11818 (version "0.4")
11819 (source
11820 (origin
11821 (method url-fetch)
11822 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
11823 "archive/v" version ".tar.gz"))
11824 (file-name (string-append name "-" version ".tar.gz"))
11825 (sha256
11826 (base32
11827 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
11828
11829 (define-public python2-jsonpatch-0.4
11830 (package-with-python2 python-jsonpatch-0.4))
11831
11832 (define-public python-rfc3986
11833 (package
11834 (name "python-rfc3986")
11835 (version "1.1.0")
11836 (source (origin
11837 (method url-fetch)
11838 (uri (pypi-uri "rfc3986" version))
11839 (sha256
11840 (base32
11841 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
11842 (build-system python-build-system)
11843 (arguments
11844 `(#:modules ((guix build utils)
11845 (guix build python-build-system)
11846 (ice-9 ftw)
11847 (srfi srfi-1)
11848 (srfi srfi-26))
11849 #:phases
11850 (modify-phases %standard-phases
11851 (replace 'check
11852 (lambda _
11853 (let ((cwd (getcwd)))
11854 (setenv "PYTHONPATH"
11855 (string-append cwd "/build/"
11856 (find (cut string-prefix? "lib" <>)
11857 (scandir (string-append cwd "/build")))
11858 ":"
11859 (getenv "PYTHONPATH")))
11860 (invoke "pytest" "-v")))))))
11861 (native-inputs
11862 `(("python-pytest" ,python-pytest)))
11863 (home-page "https://rfc3986.readthedocs.io/")
11864 (synopsis "Parse and validate URI references")
11865 (description
11866 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
11867 validation and authority parsing. This module also supports RFC@tie{}6874
11868 which adds support for zone identifiers to IPv6 addresses.")
11869 (license license:asl2.0)))
11870
11871 (define-public python2-rfc3986
11872 (package-with-python2 python-rfc3986))
11873
11874 (define-public python-rfc3987
11875 (package
11876 (name "python-rfc3987")
11877 (version "1.3.7")
11878 (source
11879 (origin
11880 (method url-fetch)
11881 (uri (pypi-uri "rfc3987" version))
11882 (sha256
11883 (base32
11884 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
11885 (build-system python-build-system)
11886 (home-page "https://pypi.python.org/pypi/rfc3987")
11887 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
11888 (description "@code{rfc3987} provides routines for parsing and
11889 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
11890 (license license:gpl3+)))
11891
11892 (define-public python2-rfc3987
11893 (package-with-python2 python-rfc3987))
11894
11895 (define-public python-validate-email
11896 (package
11897 (name "python-validate-email")
11898 (version "1.3")
11899 (source
11900 (origin
11901 (method url-fetch)
11902 (uri (pypi-uri "validate_email" version))
11903 (sha256
11904 (base32
11905 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
11906 (build-system python-build-system)
11907 (home-page "https://github.com/syrusakbary/validate_email")
11908 (synopsis "Verifies if an email address is valid and really exists")
11909 (description "@code{validate_email} can be used to verify if an email
11910 address is valid and really exists.")
11911 (license license:lgpl3+)))
11912
11913 (define-public python2-validate-email
11914 (package-with-python2 python-validate-email))
11915
11916 (define-public python-flex
11917 (package
11918 (name "python-flex")
11919 (version "6.10.0")
11920 (source
11921 (origin
11922 (method url-fetch)
11923 (uri (pypi-uri "flex" version))
11924 (sha256
11925 (base32
11926 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
11927 (build-system python-build-system)
11928 (propagated-inputs
11929 `(("python-click" ,python-click)
11930 ("python-iso8601" ,python-iso8601)
11931 ("python-jsonpointer" ,python-jsonpointer)
11932 ("python-pyyaml" ,python-pyyaml)
11933 ("python-requests" ,python-requests)
11934 ("python-rfc3987" ,python-rfc3987)
11935 ("python-six" ,python-six)
11936 ("python-validate-email" ,python-validate-email)))
11937 (home-page "https://github.com/pipermerriam/flex")
11938 (synopsis "Validates Swagger schemata")
11939 (description "@code{flex} can be used to validate Swagger schemata.")
11940 (license license:bsd-3)))
11941
11942 (define-public python2-flex
11943 (package-with-python2 python-flex))
11944
11945 (define-public python-marshmallow
11946 (package
11947 (name "python-marshmallow")
11948 (version "3.0.0b3")
11949 (source
11950 (origin
11951 (method url-fetch)
11952 (uri (pypi-uri "marshmallow" version))
11953 (sha256
11954 (base32
11955 "07mcrij1yvk85lvgx44wwr9pc80xryghvlgayb057g1cazcypysd"))))
11956 (build-system python-build-system)
11957 (propagated-inputs
11958 `(("python-dateutil" ,python-dateutil)
11959 ("python-simplejson" ,python-simplejson)))
11960 (native-inputs
11961 `(("python-pytest" ,python-pytest)
11962 ("python-pytz" ,python-pytz)))
11963 (home-page "https://github.com/marshmallow-code/marshmallow")
11964 (synopsis "Convert complex datatypes to and from native
11965 Python datatypes.")
11966 (description "@code{marshmallow} provides a library for converting
11967 complex datatypes to and from native Python datatypes.")
11968 (license license:expat)))
11969
11970 (define-public python2-marshmallow
11971 (package-with-python2 python-marshmallow))
11972
11973 (define-public python-apispec
11974 (package
11975 (name "python-apispec")
11976 (version "0.25.3")
11977 (source
11978 (origin
11979 (method url-fetch)
11980 (uri (pypi-uri "apispec" version))
11981 (sha256
11982 (base32
11983 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
11984 (build-system python-build-system)
11985 (propagated-inputs
11986 `(("python-pyyaml" ,python-pyyaml)))
11987 (native-inputs
11988 `(("python-pytest" ,python-pytest)
11989 ("python-flask" ,python-flask)
11990 ("python-marshmallow" ,python-marshmallow)
11991 ("python-tornado" ,python-tornado)
11992 ("python-bottle" ,python-bottle)
11993 ("python-mock" ,python-mock)))
11994 (home-page "https://github.com/marshmallow-code/apispec")
11995 (synopsis "Swagger 2.0 API specification generator")
11996 (description "@code{python-apispec} is a pluggable API specification
11997 generator. Currently supports the OpenAPI specification (f.k.a.
11998 Swagger 2.0).")
11999 (license license:expat)))
12000
12001 (define-public python2-apispec
12002 (package-with-python2 python-apispec))
12003
12004 (define-public python-flasgger
12005 (package
12006 (name "python-flasgger")
12007 (version "0.6.3")
12008 (source
12009 (origin
12010 (method url-fetch)
12011 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
12012 version ".tar.gz"))
12013 (file-name (string-append name "-" version ".tar.gz"))
12014 (sha256
12015 (base32
12016 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
12017 (build-system python-build-system)
12018 (arguments
12019 `(#:phases
12020 (modify-phases %standard-phases
12021 (replace 'check
12022 (lambda* (#:key inputs outputs #:allow-other-keys)
12023 (substitute* "Makefile"
12024 (("flake8 flasgger --ignore=F403")
12025 "flake8 flasgger --ignore=E731,F403"))
12026 (setenv "PYTHONPATH" (string-append (getcwd)
12027 ":"
12028 (getenv "PYTHONPATH")))
12029 (zero? (system* "py.test")))))))
12030 (propagated-inputs
12031 `(("python-flask" ,python-flask)
12032 ("python-pyyaml" ,python-pyyaml)
12033 ("python-jsonschema" ,python-jsonschema)
12034 ("python-mistune" ,python-mistune)
12035 ("python-six" ,python-six)))
12036 (native-inputs
12037 `(("python-decorator" ,python-decorator)
12038 ("python-flake8" ,python-flake8)
12039 ("python-flask-restful" ,python-flask-restful)
12040 ("python-flex" ,python-flex)
12041 ("python-pytest" ,python-pytest)
12042 ("python-pytest-cov" ,python-pytest-cov)
12043 ("python-marshmallow" ,python-marshmallow)
12044 ("python-apispec" ,python-apispec)))
12045 (home-page "https://github.com/rochacbruno/flasgger/")
12046 (synopsis "Extract Swagger specs from your Flask project")
12047 (description "@code{python-flasgger} allows extracting Swagger specs
12048 from your Flask project. It is a fork of Flask-Swagger.")
12049 (license license:expat)))
12050
12051 (define-public python2-flasgger
12052 (package-with-python2 python-flasgger))
12053
12054 (define-public python-swagger-spec-validator
12055 (package
12056 (name "python-swagger-spec-validator")
12057 (version "2.1.0")
12058 (source
12059 (origin
12060 (method url-fetch)
12061 (uri (pypi-uri "swagger-spec-validator" version))
12062 (sha256
12063 (base32
12064 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
12065 (build-system python-build-system)
12066 (propagated-inputs
12067 `(("python-jsonschema" ,python-jsonschema)
12068 ("python-six" ,python-six)))
12069 (home-page
12070 "https://github.com/Yelp/swagger_spec_validator")
12071 (synopsis "Validation of Swagger specifications")
12072 (description "@code{swagger_spec_validator} provides a library for
12073 validating Swagger API specifications.")
12074 (license license:asl2.0)))
12075
12076 (define-public python2-swagger-spec-validator
12077 (package-with-python2 python-swagger-spec-validator))
12078
12079 (define-public python-apache-libcloud
12080 (package
12081 (name "python-apache-libcloud")
12082 (version "2.0.0")
12083 (source
12084 (origin
12085 (method url-fetch)
12086 (uri (pypi-uri "apache-libcloud" version))
12087 (sha256
12088 (base32
12089 "1a71z02ckcxld72k4qgmdnkjan52c4wczncs3p2mp5yafh7dsan7"))))
12090 (build-system python-build-system)
12091 (arguments
12092 `(#:phases
12093 (modify-phases %standard-phases
12094 (add-after 'unpack 'patch-ssh
12095 (lambda* (#:key inputs #:allow-other-keys)
12096 (substitute* "libcloud/compute/ssh.py"
12097 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
12098 "/bin/ssh" "'")))
12099 #t))
12100 (add-after 'unpack 'patch-tests
12101 (lambda _
12102 (substitute* "./libcloud/test/test_file_fixtures.py"
12103 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
12104 (("def _ascii") "def _raw_data(self, method, url, body, headers):
12105 return (httplib.OK,
12106 \"1234abcd\",
12107 {\"test\": \"value\"},
12108 httplib.responses[httplib.OK])
12109 def _ascii"))
12110 (substitute* "libcloud/test/compute/test_ssh_client.py"
12111 (("class ShellOutSSHClientTests")
12112 "@unittest.skip(\"Guix container doesn't have ssh service\")
12113 class ShellOutSSHClientTests")
12114 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
12115 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
12116 (("'.xF0', '.x90', '.x8D', '.x88'")
12117 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
12118 #t)))))
12119 (inputs
12120 `(("openssh" ,openssh)))
12121 (propagated-inputs
12122 `(("python-paramiko" ,python-paramiko)
12123 ("python-requests" ,python-requests)))
12124 (native-inputs
12125 `(("python-lockfile" ,python-lockfile)
12126 ("python-mock" ,python-mock)
12127 ("python-requests-mock" ,python-requests-mock)))
12128 (home-page "https://libcloud.apache.org/")
12129 (synopsis "Unified Cloud API")
12130 (description "@code{libcloud} is a Python library for interacting with
12131 many of the popular cloud service providers using a unified API.")
12132 (license license:asl2.0)))
12133
12134 (define-public python2-apache-libcloud
12135 (package-with-python2 python-apache-libcloud))
12136
12137 (define-public python-smmap2
12138 (package
12139 (name "python-smmap2")
12140 (version "2.0.3")
12141 (source
12142 (origin
12143 (method url-fetch)
12144 (uri (pypi-uri "smmap2" version))
12145 (sha256
12146 (base32
12147 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
12148 (build-system python-build-system)
12149 (native-inputs
12150 `(("python-nosexcover" ,python-nosexcover)))
12151 (home-page "https://github.com/Byron/smmap")
12152 (synopsis "Python sliding window memory map manager")
12153 (description "@code{smmap2} is a pure Python implementation of a sliding
12154 window memory map manager.")
12155 (license license:bsd-3)))
12156
12157 (define-public python2-smmap2
12158 (package-with-python2 python-smmap2))
12159
12160 (define-public python-regex
12161 (package
12162 (name "python-regex")
12163 (version "2017.06.07")
12164 (source (origin
12165 (method url-fetch)
12166 (uri (pypi-uri "regex" version))
12167 (sha256
12168 (base32
12169 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
12170 (build-system python-build-system)
12171 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
12172 (synopsis "Alternative regular expression module")
12173 (description "This regular expression implementation is backwards-
12174 compatible with the standard @code{re} module, but offers additional
12175 functionality like full case-folding for case-insensitive matches in Unicode.")
12176 (license license:psfl)))
12177
12178 (define-public python2-regex
12179 (package-with-python2 python-regex))
12180
12181 (define-public python2-pyopengl
12182 (package
12183 (name "python2-pyopengl")
12184 (version "3.1.0")
12185 (source
12186 (origin
12187 (method url-fetch)
12188 (uri (pypi-uri "PyOpenGL" version))
12189 (sha256
12190 (base32
12191 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
12192 (arguments
12193 `(#:python ,python-2))
12194 (build-system python-build-system)
12195 (home-page "http://pyopengl.sourceforge.net")
12196 (synopsis "Standard OpenGL bindings for Python")
12197 (description
12198 "PyOpenGL is the most common cross platform Python binding to OpenGL and
12199 related APIs. The binding is created using the standard @code{ctypes}
12200 library.")
12201 (license license:bsd-3)))
12202
12203 (define-public python2-pyopengl-accelerate
12204 (package
12205 (inherit python2-pyopengl)
12206 (name "python2-pyopengl-accelerate")
12207 (version "3.1.0")
12208 (source
12209 (origin
12210 (method url-fetch)
12211 (uri (pypi-uri "PyOpenGL-accelerate" version))
12212 (sha256
12213 (base32
12214 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
12215 (synopsis "Acceleration code for PyOpenGL")
12216 (description
12217 "This is the Cython-coded accelerator module for PyOpenGL.")))
12218
12219 (define-public python-rencode
12220 (package
12221 (name "python-rencode")
12222 (version "1.0.3")
12223 (source
12224 (origin
12225 (method url-fetch)
12226 (uri (pypi-uri "rencode" version))
12227 (sha256
12228 (base32
12229 "08if5yax1xn5yfp8p3765ccjmfcv9di7i4m5jckgnwvdsgznwkbj"))))
12230 (build-system python-build-system)
12231 (native-inputs `(("pkg-config" ,pkg-config)
12232 ("python-cython" ,python-cython)))
12233 (home-page "https://github.com/aresch/rencode")
12234 (synopsis "Serialization of heterogeneous data structures")
12235 (description
12236 "The @code{rencode} module is a data structure serialization library,
12237 similar to @code{bencode} from the BitTorrent project. For complex,
12238 heterogeneous data structures with many small elements, r-encoding stake up
12239 significantly less space than b-encodings. This version of rencode is a
12240 complete rewrite in Cython to attempt to increase the performance over the
12241 pure Python module.")
12242 (license license:bsd-3)))
12243
12244 (define-public python2-rencode
12245 (package-with-python2 python-rencode))
12246
12247 (define-public python-xenon
12248 (package
12249 (name "python-xenon")
12250 (version "0.5.4")
12251 (source
12252 (origin
12253 (method url-fetch)
12254 (uri (pypi-uri "xenon" version))
12255 (sha256
12256 (base32
12257 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
12258 (build-system python-build-system)
12259 (native-inputs
12260 `(("python-pyyaml" ,python-pyyaml)
12261 ("python-radon" ,python-radon)
12262 ("python-requests" ,python-requests)
12263 ("python-flake8" ,python-flake8)
12264 ("python-tox" ,python-tox)))
12265 (arguments
12266 `(#:phases
12267 (modify-phases %standard-phases
12268 (add-before 'build 'patch-test-requirements
12269 (lambda _
12270 ;; Remove httpretty dependency for tests.
12271 (substitute* "setup.py"
12272 (("httpretty") ""))
12273 #t)))))
12274 (home-page "https://xenon.readthedocs.org/")
12275 (synopsis "Monitor code metrics for Python on your CI server")
12276 (description
12277 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
12278 Ideally, @code{xenon} is run every time code is committed. Through command
12279 line options, various thresholds can be set for the complexity of code. It
12280 will fail (i.e. it will exit with a non-zero exit code) when any of these
12281 requirements is not met.")
12282 (license license:expat)))
12283
12284 (define-public python2-xenon
12285 (package-with-python2 python-xenon))
12286
12287 (define-public python-pysocks
12288 (package
12289 (name "python-pysocks")
12290 (version "1.6.7")
12291 (source
12292 (origin
12293 (method url-fetch)
12294 (uri (pypi-uri "PySocks" version))
12295 (sha256
12296 (base32
12297 "1krkiss578zqwcg4c8iqz1hwscwhsvy2djp3xyvps5gsgvr2j0yh"))))
12298 (build-system python-build-system)
12299 (arguments `(#:tests? #f))
12300 (home-page "https://github.com/Anorov/PySocks")
12301 (synopsis "SOCKS client module")
12302 (description "@code{pysocks} is an updated and semi-actively maintained
12303 version of @code{SocksiPy} with bug fixes and extra features.")
12304 (license license:bsd-3)))
12305
12306 (define-public python2-pysocks
12307 (package-with-python2 python-pysocks))
12308
12309 (define-public python-pydiff
12310 (package
12311 (name "python-pydiff")
12312 (version "0.2")
12313 (source
12314 (origin
12315 (method url-fetch)
12316 (uri (pypi-uri "pydiff" version))
12317 (sha256
12318 (base32
12319 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
12320 (build-system python-build-system)
12321 (home-page "https://github.com/myint/pydiff")
12322 (synopsis "Library to diff two Python files at the bytecode level")
12323 (description
12324 "@code{pydiff} makes it easy to look for actual code changes while
12325 ignoring formatting changes.")
12326 (license license:expat)))
12327
12328 (define-public python2-pydiff
12329 (package-with-python2 python-pydiff))
12330
12331 (define-public python-tqdm
12332 (package
12333 (name "python-tqdm")
12334 (version "4.19.6")
12335 (source
12336 (origin
12337 (method url-fetch)
12338 (uri (pypi-uri "tqdm" version))
12339 (sha256
12340 (base32
12341 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
12342 (build-system python-build-system)
12343 (native-inputs
12344 `(("python-flake8" ,python-flake8)
12345 ("python-nose" ,python-nose)
12346 ("python-coverage" ,python-coverage)))
12347 (home-page "https://github.com/tqdm/tqdm")
12348 (synopsis "Fast, extensible progress meter")
12349 (description
12350 "Make loops show a progress bar on the console by just wrapping any
12351 iterable with @code{|tqdm(iterable)|}. Offers many options to define
12352 design and layout.")
12353 (license (list license:mpl2.0 license:expat))))
12354
12355 (define-public python2-tqdm
12356 (package-with-python2 python-tqdm))
12357
12358 (define-public python-pkginfo
12359 (package
12360 (name "python-pkginfo")
12361 (version "1.4.2")
12362 (source
12363 (origin
12364 (method url-fetch)
12365 (uri (pypi-uri "pkginfo" version))
12366 (sha256
12367 (base32
12368 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
12369 (build-system python-build-system)
12370 (arguments
12371 ;; The tests are broken upstream.
12372 '(#:tests? #f))
12373 (home-page
12374 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
12375 (synopsis
12376 "Query metadatdata from sdists, bdists, and installed packages")
12377 (description
12378 "API to query the distutils metadata written in @file{PKG-INFO} inside a
12379 source distriubtion (an sdist) or a binary distribution (e.g., created by
12380 running bdist_egg). It can also query the EGG-INFO directory of an installed
12381 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
12382 created by running @code{python setup.py develop}).")
12383 (license license:expat)))
12384
12385 (define-public python2-pkginfo
12386 (package-with-python2 python-pkginfo))
12387
12388 (define-public python-twine
12389 (package
12390 (name "python-twine")
12391 (version "1.9.1")
12392 (source
12393 (origin
12394 (method url-fetch)
12395 (uri (pypi-uri "twine" version))
12396 (sha256
12397 (base32
12398 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
12399 (build-system python-build-system)
12400 (propagated-inputs
12401 `(("python-tqdm" ,python-tqdm)
12402 ("python-pkginfo" ,python-pkginfo)
12403 ("python-requests" ,python-requests)
12404 ("python-requests-toolbelt" ,python-requests-toolbelt)))
12405 (home-page "https://github.com/pypa/twine")
12406 (synopsis "Collection of utilities for interacting with PyPI")
12407 (description
12408 "@code{twine} currently supports registering projects and uploading
12409 distributions. It authenticates the user over HTTPS, allows them to pre-sign
12410 their files and supports any packaging format (including wheels).")
12411 (license license:asl2.0)))
12412
12413 (define-public python2-twine
12414 (package-with-python2 python-twine))
12415
12416 (define-public python-linecache2
12417 (package
12418 (name "python-linecache2")
12419 (version "1.0.0")
12420 (source
12421 (origin
12422 (method url-fetch)
12423 (uri (pypi-uri "linecache2" version))
12424 (sha256
12425 (base32
12426 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
12427 (build-system python-build-system)
12428 (arguments
12429 `(;; The tests depend on unittest2, and our version is a bit too old.
12430 #:tests? #f))
12431 (native-inputs
12432 `(("python-pbr" ,python-pbr-minimal)))
12433 (home-page
12434 "https://github.com/testing-cabal/linecache2")
12435 (synopsis "Backports of the linecache module")
12436 (description
12437 "The linecache module allows one to get any line from any file, while
12438 attempting to optimize internally, using a cache, the common case where many
12439 lines are read from a single file.")
12440 (license license:psfl)))
12441
12442 (define-public python2-linecache2
12443 (package-with-python2 python-linecache2))
12444
12445 (define-public python-traceback2
12446 (package
12447 (name "python-traceback2")
12448 (version "1.4.0")
12449 (source
12450 (origin
12451 (method url-fetch)
12452 (uri (pypi-uri "traceback2" version))
12453 (sha256
12454 (base32
12455 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
12456 (build-system python-build-system)
12457 (arguments
12458 `(;; python-traceback2 and python-unittest2 depend on one another.
12459 #:tests? #f))
12460 (native-inputs
12461 `(("python-pbr" ,python-pbr-minimal)))
12462 (propagated-inputs
12463 `(("python-linecache2" ,python-linecache2)))
12464 (home-page
12465 "https://github.com/testing-cabal/traceback2")
12466 (synopsis "Backports of the traceback module")
12467 (description
12468 "This module provides a standard interface to extract, format and print
12469 stack traces of Python programs. It exactly mimics the behavior of the Python
12470 interpreter when it prints a stack trace.")
12471 (license license:psfl)))
12472
12473 (define-public python2-traceback2
12474 (package-with-python2 python-traceback2))
12475
12476 (define-public python-ratelimiter
12477 (package
12478 (name "python-ratelimiter")
12479 (version "1.2.0")
12480 (source
12481 (origin
12482 (method url-fetch)
12483 (uri (pypi-uri "ratelimiter" version))
12484 (sha256
12485 (base32
12486 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
12487 (build-system python-build-system)
12488 (arguments
12489 '(#:tests? #f)) ; There are no tests in the pypi archive.
12490 (home-page "https://github.com/RazerM/ratelimiter")
12491 (synopsis "Simple rate limiting object")
12492 (description
12493 "The @code{ratelimiter} module ensures that an operation will not be
12494 executed more than a given number of times during a given period.")
12495 (license license:asl2.0)))
12496
12497 (define-public python2-ratelimiter
12498 (package-with-python2 python-ratelimiter))
12499
12500 (define-public python-dukpy
12501 (package
12502 (name "python-dukpy")
12503 (version "0.3")
12504 (source
12505 (origin
12506 (method url-fetch)
12507 (uri (string-append "https://github.com/kovidgoyal/dukpy/archive/v"
12508 version ".tar.gz"))
12509 (file-name (string-append name "-" version ".tar.gz"))
12510 (sha256
12511 (base32
12512 "0pj39rfwlzivqm5hkrsza7gssg6ggpxlq5ivc8f3h7x5pfgc6y6c"))))
12513 (build-system python-build-system)
12514 (home-page "https://github.com/kovidgoyal/dukpy")
12515 (synopsis "Run JavaScript in python")
12516 (description
12517 "dukpy is a JavaScript runtime environment for Python using the duktape
12518 embeddable JavaScript engine.")
12519 ;; Dukpy is licensed under MIT like the embedded duktape library,
12520 ;; with 'errors.c' as GPL3.
12521 (license (list license:expat license:gpl3))))
12522
12523 (define-public python2-dukpy
12524 (package-with-python2 python-dukpy))
12525
12526 (define-public python-jsonrpclib-pelix
12527 (package
12528 (name "python-jsonrpclib-pelix")
12529 (version "0.3.1")
12530 (source
12531 (origin
12532 (method url-fetch)
12533 (uri (pypi-uri "jsonrpclib-pelix" version))
12534 (sha256
12535 (base32
12536 "1qs95vxplxwspbrqy8bvc195s58iy43qkf75yrjfql2sim8b25sl"))))
12537 (build-system python-build-system)
12538 (home-page "https://github.com/tcalmant/jsonrpclib/")
12539 (synopsis "JSON-RPC 2.0 client library for Python")
12540 (description
12541 "This library implements the JSON-RPC v2.0
12542 specification (backwards-compatible) as a client library for Python. This
12543 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
12544 services.")
12545 (license license:asl2.0)))
12546
12547 (define-public python2-jsonrpclib-pelix
12548 (package-with-python2 python-jsonrpclib-pelix))
12549
12550 (define-public python-setuptools-scm-git-archive
12551 (package
12552 (name "python-setuptools-scm-git-archive")
12553 (version "1.0")
12554 (source
12555 (origin
12556 (method url-fetch)
12557 (uri (pypi-uri "setuptools_scm_git_archive" version))
12558 (sha256
12559 (base32
12560 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
12561 (build-system python-build-system)
12562 (native-inputs
12563 `(("python-pytest" ,python-pytest)))
12564 (propagated-inputs
12565 `(("python-setuptools-scm" ,python-setuptools-scm)))
12566 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
12567 (synopsis "Setuptools_scm plugin for git archives")
12568 (description
12569 "The setuptools_scm_git_archive package is a plugin to
12570 setuptools_scm, which supports obtaining versions from git archives that
12571 belong to tagged versions.")
12572 (license license:expat)))
12573
12574 (define-public python2-setuptools-scm-git-archive
12575 (package-with-python2 python-setuptools-scm-git-archive))
12576
12577 (define-public python-pyclipper
12578 (package
12579 (name "python-pyclipper")
12580 (version "1.0.6")
12581 (source
12582 (origin
12583 (method url-fetch)
12584 (uri (pypi-uri "pyclipper" version ".zip"))
12585 (sha256
12586 (base32
12587 "1zpmwv3bya3j984y5cf9x9d5108kf6mxldcba68wiq0frv5qrssw"))))
12588 (build-system python-build-system)
12589 (arguments
12590 `(#:tests? #f)); 8 Tests fail, 37 succeed
12591 (propagated-inputs
12592 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
12593 (native-inputs
12594 `(("unzip" ,unzip)))
12595 (home-page "https://github.com/greginvm/pyclipper")
12596 (synopsis "Wrapper for Angus Johnson's Clipper library")
12597 (description
12598 "Pyclipper is a Cython wrapper for the C++ translation of the
12599 Angus Johnson's polygon clipping Clipper library (ver. 6.2.1).")
12600 (license license:expat)))
12601
12602 (define-public python2-pyclipper
12603 (package-with-python2 python-pyclipper))
12604
12605 (define-public python2-booleanoperations
12606 (package
12607 (name "python2-booleanoperations")
12608 (version "0.7.1")
12609 (source
12610 (origin
12611 (method url-fetch)
12612 (uri (pypi-uri "booleanOperations" version ".zip"))
12613 (sha256
12614 (base32
12615 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
12616 (build-system python-build-system)
12617 (arguments
12618 `(#:python ,python-2))
12619 (native-inputs
12620 `(("unzip" ,unzip)
12621 ("python2-pytest" ,python2-pytest)
12622 ("python2-pytest-runner" ,python2-pytest-runner)))
12623 (propagated-inputs
12624 `(("python-fonttools" ,python2-fonttools)
12625 ("python-pyclipper" ,python2-pyclipper)
12626 ("python-ufolib" ,python2-ufolib)))
12627 (home-page "https://github.com/typemytype/booleanOperations")
12628 (synopsis "Boolean operations on paths")
12629 (description
12630 "BooleanOperations provides a Python library that enables
12631 boolean operations on paths.")
12632 (license license:expat)))
12633
12634 (define-public python-tempdir
12635 (package
12636 (name "python-tempdir")
12637 (version "0.7.1")
12638 (source
12639 (origin
12640 (method url-fetch)
12641 (uri (pypi-uri "tempdir" version))
12642 (sha256
12643 (base32
12644 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
12645 (build-system python-build-system)
12646 (home-page "https://pypi.org/project/tempdir/")
12647 (arguments
12648 ;; the package has no tests
12649 '(#:tests? #f))
12650 (synopsis "Python library for managing temporary directories")
12651 (description
12652 "This library manages temporary directories that are automatically
12653 deleted with all their contents when they are no longer needed. It is
12654 particularly convenient for use in tests.")
12655 (license license:expat)))
12656
12657 (define-public python2-tempdir
12658 (package-with-python2 python-tempdir))
12659
12660 (define-public python-activepapers
12661 (package
12662 (name "python-activepapers")
12663 (version "0.2.2")
12664 (source
12665 (origin
12666 (method url-fetch)
12667 (uri (pypi-uri "ActivePapers.Py" version))
12668 (sha256
12669 (base32
12670 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
12671 (build-system python-build-system)
12672 (arguments
12673 `(#:modules ((ice-9 ftw)
12674 (srfi srfi-1)
12675 (guix build utils)
12676 (guix build python-build-system))
12677
12678 #:phases
12679 (modify-phases %standard-phases
12680 (add-after 'unpack 'delete-python2-code
12681 (lambda _
12682 (for-each delete-file
12683 '("lib/activepapers/builtins2.py"
12684 "lib/activepapers/standardlib2.py"
12685 "lib/activepapers/utility2.py"))))
12686 (replace 'check
12687 (lambda _
12688 ;; Deactivate the test cases that download files
12689 (setenv "NO_NETWORK_ACCESS" "1")
12690 ;; For some strange reason, some tests fail if nosetests runs all
12691 ;; test modules in a single execution. They pass if each test
12692 ;; module is run individually.
12693 (for-each (lambda (filename)
12694 (invoke "nosetests"
12695 (string-append "tests/" filename)))
12696 (scandir "tests"
12697 (lambda (filename)
12698 (string-suffix? ".py" filename)))))))))
12699 (native-inputs
12700 `(("python-tempdir" ,python-tempdir)
12701 ("python-nose" ,python-nose)))
12702 (propagated-inputs
12703 `(("python-h5py" ,python-h5py)))
12704 (home-page "http://www.activepapers.org/")
12705 (synopsis "Executable papers for scientific computing")
12706 (description
12707 "ActivePapers is a tool for working with executable papers, which
12708 combine data, code, and documentation in single-file packages,
12709 suitable for publication as supplementary material or on repositories
12710 such as figshare or Zenodo.")
12711 (properties `((python2-variant . ,(delay python2-activepapers))))
12712 (license license:bsd-3)))
12713
12714 (define-public python2-activepapers
12715 (let ((base (package-with-python2
12716 (strip-python2-variant python-activepapers))))
12717 (package
12718 (inherit base)
12719 (arguments
12720 (substitute-keyword-arguments (package-arguments base)
12721 ((#:phases phases)
12722 `(modify-phases ,phases
12723 (delete 'delete-python2-code)
12724 (add-after 'unpack 'delete-python3-code
12725 (lambda _
12726 (for-each delete-file
12727 '("lib/activepapers/builtins3.py"
12728 "lib/activepapers/standardlib3.py"
12729 "lib/activepapers/utility3.py")))))))))))
12730
12731 (define-public python-semver
12732 (package
12733 (name "python-semver")
12734 (version "2.7.9")
12735 (source
12736 (origin
12737 (method url-fetch)
12738 (uri (pypi-uri "semver" version))
12739 (sha256
12740 (base32
12741 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
12742 (build-system python-build-system)
12743 (arguments
12744 `(#:phases
12745 (modify-phases %standard-phases
12746 (add-after 'unpack 'patch-test-requirements
12747 (lambda _
12748 (substitute* "setup.py"
12749 ;; Our Python is new enough.
12750 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
12751 #t)))))
12752 (native-inputs
12753 `(("python-tox" ,python-tox)
12754 ("python-virtualenv" ,python-virtualenv)))
12755 (home-page "https://github.com/k-bx/python-semver")
12756 (synopsis "Python helper for Semantic Versioning")
12757 (description "This package provides a Python library for
12758 @url{Semantic Versioning, http://semver.org/}.")
12759 (license license:bsd-3)))
12760
12761 (define-public python2-semver
12762 (package-with-python2 python-semver))
12763
12764 (define-public python2-pyro
12765 (package
12766 (name "python2-pyro")
12767 (version "3.16")
12768 (source
12769 (origin
12770 (method url-fetch)
12771 (uri (pypi-uri "Pyro" version))
12772 (file-name (string-append "Pyro-" version ".tar.gz"))
12773 (sha256
12774 (base32
12775 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
12776 (build-system python-build-system)
12777 (arguments
12778 ;; Pyro is not compatible with Python 3
12779 `(#:python ,python-2
12780 ;; Pyro has no test cases for automatic execution
12781 #:tests? #f))
12782 (home-page "http://pythonhosted.org/Pyro/")
12783 (synopsis "Distributed object manager for Python")
12784 (description "Pyro is a Distributed Object Technology system
12785 written in Python that is designed to be easy to use. It resembles
12786 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
12787 which is a system and language independent Distributed Object Technology
12788 and has much more to offer than Pyro or RMI. Pyro 3.x is no
12789 longer maintained. New projects should use Pyro4 instead, which
12790 is the new Pyro version that is actively developed.")
12791 (license license:expat)))
12792
12793 (define-public python2-scientific
12794 (package
12795 (name "python2-scientific")
12796 (version "2.9.4")
12797 (source
12798 (origin
12799 (method url-fetch)
12800 (uri (string-append "https://bitbucket.org/khinsen/"
12801 "scientificpython/downloads/ScientificPython-"
12802 version ".tar.gz"))
12803 (file-name (string-append "ScientificPython-" version ".tar.gz"))
12804 (sha256
12805 (base32
12806 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
12807 (build-system python-build-system)
12808 (inputs
12809 `(("netcdf" ,netcdf)))
12810 (propagated-inputs
12811 `(("python-numpy" ,python2-numpy-1.8)
12812 ("python-pyro" ,python2-pyro)))
12813 (arguments
12814 ;; ScientificPython is not compatible with Python 3
12815 `(#:python ,python-2
12816 #:tests? #f ; No test suite
12817 #:phases
12818 (modify-phases %standard-phases
12819 (replace 'build
12820 (lambda* (#:key inputs #:allow-other-keys)
12821 (zero? (system* "python" "setup.py" "build"
12822 (string-append "--netcdf_prefix="
12823 (assoc-ref inputs "netcdf")))))))))
12824 (home-page "https://bitbucket.org/khinsen/scientificpython")
12825 (synopsis "Python modules for scientific computing")
12826 (description "ScientificPython is a collection of Python modules that are
12827 useful for scientific computing. Most modules are rather general (Geometry,
12828 physical units, automatic derivatives, ...) whereas others are more
12829 domain-specific (e.g. netCDF and PDB support). The library is currently
12830 not actively maintained and works only with Python 2 and NumPy < 1.9.")
12831 (license license:cecill-c)))
12832
12833 (define-public python2-mmtk
12834 (package
12835 (name "python2-mmtk")
12836 (version "2.7.11")
12837 (source
12838 (origin
12839 (method url-fetch)
12840 (uri (string-append "https://bitbucket.org/khinsen/"
12841 "mmtk/downloads/MMTK-" version ".tar.gz"))
12842 (file-name (string-append "MMTK-" version ".tar.gz"))
12843 (sha256
12844 (base32
12845 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
12846 (build-system python-build-system)
12847 (native-inputs
12848 `(("netcdf" ,netcdf)))
12849 (propagated-inputs
12850 `(("python-scientific" ,python2-scientific)
12851 ("python-tkinter" ,python-2 "tk")))
12852 (arguments
12853 `(#:python ,python-2
12854 #:tests? #f
12855 #:phases
12856 (modify-phases %standard-phases
12857 (add-before 'build 'includes-from-scientific
12858 (lambda* (#:key inputs #:allow-other-keys)
12859 (mkdir-p "Include/Scientific")
12860 (copy-recursively
12861 (string-append
12862 (assoc-ref inputs "python-scientific")
12863 "/include/python2.7/Scientific")
12864 "Include/Scientific"))))))
12865 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
12866 (synopsis "Python library for molecular simulation")
12867 (description "MMTK is a library for molecular simulations with an emphasis
12868 on biomolecules. It provides widely used methods such as Molecular Dynamics
12869 and normal mode analysis, but also basic routines for implementing new methods
12870 for simulation and analysis. The library is currently not actively maintained
12871 and works only with Python 2 and NumPy < 1.9.")
12872 (license license:cecill-c)))
12873
12874 (define-public python-phonenumbers
12875 (package
12876 (name "python-phonenumbers")
12877 (version "8.9.1")
12878 (source
12879 (origin
12880 (method url-fetch)
12881 (uri (pypi-uri "phonenumbers" version))
12882 (sha256
12883 (base32
12884 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
12885 (build-system python-build-system)
12886 (home-page
12887 "https://github.com/daviddrysdale/python-phonenumbers")
12888 (synopsis
12889 "Python library for dealing with international phone numbers")
12890 (description
12891 "This package provides a Python port of Google's libphonenumber library.")
12892 (license license:asl2.0)))
12893
12894 (define-public python2-phonenumbers
12895 (package-with-python2 python-phonenumbers))
12896
12897 (define-public python-send2trash
12898 (package
12899 (name "python-send2trash")
12900 (version "1.4.2")
12901 (source
12902 (origin (method url-fetch)
12903 ;; Source tarball on PyPI doesn't include tests.
12904 (uri (string-append "https://github.com/hsoft/send2trash/archive/"
12905 version ".tar.gz"))
12906 (file-name (string-append name "-" version ".tar.gz"))
12907 (sha256
12908 (base32
12909 "0ffyhwjyx61slkdy38iwjc4gmj7fj9gs2q58f075gwvq630pzm9z"))))
12910 (build-system python-build-system)
12911 (arguments
12912 '(#:phases
12913 (modify-phases %standard-phases
12914 (add-before 'check 'pre-check
12915 (lambda _
12916 (mkdir-p "/tmp/foo")
12917 (setenv "HOME" "/tmp/foo")
12918 #t)))))
12919 (home-page "https://github.com/hsoft/send2trash")
12920 (synopsis "Send files to the user's @file{~/Trash} directory")
12921 (description "This package provides a Python library to send files to the
12922 user's @file{~/Trash} directory.")
12923 (license license:bsd-3)))
12924
12925 (define-public python2-send2trash
12926 (package
12927 (inherit (package-with-python2 python-send2trash))
12928 (arguments
12929 (substitute-keyword-arguments (package-arguments python-send2trash)
12930 ((#:phases phases)
12931 `(modify-phases ,phases
12932 (add-before 'check 'setenv
12933 (lambda _
12934 (setenv "PYTHONPATH"
12935 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
12936 #t))))))
12937 (properties `((python2-variant . ,(delay python-send2trash))))))
12938
12939 (define-public python-yapf
12940 (package
12941 (name "python-yapf")
12942 (version "0.21.0")
12943 (source
12944 (origin
12945 (method url-fetch)
12946 (uri (pypi-uri "yapf" version))
12947 (sha256
12948 (base32
12949 "144gc7d6b1415vh02409rnb8qd5kxi6mxlr7y64d5cizgxbf72kx"))))
12950 (build-system python-build-system)
12951 (home-page "https://github.com/google/yapf")
12952 (synopsis "Formatter for Python code")
12953 (description "YAPF is a formatter for Python code. It's based off of
12954 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
12955 takes the code and reformats it to the best formatting that conforms to the
12956 style guide, even if the original code didn't violate the style guide.")
12957 (license license:asl2.0)))
12958
12959 (define-public python2-yapf
12960 (package-with-python2 python-yapf))
12961
12962 (define-public python-gyp
12963 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
12964 (revision "0"))
12965 (package
12966 (name "python-gyp")
12967 ;; Google does not release versions,
12968 ;; based on second most recent commit date.
12969 (version (git-version "0.0.0" revision commit))
12970 (source
12971 (origin
12972 ;; Google does not release tarballs,
12973 ;; git checkout is needed.
12974 (method git-fetch)
12975 (uri (git-reference
12976 (url "https://chromium.googlesource.com/external/gyp")
12977 (commit commit)))
12978 (file-name (git-file-name name version))
12979 (sha256
12980 (base32
12981 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
12982 (build-system python-build-system)
12983 (home-page "https://gyp.gsrc.io/")
12984 (synopsis "GYP is a Meta-Build system")
12985 (description
12986 "GYP builds build systems for large, cross platform applications.
12987 It can be used to generate XCode projects, Visual Studio projects, Ninja build
12988 files, and Makefiles.")
12989 (license license:bsd-3))))
12990
12991 (define-public python2-gyp
12992 (package-with-python2 python-gyp))
12993
12994 (define-public python-whatever
12995 (package
12996 (name "python-whatever")
12997 (version "0.5")
12998 (source
12999 (origin
13000 (method url-fetch)
13001 (uri (string-append "https://github.com/Suor/whatever/archive/" version
13002 ".tar.gz"))
13003 (sha256
13004 (base32
13005 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
13006 (file-name (string-append name "-" version ".tar.gz"))))
13007 (build-system python-build-system)
13008 (arguments
13009 `(#:phases
13010 (modify-phases %standard-phases
13011 (replace 'check
13012 (lambda _
13013 (invoke "py.test"))))))
13014 (native-inputs
13015 `(("python-pytest" ,python-pytest)))
13016 (home-page "http://github.com/Suor/whatever")
13017 (synopsis "Make anonymous functions by partial application of operators")
13018 (description "@code{whatever} provides an easy way to make anonymous
13019 functions by partial application of operators.")
13020 (license license:bsd-3)))
13021
13022 (define-public python2-whatever
13023 (package-with-python2 python-whatever))
13024
13025 (define-public python-funcy
13026 (package
13027 (name "python-funcy")
13028 (version "1.10")
13029 (source
13030 (origin
13031 (method url-fetch)
13032 (uri (string-append "https://github.com/Suor/funcy/archive/" version
13033 ".tar.gz"))
13034 (sha256
13035 (base32
13036 "1fanxivsip29vgarw6dn39xym3q4pbxcpa11plpp548lvxajpahz"))
13037 (file-name (string-append name "-" version ".tar.gz"))))
13038 (build-system python-build-system)
13039 (arguments
13040 `(#:phases
13041 (modify-phases %standard-phases
13042 (replace 'check
13043 (lambda _
13044 (invoke "py.test"))))))
13045 (native-inputs
13046 `(("python-pytest" ,python-pytest)
13047 ("python-whatever" ,python-whatever)))
13048 (home-page "http://github.com/Suor/funcy")
13049 (synopsis "Functional tools")
13050 (description "@code{funcy} is a library that provides functional tools.
13051 Examples are:
13052 @enumerate
13053 @item merge - Merges collections of the same type
13054 @item walk - Type-preserving map
13055 @item select - Selects a part of a collection
13056 @item take - Takes the first n items of a collection
13057 @item first - Takes the first item of a collection
13058 @item remove - Predicated-removes items of a collection
13059 @item concat - Concatenates two collections
13060 @item flatten - Flattens a collection with subcollections
13061 @item distinct - Returns only distinct items
13062 @item split - Predicated-splits a collection
13063 @item split_at - Splits a collection at a given item
13064 @item group_by - Groups items by group
13065 @item pairwise - Pairs off adjacent items
13066 @item partial - Partially-applies a function
13067 @item curry - Curries a function
13068 @item compose - Composes functions
13069 @item complement - Complements a predicate
13070 @item all_fn - \"all\" with predicate
13071 @end enumerate")
13072 (license license:bsd-3)))
13073
13074 (define-public python2-funcy
13075 (package-with-python2 python-funcy))
13076
13077 (define-public python-isoweek
13078 (package
13079 (name "python-isoweek")
13080 (version "1.3.3")
13081 (source
13082 (origin
13083 (method url-fetch)
13084 (uri (pypi-uri "isoweek" version))
13085 (sha256
13086 (base32
13087 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
13088 (build-system python-build-system)
13089 (home-page "https://github.com/gisle/isoweek")
13090 (synopsis "Objects representing a week")
13091 (description "The @code{isoweek} module provide the class Week that
13092 implements the week definition of ISO 8601. This standard also defines
13093 a notation for identifying weeks; yyyyWww (where the W is a literal).
13094 Week instances stringify to this form.")
13095 (license license:bsd-3)))
13096
13097 (define-public python2-isoweek
13098 (package-with-python2 python-isoweek))
13099
13100 (define-public python-tokenize-rt
13101 (package
13102 (name "python-tokenize-rt")
13103 (version "2.0.1")
13104 (source
13105 (origin
13106 (method url-fetch)
13107 (uri (pypi-uri "tokenize-rt" version))
13108 (sha256
13109 (base32
13110 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
13111 (build-system python-build-system)
13112 (home-page "https://github.com/asottile/tokenize-rt")
13113 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
13114 (description
13115 "This Python library is a wrapper around @code{tokenize} from the Python
13116 standard library. It provides two additional tokens @code{ESCAPED_NL} and
13117 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
13118 and @code{tokens_to_src} to roundtrip.")
13119 (license license:expat)))
13120
13121 (define-public python-future-fstrings
13122 (package
13123 (name "python-future-fstrings")
13124 (version "0.4.1")
13125 (source
13126 (origin
13127 (method url-fetch)
13128 (uri (pypi-uri "future_fstrings" version))
13129 (sha256
13130 (base32
13131 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
13132 (build-system python-build-system)
13133 (propagated-inputs
13134 `(("python-tokenize-rt" ,python-tokenize-rt)))
13135 (home-page "https://github.com/asottile/future-fstrings")
13136 (synopsis "Backport of fstrings to Python < 3.6")
13137 (description
13138 "This package provides a UTF-8 compatible encoding
13139 @code{future_fstrings}, which performs source manipulation. It decodes the
13140 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
13141 @code{f} strings.")
13142 (license license:expat)))
13143
13144 (define-public python-typing
13145 (package
13146 (name "python-typing")
13147 (version "3.6.4")
13148 (source
13149 (origin
13150 (method url-fetch)
13151 (uri (pypi-uri "typing" version))
13152 (sha256
13153 (base32
13154 "1wmk9nkh30n37cbrqwkbggmj2390lhrlagjkd0ikm02l88saj06l"))))
13155 (build-system python-build-system)
13156 (home-page "https://docs.python.org/3/library/typing.html")
13157 (synopsis "Type hints for Python")
13158 (description "This is a backport of the standard library @code{typing}
13159 module to Python versions older than 3.5. Typing defines a standard notation
13160 for Python function and variable type annotations. The notation can be used
13161 for documenting code in a concise, standard format, and it has been designed
13162 to also be used by static and runtime type checkers, static analyzers, IDEs
13163 and other tools.")
13164 (license license:psfl)))
13165
13166 (define-public python2-typing
13167 (package-with-python2 python-typing))
13168
13169 (define-public bpython
13170 (package
13171 (name "bpython")
13172 (version "0.17.1")
13173 (source
13174 (origin
13175 (method url-fetch)
13176 (uri (pypi-uri "bpython" version))
13177 (sha256
13178 (base32
13179 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
13180 (build-system python-build-system)
13181 (arguments
13182 `(#:phases
13183 (modify-phases %standard-phases
13184 (add-after 'unpack 'remove-failing-test
13185 (lambda _
13186 ;; Remove failing test. FIXME: make it pass
13187 (delete-file "bpython/test/test_args.py")
13188 #t))
13189 (add-after 'wrap 'add-aliases
13190 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
13191 (lambda* (#:key outputs #:allow-other-keys)
13192 (let ((out (assoc-ref outputs "out")))
13193 (for-each
13194 (lambda (old new)
13195 (symlink old (string-append out "/bin/" new)))
13196 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
13197 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
13198 #t)))))
13199 (propagated-inputs
13200 `(("python-pygments" ,python-pygments)
13201 ("python-requests" ,python-requests)
13202 ("python-babel" ,python-babel) ; optional, for internationalization
13203 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
13204 ("python-greenlet" ,python-greenlet)
13205 ("python-urwid" ,python-urwid) ; for bpython-urwid only
13206 ("python-six" ,python-six)))
13207 (native-inputs
13208 `(("python-sphinx" ,python-sphinx)
13209 ("python-mock" ,python-mock)))
13210 (home-page "https://bpython-interpreter.org/")
13211 (synopsis "Fancy interface to the Python interpreter")
13212 (description "Bpython is a fancy interface to the Python
13213 interpreter. bpython's main features are
13214
13215 @enumerate
13216 @item in-line syntax highlighting,
13217 @item readline-like autocomplete with suggestions displayed as you type,
13218 @item expected parameter list for any Python function,
13219 @item \"rewind\" function to pop the last line of code from memory and
13220 re-evaluate,
13221 @item send the code you've entered off to a pastebin,
13222 @item save the code you've entered to a file, and
13223 @item auto-indentation.
13224 @end enumerate")
13225 (license license:expat)))
13226
13227 (define-public bpython2
13228 (let ((base (package-with-python2
13229 (strip-python2-variant bpython))))
13230 (package (inherit base)
13231 (name "bpython2")
13232 (arguments
13233 `(#:python ,python-2
13234 #:phases
13235 (modify-phases %standard-phases
13236 (add-after 'unpack 'remove-failing-test
13237 (lambda _
13238 ;; Remove failing test. FIXME: make it pass
13239 (delete-file "bpython/test/test_args.py")
13240 ;; Disable failing test-cases (renaming inhibits they are
13241 ;; discovered)
13242 (substitute* "bpython/test/test_curtsies_repl.py"
13243 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
13244 (string-append a "xxx_off_" b))
13245 (("^(\\s*def )(test_complex\\W)" _ a b)
13246 (string-append a "xxx_off_" b)))
13247 #t))
13248 (add-before 'build 'rename-scripts
13249 ;; rename the scripts to bypthon2, bpdb2, etc.
13250 (lambda _
13251 (substitute* "setup.py"
13252 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
13253 (string-append name "2" rest "\n"))
13254 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
13255 (string-append name "2" (or sub "") rest "\n")))
13256 #t))))))))
13257
13258 (define-public python-pyinotify
13259 (package
13260 (name "python-pyinotify")
13261 (version "0.9.6")
13262 (source (origin
13263 (method url-fetch)
13264 (uri (pypi-uri "pyinotify" version))
13265 (sha256
13266 (base32
13267 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
13268 (build-system python-build-system)
13269 (arguments `(#:tests? #f)) ;no tests
13270 (home-page "https://github.com/seb-m/pyinotify")
13271 (synopsis "Python library for monitoring inotify events")
13272 (description
13273 "@code{pyinotify} provides a Python interface for monitoring
13274 file system events on Linux.")
13275 (license license:expat)))
13276
13277 (define-public python2-pyinotify
13278 (package-with-python2 python-pyinotify))
13279
13280 ;; Ada parser uses this version.
13281 (define-public python2-quex-0.67.3
13282 (package
13283 (name "python2-quex")
13284 (version "0.67.3")
13285 (source
13286 (origin
13287 (method url-fetch)
13288 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
13289 (version-major+minor version)
13290 "/quex-" version ".zip"))
13291 (sha256
13292 (base32
13293 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
13294 (build-system python-build-system)
13295 (native-inputs
13296 `(("unzip" ,unzip)))
13297 (arguments
13298 `(#:python ,python-2
13299 #:tests? #f
13300 #:phases
13301 (modify-phases %standard-phases
13302 (delete 'configure)
13303 (delete 'build)
13304 (replace 'install
13305 (lambda* (#:key outputs #:allow-other-keys)
13306 (let* ((out (assoc-ref outputs "out"))
13307 (share/quex (string-append out "/share/quex"))
13308 (bin (string-append out "/bin")))
13309 (copy-recursively "." share/quex)
13310 (mkdir-p bin)
13311 (symlink (string-append share/quex "/quex-exe.py")
13312 (string-append bin "/quex"))
13313 #t))))))
13314 (native-search-paths
13315 (list (search-path-specification
13316 (variable "QUEX_PATH")
13317 (files '("share/quex")))))
13318 (home-page "http://quex.sourceforge.net/")
13319 (synopsis "Lexical analyzer generator in Python")
13320 (description "@code{quex} is a lexical analyzer generator in Python.")
13321 (license license:lgpl2.1+))) ; Non-military
13322
13323 (define-public python2-quex
13324 (package (inherit python2-quex-0.67.3)
13325 (name "python2-quex")
13326 (version "0.68.1")
13327 (source
13328 (origin
13329 (method url-fetch)
13330 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
13331 (sha256
13332 (base32
13333 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
13334 (file-name (string-append name "-" version ".tar.gz"))))))
13335
13336 (define-public python-more-itertools
13337 (package
13338 (name "python-more-itertools")
13339 (version "4.2.0")
13340 (source
13341 (origin
13342 (method url-fetch)
13343 (uri (pypi-uri "more-itertools" version))
13344 (sha256
13345 (base32
13346 "1s6qhl7a7jy8gqw8p545rxfp7rwz1hmjr9p6prk93zbv6f9rhsrb"))))
13347 (build-system python-build-system)
13348 (propagated-inputs
13349 `(("python-six" ,python-six-bootstrap)))
13350 (home-page "https://github.com/erikrose/more-itertools")
13351 (synopsis "More routines for operating on iterables, beyond itertools")
13352 (description "Python's built-in @code{itertools} module implements a
13353 number of iterator building blocks inspired by constructs from APL, Haskell,
13354 and SML. @code{more-itertools} includes additional building blocks for
13355 working with iterables.")
13356 (license license:expat)))
13357
13358 (define-public python2-more-itertools
13359 (package-with-python2 python-more-itertools))
13360
13361 (define-public python-latexcodec
13362 (package
13363 (name "python-latexcodec")
13364 (version "1.0.5")
13365 (source
13366 (origin
13367 (method url-fetch)
13368 (uri (pypi-uri "latexcodec" version))
13369 (sha256
13370 (base32
13371 "0zdd1gf24i83ykadx0y30n3001j43scqr2saql3vckk5c39dj1wn"))))
13372 (build-system python-build-system)
13373 (inputs
13374 `(("python-six" ,python-six)))
13375 (home-page "https://readthedocs.org/projects/latexcodec/")
13376 (synopsis "Work with LaTeX code in Python")
13377 (description "Lexer and codec to work with LaTeX code in Python.")
13378 (license license:expat)))
13379
13380 (define-public python-pybtex
13381 (package
13382 (name "python-pybtex")
13383 (version "0.21")
13384 (source
13385 (origin
13386 (method url-fetch)
13387 (uri (pypi-uri "pybtex" version))
13388 (sha256
13389 (base32
13390 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
13391 (build-system python-build-system)
13392 (native-inputs
13393 `(("python-nose" ,python-nose)))
13394 (inputs
13395 `(("python-latexcodec" ,python-latexcodec)
13396 ("python-pyyaml" ,python-pyyaml)
13397 ("python-six" ,python-six)))
13398 (arguments
13399 `(#:test-target "nosetests"))
13400 (home-page "https://pybtex.org/")
13401 (synopsis "BibTeX-compatible bibliography processor")
13402 (description "Pybtex is a BibTeX-compatible bibliography processor written
13403 in Python. You can simply type pybtex instead of bibtex.")
13404 (license license:expat)))
13405
13406 (define-public python-onetimepass
13407 (package
13408 (name "python-onetimepass")
13409 (version "1.0.1")
13410 (source
13411 (origin
13412 (method url-fetch)
13413 (uri (pypi-uri "onetimepass" version))
13414 (sha256
13415 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
13416 (build-system python-build-system)
13417 (propagated-inputs `(("python-six" ,python-six)))
13418 (home-page "https://github.com/tadeck/onetimepass/")
13419 (synopsis "One-time password library")
13420 (description "Python one-time password library for HMAC-based (HOTP) and
13421 time-based (TOTP) passwords.")
13422 (license license:expat)))
13423
13424 (define-public python-parso
13425 (package
13426 (name "python-parso")
13427 (version "0.2.1")
13428 (source
13429 (origin
13430 (method url-fetch)
13431 (uri (pypi-uri "parso" version))
13432 (sha256
13433 (base32
13434 "0zvh4rdhv2wkglkgh0h9kn9ndpsw5p639wcwv47jn1kfp504lq7h"))))
13435 (native-inputs
13436 `(("python-pytest" ,python-pytest)))
13437 (build-system python-build-system)
13438 (home-page "https://github.com/davidhalter/parso")
13439 (synopsis "Python Parser")
13440 (description "Parso is a Python parser that supports error recovery and
13441 round-trip parsing for different Python versions (in multiple Python versions).
13442 Parso is also able to list multiple syntax errors in your Python file.")
13443 (license license:expat)))
13444
13445 (define-public python2-parso
13446 (package-with-python2 python-parso))
13447
13448 (define-public python-async-generator
13449 (package
13450 (name "python-async-generator")
13451 (version "1.9")
13452 (source
13453 (origin
13454 (method url-fetch)
13455 (uri (pypi-uri "async_generator" version))
13456 (sha256
13457 (base32
13458 "0wc3hidz1q85cja93k5pzybn0fprfnqyrv4qlkdqdzklc5f4dmdp"))))
13459 (build-system python-build-system)
13460 (native-inputs
13461 `(("python-pytest" ,python-pytest)))
13462 (home-page "https://github.com/python-trio/async_generator")
13463 (synopsis "Async generators and context managers for Python 3.5+")
13464 (description "@code{async_generator} back-ports Python 3.6's native async
13465 generators and Python 3.7's context managers into Python 3.5.")
13466 ;; Dual licensed.
13467 (license (list license:expat license:asl2.0))))
13468
13469 (define-public python-async-timeout
13470 (package
13471 (name "python-async-timeout")
13472 (version "2.0.1")
13473 (source
13474 (origin
13475 (method url-fetch)
13476 (uri (pypi-uri "async-timeout" version))
13477 (sha256
13478 (base32
13479 "1l3kg062m02mph6rf9rdv8r5c5n356clxa6b6mrn0i77vk9g9kq0"))))
13480 (build-system python-build-system)
13481 (home-page "https://github.com/aio-libs/async_timeout/")
13482 (synopsis "Timeout context manager for asyncio programs")
13483 (description "@code{async-timeout} provides a timeout timeout context
13484 manager compatible with @code{asyncio}.")
13485 (license license:asl2.0)))
13486
13487 (define-public python-glob2
13488 (package
13489 (name "python-glob2")
13490 (version "0.6")
13491 (source (origin
13492 (method url-fetch)
13493 (uri (string-append
13494 "https://github.com/miracle2k/python-glob2/archive/"
13495 version
13496 ".tar.gz"))
13497 (sha256
13498 (base32
13499 "0ja168f0dz4kbz4m06dm0rd3acaypk6hjx2km541pw22y9s40mag"))
13500 (file-name (string-append name "-" version ".tar.gz"))))
13501 (build-system python-build-system)
13502 (home-page "https://github.com/miracle2k/python-glob2/")
13503 (synopsis "Extended Version of the python buildin glob module")
13504 (description "This is an extended version of the Python
13505 @url{http://docs.python.org/library/glob.html, built-in glob module} which
13506 adds:
13507
13508 @itemize
13509 @item The ability to capture the text matched by glob patterns, and return
13510 those matches alongside the file names.
13511 @item A recursive @code{**} globbing syntax, akin for example to the
13512 @code{globstar} option of Bash.
13513 @item The ability to replace the file system functions used, in order to glob
13514 on virtual file systems.
13515 @item Compatible with Python 2 and Python 3 (tested with 3.3).
13516 @end itemize
13517
13518 Glob2 currently based on the glob code from Python 3.3.1.")
13519 (license license:bsd-2)))
13520
13521 (define-public python2-glob2
13522 (package-with-python2 python-glob2))
13523
13524 (define-public python-gipc
13525 (package
13526 (name "python-gipc")
13527 (version "0.6.0")
13528 (source
13529 (origin
13530 (method url-fetch)
13531 (uri (pypi-uri "gipc" version ".zip"))
13532 (sha256
13533 (base32
13534 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
13535 (build-system python-build-system)
13536 (native-inputs
13537 `(("unzip" ,unzip)))
13538 (propagated-inputs
13539 `(("python-gevent" ,python-gevent)))
13540 (home-page "http://gehrcke.de/gipc")
13541 (synopsis "Child process management in the context of gevent")
13542 (description "Usage of Python's multiprocessing package in a
13543 gevent-powered application may raise problems. With @code{gipc},
13544 process-based child processes can safely be created anywhere within a
13545 gevent-powered application.")
13546 (license license:expat)))
13547
13548 (define-public python2-gipc
13549 (package-with-python2 python-gipc))
13550
13551 (define-public python-fusepy
13552 (package
13553 (name "python-fusepy")
13554 (version "2.0.4")
13555 (source
13556 (origin
13557 (method url-fetch)
13558 (uri (pypi-uri "fusepy" version))
13559 (sha256
13560 (base32
13561 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
13562 (build-system python-build-system)
13563 (arguments
13564 `(#:phases
13565 (modify-phases %standard-phases
13566 (add-before 'build 'set-library-file-name
13567 (lambda* (#:key inputs #:allow-other-keys)
13568 (let ((fuse (assoc-ref inputs "fuse")))
13569 (substitute* "fuse.py"
13570 (("find_library\\('fuse'\\)")
13571 (string-append "'" fuse "/lib/libfuse.so'")))
13572 #t))))))
13573 (propagated-inputs
13574 `(("fuse" ,fuse)))
13575 (home-page "https://github.com/fusepy/fusepy")
13576 (synopsis "Simple ctypes bindings for FUSE")
13577 (description "Python module that provides a simple interface to FUSE and
13578 MacFUSE. The binding is created using the standard @code{ctypes} library.")
13579 (license license:isc)))
13580
13581 (define-public python2-fusepy
13582 (package-with-python2 python-fusepy))
13583
13584 (define-public python2-gdrivefs
13585 (package
13586 (name "python2-gdrivefs")
13587 (version "0.14.9")
13588 (source
13589 (origin
13590 (method url-fetch)
13591 (uri (pypi-uri "gdrivefs" version))
13592 (sha256
13593 (base32
13594 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
13595 (build-system python-build-system)
13596 (arguments
13597 `(#:python ,python-2
13598 #:phases
13599 (modify-phases %standard-phases
13600 (add-before 'build 'patch-setup-py
13601 (lambda _
13602 ;; Update requirements from dependency==version
13603 ;; to dependency>=version
13604 (substitute* "gdrivefs/resources/requirements.txt"
13605 (("==") ">="))
13606 #t)))))
13607 (native-inputs
13608 `(("python2-gipc" ,python2-gipc)
13609 ("python2-gevent" ,python2-gevent)
13610 ("python2-greenlet" ,python2-greenlet)
13611 ("python2-httplib2" ,python2-httplib2)
13612 ("python2-uritemplate" ,python2-uritemplate)
13613 ("python2-oauth2client" ,python2-oauth2client)
13614 ("python2-six" ,python2-six)))
13615 (propagated-inputs
13616 `(("python2-dateutil" ,python2-dateutil)
13617 ("python2-fusepy" ,python2-fusepy)
13618 ("python2-google-api-client" ,python2-google-api-client)))
13619 (home-page "https://github.com/dsoprea/GDriveFS")
13620 (synopsis "Mount Google Drive as a local file system")
13621 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
13622 under Python 2.7.")
13623 (license license:gpl2)))
13624
13625 (define-public pybind11
13626 (package
13627 (name "pybind11")
13628 (version "2.2.3")
13629 (source (origin
13630 (method url-fetch)
13631 (uri (string-append
13632 "https://github.com/pybind/pybind11/archive/v"
13633 version ".tar.gz"))
13634 (sha256
13635 (base32
13636 "1sj0x4fwsbnwdai5sxpw1l1vh8m5hpbkfk3zanxcbcgs39jpnfrs"))
13637 (file-name (string-append name "-" version ".tar.gz"))))
13638 (build-system cmake-build-system)
13639 (native-inputs
13640 `(("python" ,python)
13641 ("python-pytest" ,python-pytest)))
13642 (arguments
13643 `(#:test-target "check"))
13644 (home-page "https://github.com/pybind/pybind11/")
13645 (synopsis "Seamless operability between C++11 and Python")
13646 (description "pybind11 is a lightweight header-only library that exposes
13647 C++ types in Python and vice versa, mainly to create Python bindings of
13648 existing C++ code. Its goals and syntax are similar to the excellent
13649 Boost.Python library by David Abrahams: to minimize boilerplate code in
13650 traditional extension modules by inferring type information using compile-time
13651 introspection.")
13652 (license license:expat)))
13653
13654 (define-public python-fasteners
13655 (package
13656 (name "python-fasteners")
13657 (version "0.14.1")
13658 (source
13659 (origin
13660 (method url-fetch)
13661 (uri (pypi-uri "fasteners" version))
13662 (sha256
13663 (base32
13664 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
13665 (build-system python-build-system)
13666 (propagated-inputs
13667 `(("python-monotonic" ,python-monotonic)
13668 ("python-six" ,python-six)
13669 ("python-testtools" ,python-testtools)))
13670 (home-page "https://github.com/harlowja/fasteners")
13671 (synopsis "Python package that provides useful locks")
13672 (description
13673 "This package provides a Python program that provides following locks:
13674
13675 @itemize
13676 @item Locking decorator
13677 @item Reader-writer locks
13678 @item Inter-process locks
13679 @item Generic helpers
13680 @end itemize\n")
13681 (license license:asl2.0)))
13682
13683 (define-public python2-fasteners
13684 (package-with-python2 python-fasteners))
13685
13686 (define-public python-requests-file
13687 (package
13688 (name "python-requests-file")
13689 (version "1.4.3")
13690 (source
13691 (origin
13692 (method url-fetch)
13693 (uri (pypi-uri "requests-file" version))
13694 (sha256
13695 (base32
13696 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
13697 (build-system python-build-system)
13698 (propagated-inputs
13699 `(("python-requests" ,python-requests)
13700 ("python-six" ,python-six)))
13701 (home-page
13702 "https://github.com/dashea/requests-file")
13703 (synopsis "File transport adapter for Requests")
13704 (description
13705 "Requests-File is a transport adapter for use with the Requests Python
13706 library to allow local filesystem access via file:// URLs.")
13707 (license license:asl2.0)))
13708
13709 (define-public python2-requests-file
13710 (package-with-python2 python-requests-file))
13711
13712 (define-public python-tldextract
13713 (package
13714 (name "python-tldextract")
13715 (version "2.2.0")
13716 (source
13717 (origin
13718 (method url-fetch)
13719 (uri (pypi-uri "tldextract" version))
13720 (sha256
13721 (base32
13722 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
13723 (build-system python-build-system)
13724 (native-inputs
13725 `(("python-pytest" ,python-pytest)
13726 ("python-responses" ,python-responses)))
13727 (propagated-inputs
13728 `(("python-idna" ,python-idna)
13729 ("python-requests" ,python-requests)
13730 ("python-requests-file" ,python-requests-file)))
13731 (home-page
13732 "https://github.com/john-kurkowski/tldextract")
13733 (synopsis
13734 "Separate the TLD from the registered domain and subdomains of a URL")
13735 (description
13736 "TLDExtract accurately separates the TLD from the registered domain and
13737 subdomains of a URL, using the Public Suffix List. By default, this includes
13738 the public ICANN TLDs and their exceptions. It can optionally support the
13739 Public Suffix List's private domains as well.")
13740 (license license:bsd-3)))
13741
13742 (define-public python2-tldextract
13743 (package-with-python2 python-tldextract))
13744
13745 (define-public python-pynamecheap
13746 (package
13747 (name "python-pynamecheap")
13748 (version "0.0.3")
13749 (source
13750 (origin
13751 (method url-fetch)
13752 (uri (pypi-uri "PyNamecheap" version))
13753 (sha256
13754 (base32
13755 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
13756 (build-system python-build-system)
13757 (propagated-inputs
13758 `(("python-requests" ,python-requests)))
13759 (home-page
13760 "https://github.com/Bemmu/PyNamecheap")
13761 (synopsis
13762 "Namecheap API client in Python")
13763 (description
13764 "PyNamecheap is a Namecheap API client in Python.")
13765 (license license:expat)))
13766
13767 (define-public python2-pynamecheap
13768 (package-with-python2 python-pynamecheap))
13769
13770 (define-public python-dns-lexicon
13771 (package
13772 (name "python-dns-lexicon")
13773 (version "2.4.0")
13774 (source
13775 (origin
13776 (method url-fetch)
13777 (uri (pypi-uri "dns-lexicon" version))
13778 (sha256
13779 (base32
13780 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
13781 (build-system python-build-system)
13782 (arguments
13783 `(#:tests? #f)) ;requires internet access
13784 (propagated-inputs
13785 `(("python-future" ,python-future)
13786 ("python-pynamecheap" ,python-pynamecheap)
13787 ("python-requests" ,python-requests)
13788 ("python-tldextract" ,python-tldextract)
13789 ("python-urllib3" ,python-urllib3)))
13790 (home-page "https://github.com/AnalogJ/lexicon")
13791 (synopsis
13792 "Manipulate DNS records on various DNS providers")
13793 (description
13794 "Lexicon provides a way to manipulate DNS records on multiple DNS
13795 providers in a standardized way. It has a CLI but it can also be used as a
13796 Python library. It was designed to be used in automation, specifically with
13797 Let's Encrypt.")
13798 (license license:expat)))
13799
13800 (define-public python2-dns-lexicon
13801 (package-with-python2 python-dns-lexicon))
13802
13803 (define-public python-commandlines
13804 (package
13805 (name "python-commandlines")
13806 (version "0.4.1")
13807 (source
13808 (origin
13809 (method url-fetch)
13810 (uri (pypi-uri "commandlines" version))
13811 (sha256
13812 (base32
13813 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
13814 (build-system python-build-system)
13815 (home-page "https://github.com/chrissimpkins/commandlines")
13816 (synopsis "Command line argument to object parsing library")
13817 (description
13818 "@code{Commandlines} is a Python library for command line application
13819 development that supports command line argument parsing, command string
13820 validation testing and application logic.")
13821 (license license:expat)))