projects/guix·blob version-0.15.0 · refs

13821 lines · 497.1 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Nikita Karetnikov <[email protected]>
3;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <[email protected]>
4;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <[email protected]>
5;;; Copyright © 2014, 2015 Mark H Weaver <[email protected]>
6;;; Copyright © 2014, 2017 Eric Bavier <[email protected]>
7;;; Copyright © 2014, 2015 Federico Beffa <[email protected]>
8;;; Copyright © 2015 Omar Radwan <[email protected]>
9;;; Copyright © 2015 Pierre-Antoine Rault <[email protected]>
10;;; Copyright © 2015, 2016, 2017, 2018 Ricardo Wurmus <[email protected]>
11;;; Copyright © 2015, 2016 Christopher Allan Webber <[email protected]>
12;;; Copyright © 2015 Eric Dvorsak <[email protected]>
13;;; Copyright © 2015, 2016 David Thompson <[email protected]>
14;;; Copyright © 2015, 2016, 2017 Leo Famulari <[email protected]>
15;;; Copyright © 2015, 2017 Ben Woodcroft <[email protected]>
16;;; Copyright © 2015, 2016 Erik Edrosa <[email protected]>
17;;; Copyright © 2015, 2016, 2017 Efraim Flashner <[email protected]>
18;;; Copyright © 2015, 2017 Kyle Meyer <[email protected]>
19;;; Copyright © 2015, 2016 Chris Marusich <[email protected]>
20;;; Copyright © 2016 Danny Milosavljevic <[email protected]>
21;;; Copyright © 2016 Lukas Gradl <[email protected]>
22;;; Copyright © 2016, 2018 Hartmut Goebel <[email protected]>
23;;; Copyright © 2016 Daniel Pimentel <[email protected]>
24;;; Copyright © 2016 Sou Bunnbu <[email protected]>
25;;; Copyright © 2016, 2017 Troy Sankey <[email protected]>
26;;; Copyright © 2016, 2017 Nils Gillmann <[email protected]>
27;;; Copyright © 2016 Dylan Jeffers <sapientech@[email protected]>
28;;; Copyright © 2016 David Craven <[email protected]>
29;;; Copyright © 2016, 2017, 2018 Marius Bakke <[email protected]>
30;;; Copyright © 2016, 2017 Stefan Reichör <[email protected]>
31;;; Copyright © 2016 Dylan Jeffers <sapientech@[email protected]>
32;;; Copyright © 2016, 2017 Alex Vong <[email protected]>
33;;; Copyright © 2016, 2017, 2018 Arun Isaac <[email protected]>
34;;; Copyright © 2016, 2017 Julien Lepiller <[email protected]>
35;;; Copyright © 2016, 2017, 2018 Tobias Geerinckx-Rice <[email protected]>
36;;; Copyright © 2016, 2017 Thomas Danckaert <[email protected]>
37;;; Copyright © 2017 Carlo Zancanaro <[email protected]>
38;;; Copyright © 2017 Frederick M. Muriithi <[email protected]>
39;;; Copyright © 2017, 2018 Adriano Peluso <[email protected]>
40;;; Copyright © 2017 Ben Sturmfels <[email protected]>
41;;; Copyright © 2017, 2018 Mathieu Othacehe <[email protected]>
42;;; Copyright © 2017 José Miguel Sánchez García <[email protected]>
43;;; Copyright © 2017 Roel Janssen <[email protected]>
44;;; Copyright © 2017, 2018 Kei Kebreau <[email protected]>
45;;; Copyright © 2017 Rutger Helling <[email protected]>
46;;; Copyright © 2017 Muriithi Frederick Muriuki <[email protected]>
47;;; Copyright © 2017 Brendan Tildesley <[email protected]>
48;;; Copyright © 2018 Ethan R. Jones <[email protected]
49;;; Copyright © 2018 Fis Trivial <[email protected]>
50;;; Copyright © 2018 Vijayalakshmi Vedantham <[email protected]>
51;;; Copyright © 2018 Mathieu Lirzin <[email protected]>
52;;; Copyright © 2018 Adam Massmann <[email protected]>
53;;; Copyright © 2016, 2018 Tomáš Čech <[email protected]>
54;;; Copyright © 2018 Nicolas Goaziou <[email protected]>
55;;; Copyright © 2018 Oleg Pykhalov <[email protected]>
56;;; Copyright © 2018 Clément Lassieur <[email protected]>
57;;;
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.14")
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 "0rka541ys16jwzcnnvjp2v12m4cwgd2jp6wj4kj511p715pb5zvi"))
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 `(;; 356 tests OK.
182 ;; 6 tests failed:
183 ;; test_compileall test_distutils test_import test_shutil test_socket
184 ;; test_subprocess
185 ;; 39 tests skipped:
186 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
187 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
188 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
189 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
190 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
191 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
192 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
193 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
194 ;; test_winreg test_winsound test_zipfile64
195 ;; 4 skips unexpected on linux2:
196 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
197 #:test-target "test"
198 #:configure-flags
199 (list "--enable-shared" ;allow embedding
200 "--with-system-ffi" ;build ctypes
201 "--with-ensurepip=install" ;install pip and setuptools
202 "--enable-unicode=ucs4"
203 (string-append "LDFLAGS=-Wl,-rpath="
204 (assoc-ref %outputs "out") "/lib"))
205
206 #:modules ((ice-9 ftw) (ice-9 match)
207 (guix build utils) (guix build gnu-build-system))
208 #:phases
209 (modify-phases %standard-phases
210 (add-before
211 'configure 'patch-lib-shells
212 (lambda _
213 ;; Filter for existing files, since some may not exist in all
214 ;; versions of python that are built with this recipe.
215 (substitute* (filter file-exists?
216 '("Lib/subprocess.py"
217 "Lib/popen2.py"
218 "Lib/distutils/tests/test_spawn.py"
219 "Lib/test/support/__init__.py"
220 "Lib/test/test_subprocess.py"))
221 (("/bin/sh") (which "sh")))
222
223 ;; Use zero as the timestamp in .pyc files so that builds are
224 ;; deterministic. TODO: Remove it when this variable is set in
225 ;; gnu-build-system.scm.
226 (setenv "SOURCE_DATE_EPOCH" "1")
227 #t))
228 (add-before 'configure 'do-not-record-configure-flags
229 (lambda* (#:key configure-flags #:allow-other-keys)
230 ;; Remove configure flags from the installed '_sysconfigdata.py'
231 ;; and 'Makefile' so we don't end up keeping references to the
232 ;; build tools.
233 ;;
234 ;; Preserve at least '--with-system-ffi' since otherwise the
235 ;; thing tries to build libffi, fails, and we end up with a
236 ;; Python that lacks ctypes.
237 (substitute* "configure"
238 (("^CONFIG_ARGS=.*$")
239 (format #f "CONFIG_ARGS='~a'\n"
240 (if (member "--with-system-ffi" configure-flags)
241 "--with-system-ffi"
242 ""))))
243 #t))
244 (add-before
245 'check 'pre-check
246 (lambda _
247 ;; 'Lib/test/test_site.py' needs a valid $HOME
248 (setenv "HOME" (getcwd))
249 #t))
250 (add-after
251 'unpack 'set-source-file-times-to-1980
252 ;; XXX One of the tests uses a ZIP library to pack up some of the
253 ;; source tree, and fails with "ZIP does not support timestamps
254 ;; before 1980". Work around this by setting the file times in the
255 ;; source tree to sometime in early 1980.
256 (lambda _
257 (let ((circa-1980 (* 10 366 24 60 60)))
258 (ftw "." (lambda (file stat flag)
259 (utime file circa-1980 circa-1980)
260 #t))
261 #t)))
262 (add-after 'install 'remove-tests
263 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
264 ;; because these files are used by some libraries out there.
265 (lambda* (#:key outputs #:allow-other-keys)
266 (let ((out (assoc-ref outputs "out")))
267 (match (scandir (string-append out "/lib")
268 (lambda (name)
269 (string-prefix? "python" name)))
270 ((pythonX.Y)
271 (let ((testdir (string-append out "/lib/" pythonX.Y
272 "/test")))
273 (with-directory-excursion testdir
274 (for-each delete-file-recursively
275 (scandir testdir
276 (match-lambda
277 ((or "." "..") #f)
278 (file
279 (not
280 (string-prefix? "test_support."
281 file))))))
282 (call-with-output-file "__init__.py" (const #t))
283 #t)))))))
284 (add-before 'strip 'make-libraries-writable
285 (lambda* (#:key outputs #:allow-other-keys)
286 ;; Make .so files writable so they can be stripped.
287 (let ((out (assoc-ref outputs "out")))
288 (for-each (lambda (file)
289 (chmod file #o755))
290 (find-files (string-append out "/lib")
291 "\\.so"))
292 #t)))
293 (add-after 'install 'move-tk-inter
294 (lambda* (#:key outputs #:allow-other-keys)
295 ;; When Tkinter support is built move it to a separate output so
296 ;; that the main output doesn't contain a reference to Tcl/Tk.
297 (let ((out (assoc-ref outputs "out"))
298 (tk (assoc-ref outputs "tk")))
299 (when tk
300 (match (find-files out "tkinter.*\\.so")
301 ((tkinter.so)
302 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
303 ;; want it under TK/lib/pythonX.Y/site-packages.
304 (let* ((len (string-length out))
305 (target (string-append
306 tk "/"
307 (string-drop
308 (dirname (dirname tkinter.so))
309 len)
310 "/site-packages")))
311 (install-file tkinter.so target)
312 (delete-file tkinter.so)))))
313 #t))))))
314 (inputs
315 `(("bzip2" ,bzip2)
316 ("gdbm" ,gdbm)
317 ("libffi" ,libffi) ; for ctypes
318 ("sqlite" ,sqlite) ; for sqlite extension
319 ("openssl" ,openssl)
320 ("readline" ,readline)
321 ("zlib" ,zlib)
322 ("tcl" ,tcl)
323 ("tk" ,tk))) ; for tkinter
324 (native-inputs
325 `(("pkg-config" ,pkg-config)))
326 (native-search-paths
327 (list (search-path-specification
328 (variable "PYTHONPATH")
329 (files '("lib/python2.7/site-packages")))))
330 (home-page "https://www.python.org")
331 (synopsis "High-level, dynamically-typed programming language")
332 (description
333 "Python is a remarkably powerful dynamic programming language that
334is used in a wide variety of application domains. Some of its key
335distinguishing features include: clear, readable syntax; strong
336introspection capabilities; intuitive object orientation; natural
337expression of procedural code; full modularity, supporting hierarchical
338packages; exception-based error handling; and very high level dynamic
339data types.")
340 (license license:psfl)))
341
342;; Current 2.x version.
343(define-public python-2 python-2.7)
344
345(define-public python2-called-python
346 ;; Both 2.x and 3.x used to be called "python". In commit
347 ;; a7714d42de2c3082f3609d1e63c83d703fb39cf9 (March 2018), we renamed the
348 ;; Python 2.x package to "python2".
349 (package
350 (inherit python-2)
351 (name "python")
352 (properties `((superseded . ,python-2)))))
353
354(define-public python-3.6
355 (package (inherit python-2)
356 (name "python")
357 (version "3.6.5")
358 (source (origin
359 (method url-fetch)
360 (uri (string-append "https://www.python.org/ftp/python/"
361 version "/Python-" version ".tar.xz"))
362 (patches (search-patches
363 "python-fix-tests.patch"
364 "python-3-fix-tests.patch"
365 "python-3-deterministic-build-info.patch"
366 "python-3-search-paths.patch"))
367 (patch-flags '("-p0"))
368 (sha256
369 (base32
370 "19l7inxm056jjw33zz97z0m02hsi7jnnx5kyb76abj5ml4xhad7l"))
371 (snippet
372 '(begin
373 (for-each delete-file
374 '("Lib/ctypes/test/test_structures.py" ; fails on aarch64
375 "Lib/ctypes/test/test_win32.py" ; fails on aarch64
376 "Lib/test/test_fcntl.py")) ; fails on aarch64
377 #t))))
378 (arguments
379 (substitute-keyword-arguments (package-arguments python-2)
380 ((#:tests? _) #t)
381 ((#:phases phases)
382 `(modify-phases ,phases
383 (add-after 'unpack 'patch-timestamp-for-pyc-files
384 (lambda _
385 ;; We set DETERMINISTIC_BUILD to only override the mtime when
386 ;; building with Guix, lest we break auto-compilation in
387 ;; environments.
388 (setenv "DETERMINISTIC_BUILD" "1")
389 (substitute* "Lib/py_compile.py"
390 (("source_stats\\['mtime'\\]")
391 "(1 if 'DETERMINISTIC_BUILD' in os.environ else source_stats['mtime'])"))
392
393 ;; Use deterministic hashes for strings, bytes, and datetime
394 ;; objects.
395 (setenv "PYTHONHASHSEED" "0")
396
397 ;; Reset mtime when validating bytecode header.
398 (substitute* "Lib/importlib/_bootstrap_external.py"
399 (("source_mtime = int\\(source_stats\\['mtime'\\]\\)")
400 "source_mtime = 1"))
401 #t))
402 ;; These tests fail because of our change to the bytecode
403 ;; validation. They fail because expected exceptions do not get
404 ;; thrown. This seems to be no problem.
405 (add-after 'unpack 'disable-broken-bytecode-tests
406 (lambda _
407 (substitute* "Lib/test/test_importlib/source/test_file_loader.py"
408 (("test_bad_marshal")
409 "disable_test_bad_marshal")
410 (("test_no_marshal")
411 "disable_test_no_marshal")
412 (("test_non_code_marshal")
413 "disable_test_non_code_marshal"))
414 #t))
415 ;; Unset DETERMINISTIC_BUILD to allow for tests that check that
416 ;; stale pyc files are rebuilt.
417 (add-before 'check 'allow-non-deterministic-compilation
418 (lambda _ (unsetenv "DETERMINISTIC_BUILD") #t))
419 ;; We need to rebuild all pyc files for three different
420 ;; optimization levels to replace all files that were not built
421 ;; deterministically.
422
423 ;; FIXME: Without this phase we have close to 2000 files that
424 ;; differ across different builds of this package. With this phase
425 ;; there are about 500 files left that differ.
426 (add-after 'install 'rebuild-bytecode
427 (lambda* (#:key outputs #:allow-other-keys)
428 (setenv "DETERMINISTIC_BUILD" "1")
429 (let ((out (assoc-ref outputs "out")))
430 (for-each
431 (lambda (opt)
432 (format #t "Compiling with optimization level: ~a\n"
433 (if (null? opt) "none" (car opt)))
434 (for-each (lambda (file)
435 (apply invoke
436 `(,(string-append out "/bin/python3")
437 ,@opt
438 "-m" "compileall"
439 "-f" ; force rebuild
440 ;; Don't build lib2to3, because it's Python 2 code.
441 ;; Also don't build obviously broken test code.
442 "-x" "(lib2to3|test/bad.*)"
443 ,file)))
444 (find-files out "\\.py$")))
445 (list '() '("-O") '("-OO")))
446 #t)))))))
447 (native-search-paths
448 (list (search-path-specification
449 (variable "PYTHONPATH")
450 (files (list (string-append "lib/python"
451 (version-major+minor version)
452 "/site-packages"))))))))
453
454;; Current 3.x version.
455(define-public python-3 python-3.6)
456
457;; Current major version.
458(define-public python python-3)
459
460;; Minimal variants of Python, mostly used to break the cycle between Tk and
461;; Python (Tk -> libxcb -> Python.)
462
463(define-public python2-minimal
464 (package (inherit python-2)
465 (name "python2-minimal")
466 (outputs '("out"))
467
468 ;; Keep zlib, which is used by 'pip' (via the 'zipimport' module), which
469 ;; is invoked upon 'make install'. 'pip' also expects 'ctypes' and thus
470 ;; libffi.
471 (inputs `(("libffi" ,libffi)
472 ("zlib" ,zlib)))))
473
474(define-public python-minimal
475 (package (inherit python)
476 (name "python-minimal")
477 (outputs '("out"))
478
479 ;; Build fails due to missing ctypes without libffi.
480 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
481 ;; zlib is required by 'zipimport', used by pip.
482 (inputs `(("libffi" ,libffi)
483 ("openssl" ,openssl)
484 ("zlib" ,zlib)))))
485
486(define-public python-debug
487 (package
488 (inherit python)
489 (name "python-debug")
490 (outputs '("out" "debug"))
491 (build-system gnu-build-system)
492 (arguments
493 (substitute-keyword-arguments (package-arguments python)
494 ((#:configure-flags flags '())
495 `(cons "--with-pydebug" ,flags))))
496 (synopsis
497 "High-level, dynamically-typed programming language (for debugging)")
498 (description
499 "This variant of Python provides an interpreter built with
500@code{--with-pydebug} to help develop and debug extensions. See
501@url{https://pythonextensionpatterns.readthedocs.io/en/latest/debugging/debug.html},
502for more information.")))
503
504(define* (wrap-python3 python
505 #:optional
506 (name (string-append (package-name python) "-wrapper")))
507 (package (inherit python)
508 (name name)
509 (source #f)
510 (build-system trivial-build-system)
511 (outputs '("out"))
512 (inputs `(("bash" ,bash)))
513 (propagated-inputs `(("python" ,python)))
514 (arguments
515 `(#:modules ((guix build utils))
516 #:builder
517 (begin
518 (use-modules (guix build utils))
519 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
520 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
521 (mkdir-p bin)
522 (for-each
523 (lambda (old new)
524 (symlink (string-append python old)
525 (string-append bin "/" new)))
526 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
527 `("python" ,"pydoc" ,"idle" ,"pip"))
528 ;; python-config outputs search paths based upon its location,
529 ;; use a bash wrapper to avoid changing its outputs.
530 (let ((bash (string-append (assoc-ref %build-inputs "bash")
531 "/bin/bash"))
532 (old (string-append python "python3-config"))
533 (new (string-append bin "/python-config")))
534 (with-output-to-file new
535 (lambda ()
536 (format #t "#!~a~%" bash)
537 (format #t "exec \"~a\" \"$@\"~%" old)
538 (chmod new #o755)
539 #t)))))))
540 (synopsis "Wrapper for the Python 3 commands")
541 (description
542 "This package provides wrappers for the commands of Python@tie{}3.x such
543that they can be invoked under their usual name---e.g., @command{python}
544instead of @command{python3}.")))
545
546(define-public python-wrapper (wrap-python3 python))
547(define-public python-minimal-wrapper (wrap-python3 python-minimal))
548
549(define-public python-psutil
550 (package
551 (name "python-psutil")
552 (version "5.4.3")
553 (source
554 (origin
555 (method url-fetch)
556 (uri (pypi-uri "psutil" version))
557 (sha256
558 (base32
559 "063v69x7spyclyaxrd3gmzj3p16q5ayg97xqhwb1kyn22a9pwip2"))))
560 (build-system python-build-system)
561 (arguments
562 ;; FIXME: some tests does not return and times out.
563 '(#:tests? #f))
564 (home-page "https://www.github.com/giampaolo/psutil")
565 (synopsis "Library for retrieving information on running processes")
566 (description
567 "psutil (Python system and process utilities) is a library for retrieving
568information on running processes and system utilization (CPU, memory, disks,
569network) in Python. It is useful mainly for system monitoring, profiling and
570limiting process resources and management of running processes. It implements
571many functionalities offered by command line tools such as: ps, top, lsof,
572netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
573pidof, tty, taskset, pmap.")
574 (properties `((python2-variant . ,(delay python2-psutil))))
575 (license license:bsd-3)))
576
577(define-public python2-psutil
578 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
579 (package
580 (inherit base)
581 (propagated-inputs
582 `(("python2-enum34" ,python2-enum34) ;optional
583 ,@(package-propagated-inputs base))))))
584
585(define-public python-shapely
586 (package
587 (name "python-shapely")
588 (version "1.6.3")
589 (source
590 (origin
591 (method url-fetch)
592 (uri (pypi-uri "Shapely" version))
593 (sha256
594 (base32
595 "0svc58dzcw9gj92b4sgq35sdxkf85z0qwlzxarkzq4bp3h8jy58l"))))
596 (build-system python-build-system)
597 (native-inputs
598 `(("python-cython" ,python-cython)
599 ("python-matplotlib" ,python-matplotlib)
600 ("python-pytest" ,python-pytest)
601 ("python-pytest-cov" ,python-pytest-cov)))
602 (inputs
603 `(("geos" ,geos)))
604 (propagated-inputs
605 `(("python-numpy" ,python-numpy)))
606 (arguments
607 `(#:phases
608 (modify-phases %standard-phases
609 (add-after 'unpack 'patch-geos-path
610 (lambda* (#:key inputs #:allow-other-keys)
611 (let ((geos (assoc-ref inputs "geos"))
612 (glibc (assoc-ref inputs ,(if (%current-target-system)
613 "cross-libc" "libc"))))
614 (substitute* "shapely/geos.py"
615 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
616 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
617 geos "/lib/libgeos_c.so'])"))
618 (("free = load_dll\\('c'\\)\\.free")
619 (string-append "free = load_dll('c', fallbacks=['"
620 glibc "/lib/libc.so.6']).free"))))
621 #t)))))
622 (home-page "https://github.com/Toblerity/Shapely")
623 (synopsis "Library for the manipulation and analysis of geometric objects")
624 (description "Shapely is a Python package for manipulation and analysis of
625planar geometric objects. It is based on the @code{GEOS} library.")
626 (license license:bsd-3)))
627
628(define-public python-logwrap
629 (package
630 (name "python-logwrap")
631 (version "3.2.1")
632 (source
633 (origin
634 (method url-fetch)
635 (uri (pypi-uri "logwrap" version ".zip"))
636 (sha256
637 (base32
638 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
639 (build-system python-build-system)
640 (propagated-inputs
641 `(("python-six" ,python-six)
642 ("python-typing" ,python-typing)))
643 (native-inputs
644 `(("unzip" ,unzip)
645 ("python-cython" ,python-cython)
646 ("python-pytest" ,python-pytest)
647 ("python-pytest-cov" ,python-pytest-cov)
648 ("python-pytest-runner" ,python-pytest-runner)))
649 (home-page "https://github.com/penguinolog/logwrap")
650 (synopsis "Decorator for logging function arguments")
651 (description "This package provides a decorator to log function arguments
652and function call return values in a human-readable way.")
653 (license license:asl2.0)))
654
655(define-public python2-shapely
656 (package-with-python2 python-shapely))
657
658(define-public python-clyent
659 (package
660 (name "python-clyent")
661 (version "1.2.1")
662 (source
663 (origin
664 (method url-fetch)
665 (uri (pypi-uri "clyent" version))
666 (sha256
667 (base32
668 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
669 (build-system python-build-system)
670 (native-inputs
671 `(("python-mock" ,python-mock)))
672 (home-page "https://github.com/binstar/clyent")
673 (synopsis "Command line client library")
674 (description "Clyent is a Python command line utiliy library. It is used
675by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
676 (license license:bsd-3)))
677
678(define-public python2-clyent
679 (package-with-python2 python-clyent))
680
681(define-public python-babel
682 (package
683 (name "python-babel")
684 (version "2.3.4")
685 (source
686 (origin
687 (method url-fetch)
688 (uri (pypi-uri "Babel" version))
689 (sha256
690 (base32
691 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
692 (build-system python-build-system)
693 (propagated-inputs
694 `(("python-pytz" ,python-pytz)))
695 (arguments `(#:tests? #f)) ; no test target
696 (home-page "http://babel.pocoo.org/")
697 (synopsis
698 "Tools for internationalizing Python applications")
699 (description
700 "Babel is composed of two major parts:
701- tools to build and work with gettext message catalogs
702- a Python interface to the CLDR (Common Locale Data Repository), providing
703access to various locale display names, localized number and date formatting,
704etc. ")
705 (license license:bsd-3)))
706
707(define-public python2-babel
708 (package-with-python2 python-babel))
709
710(define-public python2-backport-ssl-match-hostname
711 (package
712 (name "python2-backport-ssl-match-hostname")
713 (version "3.5.0.1")
714 (source
715 (origin
716 (method url-fetch)
717 (uri (string-append
718 "https://pypi.python.org/packages/source/b/"
719 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
720 version ".tar.gz"))
721 (sha256
722 (base32
723 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
724 (build-system python-build-system)
725 (arguments
726 `(#:python ,python-2
727 #:tests? #f)) ; no test target
728 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
729 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
730 (description
731 "This backport brings the ssl.match_hostname() function to users of
732earlier versions of Python. The function checks the hostname in the
733certificate returned by the server to which a connection has been established,
734and verifies that it matches the intended target hostname.")
735 (license license:psfl)))
736
737(define-public python-hdf4
738 (package
739 (name "python-hdf4")
740 (version "0.9")
741 (source
742 (origin
743 (method url-fetch)
744 (uri (pypi-uri name version))
745 (sha256
746 (base32
747 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
748 (build-system python-build-system)
749 (native-inputs `(("nose" ,python-nose)))
750 (propagated-inputs `(("numpy" ,python-numpy)))
751 (inputs
752 `(("hdf4" ,hdf4)
753 ("libjpeg" ,libjpeg)
754 ("zlib" ,zlib)))
755 (arguments
756 `(#:phases
757 (modify-phases %standard-phases
758 (replace 'check
759 (lambda _
760 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
761 ;; on to import numpy. Somehow this works on their CI system.
762 ;; Let's just manage PYTHONPATH here instead.
763 (substitute* "runexamples.sh"
764 (("export PYTHONPATH=.*") ""))
765 (setenv "PYTHONPATH"
766 (string-append (getcwd) ":"
767 (getenv "PYTHONPATH")))
768 (and (zero? (system* "./runexamples.sh"))
769 (zero? (system* "nosetests" "-v"))))))))
770 (home-page "https://github.com/fhs/python-hdf4")
771 (synopsis "Python interface to the NCSA HDF4 library")
772 (description
773 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
774which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
775NetCDF files can also be read and modified. Python-HDF4 is a fork of
776@url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
777 (license license:expat)))
778
779(define-public python2-hdf4
780 (package-with-python2 python-hdf4))
781
782(define-public python-h5py
783 (package
784 (name "python-h5py")
785 (version "2.7.0")
786 (source
787 (origin
788 (method url-fetch)
789 (uri (pypi-uri "h5py" version))
790 (sha256
791 (base32
792 "0433sdv6xc9p7v1xs1gvbxp7p152ywi3nplgjb258q9fvw9469br"))))
793 (build-system python-build-system)
794 (arguments
795 `(#:tests? #f ; no test target
796 #:phases
797 (modify-phases %standard-phases
798 (add-after 'unpack 'fix-hdf5-paths
799 (lambda* (#:key inputs #:allow-other-keys)
800 (let ((prefix (assoc-ref inputs "hdf5")))
801 (substitute* "setup_build.py"
802 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
803 (string-append "['" prefix "/lib" "']"))
804 (("'/opt/local/include', '/usr/local/include'")
805 (string-append "'" prefix "/include" "'")))
806 (substitute* "setup_configure.py"
807 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
808 (string-append "['" prefix "/lib" "']")))
809 #t))))))
810 (propagated-inputs
811 `(("python-six" ,python-six)
812 ("python-numpy" ,python-numpy)))
813 (inputs
814 `(("hdf5" ,hdf5)))
815 (native-inputs
816 `(("python-cython" ,python-cython)
817 ("python-pkgconfig" ,python-pkgconfig)))
818 (home-page "http://www.h5py.org/")
819 (synopsis "Read and write HDF5 files from Python")
820 (description
821 "The h5py package provides both a high- and low-level interface to the
822HDF5 library from Python. The low-level interface is intended to be a
823complete wrapping of the HDF5 API, while the high-level component supports
824access to HDF5 files, datasets and groups using established Python and NumPy
825concepts.")
826 (license license:bsd-3)))
827
828(define-public python2-h5py
829 (package-with-python2 python-h5py))
830
831(define-public python-netcdf4
832 (package
833 (name "python-netcdf4")
834 (version "1.2.9")
835 (source
836 (origin
837 (method url-fetch)
838 (uri (pypi-uri "netCDF4" version))
839 (sha256
840 (base32
841 "1h6jq338amlbk0ilzvjyl7cck80i0bah9a5spn9in71vy2qxm7i5"))))
842 (build-system python-build-system)
843 (native-inputs
844 `(("python-cython" ,python-cython)))
845 (propagated-inputs
846 `(("python-numpy" ,python-numpy)))
847 (inputs
848 `(("netcdf" ,netcdf)
849 ("hdf4" ,hdf4)
850 ("hdf5" ,hdf5)))
851 (arguments
852 '(#:phases
853 (modify-phases %standard-phases
854 (replace 'check
855 (lambda _
856 (setenv "NO_NET" "1") ; disable opendap tests
857 (with-directory-excursion "test"
858 (setenv "PYTHONPATH" ; find and add the library we just built
859 (string-append
860 (car (find-files "../build" "lib.*"
861 #:directories? #:t
862 #:fail-on-error? #:t))
863 ":" (getenv "PYTHONPATH")))
864 (zero? (system* "python" "run_all.py"))))))))
865 (home-page
866 "https://github.com/Unidata/netcdf4-python")
867 (synopsis "Python/numpy interface to the netCDF library")
868 (description "Netcdf4-python is a Python interface to the netCDF C
869library. netCDF version 4 has many features not found in earlier
870versions of the library and is implemented on top of HDF5. This module
871can read and write files in both the new netCDF 4 and the old netCDF 3
872format, and can create files that are readable by HDF5 clients. The
873API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
874to users of that module.")
875 ;; The software is mainly ISC, but includes some files covered
876 ;; by the Expat license.
877 (license (list license:isc license:expat))))
878
879(define-public python2-netcdf4
880 (package-with-python2 python-netcdf4))
881
882(define-public python-lockfile
883 (package
884 (name "python-lockfile")
885 (version "0.12.2")
886 (source
887 (origin
888 (method url-fetch)
889 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
890 "lockfile-" version ".tar.gz"))
891 (sha256
892 (base32
893 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
894 (build-system python-build-system)
895 (arguments '(#:test-target "check"))
896 (native-inputs
897 `(("python-pbr" ,python-pbr)))
898 (home-page "https://launchpad.net/pylockfile")
899 (synopsis "Platform-independent file locking module")
900 (description
901 "The lockfile package exports a LockFile class which provides a simple
902API for locking files.")
903 (license license:expat)))
904
905(define-public python2-lockfile
906 (package-with-python2 python-lockfile))
907
908(define-public python-setuptools
909 (package
910 (name "python-setuptools")
911 (version "31.0.0")
912 (source
913 (origin
914 (method url-fetch)
915 (uri (pypi-uri "setuptools" version))
916 (sha256
917 (base32
918 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
919 (modules '((guix build utils)))
920 (snippet
921 '(begin
922 ;; Remove included binaries which are used to build self-extracting
923 ;; installers for Windows.
924 ;; TODO: Find some way to build them ourself so we can include them.
925 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
926 #t))))
927 (build-system python-build-system)
928 ;; FIXME: Tests require pytest, which itself relies on setuptools.
929 ;; One could bootstrap with an internal untested setuptools.
930 (arguments
931 `(#:tests? #f))
932 (home-page "https://pypi.python.org/pypi/setuptools")
933 (synopsis
934 "Library designed to facilitate packaging Python projects")
935 (description
936 "Setuptools is a fully-featured, stable library designed to facilitate
937packaging Python projects, where packaging includes:
938Python package and module definitions,
939distribution package metadata,
940test hooks,
941project installation,
942platform-specific details,
943Python 3 support.")
944 ;; TODO: setuptools now bundles the following libraries:
945 ;; packaging, pyparsing, six and appdirs. How to unbundle?
946 (license (list license:psfl ; setuptools itself
947 license:expat ; six, appdirs, pyparsing
948 license:asl2.0 ; packaging is dual ASL2/BSD-2
949 license:bsd-2))))
950
951(define-public python2-setuptools
952 (package-with-python2 python-setuptools))
953
954(define-public python-uniseg
955 (package
956 (name "python-uniseg")
957 (version "0.7.1")
958 (source
959 (origin
960 (method url-fetch)
961 (uri (pypi-uri "uniseg" version ".zip"))
962 (sha256
963 (base32
964 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
965 (build-system python-build-system)
966 (arguments
967 '(#:tests? #f)) ; The test suite requires network access.
968 (native-inputs
969 `(("unzip" ,unzip)))
970 (home-page
971 "https://bitbucket.org/emptypage/uniseg-python")
972 (synopsis
973 "Python library to determine Unicode text segmentations")
974 (description
975 "Uniseg is a Python package used to determine Unicode text segmentations.
976Supported segmentations include:
977@enumerate
978@item @dfn{Code point} (any value in the Unicode codespace)
979@item @dfn{Grapheme cluster} (user-perceived character made of a single or
980multiple Unicode code points, e.g. \"G\" + acute-accent)
981@item Word break
982@item Sentence break
983@item Line break
984@end enumerate")
985 (license license:expat)))
986
987(define-public python2-uniseg
988 (package-with-python2 python-uniseg))
989
990(define-public python-humanfriendly
991 (package
992 (name "python-humanfriendly")
993 (version "4.4.1")
994 (source
995 (origin
996 (method url-fetch)
997 (uri (pypi-uri "humanfriendly" version))
998 (sha256
999 (base32
1000 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
1001 (build-system python-build-system)
1002 (arguments
1003 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1004 #:tests? #f))
1005 (propagated-inputs
1006 `(("python-monotonic" ,python-monotonic)))
1007 (home-page "https://humanfriendly.readthedocs.io")
1008 (synopsis "Human-friendly input and output in Python")
1009 (description
1010 "The functions and classes in @code{humanfriendly} can be used to make
1011text interfaces more user-friendly. It includes tools to parse and format
1012numbers, file sizes, and timespans, timers for long-running operations, menus
1013to allow the user to choose from a list of options, and terminal interaction
1014helpers.")
1015 (license license:expat)))
1016
1017(define-public python2-humanfriendly
1018 (package-with-python2 python-humanfriendly))
1019
1020(define-public python-capturer
1021 (package
1022 (name "python-capturer")
1023 (version "2.4")
1024 (source
1025 (origin
1026 (method url-fetch)
1027 (uri (pypi-uri "capturer" version))
1028 (sha256
1029 (base32
1030 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1031 (build-system python-build-system)
1032 (arguments
1033 `(#:tests? #f))
1034 (propagated-inputs
1035 `(("python-humanfriendly" ,python-humanfriendly)))
1036 (home-page "https://capturer.readthedocs.io")
1037 (synopsis "Capture stdout and stderr streams of the current process")
1038 (description
1039 "The capturer package makes it easy to capture the stdout and stderr
1040streams of the current process and subprocesses. Output can be relayed
1041to the terminal in real time but is also available to the Python program
1042for additional processing.")
1043 (license license:expat)))
1044
1045(define-public python2-capturer
1046 (package-with-python2 python-capturer))
1047
1048(define-public python-verboselogs
1049 (package
1050 (name "python-verboselogs")
1051 (version "1.7")
1052 (source
1053 (origin
1054 (method url-fetch)
1055 (uri (pypi-uri "verboselogs" version))
1056 (sha256
1057 (base32
1058 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1059 (build-system python-build-system)
1060 (native-inputs
1061 `(("python-mock" ,python-mock)
1062 ("python-astroid" ,python-astroid)
1063 ("python-pylint" ,python-pylint)))
1064 (home-page "https://verboselogs.readthedocs.io")
1065 (synopsis "Verbose logging level for Python's logging module")
1066 (description
1067 "The @code{verboselogs} package extends Python's @code{logging} module to
1068add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1069 (license license:expat)))
1070
1071(define-public python2-verboselogs
1072 (package-with-python2 python-verboselogs))
1073
1074(define-public python-coloredlogs
1075 (package
1076 (name "python-coloredlogs")
1077 (version "7.3")
1078 (source
1079 (origin
1080 (method url-fetch)
1081 (uri (pypi-uri "coloredlogs" version))
1082 (sha256
1083 (base32
1084 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
1085 (build-system python-build-system)
1086 (arguments
1087 `(;Tests require some updated modules
1088 #:tests? #f))
1089 (propagated-inputs
1090 `(("python-capturer" ,python-capturer)))
1091 (home-page "https://coloredlogs.readthedocs.io")
1092 (synopsis "Colored stream handler for Python's logging module")
1093 (description
1094 "The @code{coloredlogs} package enables colored terminal output for
1095Python's logging module. The @code{ColoredFormatter} class inherits from
1096@code{logging.Formatter} and uses ANSI escape sequences to render your logging
1097messages in color.")
1098 (license license:expat)))
1099
1100(define-public python2-coloredlogs
1101 (package-with-python2 python-coloredlogs))
1102
1103(define-public python-eventlet
1104 (package
1105 (name "python-eventlet")
1106 (version "0.20.1")
1107 (source
1108 (origin
1109 (method url-fetch)
1110 (uri (pypi-uri "eventlet" version))
1111 (sha256
1112 (base32
1113 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1114 (build-system python-build-system)
1115 (propagated-inputs
1116 `(("python-greenlet" ,python-greenlet)))
1117 (arguments
1118 ;; TODO: Requires unpackaged 'enum-compat'.
1119 '(#:tests? #f))
1120 (home-page "http://eventlet.net")
1121 (synopsis "Concurrent networking library for Python")
1122 (description
1123 "Eventlet is a concurrent networking library for Python that
1124allows you to change how you run your code, not how you write it.
1125It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1126Coroutines ensure that the developer uses a blocking style of programming
1127that is similar to threading, but provide the benefits of non-blocking I/O.
1128The event dispatch is implicit, which means you can easily use @code{Eventlet}
1129from the Python interpreter, or as a small part of a larger application.")
1130 (license license:expat)))
1131
1132(define-public python2-eventlet
1133 (let ((base (package-with-python2
1134 (strip-python2-variant python-eventlet))))
1135 (package (inherit base)
1136 (propagated-inputs
1137 `(("python2-enum34" ,python2-enum34)
1138 ,@(package-propagated-inputs base))))))
1139
1140(define-public python-six
1141 (package
1142 (name "python-six")
1143 (version "1.11.0")
1144 (source
1145 (origin
1146 (method url-fetch)
1147 (uri (pypi-uri "six" version))
1148 (sha256
1149 (base32
1150 "1scqzwc51c875z23phj48gircqjgnn3af8zy2izjwmnlxrxsgs3h"))))
1151 (build-system python-build-system)
1152 (arguments
1153 `(#:phases
1154 (modify-phases %standard-phases
1155 (replace 'check
1156 (lambda _
1157 (invoke "py.test" "-v"))))))
1158 (native-inputs
1159 `(("python-py" ,python-py)
1160 ("python-pytest" ,python-pytest-bootstrap)))
1161 (home-page "https://pypi.python.org/pypi/six/")
1162 (synopsis "Python 2 and 3 compatibility utilities")
1163 (description
1164 "Six is a Python 2 and 3 compatibility library. It provides utility
1165functions for smoothing over the differences between the Python versions with
1166the goal of writing Python code that is compatible on both Python versions.
1167Six supports every Python version since 2.5. It is contained in only one
1168Python file, so it can be easily copied into your project.")
1169 (license license:x11)))
1170
1171(define-public python2-six
1172 (package-with-python2 python-six))
1173
1174(define-public python-six-bootstrap
1175 (package
1176 (inherit python-six)
1177 (name "python-six-bootstrap")
1178 (native-inputs `())
1179 (arguments `(#:tests? #f))))
1180
1181(define-public python2-six-bootstrap
1182 (package-with-python2 python-six-bootstrap))
1183
1184(define-public python-schedule
1185 (package
1186 (name "python-schedule")
1187 (version "0.4.3")
1188 (source
1189 (origin
1190 (method url-fetch)
1191 (uri (pypi-uri "schedule" version))
1192 (sha256
1193 (base32
1194 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1195 (build-system python-build-system)
1196 (native-inputs
1197 `(("python-pytest" ,python-pytest)
1198 ("python-mock" ,python-mock)))
1199 (home-page "https://github.com/dbader/schedule")
1200 (synopsis "Schedule periodic function calls in Python")
1201 (description
1202 "Schedule is an in-process scheduler for periodic jobs that uses the
1203builder pattern for configuration. Schedule lets you run Python functions (or
1204any other callable) periodically at pre-determined intervals using a simple,
1205human-friendly syntax.")
1206 (license license:expat)))
1207
1208(define-public python2-schedule
1209 (package-with-python2 python-schedule))
1210
1211(define-public python-pandas
1212 (package
1213 (name "python-pandas")
1214 (version "0.23.1")
1215 (source
1216 (origin
1217 (method url-fetch)
1218 (uri (pypi-uri "pandas" version))
1219 (sha256
1220 (base32 "142nvwb01r2wv42y2cz40bx33hd8ffh6s6gynapg859fmzr2mdah"))))
1221 (build-system python-build-system)
1222 (arguments
1223 `(#:modules ((guix build utils)
1224 (guix build python-build-system)
1225 (ice-9 ftw)
1226 (srfi srfi-26))
1227 #:phases (modify-phases %standard-phases
1228 (replace 'check
1229 (lambda _
1230 (let ((build-directory
1231 (string-append
1232 (getcwd) "/build/"
1233 (car (scandir "build"
1234 (cut string-prefix? "lib." <>))))))
1235 (with-directory-excursion build-directory
1236 ;; Delete tests that require "moto" which is not yet in Guix.
1237 (for-each delete-file
1238 '("pandas/tests/io/conftest.py"
1239 "pandas/tests/io/json/test_compression.py"
1240 "pandas/tests/io/test_excel.py"
1241 "pandas/tests/io/test_parquet.py"))
1242 (invoke "pytest" "-v" "pandas" "-k"
1243 (string-append
1244 "not network and not disabled"
1245 ;; XXX: Due to the deleted tests above.
1246 " and not test_read_s3_jsonl")))))))))
1247 (propagated-inputs
1248 `(("python-numpy" ,python-numpy)
1249 ("python-pytz" ,python-pytz)
1250 ("python-dateutil" ,python-dateutil)))
1251 (native-inputs
1252 `(("python-cython" ,python-cython)
1253 ("python-beautifulsoup4" ,python-beautifulsoup4)
1254 ("python-lxml" ,python-lxml)
1255 ("python-html5lib" ,python-html5lib)
1256 ("python-nose" ,python-nose)
1257 ("python-pytest" ,python-pytest)))
1258 (home-page "https://pandas.pydata.org")
1259 (synopsis "Data structures for data analysis, time series, and statistics")
1260 (description
1261 "Pandas is a Python package providing fast, flexible, and expressive data
1262structures designed to make working with structured (tabular,
1263multidimensional, potentially heterogeneous) and time series data both easy
1264and intuitive. It aims to be the fundamental high-level building block for
1265doing practical, real world data analysis in Python.")
1266 (license license:bsd-3)))
1267
1268(define-public python2-pandas
1269 (package-with-python2 python-pandas))
1270
1271(define-public python2-mechanize
1272 (package
1273 (name "python2-mechanize")
1274 (version "0.2.5")
1275 (source
1276 (origin
1277 (method url-fetch)
1278 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1279 version ".tar.gz"))
1280 (sha256
1281 (base32
1282 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1283 (build-system python-build-system)
1284 (arguments
1285 `(#:python ,python-2 ; apparently incompatible with Python 3
1286 #:tests? #f))
1287 ;; test fails with message
1288 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1289 ;; (python-3.3.2) or
1290 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1291 ;; (python-2.7.5).
1292 ;; The source code is from March 2011 and probably not up-to-date
1293 ;; with respect to python unit tests.
1294 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1295 (synopsis
1296 "Stateful programmatic web browsing in Python")
1297 (description
1298 "Mechanize implements stateful programmatic web browsing in Python,
1299after Andy Lester’s Perl module WWW::Mechanize.")
1300 (license (license:non-copyleft
1301 "file://COPYING"
1302 "See COPYING in the distribution."))))
1303
1304
1305(define-public python-simplejson
1306 (package
1307 (name "python-simplejson")
1308 (version "3.14.0")
1309 (source
1310 (origin
1311 (method url-fetch)
1312 (uri (pypi-uri "simplejson" version))
1313 (sha256
1314 (base32
1315 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1316 (build-system python-build-system)
1317 (home-page "http://simplejson.readthedocs.org/en/latest/")
1318 (synopsis
1319 "Json library for Python")
1320 (description
1321 "JSON (JavaScript Object Notation) is a subset of JavaScript
1322syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1323format.
1324
1325Simplejson exposes an API familiar to users of the standard library marshal
1326and pickle modules. It is the externally maintained version of the json
1327library contained in Python 2.6, but maintains compatibility with Python 2.5
1328and (currently) has significant performance advantages, even without using
1329the optional C extension for speedups. Simplejson is also supported on
1330Python 3.3+.")
1331 (license license:x11)))
1332
1333(define-public python2-simplejson
1334 (package-with-python2 python-simplejson))
1335
1336
1337(define-public python-pyicu
1338 (package
1339 (name "python-pyicu")
1340 (version "1.9.8")
1341 (source
1342 (origin
1343 (method url-fetch)
1344 (uri (pypi-uri "PyICU" version))
1345 (sha256
1346 (base32
1347 "05nz4p2dpkhwj6y9kik24xbvmfxji39nl0xw0sc0nvp9fgzf6xnd"))))
1348 (build-system python-build-system)
1349 (inputs
1350 `(("icu4c" ,icu4c)))
1351 (native-inputs
1352 `(("python-pytest" ,python-pytest)
1353 ("python-six" ,python-six)))
1354 (home-page "https://github.com/ovalhub/pyicu")
1355 (synopsis "Python extension wrapping the ICU C++ API")
1356 (description
1357 "PyICU is a python extension wrapping the ICU C++ API.")
1358 (properties `((python2-variant . ,(delay python2-pyicu))))
1359 (license license:x11)))
1360
1361(define-public python2-pyicu
1362 (let ((base (package-with-python2
1363 (strip-python2-variant python-pyicu))))
1364 (package
1365 (inherit base)
1366 (arguments
1367 `(,@(package-arguments base)
1368 #:phases
1369 (modify-phases %standard-phases
1370 (add-before 'check 'delete-failing-test
1371 (λ _
1372 ;; XXX: This fails due to Unicode issues unique to Python 2,
1373 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1374 (delete-file "test/test_Script.py")
1375 #t))))))))
1376
1377(define-public python2-dogtail
1378 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1379 ;; spaces in indentation" with Python 3.
1380 (package
1381 (name "python2-dogtail")
1382 (version "0.9.9")
1383 (source (origin
1384 (method url-fetch)
1385 (uri (pypi-uri "dogtail" version))
1386 (sha256
1387 (base32
1388 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1389 (build-system python-build-system)
1390 (arguments `(#:python ,python-2
1391 #:tests? #f)) ; invalid command "test"
1392 ;; Currently no offical homepage.
1393 (home-page "https://pypi.python.org/pypi/dogtail/")
1394 (synopsis "GUI test tool and automation framework written in Python")
1395 (description
1396 "Dogtail is a GUI test tool and automation framework written in Python.
1397It uses Accessibility (a11y) technologies to communicate with desktop
1398applications. dogtail scripts are written in Python and executed like any
1399other Python program.")
1400 (license license:gpl2+)))
1401
1402(define-public python-empy
1403 (package
1404 (name "python-empy")
1405 (version "3.3")
1406 (source (origin
1407 (method url-fetch)
1408 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1409 version ".tar.gz"))
1410 (sha256
1411 (base32
1412 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1413 (build-system python-build-system)
1414 (arguments
1415 `(#:tests? #f)) ;python2 only
1416 (home-page "http://www.alcyone.com/software/empy/")
1417 (synopsis "Templating system for Python")
1418 (description
1419 "EmPy is a system for embedding Python expressions and statements in
1420template text; it takes an EmPy source file, processes it, and produces
1421output. This is accomplished via expansions, which are special signals to the
1422EmPy system and are set off by a special prefix (by default the at sign, @@).
1423EmPy can expand arbitrary Python expressions and statements in this way, as
1424well as a variety of special forms. Textual data not explicitly delimited in
1425this way is sent unaffected to the output, allowing Python to be used in
1426effect as a markup language. Also supported are callbacks via hooks,
1427recording and playback via diversions, and dynamic, chainable filters. The
1428system is highly configurable via command line options and embedded
1429commands.")
1430 (license license:lgpl2.1+)))
1431
1432(define-public python2-empy
1433 (package-with-python2 python-empy))
1434
1435(define-public python2-element-tree
1436 (package
1437 (name "python2-element-tree")
1438 (version "1.2.6")
1439 (source (origin
1440 (method url-fetch)
1441 (uri (string-append
1442 "http://effbot.org/media/downloads/elementtree-"
1443 version "-20050316.tar.gz"))
1444 (sha256
1445 (base32
1446 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1447 (build-system python-build-system)
1448 (arguments
1449 `(#:python ,python-2 ; seems to be part of Python 3
1450 #:tests? #f)) ; no 'test' sub-command
1451 (synopsis "Toolkit for XML processing in Python")
1452 (description
1453 "ElementTree is a Python library supporting lightweight XML processing.")
1454 (home-page "http://effbot.org/zone/element-index.htm")
1455 (license (license:x11-style
1456 "http://docs.python.org/2/license.html"
1457 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1458
1459(define-public python2-pybugz
1460 (package
1461 (name "python2-pybugz")
1462 (version "0.6.11")
1463 (source (origin
1464 (method url-fetch)
1465 (uri (string-append
1466 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1467 version ".tar.gz"))
1468 (sha256
1469 (base32
1470 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1471 (patches (search-patches "pybugz-stty.patch"
1472 "pybugz-encode-error.patch"))))
1473 (build-system python-build-system)
1474 (arguments
1475 `(#:python ,python-2 ; SyntaxError with Python 3
1476 #:tests? #f)) ; no 'test' sub-command
1477 (propagated-inputs
1478 `(("element-tree" ,python2-element-tree)))
1479 (synopsis "Python and command-line interface to Bugzilla")
1480 (description
1481 "PyBugz is a Python library and command-line tool to query the Bugzilla
1482bug tracking system. It is meant as an aid to speed up interaction with the
1483bug tracker.")
1484 (home-page "http://www.liquidx.net/pybugz/")
1485 (license license:gpl2)))
1486
1487(define-public python2-enum
1488 (package
1489 (name "python2-enum")
1490 (version "0.4.6")
1491 (source (origin
1492 (method url-fetch)
1493 (uri (pypi-uri "enum" version))
1494 (sha256
1495 (base32
1496 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1497 (build-system python-build-system)
1498 (arguments
1499 `(#:python ,python-2))
1500 (home-page "http://pypi.python.org/pypi/enum/")
1501 (synopsis "Robust enumerated type support in Python")
1502 (description
1503 "This provides a module for robust enumerations in Python. It has
1504been superseded by the Python standard library and is provided only for
1505compatibility.")
1506 ;; Choice of either license.
1507 (license (list license:gpl3+ license:psfl))))
1508
1509(define-public python-enum34
1510 (package
1511 (name "python-enum34")
1512 (version "1.1.6")
1513 (source
1514 (origin
1515 (method url-fetch)
1516 (uri (pypi-uri "enum34" version))
1517 (sha256
1518 (base32
1519 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1520 (build-system python-build-system)
1521 (home-page "https://pypi.python.org/pypi/enum34")
1522 (synopsis "Backported Python 3.4 Enum")
1523 (description
1524 "Enum34 is the new Python stdlib enum module available in Python 3.4
1525backported for previous versions of Python from 2.4 to 3.3.")
1526 (license license:bsd-3)))
1527
1528(define-public python2-enum34
1529 (package-with-python2 python-enum34))
1530
1531(define-public python-parse-type
1532 (package
1533 (name "python-parse-type")
1534 (version "0.4.2")
1535 (source
1536 (origin
1537 (method url-fetch)
1538 (uri (pypi-uri "parse_type" version))
1539 (sha256
1540 (base32
1541 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1542 (build-system python-build-system)
1543 (propagated-inputs
1544 `(("python-six" ,python-six)
1545 ("python-parse" ,python-parse)))
1546 (native-inputs
1547 `(("python-pytest" ,python-pytest)
1548 ("python-pytest-runner" ,python-pytest-runner)))
1549 (home-page "https://github.com/jenisys/parse_type")
1550 (synopsis "Extended parse module")
1551 (description
1552 "Parse_type extends the python parse module.")
1553 (properties
1554 `((python2-variant . ,(delay python2-parse-type))))
1555 (license license:bsd-3)))
1556
1557(define-public python2-parse-type
1558 (let ((base (package-with-python2
1559 (strip-python2-variant python-parse-type))))
1560 (package (inherit base)
1561 (propagated-inputs
1562 `(("python2-enum34" ,python2-enum34)
1563 ,@(package-propagated-inputs base))))))
1564
1565(define-public python-parse
1566 (package
1567 (name "python-parse")
1568 (version "1.8.2")
1569 (source
1570 (origin
1571 (method url-fetch)
1572 (uri (pypi-uri "parse" version))
1573 (sha256
1574 (base32
1575 "1lj9v1q4imszyhvipb6drsm3xdl35nan011mqxxas1yaypixsj40"))))
1576 (build-system python-build-system)
1577 (arguments
1578 `(#:phases
1579 (modify-phases %standard-phases
1580 (replace 'check
1581 (lambda _ (invoke "python" "test_parse.py"))))))
1582 (home-page "https://github.com/r1chardj0n3s/parse")
1583 (synopsis "Parse strings")
1584 (description
1585 "Parse strings using a specification based on the Python format()
1586syntax.")
1587 (license license:x11)))
1588
1589(define-public python-polib
1590 (package
1591 (name "python-polib")
1592 (version "1.0.8")
1593 (source (origin
1594 (method url-fetch)
1595 (uri (pypi-uri "polib" version))
1596 (sha256
1597 (base32
1598 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1599 (build-system python-build-system)
1600 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1601 (synopsis "Manipulate, create and modify gettext files")
1602 (description "Polib can manipulate any gettext format (po, pot and mo)
1603files. It can be used to create po files from scratch or to modify
1604existing ones.")
1605 (license license:expat)))
1606
1607(define-public python2-polib
1608 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1609 (package
1610 (inherit base)
1611 (arguments `(,@(package-arguments base)
1612 ;; Tests don't work with python2.
1613 #:tests? #f)))))
1614
1615(define-public scons
1616 (package
1617 (name "scons")
1618 (version "3.0.1")
1619 (source (origin
1620 (method url-fetch)
1621 (uri (string-append "mirror://sourceforge/scons/scons/" version
1622 "/scons-" version ".tar.gz"))
1623 (sha256
1624 (base32
1625 "0wzid419mlwqw9llrg8gsx4nkzhqy16m4m40r0xnh6cwscw5wir4"))))
1626 (build-system python-build-system)
1627 (arguments
1628 `(#:use-setuptools? #f ; still relies on distutils
1629 #:tests? #f)) ; no 'python setup.py test' command
1630 (home-page "http://scons.org/")
1631 (synopsis "Software construction tool written in Python")
1632 (description
1633 "SCons is a software construction tool. Think of SCons as an improved,
1634cross-platform substitute for the classic Make utility with integrated
1635functionality similar to autoconf/automake and compiler caches such as ccache.
1636In short, SCons is an easier, more reliable and faster way to build
1637software.")
1638 (license license:x11)))
1639
1640(define-public scons-python2
1641 (package
1642 (inherit (package-with-python2 scons))
1643 (name "scons-python2")))
1644
1645(define-public python-extras
1646 (package
1647 (name "python-extras")
1648 (version "1.0.0")
1649 (source
1650 (origin
1651 (method url-fetch)
1652 (uri (pypi-uri "extras" version))
1653 (sha256
1654 (base32
1655 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1656 (build-system python-build-system)
1657 (arguments
1658 ;; FIXME: Circular dependency on testtools.
1659 '(#:tests? #f))
1660 (home-page "https://github.com/testing-cabal/extras")
1661 (synopsis "Useful extensions to the Python standard library")
1662 (description
1663 "Extras is a set of extensions to the Python standard library.")
1664 (license license:expat)))
1665
1666(define-public python2-extras
1667 (package-with-python2 python-extras))
1668
1669(define-public python-mimeparse
1670 (package
1671 (name "python-mimeparse")
1672 (version "0.1.4")
1673 (source
1674 (origin
1675 (method url-fetch)
1676 (uri (string-append
1677 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1678 version ".tar.gz"))
1679 (sha256
1680 (base32
1681 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1682 (build-system python-build-system)
1683 (arguments
1684 '(#:tests? #f)) ; no setup.py test command
1685 (home-page
1686 "https://github.com/dbtsai/python-mimeparse")
1687 (synopsis "Python library for parsing MIME types")
1688 (description
1689 "Mimeparse provides basic functions for parsing MIME type names and
1690matching them against a list of media-ranges.")
1691 (license license:expat)))
1692
1693(define-public python2-mimeparse
1694 (package-with-python2 python-mimeparse))
1695
1696(define-public python-pafy
1697 (package
1698 (name "python-pafy")
1699 (version "0.5.3.1")
1700 (source
1701 (origin
1702 (method url-fetch)
1703 (uri (pypi-uri "pafy" version))
1704 (sha256
1705 (base32
1706 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1707 (build-system python-build-system)
1708 (arguments
1709 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1710 (propagated-inputs
1711 ;; Youtube-dl is a python package which is imported in the file
1712 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1713 `(("youtube-dl" ,youtube-dl)))
1714 (home-page "https://np1.github.io/pafy/")
1715 (synopsis "Retrieve YouTube content and metadata")
1716 (description
1717 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1718 (license license:lgpl3+)))
1719
1720(define-public python2-funcsigs
1721 (package
1722 (name "python2-funcsigs")
1723 (version "1.0.2")
1724 (source (origin
1725 (method url-fetch)
1726 (uri (pypi-uri "funcsigs" version))
1727 (sha256
1728 (base32
1729 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1730 (build-system python-build-system)
1731 (arguments
1732 `(#:python ,python-2))
1733 (native-inputs
1734 `(("python2-unittest2" ,python2-unittest2)))
1735 (home-page "http://funcsigs.readthedocs.org")
1736 (synopsis "Python function signatures from PEP362")
1737 (description
1738 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1739 (license license:asl2.0)))
1740
1741(define-public python2-funcsigs-bootstrap
1742 (package
1743 (inherit python2-funcsigs)
1744 (name "python2-funcsigs-bootstrap")
1745 (native-inputs `())
1746 (arguments
1747 `(#:tests? #f
1748 ,@(package-arguments python2-funcsigs)))))
1749
1750(define-public python-pafy
1751 (package
1752 (name "python-pafy")
1753 (version "0.5.3.1")
1754 (source
1755 (origin
1756 (method url-fetch)
1757 (uri (pypi-uri "pafy" version))
1758 (sha256
1759 (base32
1760 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1761 (build-system python-build-system)
1762 (arguments
1763 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1764 (propagated-inputs
1765 ;; Youtube-dl is a python package which is imported in the file
1766 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1767 `(("youtube-dl" ,youtube-dl)))
1768 (home-page "https://np1.github.io/pafy/")
1769 (synopsis "Retrieve YouTube content and metadata")
1770 (description
1771 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1772 (license license:lgpl3+)))
1773
1774(define-public python-py
1775 (package
1776 (name "python-py")
1777 (version "1.5.3")
1778 (source
1779 (origin
1780 (method url-fetch)
1781 (uri (pypi-uri "py" version))
1782 (sha256
1783 (base32
1784 "10gq2lckvgwlk9w6yzijhzkarx44hsaknd0ypa08wlnpjnsgmj99"))))
1785 (build-system python-build-system)
1786 (arguments
1787 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1788 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1789 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1790 ;; Is this module globally installed?"
1791 '(#:tests? #f))
1792 (home-page "http://pylib.readthedocs.io/")
1793 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1794 (description
1795 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1796code introspection, and logging.")
1797 (license license:expat)))
1798
1799(define-public python2-py
1800 (package-with-python2 python-py))
1801
1802;; Recent versions of python-fixtures and python-testrepository need
1803;; python-pbr for packaging, which itself needs these two packages for
1804;; testing.
1805;; To fix this circular dependency, we use a build of python-pbr, based on the
1806;; same source, just without any test dependencies and with tests disabled.
1807;; python-pbr-minmal is then used to package python-fixtures and
1808;; python-testrepository.
1809;; Strictly speaking we currently could remove the test-requirements from the
1810;; normal python-pbr package (and save this package) since test are disabled
1811;; there anyway. But this may change in future.
1812(define-public python-pbr-minimal
1813 (package
1814 (name "python-pbr-minimal")
1815 (version "3.0.1")
1816 (source
1817 (origin
1818 (method url-fetch)
1819 (uri (pypi-uri "pbr" version))
1820 (sha256
1821 (base32
1822 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1823 (build-system python-build-system)
1824 (arguments
1825 `(#:tests? #f))
1826 (home-page "http://docs.openstack.org/developer/pbr/")
1827 (synopsis "Minimal build of python-pbr used for bootstrapping")
1828 (description
1829 "Used only for bootstrapping python2-pbr, you should not need this.")
1830 (license license:asl2.0)))
1831
1832(define-public python2-pbr-minimal
1833 (package-with-python2 python-pbr-minimal))
1834
1835(define-public python-pbr
1836 (package
1837 (inherit python-pbr-minimal)
1838 (name "python-pbr")
1839 (arguments
1840 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1841 (propagated-inputs
1842 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1843 (native-inputs
1844 `(("python-fixtures" ,python-fixtures-bootstrap)
1845 ;; discover, coverage, hacking, subunit
1846 ("python-mock" ,python-mock)
1847 ("python-six" ,python-six)
1848 ("python-sphinx" ,python-sphinx)
1849 ("python-testrepository" ,python-testrepository-bootstrap)
1850 ("python-testresources" ,python-testresources-bootstrap)
1851 ("python-testscenarios" ,python-testscenarios-bootstrap)
1852 ("python-testtools" ,python-testtools-bootstrap)
1853 ("python-virtualenv" ,python-virtualenv)))
1854 (synopsis "Enhance the default behavior of Python’s setuptools")
1855 (description
1856 "Python Build Reasonableness (PBR) is a library that injects some useful
1857and sensible default behaviors into your setuptools run. It will set
1858versions, process requirements files and generate AUTHORS and ChangeLog file
1859from git information.
1860")))
1861
1862(define-public python2-pbr
1863 (package-with-python2 python-pbr))
1864
1865(define-public python-exif-read
1866 (package
1867 (name "python-exif-read")
1868 (version "2.1.2")
1869 (source (origin
1870 (method url-fetch)
1871 (uri (pypi-uri "ExifRead" version))
1872 (sha256
1873 (base32
1874 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1875 (build-system python-build-system)
1876 (arguments `(#:tests? #f)) ; no tests
1877 (home-page "https://github.com/ianare/exif-py")
1878 (synopsis "Python library to extract EXIF data from image files")
1879 (description
1880 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1881files.")
1882 (license license:bsd-3)))
1883
1884(define-public python2-exif-read
1885 (package-with-python2 python-exif-read))
1886
1887(define-public python-pyld
1888 (package
1889 (name "python-pyld")
1890 (version "1.0.3")
1891 (source (origin
1892 (method url-fetch)
1893 (uri (pypi-uri "PyLD" version))
1894 (sha256
1895 (base32
1896 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1897 (build-system python-build-system)
1898 (home-page "https://github.com/digitalbazaar/pyld")
1899 (synopsis "Python implementation of the JSON-LD specification")
1900 (description
1901 "PyLD is an implementation of the JSON-LD specification.")
1902 (license license:bsd-3)))
1903
1904(define-public python2-pyld
1905 (package-with-python2 python-pyld))
1906
1907(define-public python-click
1908 (package
1909 (name "python-click")
1910 (version "6.7")
1911 (source
1912 (origin
1913 (method url-fetch)
1914 (uri (pypi-uri "click" version))
1915 (sha256
1916 (base32
1917 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
1918 (build-system python-build-system)
1919 (arguments
1920 `(;; The tests are fragile, depending on a specific version of pytest:
1921 ;; <https://github.com/pallets/click/issues/823>
1922 #:tests? #f
1923 #:phases
1924 (modify-phases %standard-phases
1925 (add-after 'unpack 'fix-paths
1926 (lambda* (#:key inputs #:allow-other-keys)
1927 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1928 "cross-libc" "libc"))))
1929 (substitute* "click/_unicodefun.py"
1930 (("'locale'")
1931 (string-append "'" glibc "/bin/locale'"))))
1932 #t)))))
1933 (native-inputs
1934 `(("python-pytest" ,python-pytest)))
1935 (home-page "http://click.pocoo.org")
1936 (synopsis "Command line library for Python")
1937 (description
1938 "Click is a Python package for creating command line interfaces in a
1939composable way with as little code as necessary. Its name stands for
1940\"Command Line Interface Creation Kit\". It's highly configurable but comes
1941with sensible defaults out of the box.")
1942 (license license:bsd-3)))
1943
1944(define-public python2-click
1945 (package-with-python2 python-click))
1946
1947(define-public python-wheel
1948 (package
1949 (name "python-wheel")
1950 (version "0.30.0a0")
1951 (source
1952 (origin
1953 (method url-fetch)
1954 (uri (pypi-uri "wheel" version))
1955 (sha256
1956 (base32
1957 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
1958 (build-system python-build-system)
1959 (native-inputs
1960 `(("python-jsonschema" ,python-jsonschema)
1961 ("python-pytest-cov" ,python-pytest-cov)))
1962 (home-page "https://bitbucket.org/pypa/wheel/")
1963 (synopsis "Format for built Python packages")
1964 (description
1965 "A wheel is a ZIP-format archive with a specially formatted filename and
1966the @code{.whl} extension. It is designed to contain all the files for a PEP
1967376 compatible install in a way that is very close to the on-disk format. Many
1968packages will be properly installed with only the @code{Unpack} step and the
1969unpacked archive preserves enough information to @code{Spread} (copy data and
1970scripts to their final locations) at any later time. Wheel files can be
1971installed with a newer @code{pip} or with wheel's own command line utility.")
1972 (license license:expat)
1973 (properties `((python2-variant . ,(delay python2-wheel))))))
1974
1975(define-public python2-wheel
1976 (let ((wheel (package-with-python2
1977 (strip-python2-variant python-wheel))))
1978 (package (inherit wheel)
1979 (native-inputs `(("python2-functools32" ,python2-functools32)
1980 ,@(package-native-inputs wheel))))))
1981
1982(define-public python-vcversioner
1983 (package
1984 (name "python-vcversioner")
1985 (version "2.16.0.0")
1986 (source
1987 (origin
1988 (method url-fetch)
1989 (uri (pypi-uri "vcversioner" version))
1990 (sha256
1991 (base32
1992 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1993 (build-system python-build-system)
1994 (synopsis "Python library for version number discovery")
1995 (description "Vcversioner is a Python library that inspects tagging
1996information in a variety of version control systems in order to discover
1997version numbers.")
1998 (home-page "https://github.com/habnabit/vcversioner")
1999 (license license:isc)))
2000
2001(define-public python2-vcversioner
2002 (package-with-python2 python-vcversioner))
2003
2004(define-public python-jsonschema
2005 (package
2006 (name "python-jsonschema")
2007 (version "2.6.0")
2008 (source (origin
2009 (method url-fetch)
2010 (uri
2011 (string-append
2012 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
2013 version ".tar.gz"))
2014 (sha256
2015 (base32
2016 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2017 (build-system python-build-system)
2018 (arguments
2019 '(#:phases
2020 (modify-phases %standard-phases
2021 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
2022 (native-inputs
2023 `(("python-nose" ,python-nose)
2024 ("python-vcversioner" ,python-vcversioner)))
2025 (home-page "https://github.com/Julian/jsonschema")
2026 (synopsis "Implementation of JSON Schema for Python")
2027 (description
2028 "Jsonschema is an implementation of JSON Schema for Python.")
2029 (license license:expat)
2030 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2031
2032(define-public python2-jsonschema
2033 (let ((jsonschema (package-with-python2
2034 (strip-python2-variant python-jsonschema))))
2035 (package (inherit jsonschema)
2036 (native-inputs
2037 `(("python2-mock" ,python2-mock)
2038 ,@(package-native-inputs jsonschema)))
2039 (propagated-inputs
2040 `(("python2-functools32" ,python2-functools32))))))
2041
2042(define-public python-schema
2043 (package
2044 (name "python-schema")
2045 (version "0.6.6")
2046 (source
2047 (origin
2048 (method url-fetch)
2049 (uri (pypi-uri "schema" version))
2050 (sha256
2051 (base32
2052 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2053 (build-system python-build-system)
2054 (native-inputs
2055 `(("python-pytest" ,python-pytest)))
2056 (home-page "https://github.com/keleshev/schema")
2057 (synopsis "Simple data validation library")
2058 (description
2059 "@code{python-schema} is a library for validating Python data
2060structures, such as those obtained from config-files, forms, external
2061services or command-line parsing, converted from JSON/YAML (or
2062something else) to Python data-types.")
2063 (license license:psfl)))
2064
2065(define-public python2-schema
2066 (package-with-python2 python-schema))
2067
2068(define-public python-schema-0.5
2069 (package (inherit python-schema)
2070 (version "0.5.0")
2071 (source
2072 (origin
2073 (method url-fetch)
2074 (uri (pypi-uri "schema" version))
2075 (sha256
2076 (base32
2077 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2078
2079(define-public python2-schema-0.5
2080 (package-with-python2 python-schema-0.5))
2081
2082(define-public python-kitchen
2083 (package
2084 (name "python-kitchen")
2085 (version "1.2.5")
2086 (source
2087 (origin
2088 (method url-fetch)
2089 (uri (pypi-uri "kitchen" version))
2090 (sha256
2091 (base32
2092 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2093 (build-system python-build-system)
2094 (propagated-inputs
2095 `(("python-chardet" ,python-chardet)))
2096 (home-page "https://github.com/fedora-infra/kitchen")
2097 (synopsis "Python API for snippets")
2098 (description "@code{kitchen} module provides a python API for all sorts of
2099little useful snippets of code that everybody ends up writing for their projects
2100but never seem big enough to build an independent release. Use kitchen and stop
2101cutting and pasting that code over and over.")
2102 (license (list license:lgpl2.1+
2103 ;; subprocess.py, test_subprocess.py,
2104 ;; kitchen/pycompat25/defaultdict.py:
2105 license:psfl))))
2106
2107(define-public python2-kitchen
2108 (package-with-python2 python-kitchen))
2109
2110(define-public python-unidecode
2111 (package
2112 (name "python-unidecode")
2113 (version "0.04.21")
2114 (source (origin
2115 (method url-fetch)
2116 (uri (pypi-uri "Unidecode" version))
2117 (sha256
2118 (base32
2119 "0lfhp9c5xrbpjvbpr12ji52g1lx04404bzzdg6pvabhzisw6l2i8"))))
2120 (build-system python-build-system)
2121 (home-page "https://pypi.python.org/pypi/Unidecode")
2122 (synopsis "ASCII transliterations of Unicode text")
2123 (description
2124 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2125useful when integrating with legacy code that doesn't support Unicode, or for
2126ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2127machine identifiers from human-readable Unicode strings that should still be
2128somewhat intelligible.")
2129 (license license:gpl2+)))
2130
2131(define-public python2-unidecode
2132 (package-with-python2 python-unidecode))
2133
2134(define-public python-pyjwt
2135 (package
2136 (name "python-pyjwt")
2137 (version "1.5.3")
2138 (source
2139 (origin
2140 (method url-fetch)
2141 (uri (pypi-uri "PyJWT" version))
2142 (sha256
2143 (base32
2144 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2145 (modules '((guix build utils)))
2146 (snippet
2147 '(begin
2148 (for-each delete-file-recursively
2149 (find-files "." "\\.pyc$"))
2150 #t))))
2151 (build-system python-build-system)
2152 (native-inputs
2153 `(("python-pytest" ,python-pytest)
2154 ("python-pytest-cov" ,python-pytest-cov)
2155 ("python-pytest-runner" ,python-pytest-runner)))
2156 (home-page "https://github.com/progrium/pyjwt")
2157 (synopsis "JSON Web Token implementation in Python")
2158 (description
2159 "PyJWT is a JSON Web Token implementation written in Python.")
2160 (license license:expat)))
2161
2162(define-public python2-pyjwt
2163 (package-with-python2 python-pyjwt))
2164
2165(define-public python-pykka
2166 (package
2167 (name "python-pykka")
2168 (version "1.2.1")
2169 (source
2170 (origin
2171 (method url-fetch)
2172 (uri (pypi-uri "Pykka" version))
2173 (sha256
2174 (base32
2175 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2176 (build-system python-build-system)
2177 (native-inputs
2178 `(("python-mock" ,python-mock)
2179 ("python-nose" ,python-nose)
2180 ("python-gevent" ,python-gevent)
2181 ("python-eventlet" ,python-eventlet)))
2182 (home-page "https://www.pykka.org/")
2183 (synopsis "Pykka is a Python implementation of the actor model")
2184 (description
2185 "Pykka is a Python implementation of the actor model.
2186The actor model introduces some simple rules to control the sharing
2187of state and cooperation between execution units, which makes it
2188easier to build concurrent applications.")
2189 (license license:asl2.0)))
2190
2191(define-public python2-pykka
2192 (package-with-python2 python-pykka))
2193
2194(define-public python-itsdangerous
2195 (package
2196 (name "python-itsdangerous")
2197 (version "0.24")
2198 (source
2199 (origin
2200 (method url-fetch)
2201 (uri (string-append
2202 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2203 version ".tar.gz"))
2204 (sha256
2205 (base32
2206 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2207 (build-system python-build-system)
2208 (home-page "https://github.com/mitsuhiko/itsdangerous")
2209 (synopsis "Python library for passing data to/from untrusted environments")
2210 (description
2211 "Itsdangerous provides various helpers to pass trusted data to untrusted
2212environments and back.")
2213 (license license:bsd-3)))
2214
2215(define-public python2-itsdangerous
2216 (package-with-python2 python-itsdangerous))
2217
2218(define-public python-pyyaml
2219 (package
2220 (name "python-pyyaml")
2221 (version "3.12")
2222 (source
2223 (origin
2224 (method url-fetch)
2225 (uri (pypi-uri "PyYAML" version))
2226 (sha256
2227 (base32
2228 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
2229 (build-system python-build-system)
2230 (inputs
2231 `(("libyaml" ,libyaml)))
2232 (home-page "http://pyyaml.org/wiki/PyYAML")
2233 (synopsis "YAML parser and emitter for Python")
2234 (description
2235 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2236complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2237API, and sensible error messages. PyYAML supports standard YAML tags and
2238provides Python-specific tags that allow to represent an arbitrary Python
2239object.")
2240 (license license:expat)))
2241
2242(define-public python2-pyyaml
2243 (package-with-python2 python-pyyaml))
2244
2245(define-public python-virtualenv
2246 (package
2247 (name "python-virtualenv")
2248 (version "15.0.3")
2249 (source
2250 (origin
2251 (method url-fetch)
2252 (uri (pypi-uri "virtualenv" version))
2253 (sha256
2254 (base32
2255 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
2256 (build-system python-build-system)
2257 (arguments
2258 `(#:phases
2259 (modify-phases %standard-phases
2260 (replace 'check
2261 (lambda _
2262 ;; Disable failing test. See upstream bug report
2263 ;; https://github.com/pypa/virtualenv/issues/957
2264 (substitute* "tests/test_virtualenv.py"
2265 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2266 (zero? (system* "py.test")))))))
2267 (native-inputs
2268 `(("python-mock" ,python-mock)
2269 ("python-pytest" ,python-pytest)))
2270 (home-page "https://virtualenv.pypa.io/")
2271 (synopsis "Virtual Python environment builder")
2272 (description
2273 "Virtualenv is a tool to create isolated Python environments.")
2274 (license license:expat)))
2275
2276(define-public python2-virtualenv
2277 (package-with-python2 python-virtualenv))
2278
2279(define-public python-markupsafe
2280 (package
2281 (name "python-markupsafe")
2282 (version "0.23")
2283 (source
2284 (origin
2285 (method url-fetch)
2286 (uri (string-append
2287 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2288 version ".tar.gz"))
2289 (sha256
2290 (base32
2291 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2292 (build-system python-build-system)
2293 (home-page "https://github.com/mitsuhiko/markupsafe")
2294 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2295 (description
2296 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2297for Python.")
2298 (license license:bsd-3)))
2299
2300(define-public python2-markupsafe
2301 (package-with-python2 python-markupsafe))
2302
2303(define-public python-jinja2
2304 (package
2305 (name "python-jinja2")
2306 (version "2.9.6")
2307 (source
2308 (origin
2309 (method url-fetch)
2310 (uri (pypi-uri "Jinja2" version))
2311 (sha256
2312 (base32
2313 "1zzrkywhziqffrzks14kzixz7nd4yh2vc0fb04a68vfd2ai03anx"))))
2314 (build-system python-build-system)
2315 (propagated-inputs
2316 `(("python-markupsafe" ,python-markupsafe)))
2317 (home-page "http://jinja.pocoo.org/")
2318 (synopsis "Python template engine")
2319 (description
2320 "Jinja2 is a small but fast and easy to use stand-alone template engine
2321written in pure Python.")
2322 (license license:bsd-3)))
2323
2324(define-public python2-jinja2
2325 (package-with-python2 python-jinja2))
2326
2327(define-public python-pystache
2328 (package
2329 (name "python-pystache")
2330 (version "0.5.4")
2331 (source (origin
2332 (method url-fetch)
2333 (uri (pypi-uri "pystache" version))
2334 (sha256
2335 (base32
2336 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2337 (build-system python-build-system)
2338 (arguments
2339 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2340 (home-page "http://defunkt.io/pystache/")
2341 (synopsis "Python logic-less template engine")
2342 (description
2343 "Pystache is a Python implementation of the framework agnostic,
2344logic-free templating system Mustache.")
2345 (license license:expat)
2346 (properties `((python2-variant . ,(delay python2-pystache))))))
2347
2348(define-public python2-pystache
2349 (package (inherit (package-with-python2
2350 (strip-python2-variant python-pystache)))
2351 (arguments
2352 `(#:python ,python-2
2353 #:phases
2354 (modify-phases %standard-phases
2355 (replace 'check
2356 (lambda _
2357 (zero? (system* "python" "test_pystache.py")))))))))
2358
2359(define-public python-joblib
2360 (package
2361 (name "python-joblib")
2362 (version "0.10.3")
2363 (source (origin
2364 (method url-fetch)
2365 (uri (pypi-uri "joblib" version))
2366 (sha256
2367 (base32
2368 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2369 (modules '((guix build utils)))
2370 (snippet
2371 '(begin
2372 ;; Remove pre-compiled .pyc files from source.
2373 (for-each delete-file-recursively
2374 (find-files "." "__pycache__" #:directories? #t))
2375 (for-each delete-file (find-files "." "\\.pyc$"))
2376 #t))))
2377 (build-system python-build-system)
2378 (arguments
2379 `(#:phases
2380 (modify-phases %standard-phases
2381 (add-before 'check 'disable-failing-tests
2382 (lambda _
2383 ;; This numpydoc tests fails for unknown reasons
2384 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2385 ;; This numpydoc test depends on matplotlib, which is not a
2386 ;; required input.
2387 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2388 ;; These tests fail to execute sys.executable
2389 (substitute* "joblib/test/test_parallel.py"
2390 (("import nose" line)
2391 (string-append "from nose.plugins.skip import SkipTest\n" line))
2392 (("def test_nested_parallel_warnings" line)
2393 (string-append "@SkipTest\n" line))
2394 (("def test_parallel_with_interactively_defined_functions" line)
2395 (string-append "@SkipTest\n" line)))
2396 #t)))))
2397 ;; Provide nose to enable tests command
2398 (native-inputs
2399 `(("python-nose" ,python-nose)
2400 ("python-sphinx" ,python-sphinx)
2401 ("python-docutils" ,python-docutils)
2402 ("python-numpydoc" ,python-numpydoc)))
2403 (home-page "http://pythonhosted.org/joblib/")
2404 (synopsis "Using Python functions as pipeline jobs")
2405 (description
2406 "Joblib is a set of tools to provide lightweight pipelining in Python.
2407In particular, joblib offers: transparent disk-caching of the output values
2408and lazy re-evaluation (memoize pattern), easy simple parallel computing
2409logging and tracing of the execution.")
2410 (license license:bsd-3)))
2411
2412(define-public python2-joblib
2413 (package-with-python2 python-joblib))
2414
2415(define-public python-docutils
2416 (package
2417 (name "python-docutils")
2418 (version "0.14")
2419 (source
2420 (origin
2421 (method url-fetch)
2422 (uri (pypi-uri "docutils" version))
2423 (sha256
2424 (base32
2425 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2426 (build-system python-build-system)
2427 (arguments
2428 '(#:tests? #f)) ; no setup.py test command
2429 (home-page "http://docutils.sourceforge.net/")
2430 (synopsis "Python Documentation Utilities")
2431 (description
2432 "Docutils is a modular system for processing documentation into useful
2433formats, such as HTML, XML, and LaTeX. For input Docutils supports
2434reStructuredText.")
2435 ;; Most of the source code is public domain, but some source files are
2436 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2437 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2438
2439(define-public python2-docutils
2440 (package-with-python2 python-docutils))
2441
2442(define-public python-pygments
2443 (package
2444 (name "python-pygments")
2445 (version "2.2.0")
2446 (source
2447 (origin
2448 (method url-fetch)
2449 (uri (pypi-uri "Pygments" version))
2450 (sha256
2451 (base32
2452 "1k78qdvir1yb1c634nkv6rbga8wv4289xarghmsbbvzhvr311bnv"))))
2453 (build-system python-build-system)
2454 (arguments
2455 ;; FIXME: Tests require sphinx, which depends on this.
2456 '(#:tests? #f))
2457 (home-page "http://pygments.org/")
2458 (synopsis "Syntax highlighting")
2459 (description
2460 "Pygments is a syntax highlighting package written in Python.")
2461 (license license:bsd-2)))
2462
2463(define-public python2-pygments
2464 (package-with-python2 python-pygments))
2465
2466(define-public python-sphinxcontrib-websupport
2467 (package
2468 (name "python-sphinxcontrib-websupport")
2469 (version "1.0.1")
2470 (source (origin
2471 (method url-fetch)
2472 (uri (pypi-uri "sphinxcontrib-websupport" version))
2473 (sha256
2474 (base32
2475 "1f9f0wjpi9nhikbyaz6d19s7qvzdf1nq2g5dsh640fma4q9rd1bs"))))
2476 (build-system python-build-system)
2477 (propagated-inputs
2478 `(("python-mock" ,python-mock)
2479 ("python-pytest" ,python-pytest)
2480 ("python-xapian-bindings" ,python-xapian-bindings)))
2481 ;; Needed for running the test suite
2482 (native-inputs
2483 `(("python-six" ,python-six)
2484 ("python-jinja2" ,python-jinja2)
2485 ("python-docutils" ,python-docutils)
2486 ("python-sphinx" ,python-sphinx)
2487 ("python-sqlalchemy" ,python-sqlalchemy)
2488 ("python-whoosh" ,python-whoosh)))
2489 (home-page "http://sphinx-doc.org/")
2490 (synopsis "Sphinx API for web applications")
2491 (description "This package provides a Python API to easily integrate
2492Sphinx documentation into your web application. It provides tools to
2493integrate Sphinx documents in web templates and to handle searches.")
2494 (license license:bsd-3)))
2495
2496(define-public python-sphinx
2497 (package
2498 (name "python-sphinx")
2499 (version "1.5.1")
2500 (source
2501 (origin
2502 (method url-fetch)
2503 (uri (pypi-uri "Sphinx" version))
2504 (sha256
2505 (base32
2506 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
2507 (build-system python-build-system)
2508 (arguments
2509 `(#:phases
2510 (modify-phases %standard-phases
2511 (replace 'check
2512 (lambda _
2513 ;; Requires Internet access.
2514 (delete-file "tests/test_build_linkcheck.py")
2515 (zero? (system* "make" "test")))))))
2516 (propagated-inputs
2517 `(("python-imagesize" ,python-imagesize)
2518 ("python-sphinx-alabaster-theme"
2519 ,python-sphinx-alabaster-theme)
2520 ("python-babel" ,python-babel)
2521 ("python-snowballstemmer" ,python-snowballstemmer)
2522 ("python-docutils" ,python-docutils)
2523 ("python-jinja2" ,python-jinja2)
2524 ("python-pygments" ,python-pygments)
2525 ("python-requests" ,python-requests)
2526 ("python-six" ,python-six)))
2527 (native-inputs
2528 `(("graphviz" ,graphviz)
2529 ("python-html5lib" ,python-html5lib)
2530 ("python-mock" ,python-mock)
2531 ("python-nose" ,python-nose)))
2532 (home-page "http://sphinx-doc.org/")
2533 (synopsis "Python documentation generator")
2534 (description "Sphinx is a tool that makes it easy to create documentation
2535for Python projects or other documents consisting of multiple reStructuredText
2536sources.")
2537 (license license:bsd-3)
2538 (properties `((python2-variant . ,(delay python2-sphinx))))))
2539
2540(define-public python-sphinx-1.6
2541 (package (inherit python-sphinx)
2542 (name "python-sphinx")
2543 (version "1.6.4")
2544 (source (origin
2545 (method url-fetch)
2546 (uri (pypi-uri "Sphinx" version))
2547 (sha256
2548 (base32
2549 "0gjakw9fv5pwqb5yyclxycs36sapxizk1vx6mkcdizmzgzcfy0gi"))))
2550 (arguments
2551 `(#:phases
2552 (modify-phases %standard-phases
2553 (replace 'check
2554 (lambda _
2555 ;; Requires Internet access.
2556 (delete-file "tests/test_build_linkcheck.py")
2557 (substitute* "tests/test_build_latex.py"
2558 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
2559 "@pytest.mark.skip()"))
2560 (zero? (system* "make" "test")))))))
2561 (propagated-inputs
2562 `(("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)
2563 ,@(package-propagated-inputs python-sphinx)))
2564 (native-inputs
2565 `(("python-pytest" ,python-pytest)
2566 ("imagemagick" ,imagemagick) ; for "convert"
2567 ,@(package-native-inputs python-sphinx)))
2568 (properties `((python2-variant . ,(delay python2-sphinx-1.6))))))
2569
2570(define-public python2-sphinx-1.6
2571 (let ((base (package-with-python2 (strip-python2-variant python-sphinx-1.6))))
2572 (package
2573 (inherit base)
2574 (propagated-inputs
2575 `(("python2-typing" ,python2-typing)
2576 ,@(package-propagated-inputs base)))
2577 (native-inputs `(("python2-enum34" ,python2-enum34)
2578 ,@(package-native-inputs base))))))
2579
2580(define-public python-sphinx-1.5.3
2581 (package
2582 (inherit python-sphinx)
2583 (name "python-sphinx")
2584 (version "1.5.3")
2585 (source
2586 (origin
2587 (method url-fetch)
2588 (uri (pypi-uri "Sphinx" version))
2589 (sha256
2590 (base32
2591 "0kw1axswbvaavr8ggyf4qr6hnisnrzlbkkcdada69vk1x9xjassg"))))
2592 (native-inputs
2593 `(("python-pytest" ,python-pytest)
2594 ,@(package-native-inputs python-sphinx)))))
2595
2596(define-public python2-sphinx
2597 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
2598 (package
2599 (inherit base)
2600 (native-inputs `(("python2-mock" ,python2-mock)
2601 ("python2-enum34" ,python2-enum34)
2602 ,@(package-native-inputs base)))
2603 (propagated-inputs `(("python2-pytz" ,python2-pytz)
2604 ,@(package-propagated-inputs base))))))
2605
2606(define-public python-sphinx-gallery
2607 (package
2608 (name "python-sphinx-gallery")
2609 (version "0.1.13")
2610 (source (origin
2611 (method url-fetch)
2612 (uri (string-append "https://github.com/sphinx-gallery/sphinx-gallery"
2613 "/archive/v" version ".tar.gz"))
2614 (file-name (string-append name "-" version ".tar.gz"))
2615 (sha256
2616 (base32
2617 "03fs99mcb1r7qp0xixqv07vcz98sk21yq19ffdysi0infdcpzfkd"))))
2618 (build-system python-build-system)
2619 (arguments
2620 ;; FIXME: Tests attempt to download <https://docs.python.org/3/objects.inv>,
2621 ;; <https://docs.scipy.org/doc/numpy/objects.inv>, and
2622 ;; <https://matplotlib.org/objects.inv>.
2623 `(#:tests? #f))
2624 (native-inputs
2625 `(("python-pytest-runner" ,python-pytest-runner)))
2626 (home-page "https://sphinx-gallery.github.io/")
2627 (synopsis "Generate an examples gallery automatically")
2628 (description
2629 "@code{sphinx_gallery} is a Sphinx extension that builds an HTML version
2630from any set of Python scripts and puts it into an examples gallery.")
2631 (license license:bsd-3)))
2632
2633(define-public python2-sphinx-gallery
2634 (package-with-python2 python-sphinx-gallery))
2635
2636(define-public python-sphinx-rtd-theme
2637 (package
2638 (name "python-sphinx-rtd-theme")
2639 (version "0.2.4")
2640 (source
2641 (origin
2642 (method url-fetch)
2643 (uri (pypi-uri "sphinx_rtd_theme" version))
2644 (sha256
2645 (base32
2646 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
2647 (build-system python-build-system)
2648 (arguments '(#:tests? #f)) ; No tests.
2649 (propagated-inputs
2650 `(("python-sphinx" ,python-sphinx)))
2651 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2652 (synopsis "ReadTheDocs.org theme for Sphinx")
2653 (description "A theme for Sphinx used by ReadTheDocs.org.")
2654 (license license:expat)))
2655
2656(define-public python2-sphinx-rtd-theme
2657 (package-with-python2 python-sphinx-rtd-theme))
2658
2659(define-public python-guzzle-sphinx-theme
2660 (package
2661 (name "python-guzzle-sphinx-theme")
2662 (version "0.7.11")
2663 (source
2664 (origin
2665 (method url-fetch)
2666 (uri (pypi-uri "guzzle_sphinx_theme" version))
2667 (sha256
2668 (base32
2669 "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
2670 (build-system python-build-system)
2671 (propagated-inputs
2672 `(("python-sphinx" ,python-sphinx)))
2673 (home-page "https://github.com/guzzle/guzzle_sphinx_theme")
2674 (synopsis "Sphinx theme used by Guzzle")
2675 (description "This package provides guzzle_sphinx_theme, a theme for the
2676Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
2677and several other projects.")
2678 (license license:expat)))
2679
2680(define-public python2-guzzle-sphinx-theme
2681 (package-with-python2 python-guzzle-sphinx-theme))
2682
2683(define-public python-rst.linker
2684 (package
2685 (name "python-rst.linker")
2686 (version "1.10")
2687 (source
2688 (origin
2689 (method url-fetch)
2690 (uri (pypi-uri "rst.linker" version))
2691 (sha256
2692 (base32
2693 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2694 (build-system python-build-system)
2695 (propagated-inputs
2696 `(("python-dateutil" ,python-dateutil)
2697 ("python-six" ,python-six)))
2698 (native-inputs
2699 `(("python-setuptools-scm" ,python-setuptools-scm)))
2700 ;; Test would require path.py, which would introduce a cyclic dependence.
2701 (arguments `(#:tests? #f))
2702 ;; Note: As of version 1.7 the documentation is not worth building.
2703 (home-page "https://github.com/jaraco/rst.linker")
2704 (synopsis "Sphinx plugin to add links and timestamps")
2705 (description "rst.linker allows to automatically replace text by a
2706reStructuredText external reference or timestamps. It's primary purpose is to
2707augment the changelog, but it can be used for other documents, too.")
2708 (license license:expat)))
2709
2710(define-public python2-rst.linker
2711 (package-with-python2 python-rst.linker))
2712
2713(define-public python-feedgenerator
2714 (package
2715 (name "python-feedgenerator")
2716 (version "1.9")
2717 (source
2718 (origin
2719 (method url-fetch)
2720 (uri (pypi-uri "feedgenerator" version))
2721 (sha256
2722 (base32
2723 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2724 (modules '((guix build utils)))
2725 (snippet
2726 '(begin
2727 ;; Remove pre-compiled .pyc files from source.
2728 (for-each delete-file-recursively
2729 (find-files "." "__pycache__" #:directories? #t))
2730 (for-each delete-file (find-files "." "\\.pyc$"))
2731 #t))))
2732 (build-system python-build-system)
2733 (propagated-inputs
2734 `(("python-pytz" ,python-pytz)
2735 ("python-six" ,python-six)))
2736 (home-page "https://github.com/getpelican/feedgenerator")
2737 (synopsis
2738 "Standalone version of Django's Atom/RSS feed generator")
2739 (description
2740 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2741which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2742 (license license:bsd-3)))
2743
2744(define-public python2-feedgenerator
2745 (package-with-python2 python-feedgenerator))
2746
2747(define-public python-blinker
2748 (package
2749 (name "python-blinker")
2750 (version "1.4")
2751 (source
2752 (origin
2753 (method url-fetch)
2754 (uri (pypi-uri "blinker" version))
2755 (sha256
2756 (base32
2757 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2758 (build-system python-build-system)
2759 (home-page "http://pythonhosted.org/blinker/")
2760 (synopsis "Fast, simple object-to-object and broadcast signaling")
2761 (description
2762 "Blinker provides a fast dispatching system that allows any number of
2763interested parties to subscribe to events, or \"signals\".")
2764 (license license:expat)))
2765
2766(define-public python2-blinker
2767 (package-with-python2 python-blinker))
2768
2769(define-public pelican
2770 (package
2771 (name "pelican")
2772 (version "3.6.3")
2773 (source
2774 (origin
2775 (method url-fetch)
2776 (uri (pypi-uri "pelican" version))
2777 (sha256
2778 (base32
2779 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
2780 (build-system python-build-system)
2781 (propagated-inputs
2782 `(("python-feedgenerator" ,python-feedgenerator)
2783 ("python-jinja2" ,python-jinja2)
2784 ("python-pygments" ,python-pygments)
2785 ("python-docutils" ,python-docutils)
2786 ("python-pytz" ,python-pytz)
2787 ("python-blinker" ,python-blinker)
2788 ("python-unidecode" ,python-unidecode)
2789 ("python-six" ,python-six)
2790 ("python-dateutil" ,python-dateutil)
2791 ("python-markdown" ,python-markdown)))
2792 (home-page "http://getpelican.com/")
2793 (arguments
2794 `(;; XXX Requires a lot more packages to do unit tests :P
2795 #:tests? #f
2796 #:phases (modify-phases %standard-phases
2797 (add-before
2798 'install 'adjust-requires
2799 ;; Since feedgenerator is installed from git, it doesn't
2800 ;; conform to the version requirements.
2801 ;;
2802 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2803 ;; version requirement so setuptools doesn't get confused.
2804 (lambda _
2805 (substitute* "setup.py"
2806 (("['\"]feedgenerator.*?['\"]")
2807 "'feedgenerator'")))))))
2808 (synopsis "Python-based static site publishing system")
2809 (description
2810 "Pelican is a tool to generate a static blog from reStructuredText,
2811Markdown input files, and more. Pelican uses Jinja2 for templating
2812and is very extensible.")
2813 (license license:agpl3+)))
2814
2815(define-public python-scikit-image
2816 (package
2817 (name "python-scikit-image")
2818 (version "0.11.3")
2819 (source
2820 (origin
2821 (method url-fetch)
2822 (uri (string-append
2823 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
2824 version ".tar.gz"))
2825 (sha256
2826 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
2827 (build-system python-build-system)
2828 (arguments
2829 ;; TODO: Some tests require running X11 server. Disable them?
2830 '(#:tests? #f))
2831 ;; See DEPENDS.txt for the list of build and run time requiremnts
2832 (propagated-inputs
2833 `(("python-matplotlib" ,python-matplotlib)
2834 ("python-networkx" ,python-networkx)
2835 ("python-scipy" ,python-scipy)
2836 ("python-pillow" ,python-pillow)))
2837 (native-inputs
2838 `(("python-numpy" ,python-numpy)
2839 ("python-cython" ,python-cython)
2840 ("python-six" ,python-six)))
2841 (home-page "http://scikit-image.org/")
2842 (synopsis "Image processing in Python")
2843 (description
2844 "Scikit-image is a collection of algorithms for image processing.")
2845 (license license:bsd-3)))
2846
2847(define-public python2-scikit-image
2848 (package-with-python2 python-scikit-image))
2849
2850(define-public python-cython
2851 (package
2852 (name "python-cython")
2853 (version "0.27")
2854 (source
2855 (origin
2856 (method url-fetch)
2857 (uri (pypi-uri "Cython" version))
2858 (sha256
2859 (base32
2860 "02y0pp1nx77b8s1mpxc6da2dccl6wd31pp4ksi9via479qcvacmr"))))
2861 (build-system python-build-system)
2862 ;; we need the full python package and not just the python-wrapper
2863 ;; because we need libpython3.3m.so
2864 (inputs
2865 `(("python" ,python)))
2866 (arguments
2867 `(#:phases
2868 (modify-phases %standard-phases
2869 (add-before 'check 'set-HOME
2870 ;; some tests require access to "$HOME/.cython"
2871 (lambda _ (setenv "HOME" "/tmp") #t))
2872 (replace 'check
2873 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
2874 (home-page "http://cython.org/")
2875 (synopsis "C extensions for Python")
2876 (description "Cython is an optimising static compiler for both the Python
2877programming language and the extended Cython programming language. It makes
2878writing C extensions for Python as easy as Python itself.")
2879 (license license:asl2.0)
2880 (properties `((python2-variant . ,(delay python2-cython))))))
2881
2882(define-public python2-cython
2883 (package (inherit (package-with-python2
2884 (strip-python2-variant python-cython)))
2885 (name "python2-cython")
2886 (inputs
2887 `(("python-2" ,python-2))))) ; this is not automatically changed
2888
2889;; The RPython toolchain currently does not support Python 3.
2890(define-public python2-rpython
2891 (package
2892 (name "python2-rpython")
2893 (version "0.2.1")
2894 (source
2895 (origin
2896 (method url-fetch)
2897 (uri (pypi-uri "rpython" version))
2898 (sha256
2899 (base32
2900 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
2901 (build-system python-build-system)
2902 (arguments `(#:python ,python-2))
2903 (native-inputs
2904 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
2905 (home-page "https://rpython.readthedocs.org")
2906 (synopsis "Framework for implementing interpreters and virtual machines")
2907 (description "RPython is a translation and support framework for
2908producing implementations of dynamic languages, emphasizing a clean separation
2909between language specification and implementation aspects.")
2910 (license license:expat)))
2911
2912;; NOTE: when upgrading numpy please make sure that python-pandas and
2913;; python-scipy still build, as these three packages are often used together.
2914(define-public python-numpy
2915 (package
2916 (name "python-numpy")
2917 (version "1.14.5")
2918 (source
2919 (origin
2920 (method url-fetch)
2921 (uri (string-append
2922 "https://github.com/numpy/numpy/releases/download/v"
2923 version "/numpy-" version ".tar.gz"))
2924 (sha256
2925 (base32
2926 "0admjpkih63lm19zbbilq8ck4f6ny5kqi03dk3m6b2mnixsh4jhv"))))
2927 (build-system python-build-system)
2928 (inputs
2929 `(("openblas" ,openblas)
2930 ("lapack" ,lapack)))
2931 (native-inputs
2932 `(("python-cython" ,python-cython)
2933 ("python-nose" ,python-nose)
2934 ("gfortran" ,gfortran)))
2935 (arguments
2936 `(#:phases
2937 (modify-phases %standard-phases
2938 (add-before 'build 'configure-blas-lapack
2939 (lambda* (#:key inputs #:allow-other-keys)
2940 (call-with-output-file "site.cfg"
2941 (lambda (port)
2942 (format port
2943 "[openblas]
2944libraries = openblas
2945library_dirs = ~a/lib
2946include_dirs = ~a/include
2947
2948# backslash-n to make emacs happy
2949\n[lapack]
2950lapack_libs = lapack
2951library_dirs = ~a/lib
2952include_dirs = ~a/include
2953"
2954 (assoc-ref inputs "openblas")
2955 (assoc-ref inputs "openblas")
2956 (assoc-ref inputs "lapack")
2957 (assoc-ref inputs "lapack"))))
2958 #t))
2959 (add-before 'build 'fix-executable-paths
2960 (lambda* (#:key inputs #:allow-other-keys)
2961 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
2962 ;; instead of /bin/sh.
2963 (substitute* "numpy/distutils/exec_command.py"
2964 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
2965 (string-append match-start (assoc-ref inputs "bash") match-end)))
2966 ;; Use "gcc" executable, not "cc".
2967 (substitute* "numpy/distutils/system_info.py"
2968 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
2969 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2970 #t))
2971 ;; Tests can only be run after the library has been installed and not
2972 ;; within the source directory.
2973 (delete 'check)
2974 (add-after 'install 'check
2975 (lambda* (#:key outputs inputs #:allow-other-keys)
2976 ;; Make installed package available for running the tests
2977 (add-installed-pythonpath inputs outputs)
2978 (with-directory-excursion "/tmp"
2979 (zero? (system* "python" "-c"
2980 "import numpy; numpy.test(verbose=2)"))))))))
2981 (home-page "http://www.numpy.org/")
2982 (synopsis "Fundamental package for scientific computing with Python")
2983 (description "NumPy is the fundamental package for scientific computing
2984with Python. It contains among other things: a powerful N-dimensional array
2985object, sophisticated (broadcasting) functions, tools for integrating C/C++
2986and Fortran code, useful linear algebra, Fourier transform, and random number
2987capabilities.")
2988 (license license:bsd-3)))
2989
2990(define-public python2-numpy
2991 (package-with-python2 python-numpy))
2992
2993;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
2994;; interest only for legacy code going back to NumPy's predecessor
2995;; Numeric.
2996(define-public python2-numpy-1.8
2997 (package (inherit python2-numpy)
2998 (version "1.8.2")
2999 (source
3000 (origin
3001 (method url-fetch)
3002 (uri (string-append
3003 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3004 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3005 (sha256
3006 (base32
3007 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3008 (arguments
3009 (substitute-keyword-arguments (package-arguments python2-numpy)
3010 ((#:phases phases)
3011 `(modify-phases ,phases
3012 (replace 'configure-blas-lapack
3013 (lambda* (#:key inputs #:allow-other-keys)
3014 (call-with-output-file "site.cfg"
3015 (lambda (port)
3016 (format port
3017 "[openblas]
3018libraries = openblas,lapack
3019library_dirs = ~a/lib:~a/lib
3020include_dirs = ~a/include:~a/include
3021"
3022 (assoc-ref inputs "openblas")
3023 (assoc-ref inputs "lapack")
3024 (assoc-ref inputs "openblas")
3025 (assoc-ref inputs "lapack"))))
3026 #t))))))
3027 (description "NumPy is the fundamental package for scientific computing
3028with Python. It contains among other things: a powerful N-dimensional array
3029object, sophisticated (broadcasting) functions, tools for integrating C/C++
3030and Fortran code, useful linear algebra, Fourier transform, and random number
3031capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3032that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3033Numeric.")
3034 (license license:bsd-3)))
3035
3036(define-public python-munch
3037 (package
3038 (name "python-munch")
3039 (version "2.0.4")
3040 (source
3041 (origin
3042 (method url-fetch)
3043 (uri (pypi-uri "munch" version))
3044 (sha256
3045 (base32
3046 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3047 (build-system python-build-system)
3048 (home-page "https://github.com/Infinidat/munch")
3049 (synopsis "Dot-accessible dictionary")
3050 (description "Munch is a dot-accessible dictionary similar to JavaScript
3051objects.")
3052 (license license:expat)))
3053
3054(define-public python2-munch
3055 (package-with-python2 python-munch))
3056
3057(define-public python-colormath
3058 (package
3059 (name "python-colormath")
3060 (version "3.0.0")
3061 (source
3062 (origin
3063 (method url-fetch)
3064 (uri (pypi-uri "colormath" version))
3065 (sha256
3066 (base32
3067 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3068 (build-system python-build-system)
3069 (propagated-inputs
3070 `(("python-networkx" ,python-networkx)
3071 ("python-numpy" ,python-numpy)))
3072 (home-page "https://github.com/gtaylor/python-colormath")
3073 (synopsis "Color math and conversion library")
3074 (description
3075 "This is a Python library for color math and conversions.")
3076 (license license:bsd-3)))
3077
3078(define-public python2-colormath
3079 (package-with-python2 python-colormath))
3080
3081(define-public python-spectra
3082 (package
3083 (name "python-spectra")
3084 (version "0.0.11")
3085 (source
3086 (origin
3087 (method url-fetch)
3088 (uri (pypi-uri "spectra" version))
3089 (sha256
3090 (base32
3091 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3092 (build-system python-build-system)
3093 (arguments
3094 `(#:phases
3095 (modify-phases %standard-phases
3096 (replace 'check
3097 (lambda _
3098 (zero? (system* "nosetests" "-v")))))))
3099 (propagated-inputs
3100 `(("python-colormath" ,python-colormath)))
3101 (native-inputs
3102 `(("python-nose" ,python-nose)))
3103 (home-page "https://github.com/jsvine/spectra")
3104 (synopsis "Color scales and color conversion")
3105 (description
3106 "This package provides a Python library intended to make color math,
3107color scales, and color space conversion easy. It has support for:
3108
3109@enumerate
3110@item Color scales
3111@item Color ranges
3112@item Color blending
3113@item Brightening/darkening colors
3114@item Saturating/desaturating colors
3115@item Conversion to/from multiple color spaces.
3116@end enumerate\n")
3117 (license license:expat)))
3118
3119(define-public python2-spectra
3120 (package-with-python2 python-spectra))
3121
3122(define-public python2-fastlmm
3123 (package
3124 (name "python2-fastlmm")
3125 (version "0.2.21")
3126 (source
3127 (origin
3128 (method url-fetch)
3129 (uri (pypi-uri "fastlmm" version ".zip"))
3130 (sha256
3131 (base32
3132 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3133 (build-system python-build-system)
3134 (arguments
3135 `(#:python ,python-2)) ; only Python 2.7 is supported
3136 (propagated-inputs
3137 `(("python2-numpy" ,python2-numpy)
3138 ("python2-scipy" ,python2-scipy)
3139 ("python2-matplotlib" ,python2-matplotlib)
3140 ("python2-pandas" ,python2-pandas)
3141 ("python2-scikit-learn" ,python2-scikit-learn)
3142 ("python2-pysnptools" ,python2-pysnptools)))
3143 (native-inputs
3144 `(("unzip" ,unzip)
3145 ("python2-cython" ,python2-cython)
3146 ("python2-mock" ,python2-mock)
3147 ("python2-nose" ,python2-nose)))
3148 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3149 (synopsis "Perform genome-wide association studies on large data sets")
3150 (description
3151 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3152Models, is a program for performing both single-SNP and SNP-set genome-wide
3153association studies (GWAS) on extremely large data sets.")
3154 (license license:asl2.0)))
3155
3156(define-public python-numpy-documentation
3157 (package
3158 (name "python-numpy-documentation")
3159 (version (package-version python-numpy))
3160 (source (package-source python-numpy))
3161 (build-system python-build-system)
3162 (native-inputs
3163 `(("python-matplotlib" ,python-matplotlib)
3164 ("python-numpy" ,python-numpy)
3165 ("pkg-config" ,pkg-config)
3166 ("python-sphinx" ,python-sphinx)
3167 ("python-numpydoc" ,python-numpydoc)
3168 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3169 texlive-fonts-ec
3170 texlive-generic-ifxetex
3171 texlive-generic-pdftex
3172 texlive-latex-amsfonts
3173 texlive-latex-capt-of
3174 texlive-latex-cmap
3175 texlive-latex-environ
3176 texlive-latex-eqparbox
3177 texlive-latex-etoolbox
3178 texlive-latex-expdlist
3179 texlive-latex-fancyhdr
3180 texlive-latex-fancyvrb
3181 texlive-latex-fncychap
3182 texlive-latex-float
3183 texlive-latex-framed
3184 texlive-latex-geometry
3185 texlive-latex-graphics
3186 texlive-latex-hyperref
3187 texlive-latex-mdwtools
3188 texlive-latex-multirow
3189 texlive-latex-oberdiek
3190 texlive-latex-parskip
3191 texlive-latex-preview
3192 texlive-latex-tabulary
3193 texlive-latex-threeparttable
3194 texlive-latex-titlesec
3195 texlive-latex-trimspaces
3196 texlive-latex-ucs
3197 texlive-latex-upquote
3198 texlive-latex-url
3199 texlive-latex-varwidth
3200 texlive-latex-wrapfig)))
3201 ("texinfo" ,texinfo)
3202 ("perl" ,perl)
3203 ("scipy-sphinx-theme"
3204 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3205 (method git-fetch)
3206 (uri (git-reference
3207 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3208 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3209 (sha256
3210 (base32
3211 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3212 ,@(package-native-inputs python-numpy)))
3213 (arguments
3214 `(#:tests? #f ; we're only generating the documentation
3215 #:phases
3216 (modify-phases %standard-phases
3217 (delete 'build)
3218 (replace 'install
3219 (lambda* (#:key inputs outputs #:allow-other-keys)
3220 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3221 (doc (string-append
3222 data "/doc/" ,name "-"
3223 ,(package-version python-numpy)))
3224 (info-reader (string-append data "/info"))
3225 (html (string-append doc "/html"))
3226 (scipy-sphinx-theme "scipy-sphinx-theme")
3227 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3228 (pyver ,(string-append "PYVER=")))
3229
3230 ;; FIXME: this is needed to for texlive-union to generate
3231 ;; fonts, which are not found.
3232 (setenv "HOME" "/tmp")
3233
3234 (with-directory-excursion "doc"
3235 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3236 (mkdir-p html)
3237 (system* "make" "html" pyver)
3238 (system* "make" "latex" "PAPER=a4" pyver)
3239 (system* "make" "-C" "build/latex"
3240 "all-pdf" "PAPER=a4" pyver)
3241 ;; FIXME: Generation of the info file fails.
3242 ;; (system* "make" "info" pyver)
3243 ;; (mkdir-p info)
3244 ;; (copy-file "build/texinfo/numpy.info"
3245 ;; (string-append info "/numpy.info"))
3246 (for-each (lambda (file)
3247 (copy-file (string-append "build/latex" file)
3248 (string-append doc file)))
3249 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3250 (with-directory-excursion "build/html"
3251 (for-each (lambda (file)
3252 (let* ((dir (dirname file))
3253 (tgt-dir (string-append html "/" dir)))
3254 (unless (equal? "." dir)
3255 (mkdir-p tgt-dir))
3256 (install-file file html)))
3257 (find-files "." ".*")))))
3258 #t)))))
3259 (home-page (package-home-page python-numpy))
3260 (synopsis "Documentation for the python-numpy package")
3261 (description (package-description python-numpy))
3262 (license (package-license python-numpy))))
3263
3264(define-public python2-numpy-documentation
3265 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3266 (package
3267 (inherit numpy-documentation)
3268 (native-inputs `(("python2-functools32" ,python2-functools32)
3269 ,@(package-native-inputs numpy-documentation))))))
3270
3271(define-public python-pygit2
3272 (package
3273 (name "python-pygit2")
3274 (version "0.26.0")
3275 (source
3276 (origin
3277 (method url-fetch)
3278 (uri (pypi-uri "pygit2" version))
3279 (sha256
3280 (base32
3281 "1cbc488ra3kg7r3qky17ms0szi3cda2d96qfkv1l9djsy9hnvw57"))
3282 (patches
3283 (search-patches "python-pygit2-disable-network-tests.patch"))))
3284 (build-system python-build-system)
3285 (propagated-inputs
3286 `(("python-six" ,python-six)
3287 ("python-cffi" ,python-cffi)
3288 ("libgit2" ,libgit2)
3289 ("python-tox" ,python-tox)))
3290 (home-page "https://github.com/libgit2/pygit2")
3291 (synopsis "Python bindings for libgit2")
3292 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3293library, libgit2 implements Git plumbing.")
3294 ;; GPL2.0 only, with linking exception.
3295 (license license:gpl2)))
3296
3297(define-public python2-pygit2
3298 (package-with-python2 python-pygit2))
3299
3300(define-public python-pyparsing
3301 (package
3302 (name "python-pyparsing")
3303 (version "2.2.0")
3304 (source
3305 (origin
3306 (method url-fetch)
3307 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3308 "/pyparsing-" version
3309 "/pyparsing-" version ".tar.gz"))
3310 (sha256
3311 (base32
3312 "016b9gh606aa44sq92jslm89bg874ia0yyiyb643fa6dgbsbqch8"))))
3313 (build-system python-build-system)
3314 (outputs '("out" "doc"))
3315 (arguments
3316 `(#:tests? #f ; no test target
3317 #:phases
3318 (modify-phases %standard-phases
3319 (add-after 'install 'install-doc
3320 (lambda* (#:key outputs #:allow-other-keys)
3321 (let* ((doc (string-append (assoc-ref outputs "doc")
3322 "/share/doc/" ,name "-" ,version))
3323 (html-doc (string-append doc "/html"))
3324 (examples (string-append doc "/examples")))
3325 (mkdir-p html-doc)
3326 (mkdir-p examples)
3327 (for-each
3328 (lambda (dir tgt)
3329 (map (lambda (file)
3330 (install-file file tgt))
3331 (find-files dir ".*")))
3332 (list "docs" "htmldoc" "examples")
3333 (list doc html-doc examples))
3334 #t))))))
3335 (home-page "http://pyparsing.wikispaces.com")
3336 (synopsis "Python parsing class library")
3337 (description
3338 "The pyparsing module is an alternative approach to creating and
3339executing simple grammars, vs. the traditional lex/yacc approach, or the use
3340of regular expressions. The pyparsing module provides a library of classes
3341that client code uses to construct the grammar directly in Python code.")
3342 (license license:expat)))
3343
3344(define-public python2-pyparsing
3345 (package-with-python2 python-pyparsing))
3346
3347(define-public python-numpydoc
3348 (package
3349 (name "python-numpydoc")
3350 (version "0.5")
3351 (source
3352 (origin
3353 (method url-fetch)
3354 (uri (string-append
3355 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3356 version ".tar.gz"))
3357 (sha256
3358 (base32
3359 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3360 (modules '((guix build utils)))
3361 (snippet
3362 '(begin
3363 ;; Drop a test requiring matplotlib, which we cannot add as an
3364 ;; input since it would create a circular dependency: Extend the
3365 ;; test for Python 3, where it is already dropped, to Python 2.
3366 (substitute* "numpydoc/tests/test_plot_directive.py"
3367 (("3") "2"))
3368 #t))))
3369 (build-system python-build-system)
3370 (propagated-inputs
3371 `(("python-sphinx" ,python-sphinx)))
3372 (native-inputs
3373 `(("python-nose" ,python-nose)))
3374 (home-page "https://pypi.python.org/pypi/numpydoc")
3375 (synopsis
3376 "Numpy's Sphinx extensions")
3377 (description
3378 "Sphinx extension to support docstrings in Numpy format.")
3379 (license license:bsd-2)))
3380
3381(define-public python2-numpydoc
3382 (package-with-python2 python-numpydoc))
3383
3384(define-public python-numexpr
3385 (package
3386 (name "python-numexpr")
3387 (version "2.6.5")
3388 (source
3389 (origin
3390 (method url-fetch)
3391 (uri (pypi-uri "numexpr" version))
3392 (sha256
3393 (base32
3394 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3395 (build-system python-build-system)
3396 (arguments `(#:tests? #f)) ; no tests included
3397 (propagated-inputs
3398 `(("python-numpy" ,python-numpy)))
3399 (home-page "https://github.com/pydata/numexpr")
3400 (synopsis "Fast numerical expression evaluator for NumPy")
3401 (description
3402 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3403expressions that operate on arrays are accelerated and use less memory than
3404doing the same calculation in Python. In addition, its multi-threaded
3405capabilities can make use of all your cores, which may accelerate
3406computations, most specially if they are not memory-bounded (e.g. those using
3407transcendental functions).")
3408 (license license:expat)))
3409
3410(define-public python2-numexpr
3411 (package-with-python2 python-numexpr))
3412
3413(define-public python-cycler
3414 (package
3415 (name "python-cycler")
3416 (version "0.10.0")
3417 (source (origin
3418 (method url-fetch)
3419 (uri (pypi-uri "cycler" version))
3420 (sha256
3421 (base32
3422 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3423 (build-system python-build-system)
3424 (arguments
3425 ;; XXX: The current version requires 'coveralls' which we don't have.
3426 ;; Enable this for the next release which uses 'python-pytest'.
3427 '(#:tests? #f))
3428 (propagated-inputs
3429 `(("python-six" ,python-six)))
3430 (home-page "http://matplotlib.org/cycler/")
3431 (synopsis "Composable keyword argument iterator")
3432 (description
3433 "When using @code{matplotlib} and plotting more than one line, it is
3434common to want to be able to want to be able to cycle over one or more artist
3435styles; but the plotting logic can quickly become involved.
3436To address this and enable easy cycling over arbitrary @code{kwargs}, the
3437@code{Cycler} class was developed.")
3438 (license license:bsd-3)))
3439
3440(define-public python2-cycler
3441 (package-with-python2 python-cycler))
3442
3443(define-public python-colorspacious
3444 (package
3445 (name "python-colorspacious")
3446 (version "1.1.0")
3447 (source
3448 (origin
3449 (method url-fetch)
3450 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3451 version ".tar.gz"))
3452 (file-name (string-append name "-" version))
3453 (sha256
3454 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3455 (build-system python-build-system)
3456 (propagated-inputs
3457 `(("python-numpy" ,python-numpy)))
3458 (native-inputs
3459 `(("python-nose" ,python-nose)))
3460 (arguments
3461 `(#:phases
3462 (modify-phases %standard-phases
3463 (replace 'check
3464 (lambda _
3465 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
3466 (home-page "https://github.com/njsmith/colorspacious")
3467 (synopsis "Python library for colorspace conversions")
3468 (description "@code{colorspacious} is a Python library that lets you
3469convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3470 (license license:expat)))
3471
3472(define-public python2-colorspacious
3473 (package-with-python2 python-colorspacious))
3474
3475(define-public python-matplotlib
3476 (package
3477 (name "python-matplotlib")
3478 (version "2.2.2")
3479 (source
3480 (origin
3481 (method url-fetch)
3482 (uri (pypi-uri "matplotlib" version))
3483 (sha256
3484 (base32
3485 "1s6dv225w3k4fv52h8lfjc7qq5y56i9755ayx0mz48ddi99fzisd"))))
3486 (build-system python-build-system)
3487 (propagated-inputs ; the following packages are all needed at run time
3488 `(("python-cycler" ,python-cycler)
3489 ("python-kiwisolver" ,python-kiwisolver)
3490 ("python-pyparsing" ,python-pyparsing)
3491 ("python-pygobject" ,python-pygobject)
3492 ("gobject-introspection" ,gobject-introspection)
3493 ("python-tkinter" ,python "tk")
3494 ("python-dateutil" ,python-dateutil)
3495 ("python-numpy" ,python-numpy)
3496 ("python-pillow" ,python-pillow)
3497 ("python-pytz" ,python-pytz)
3498 ("python-six" ,python-six)
3499 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3500 ;; from 'gtk+') provides the required 'typelib' files used by
3501 ;; 'gobject-introspection'. The location of these files is set with the
3502 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3503 ;; is done automatically by a 'native-search-path' procedure. However,
3504 ;; at run-time the user must set this variable as follows:
3505 ;;
3506 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3507 ("gtk+" ,gtk+)
3508 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3509 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3510 ;; object. For this reason we need to import both libraries.
3511 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3512 ("python-pycairo" ,python-pycairo)
3513 ("python-pyqt" ,python-pyqt)
3514 ("python-cairocffi" ,python-cairocffi)))
3515 (inputs
3516 `(("libpng" ,libpng)
3517 ("imagemagick" ,imagemagick)
3518 ("freetype" ,freetype)
3519 ("cairo" ,cairo)
3520 ("glib" ,glib)
3521 ;; FIXME: Add backends when available.
3522 ;("python-wxpython" ,python-wxpython)
3523 ("tcl" ,tcl)
3524 ("tk" ,tk)))
3525 (native-inputs
3526 `(("pkg-config" ,pkg-config)
3527 ("python-nose" ,python-nose)
3528 ("python-mock" ,python-mock)))
3529 (arguments
3530 `(#:phases
3531 (modify-phases %standard-phases
3532 (add-before 'build 'configure-environment
3533 (lambda* (#:key outputs inputs #:allow-other-keys)
3534 (let ((cairo (assoc-ref inputs "cairo"))
3535 (gtk+ (assoc-ref inputs "gtk+")))
3536 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3537 ;; has not effect.
3538 (setenv "LD_LIBRARY_PATH"
3539 (string-append cairo "/lib:" gtk+ "/lib"))
3540 (setenv "HOME" (getcwd))
3541 (call-with-output-file "setup.cfg"
3542 (lambda (port)
3543 (format port "[directories]~%
3544basedirlist = ~a,~a~%
3545 [rc_options]~%
3546backend = TkAgg~%"
3547 (assoc-ref inputs "tcl")
3548 (assoc-ref inputs "tk")))))
3549 #t)))))
3550 (home-page "http://matplotlib.org")
3551 (synopsis "2D plotting library for Python")
3552 (description
3553 "Matplotlib is a Python 2D plotting library which produces publication
3554quality figures in a variety of hardcopy formats and interactive environments
3555across platforms. Matplotlib can be used in Python scripts, the python and
3556ipython shell, web application servers, and six graphical user interface
3557toolkits.")
3558 (license license:psfl)
3559 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3560
3561(define-public python2-matplotlib
3562 (let ((matplotlib (package-with-python2
3563 (strip-python2-variant python-matplotlib))))
3564 (package (inherit matplotlib)
3565 ;; Make sure to use special packages for Python 2 instead
3566 ;; of those automatically rewritten by package-with-python2.
3567 (propagated-inputs
3568 `(("python2-pycairo" ,python2-pycairo)
3569 ("python2-backports-functools-lru-cache"
3570 ,python2-backports-functools-lru-cache)
3571 ("python2-functools32" ,python2-functools32)
3572 ("python2-pygobject-2" ,python2-pygobject-2)
3573 ("python2-subprocess32" ,python2-subprocess32)
3574 ("python2-tkinter" ,python-2 "tk")
3575 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3576 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3577
3578(define-public python-matplotlib-documentation
3579 (package
3580 (name "python-matplotlib-documentation")
3581 (version (package-version python-matplotlib))
3582 (source (package-source python-matplotlib))
3583 (build-system python-build-system)
3584 (native-inputs
3585 `(("python-matplotlib" ,python-matplotlib)
3586 ("python-colorspacious" ,python-colorspacious)
3587 ("python-sphinx" ,python-sphinx-1.6)
3588 ("python-sphinx-gallery" ,python-sphinx-gallery)
3589 ("python-numpydoc" ,python-numpydoc)
3590 ("python-ipython" ,python-ipython)
3591 ("python-mock" ,python-mock)
3592 ("graphviz" ,graphviz)
3593 ("texlive" ,texlive)
3594 ("texinfo" ,texinfo)
3595 ,@(package-native-inputs python-matplotlib)))
3596 (arguments
3597 `(#:tests? #f ; we're only generating documentation
3598 #:phases
3599 (modify-phases %standard-phases
3600 (replace 'build
3601 (lambda _
3602 (chdir "doc")
3603 ;; Produce pdf in 'A4' format.
3604 (substitute* "conf.py"
3605 (("latex_paper_size = 'letter'") "")
3606 ;; latex_paper_size is deprecated -> set paper size using
3607 ;; latex_elements
3608 (("latex_elements\\['pointsize'\\] = '11pt'" match)
3609 ;; insert at a point where latex_elements{} is defined:
3610 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
3611 (invoke "make" "SPHINXBUILD=sphinx-build" "html" "latex" "texinfo")))
3612 (replace 'install
3613 (lambda* (#:key inputs outputs #:allow-other-keys)
3614 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3615 (doc (string-append data "/doc/python-matplotlib-" ,version))
3616 (info (string-append data "/info"))
3617 (html (string-append doc "/html")))
3618 (mkdir-p html)
3619 (mkdir-p info)
3620 (copy-recursively "build/html" html)
3621 (symlink (string-append html "/_images")
3622 (string-append info "/matplotlib-figures"))
3623 (with-directory-excursion "build/texinfo"
3624 (substitute* "matplotlib.texi"
3625 (("@image\\{([^,]*)" all file)
3626 (string-append "@image{matplotlib-figures/" file)))
3627 (symlink (string-append html "/_images")
3628 "./matplotlib-figures")
3629 (system* "makeinfo" "--no-split"
3630 "-o" "matplotlib.info" "matplotlib.texi"))
3631 (copy-file "build/texinfo/matplotlib.info"
3632 (string-append info "/matplotlib.info"))
3633 (copy-file "build/latex/Matplotlib.pdf"
3634 (string-append doc "/Matplotlib.pdf")))
3635 #t)))))
3636 (home-page (package-home-page python-matplotlib))
3637 (synopsis "Documentation for the python-matplotlib package")
3638 (description (package-description python-matplotlib))
3639 (license (package-license python-matplotlib))))
3640
3641(define-public python2-matplotlib-documentation
3642 (package-with-python2 python-matplotlib-documentation))
3643
3644(define-public python2-pysnptools
3645 (package
3646 (name "python2-pysnptools")
3647 (version "0.3.9")
3648 (source
3649 (origin
3650 (method url-fetch)
3651 (uri (pypi-uri "pysnptools" version ".zip"))
3652 (sha256
3653 (base32
3654 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
3655 (build-system python-build-system)
3656 (arguments
3657 `(#:python ,python-2)) ; only Python 2.7 is supported
3658 (propagated-inputs
3659 `(("python2-numpy" ,python2-numpy)
3660 ("python2-scipy" ,python2-scipy)
3661 ("python2-pandas" ,python2-pandas)))
3662 (native-inputs
3663 `(("python2-cython" ,python2-cython)))
3664 (native-inputs
3665 `(("unzip" ,unzip)))
3666 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3667 (synopsis "Library for reading and manipulating genetic data")
3668 (description
3669 "PySnpTools is a library for reading and manipulating genetic data. It
3670can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3671those files. It can also efficiently manipulate ranges of integers using set
3672operators such as union, intersection, and difference.")
3673 (license license:asl2.0)))
3674
3675(define-public python-rpy2
3676 (package
3677 (name "python-rpy2")
3678 (version "2.9.0")
3679 (source
3680 (origin
3681 (method url-fetch)
3682 (uri (pypi-uri "rpy2" version))
3683 (sha256
3684 (base32
3685 "0bqihjrdqwj5r1h86shvfb1p5hfr4a6klv1v54bzfr9r144w3rni"))))
3686 (build-system python-build-system)
3687 (arguments
3688 '(#:modules ((ice-9 ftw)
3689 (srfi srfi-1)
3690 (srfi srfi-26)
3691 (guix build utils)
3692 (guix build python-build-system))
3693 #:phases
3694 (modify-phases %standard-phases
3695 ;; Without this phase the test loader cannot find the directories, in
3696 ;; which it is supposed to look for test files.
3697 (add-after 'unpack 'fix-tests
3698 (lambda* (#:key outputs #:allow-other-keys)
3699 (substitute* "rpy/tests.py"
3700 (("loader.discover\\(")
3701 "loader.discover(rpy_root + '/' +"))
3702 #t))
3703 (replace 'check
3704 (lambda* (#:key outputs inputs #:allow-other-keys)
3705 (let ((cwd (getcwd)))
3706 (setenv "PYTHONPATH"
3707 (string-append cwd "/build/"
3708 (find (cut string-prefix? "lib" <>)
3709 (scandir (string-append cwd "/build")))
3710 ":"
3711 (getenv "PYTHONPATH"))))
3712 ;; FIXME: Even when all tests pass, the check phase will fail.
3713 (system* "python" "-m" "rpy2.tests" "-v"))))))
3714 (propagated-inputs
3715 `(("python-six" ,python-six)
3716 ("python-jinja2" ,python-jinja2)
3717 ("python-pytz" ,python-pytz)))
3718 (inputs
3719 `(("readline" ,readline)
3720 ("icu4c" ,icu4c)
3721 ("pcre" ,pcre)
3722 ("r-minimal" ,r-minimal)
3723 ("r-survival" ,r-survival)
3724 ("r-ggplot2" ,r-ggplot2)
3725 ("r-rsqlite" ,r-rsqlite)
3726 ("r-dplyr" ,r-dplyr)
3727 ("r-dbplyr" ,r-dbplyr)
3728 ("python-numpy" ,python-numpy)))
3729 (native-inputs
3730 `(("zlib" ,zlib)))
3731 (home-page "http://rpy.sourceforge.net/")
3732 (synopsis "Python interface to the R language")
3733 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3734low-level interface to R from Python, a proposed high-level interface,
3735including wrappers to graphical libraries, as well as R-like structures and
3736functions.")
3737 ;; Any of these licenses can be picked for the R interface. The whole
3738 ;; project is released under GPLv2+ according to the license declaration
3739 ;; in "setup.py".
3740 (license (list license:mpl2.0 license:gpl2+ license:lgpl2.1+))))
3741
3742(define-public python-scipy
3743 (package
3744 (name "python-scipy")
3745 (version "1.0.1")
3746 (source
3747 (origin
3748 (method url-fetch)
3749 (uri (pypi-uri "scipy" version))
3750 (sha256
3751 (base32
3752 "1fj0r7bg0cfk5clvl57ga06y9bfh05iwlv1dqqs1r6pd89wccfc7"))))
3753 (build-system python-build-system)
3754 (propagated-inputs
3755 `(("python-numpy" ,python-numpy)
3756 ("python-matplotlib" ,python-matplotlib)
3757 ("python-pyparsing" ,python-pyparsing)))
3758 (inputs
3759 `(("lapack" ,lapack)
3760 ("openblas" ,openblas)))
3761 (native-inputs
3762 `(("python-cython" ,python-cython)
3763 ("python-pytest" ,python-pytest)
3764 ("python-sphinx" ,python-sphinx)
3765 ("python-numpydoc" ,python-numpydoc)
3766 ("gfortran" ,gfortran)
3767 ("perl" ,perl)
3768 ("which" ,which)))
3769 (outputs '("out" "doc"))
3770 (arguments
3771 `(#:phases
3772 (modify-phases %standard-phases
3773 (add-before 'build 'configure-openblas
3774 (lambda* (#:key inputs #:allow-other-keys)
3775 (call-with-output-file "site.cfg"
3776 (lambda (port)
3777 (format port
3778 "[blas]
3779libraries = openblas
3780library_dirs = ~a/lib
3781include_dirs = ~a/include
3782
3783# backslash-n to make emacs happy
3784\n[atlas]
3785library_dirs = ~a/lib
3786atlas_libs = openblas
3787"
3788 (assoc-ref inputs "openblas")
3789 (assoc-ref inputs "openblas")
3790 (assoc-ref inputs "openblas"))))
3791 #t))
3792 (add-after 'install 'install-doc
3793 (lambda* (#:key inputs outputs #:allow-other-keys)
3794 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3795 (doc (string-append data "/doc/" ,name "-" ,version))
3796 (html (string-append doc "/html"))
3797 (pyver ,(string-append "PYVER=" (version-major+minor
3798 (package-version python))))
3799 ;; By default it tries to run sphinx-build through the Python
3800 ;; interpreter which won't work with our shell wrapper.
3801 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
3802 ;; Make installed package available for building the
3803 ;; documentation
3804 (add-installed-pythonpath inputs outputs)
3805 (with-directory-excursion "doc"
3806 ;; Fix generation of images for mathematical expressions.
3807 (substitute* (find-files "source" "conf\\.py")
3808 (("pngmath_use_preview = True")
3809 "pngmath_use_preview = False"))
3810 (mkdir-p html)
3811 (invoke "make" "html" pyver sphinxbuild)
3812 (with-directory-excursion "build/html"
3813 (for-each (lambda (file)
3814 (let* ((dir (dirname file))
3815 (tgt-dir (string-append html "/" dir)))
3816 (install-file file html)))
3817 (find-files "." ".*")))))
3818 #t))
3819 ;; Tests can only be run after the library has been installed and not
3820 ;; within the source directory.
3821 (delete 'check)
3822 (add-after 'install 'check
3823 (lambda* (#:key inputs outputs #:allow-other-keys)
3824 (add-installed-pythonpath inputs outputs)
3825 (with-directory-excursion "/tmp"
3826 (invoke "python" "-c"
3827 "import scipy; scipy.test('full', verbose=2)")))))))
3828 (home-page "https://www.scipy.org/")
3829 (synopsis "The Scipy library provides efficient numerical routines")
3830 (description "The SciPy library is one of the core packages that make up
3831the SciPy stack. It provides many user-friendly and efficient numerical
3832routines such as routines for numerical integration and optimization.")
3833 (properties `((python2-variant . ,(delay python2-scipy))))
3834 (license license:bsd-3)))
3835
3836(define-public python2-scipy
3837 (package-with-python2
3838 (strip-python2-variant python-scipy)))
3839
3840(define-public python-socksipy-branch
3841 (package
3842 (name "python-socksipy-branch")
3843 (version "1.01")
3844 (source
3845 (origin
3846 (method url-fetch)
3847 (uri (pypi-uri "SocksiPy-branch" version))
3848 (sha256
3849 (base32
3850 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3851 (build-system python-build-system)
3852 (arguments
3853 `(#:tests? #f)) ; There are no tests
3854 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3855 (synopsis "Python SOCKS module")
3856 (description
3857 "SocksiPy - A Python SOCKS client module. It provides a
3858socket-like interface that supports connections to any TCP
3859service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3860The original version was developed by Dan Haim, this is a
3861branch created by Mario Vilas to address some open issues,
3862as the original project seems to have been abandoned circa 2007.")
3863 (license license:bsd-3)))
3864
3865(define-public python2-socksipy-branch
3866 (package-with-python2 python-socksipy-branch))
3867
3868(define-public python-pycodestyle
3869 (package
3870 (name "python-pycodestyle")
3871 (version "2.3.1")
3872 (source
3873 (origin
3874 (method url-fetch)
3875 (uri (pypi-uri "pycodestyle" version))
3876 (sha256
3877 (base32
3878 "0rk78b66p57ala26mdldl9lafr48blv5s659sah9q50qnfjmc8k8"))))
3879 (build-system python-build-system)
3880 (home-page "https://pycodestyle.readthedocs.io/")
3881 (synopsis "Python style guide checker")
3882 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3883Python code against some of the style conventions in
3884@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3885 (license license:expat)))
3886
3887(define-public python2-pycodestyle
3888 (package-with-python2 python-pycodestyle))
3889
3890(define-public python-multidict
3891 (package
3892 (name "python-multidict")
3893 (version "4.2.0")
3894 (source
3895 (origin
3896 (method url-fetch)
3897 (uri (pypi-uri "multidict" version))
3898 (sha256
3899 (base32
3900 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
3901 (build-system python-build-system)
3902 (native-inputs
3903 `(("python-pytest" ,python-pytest)
3904 ("python-pytest-runner" ,python-pytest-runner)))
3905 (home-page "https://github.com/aio-libs/multidict/")
3906 (synopsis "Multidict implementation")
3907 (description "Multidict is dict-like collection of key-value pairs
3908where key might be occurred more than once in the container.")
3909 (license license:asl2.0)))
3910
3911(define-public python-orderedmultidict
3912 (package
3913 (name "python-orderedmultidict")
3914 (version "0.7.11")
3915 (source
3916 (origin
3917 (method url-fetch)
3918 (uri (pypi-uri "orderedmultidict" version))
3919 (sha256
3920 (base32
3921 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
3922 (build-system python-build-system)
3923 (arguments
3924 `(#:phases
3925 (modify-phases %standard-phases
3926 (add-after 'unpack 'fix-tests
3927 (lambda _
3928 ;; The package uses nosetest for running the tests.
3929 ;; Adding this initfile allows to run the test suite
3930 ;; without requiring nosetest.
3931 (zero? (system* "touch" "tests/__init__.py")))))))
3932 (propagated-inputs
3933 `(("python-six" ,python-six)))
3934 (native-inputs
3935 `(("python-pycodestyle" ,python-pycodestyle)))
3936 (home-page "https://github.com/gruns/orderedmultidict")
3937 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3938 (description "This package contains a library for ordered multivalue
3939dictionaries. A multivalue dictionary is a dictionary that can store
3940multiple values for the same key. An ordered multivalue dictionary is a
3941multivalue dictionary that retains the order of insertions and deletions.")
3942 (license license:unlicense)))
3943
3944(define-public python2-orderedmultidict
3945 (package-with-python2 python-orderedmultidict))
3946
3947(define-public python-autopep8
3948 (package
3949 (name "python-autopep8")
3950 (version "1.3.5")
3951 (source
3952 (origin
3953 (method url-fetch)
3954 (uri (pypi-uri "autopep8" version))
3955 (sha256
3956 (base32
3957 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
3958 (build-system python-build-system)
3959 (propagated-inputs
3960 `(("python-pycodestyle" ,python-pycodestyle)))
3961 (home-page "https://github.com/hhatto/autopep8")
3962 (synopsis "Format Python code according to the PEP 8 style guide")
3963 (description
3964 "@code{autopep8} automatically formats Python code to conform to
3965the PEP 8 style guide. It uses the pycodestyle utility to determine
3966what parts of the code needs to be formatted. @code{autopep8} is
3967capable of fixing most of the formatting issues that can be reported
3968by pycodestyle.")
3969 (license (license:non-copyleft
3970 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
3971
3972(define-public python2-autopep8
3973 (package-with-python2 python-autopep8))
3974
3975(define-public python-distutils-extra
3976 (package
3977 (name "python-distutils-extra")
3978 (version "2.38")
3979 (source
3980 (origin
3981 (method url-fetch)
3982 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3983 version "/+download/python-distutils-extra-"
3984 version ".tar.gz"))
3985 (sha256
3986 (base32
3987 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3988 (build-system python-build-system)
3989 (home-page "https://launchpad.net/python-distutils-extra/")
3990 (synopsis "Enhancements to Python's distutils")
3991 (description
3992 "The python-distutils-extra module enables you to easily integrate
3993gettext support, themed icons, and scrollkeeper-based documentation into
3994Python's distutils.")
3995 (license license:gpl2)))
3996
3997(define-public python2-distutils-extra
3998 (package-with-python2 python-distutils-extra))
3999
4000(define-public python2-elib.intl
4001 (package
4002 (name "python2-elib.intl")
4003 (version "0.0.3")
4004 (source
4005 (origin
4006 ;; This project doesn't tag releases or publish tarballs, so we take
4007 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4008 (method git-fetch)
4009 (uri (git-reference
4010 (url "https://github.com/dieterv/elib.intl.git")
4011 (commit "d09997cfef")))
4012 (file-name (string-append name "-" version "-checkout"))
4013 (sha256
4014 (base32
4015 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4016 (build-system python-build-system)
4017 (arguments
4018 ;; incompatible with Python 3 (exception syntax)
4019 `(#:python ,python-2
4020 #:tests? #f))
4021 (home-page "https://github.com/dieterv/elib.intl")
4022 (synopsis "Enhanced internationalization for Python")
4023 (description
4024 "The elib.intl module provides enhanced internationalization (I18N)
4025services for your Python modules and applications.")
4026 (license license:lgpl3+)))
4027
4028(define-public python-olefile
4029 (package
4030 (name "python-olefile")
4031 (version "0.44")
4032 (source
4033 (origin
4034 (method url-fetch)
4035 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
4036 version ".tar.gz"))
4037 (file-name (string-append name "-" version ".tar.gz"))
4038 (sha256
4039 (base32
4040 "1wmxbrhyqjry2000zx0zdhqdqxhgi06nz7sbzjlh222q2zjv1gpj"))))
4041 (build-system python-build-system)
4042 (home-page
4043 "https://www.decalage.info/python/olefileio")
4044 (synopsis "Read and write Microsoft OLE2 files.")
4045 (description
4046 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4047Storage or Compound Document, Microsoft Office). It is an improved version of
4048the OleFileIO module from PIL, the Python Image Library.")
4049 (license license:bsd-3)))
4050
4051(define-public python2-olefile
4052 (package-with-python2 python-olefile))
4053
4054(define-public python-pillow
4055 (package
4056 (name "python-pillow")
4057 (version "4.3.0")
4058 (source
4059 (origin
4060 (method url-fetch)
4061 (uri (pypi-uri "Pillow" version))
4062 (sha256
4063 (base32
4064 "09xmn7rl6840sli2iz1k3fgxfgmri2nqz6vkinmb9mgg8ifp2z59"))
4065 (patch-flags '("-p1" "--binary"))
4066 (patches (search-patches "python-pillow-fix-failing-tests.patch"))))
4067 (build-system python-build-system)
4068 (native-inputs
4069 `(("python-nose" ,python-nose)))
4070 (inputs
4071 `(("freetype" ,freetype)
4072 ("lcms" ,lcms)
4073 ("zlib" ,zlib)
4074 ("libjpeg" ,libjpeg)
4075 ("openjpeg" ,openjpeg)
4076 ("libtiff" ,libtiff)
4077 ("libwebp" ,libwebp)))
4078 (propagated-inputs
4079 `(("python-olefile" ,python-olefile)))
4080 (arguments
4081 `(#:phases (modify-phases %standard-phases
4082 (add-after
4083 'install 'check-installed
4084 (lambda* (#:key outputs inputs #:allow-other-keys)
4085 (begin
4086 (setenv "HOME" (getcwd))
4087 ;; Make installed package available for running the
4088 ;; tests
4089 (add-installed-pythonpath inputs outputs)
4090 (and (zero? (system* "python" "selftest.py"
4091 "--installed"))
4092 (zero? (system* "python" "test-installed.py"))))))
4093 (delete 'check))))
4094 (home-page "https://pypi.python.org/pypi/Pillow")
4095 (synopsis "Fork of the Python Imaging Library")
4096 (description
4097 "The Python Imaging Library adds image processing capabilities to your
4098Python interpreter. This library provides extensive file format support, an
4099efficient internal representation, and fairly powerful image processing
4100capabilities. The core image library is designed for fast access to data
4101stored in a few basic pixel formats. It should provide a solid foundation for
4102a general image processing tool.")
4103 (license (license:x11-style
4104 "http://www.pythonware.com/products/pil/license.htm"
4105 "The PIL Software License"))))
4106
4107(define-public python2-pillow
4108 (package-with-python2 python-pillow))
4109
4110(define-public python-pycparser
4111 (package
4112 (name "python-pycparser")
4113 (version "2.17")
4114 (source
4115 (origin
4116 (method url-fetch)
4117 (uri (pypi-uri "pycparser" version))
4118 (sha256
4119 (base32
4120 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
4121 (outputs '("out" "doc"))
4122 (build-system python-build-system)
4123 (native-inputs
4124 `(("pkg-config" ,pkg-config)))
4125 (arguments
4126 `(#:phases
4127 (modify-phases %standard-phases
4128 (replace 'check
4129 (lambda _
4130 (with-directory-excursion "tests"
4131 (zero? (system* "python" "all_tests.py")))))
4132 (add-after 'install 'install-doc
4133 (lambda* (#:key outputs #:allow-other-keys)
4134 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4135 (doc (string-append data "/doc/" ,name "-" ,version))
4136 (examples (string-append doc "/examples")))
4137 (mkdir-p examples)
4138 (for-each (lambda (file)
4139 (copy-file (string-append "." file)
4140 (string-append doc file)))
4141 '("/README.rst" "/CHANGES" "/LICENSE"))
4142 (copy-recursively "examples" examples)))))))
4143 (home-page "https://github.com/eliben/pycparser")
4144 (synopsis "C parser in Python")
4145 (description
4146 "Pycparser is a complete parser of the C language, written in pure Python
4147using the PLY parsing library. It parses C code into an AST and can serve as
4148a front-end for C compilers or analysis tools.")
4149 (license license:bsd-3)))
4150
4151(define-public python2-pycparser
4152 (package-with-python2 python-pycparser))
4153
4154(define-public python-xcffib
4155 (package
4156 (name "python-xcffib")
4157 (version "0.5.1")
4158 (source
4159 (origin
4160 (method url-fetch)
4161 (uri (pypi-uri "xcffib" version))
4162 (sha256
4163 (base32
4164 "09gbnmr5vn58mm8xi3fmd7fz6743cks6c46dphnxzwax6zsxmy60"))))
4165 (build-system python-build-system)
4166 (inputs
4167 `(("libxcb" ,libxcb)))
4168 (propagated-inputs
4169 `(("python-cffi" ,python-cffi) ; used at run time
4170 ("python-six" ,python-six)))
4171 (arguments
4172 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4173 #:tests? #f
4174 #:phases
4175 (modify-phases %standard-phases
4176 (add-after 'unpack 'fix-libxcb-path
4177 (lambda* (#:key inputs #:allow-other-keys)
4178 (let ((libxcb (assoc-ref inputs "libxcb")))
4179 (substitute* '("xcffib/__init__.py")
4180 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4181 #t)))
4182 (add-after 'install 'install-doc
4183 (lambda* (#:key outputs #:allow-other-keys)
4184 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4185 "/doc/" ,name "-" ,version)))
4186 (mkdir-p doc)
4187 (copy-file "README.md"
4188 (string-append doc "/README.md"))
4189 #t))))))
4190 (home-page "https://github.com/tych0/xcffib")
4191 (synopsis "XCB Python bindings")
4192 (description
4193 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4194support for Python 3 and PyPy. It is based on cffi.")
4195 (license license:expat)))
4196
4197(define-public python2-xcffib
4198 (package-with-python2 python-xcffib))
4199
4200(define-public python-cairocffi
4201 (package
4202 (name "python-cairocffi")
4203 (version "0.8.0")
4204 (source
4205 (origin
4206 (method url-fetch)
4207 ;; The archive on pypi is missing the 'utils' directory!
4208 (uri (string-append "https://github.com/Kozea/cairocffi/archive/v"
4209 version ".tar.gz"))
4210 (file-name (string-append name "-" version ".tar.gz"))
4211 (sha256
4212 (base32
4213 "1rk2dvy3fxrga6bvvxc2fi5lbaynm5h4a0w0aaxyn3bc77rszjg9"))))
4214 (build-system python-build-system)
4215 (outputs '("out" "doc"))
4216 (inputs
4217 `(("gdk-pixbuf" ,gdk-pixbuf)
4218 ("cairo" ,cairo)))
4219 (native-inputs
4220 `(("pkg-config" ,pkg-config)
4221 ("python-sphinx" ,python-sphinx)
4222 ("python-docutils" ,python-docutils)))
4223 (propagated-inputs
4224 `(("python-xcffib" ,python-xcffib))) ; used at run time
4225 (arguments
4226 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
4227 #:tests? #f
4228 #:phases
4229 (modify-phases %standard-phases
4230 (add-after 'install 'install-doc
4231 (lambda* (#:key inputs outputs #:allow-other-keys)
4232 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4233 (doc (string-append data "/doc/" ,name "-" ,version))
4234 (html (string-append doc "/html")))
4235 (setenv "LD_LIBRARY_PATH"
4236 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4237 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4238 (setenv "LANG" "en_US.UTF-8")
4239 (mkdir-p html)
4240 (for-each (lambda (file)
4241 (copy-file (string-append "." file)
4242 (string-append doc file)))
4243 '("/README.rst" "/CHANGES" "/LICENSE"))
4244 (system* "python" "setup.py" "build_sphinx")
4245 (copy-recursively "docs/_build/html" html)
4246 #t))))))
4247 (home-page "https://github.com/Kozea/cairocffi")
4248 (synopsis "Python bindings and object-oriented API for Cairo")
4249 (description
4250 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4251Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4252graphics library with support for multiple backends including image buffers,
4253PNG, PostScript, PDF, and SVG file output.")
4254 (license license:bsd-3)))
4255
4256(define-public python2-cairocffi
4257 (package-with-python2 python-cairocffi))
4258
4259(define-public python-decorator
4260 (package
4261 (name "python-decorator")
4262 (version "4.2.1")
4263 (source
4264 (origin
4265 (method url-fetch)
4266 (uri (pypi-uri "decorator" version))
4267 (sha256
4268 (base32 "03iaf116rm3w8b4agb8hzf6z9331mrvi4khfxq35zkx17sgxsikx"))))
4269 (build-system python-build-system)
4270 (arguments '(#:tests? #f)) ; no test target
4271 (home-page "https://pypi.python.org/pypi/decorator/")
4272 (synopsis "Python module to simplify usage of decorators")
4273 (description
4274 "The aim of the decorator module is to simplify the usage of decorators
4275for the average programmer, and to popularize decorators usage giving examples
4276of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4277etc. The core of this module is a decorator factory.")
4278 (license license:expat)))
4279
4280(define-public python2-decorator
4281 (package-with-python2 python-decorator))
4282
4283(define-public python-drmaa
4284 (package
4285 (name "python-drmaa")
4286 (version "0.7.7")
4287 (source
4288 (origin
4289 (method url-fetch)
4290 (uri (pypi-uri "drmaa" version))
4291 (sha256
4292 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4293 (build-system python-build-system)
4294 ;; The test suite requires libdrmaa which is provided by the cluster
4295 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4296 ;; should be set to the path of the libdrmaa library.
4297 (arguments '(#:tests? #f))
4298 (native-inputs
4299 `(("python-nose" ,python-nose)))
4300 (home-page "https://pypi.python.org/pypi/drmaa")
4301 (synopsis "Python bindings for the DRMAA library")
4302 (description
4303 "A Python package for Distributed Resource Management (DRM) job
4304submission and control. This package is an implementation of the DRMAA 1.0
4305Python language binding specification.")
4306 (license license:bsd-3)))
4307
4308(define-public python2-drmaa
4309 (package-with-python2 python-drmaa))
4310
4311(define-public python-grako
4312 (package
4313 (name "python-grako")
4314 (version "3.99.9")
4315 (source
4316 (origin
4317 (method url-fetch)
4318 (uri
4319 (pypi-uri "grako" version ".zip"))
4320 (sha256
4321 (base32
4322 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4323 (build-system python-build-system)
4324 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4325 (native-inputs
4326 `(("unzip" ,unzip)
4327 ("python-pytest" ,python-pytest)
4328 ("python-pytest-runner" ,python-pytest-runner)))
4329 (home-page "https://bitbucket.org/neogeny/grako")
4330 (synopsis "EBNF parser generator")
4331 (description
4332 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4333memoizing PEG/Packrat parser in Python.")
4334 (license license:bsd-3)))
4335
4336(define-public python2-grako
4337 (package-with-python2 python-grako))
4338
4339(define-public python-gridmap
4340 (package
4341 (name "python-gridmap")
4342 (version "0.13.0")
4343 (source
4344 (origin
4345 (method url-fetch)
4346 (uri (string-append
4347 "https://github.com/pygridtools/gridmap/archive/v"
4348 version ".tar.gz"))
4349 (file-name (string-append name "-" version ".tar.gz"))
4350 (sha256
4351 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4352 (build-system python-build-system)
4353 (arguments
4354 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4355 (propagated-inputs
4356 `(("python-psutil" ,python-psutil)
4357 ("python-drmaa" ,python-drmaa)
4358 ("python-pyzmq" ,python-pyzmq)))
4359 (home-page "https://github.com/pygridtools/gridmap")
4360 (synopsis "Create jobs on a cluster directly from Python")
4361 (description
4362 "Gridmap is a Python package to allow you to easily create jobs on the
4363cluster directly from Python. You can directly map Python functions onto the
4364cluster without needing to write any wrapper code yourself.")
4365 (license license:gpl3+)))
4366
4367(define-public python2-gridmap
4368 (package-with-python2 python-gridmap))
4369
4370(define-public python-honcho
4371 (package
4372 (name "python-honcho")
4373 (version "1.0.1")
4374 (source
4375 (origin
4376 (method url-fetch)
4377 (uri (string-append
4378 "https://github.com/nickstenning/honcho/archive/v"
4379 version ".tar.gz"))
4380 (file-name (string-append name "-" version ".tar.gz"))
4381 (sha256
4382 (base32 "0zizn61n5z5hq421hkypk9pw8s6fpxw30f4hsg7k4ivwzy3gjw9j"))))
4383 (build-system python-build-system)
4384 (native-inputs
4385 `(("python-pytest" ,python-pytest)
4386 ("python-mock" ,python-mock)
4387 ("python-tox" ,python-tox)
4388 ("which" ,which))) ;for tests
4389 (propagated-inputs
4390 `(("python-jinja2" ,python-jinja2)))
4391 (arguments
4392 `(#:phases
4393 (modify-phases %standard-phases
4394 (delete 'check)
4395 (add-after 'install 'check
4396 (lambda* (#:key outputs inputs #:allow-other-keys)
4397 ;; fix honcho path in testsuite
4398 (substitute* "tests/conftest.py"
4399 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4400 "/bin/honcho" "'")))
4401 ;; It's easier to run tests after install.
4402 ;; Make installed package available for running the tests
4403 (add-installed-pythonpath inputs outputs)
4404 (zero? (system* "py.test" "-v")))))))
4405 (home-page "https://github.com/nickstenning/honcho")
4406 (synopsis "Manage Procfile-based applications")
4407 (description
4408 "A Procfile is a file which describes how to run an application
4409consisting of serveral processes. honcho starts all listed processes.
4410The output of all running processes is collected by honcho and
4411displayed.")
4412 (license license:expat)))
4413
4414(define-public python2-honcho
4415 (package-with-python2 python-honcho))
4416
4417(define-public python-pexpect
4418 (package
4419 (name "python-pexpect")
4420 (version "4.2.1")
4421 (source
4422 (origin
4423 (method url-fetch)
4424 (uri (pypi-uri "pexpect" version))
4425 (sha256
4426 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
4427 (build-system python-build-system)
4428 (arguments
4429 `(#:phases
4430 (modify-phases %standard-phases
4431 (add-before 'check 'prepare-tests
4432 (lambda _
4433 (substitute* (find-files "tests")
4434 (("/bin/ls") (which "ls"))
4435 (("/bin/echo") (which "echo"))
4436 (("/bin/which") (which "which"))
4437 ;; Many tests try to use the /bin directory which
4438 ;; is not present in the build environment.
4439 ;; Use one that's non-empty and unlikely to change.
4440 (("/bin'") "/dev'"))
4441 ;; XXX: Socket connection test gets "Connection reset by peer".
4442 ;; Why does it not work? Delete for now.
4443 (delete-file "tests/test_socket.py")
4444 #t))
4445 (replace 'check (lambda _ (zero? (system* "nosetests" "-v")))))))
4446 (native-inputs
4447 `(("python-nose" ,python-nose)
4448 ("python-pytest" ,python-pytest)
4449 ("man-db" ,man-db)
4450 ("which" ,which)
4451 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4452 (propagated-inputs
4453 `(("python-ptyprocess" ,python-ptyprocess)))
4454 (home-page "http://pexpect.readthedocs.org/")
4455 (synopsis "Controlling interactive console applications")
4456 (description
4457 "Pexpect is a pure Python module for spawning child applications;
4458controlling them; and responding to expected patterns in their output.
4459Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4460child application and control it as if a human were typing commands.")
4461 (license license:isc)))
4462
4463(define-public python2-pexpect
4464 (package-with-python2 python-pexpect))
4465
4466(define-public python-setuptools-scm
4467 (package
4468 (name "python-setuptools-scm")
4469 (version "1.15.6")
4470 (source (origin
4471 (method url-fetch)
4472 (uri (pypi-uri "setuptools_scm" version))
4473 (sha256
4474 (base32
4475 "0pzvfmx8s20yrgkgwfbxaspz2x1g38qv61jpm0ns91lrb22ldas9"))))
4476 (build-system python-build-system)
4477 (home-page "https://github.com/pypa/setuptools_scm/")
4478 (synopsis "Manage Python package versions in SCM metadata")
4479 (description
4480 "Setuptools_scm handles managing your Python package versions in
4481@dfn{software configuration management} (SCM) metadata instead of declaring
4482them as the version argument or in a SCM managed file.")
4483 (license license:expat)))
4484
4485(define-public python2-setuptools-scm
4486 (package-with-python2 python-setuptools-scm))
4487
4488(define-public python-pathpy
4489 (package
4490 (name "python-pathpy")
4491 (version "11.0.1")
4492 (source
4493 (origin
4494 (method url-fetch)
4495 (uri (pypi-uri "path.py" version))
4496 (sha256
4497 (base32 "07x15v8c7ry9bvycw294c9yq6ky9v2b0dalvgi6rn38ilh69vsz7"))))
4498 ;; (outputs '("out" "doc"))
4499 (build-system python-build-system)
4500 (propagated-inputs
4501 `(("python-appdirs" ,python-appdirs)))
4502 (native-inputs
4503 `(("python-setuptools-scm" ,python-setuptools-scm)
4504 ("python-sphinx" ,python-sphinx)
4505 ("python-rst.linker" ,python-rst.linker)
4506 ("python-pytest" ,python-pytest)
4507 ("python-pytest-runner" ,python-pytest-runner)))
4508 (arguments
4509 ;; FIXME: Documentation and tests require "jaraco.packaging".
4510 `(#:tests? #f))
4511 ;; #:phases
4512 ;; (modify-phases %standard-phases
4513 ;; (add-after 'build 'build-doc
4514 ;; (lambda _
4515 ;; (setenv "LANG" "en_US.UTF-8")
4516 ;; (zero? (system* "python" "setup.py" "build_sphinx"))))
4517 ;; (add-after 'install 'install-doc
4518 ;; (lambda* (#:key outputs #:allow-other-keys)
4519 ;; (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4520 ;; (doc (string-append data "/doc/" ,name "-" ,version))
4521 ;; (html (string-append doc "/html")))
4522 ;; (mkdir-p html)
4523 ;; (for-each (lambda (file)
4524 ;; (copy-file file (string-append doc "/" file)))
4525 ;; '("README.rst" "CHANGES.rst"))
4526 ;; (copy-recursively "build/sphinx/html" html)))))))
4527 (home-page "https://github.com/jaraco/path.py")
4528 (synopsis "Python module wrapper for built-in os.path")
4529 (description
4530 "@code{path.py} implements path objects as first-class entities, allowing
4531common operations on files to be invoked on those path objects directly.")
4532 (license license:expat)))
4533
4534(define-public python2-pathpy
4535 (package-with-python2 python-pathpy))
4536
4537(define-public python-simplegeneric
4538 (package
4539 (name "python-simplegeneric")
4540 (version "0.8.1")
4541 (source
4542 (origin
4543 (method url-fetch)
4544 (uri (string-append "https://pypi.python.org/packages/source/s/"
4545 "simplegeneric/simplegeneric-" version ".zip"))
4546 (sha256
4547 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4548 (build-system python-build-system)
4549 (native-inputs
4550 `(("unzip" ,unzip)))
4551 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4552 (synopsis "Python module for simple generic functions")
4553 (description
4554 "The simplegeneric module lets you define simple single-dispatch generic
4555functions, akin to Python’s built-in generic functions like @code{len()},
4556@code{iter()} and so on. However, instead of using specially-named methods,
4557these generic functions use simple lookup tables, akin to those used by
4558e.g. @code{pickle.dump()} and other generic functions found in the Python
4559standard library.")
4560 (license license:zpl2.1)))
4561
4562(define-public python2-simplegeneric
4563 (package-with-python2 python-simplegeneric))
4564
4565(define-public python-ipython-genutils
4566 ;; TODO: This package is retired, check if can be removed, see description.
4567 (package
4568 (name "python-ipython-genutils")
4569 (version "0.1.0")
4570 (source
4571 (origin
4572 (method url-fetch)
4573 (uri (string-append "https://pypi.python.org/packages/source/i/"
4574 "ipython_genutils/ipython_genutils-"
4575 version ".tar.gz"))
4576 (sha256
4577 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4578 (build-system python-build-system)
4579 (arguments `(#:tests? #f)) ; no tests
4580 (home-page "https://ipython.org")
4581 (synopsis "Vestigial utilities from IPython")
4582 (description
4583 "This package provides retired utilities from IPython. No packages
4584outside IPython/Jupyter should depend on it.
4585
4586This package shouldn't exist. It contains some common utilities shared by
4587Jupyter and IPython projects during The Big Split. As soon as possible, those
4588packages will remove their dependency on this, and this package will go
4589away.")
4590 (license license:bsd-3)))
4591
4592(define-public python2-ipython-genutils
4593 (package-with-python2 python-ipython-genutils))
4594
4595(define-public python-traitlets
4596 (package
4597 (name "python-traitlets")
4598 (version "4.2.0")
4599 (source
4600 (origin
4601 (method url-fetch)
4602 (uri (pypi-uri "traitlets" version))
4603 (sha256
4604 (base32
4605 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
4606 (build-system python-build-system)
4607 (arguments
4608 `(#:phases
4609 (modify-phases %standard-phases
4610 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4611 (propagated-inputs
4612 `(("python-ipython-genutils" ,python-ipython-genutils)
4613 ("python-decorator" ,python-decorator)))
4614 (native-inputs
4615 `(("python-mock" ,python-mock)
4616 ("python-nose" ,python-nose)))
4617 (home-page "https://ipython.org")
4618 (synopsis "Configuration system for Python applications")
4619 (description
4620 "Traitlets is a framework that lets Python classes have attributes with
4621type checking, dynamically calculated default values, and ‘on change’
4622callbacks. The package also includes a mechanism to use traitlets for
4623configuration, loading values from files or from command line arguments. This
4624is a distinct layer on top of traitlets, so you can use traitlets in your code
4625without using the configuration machinery.")
4626 (license license:bsd-3)))
4627
4628(define-public python2-traitlets
4629 (package-with-python2 python-traitlets))
4630
4631(define-public python-jupyter-core
4632 (package
4633 (name "python-jupyter-core")
4634 (version "4.4.0")
4635 (source
4636 (origin
4637 (method url-fetch)
4638 (uri (string-append (pypi-uri "jupyter_core" version)))
4639 (sha256
4640 (base32
4641 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
4642 (build-system python-build-system)
4643 ;; FIXME: not sure how to run the tests
4644 (arguments `(#:tests? #f))
4645 (propagated-inputs
4646 `(("python-traitlets" ,python-traitlets)))
4647 (home-page "http://jupyter.org/")
4648 (synopsis "Jupyter base package")
4649 (description
4650 "Jupyter core is the base package on which Jupyter projects rely.")
4651 (license license:bsd-3)))
4652
4653(define-public python2-jupyter-core
4654 (package-with-python2 python-jupyter-core))
4655
4656(define-public python-jupyter-client
4657 (package
4658 (name "python-jupyter-client")
4659 (version "4.4.0")
4660 (source
4661 (origin
4662 (method url-fetch)
4663 (uri (pypi-uri "jupyter_client" version))
4664 (sha256
4665 (base32
4666 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4667 (build-system python-build-system)
4668 ;; Tests fail because of missing native python kernel which I assume is
4669 ;; provided by the ipython package, which we cannot use because it would
4670 ;; cause a dependency cycle.
4671 (arguments `(#:tests? #f))
4672 (propagated-inputs
4673 `(("python-pyzmq" ,python-pyzmq)
4674 ("python-traitlets" ,python-traitlets)
4675 ("python-jupyter-core" ,python-jupyter-core)))
4676 (home-page "http://jupyter.org/")
4677 (synopsis "Jupyter protocol implementation and client libraries")
4678 (description
4679 "The @code{jupyter_client} package contains the reference implementation
4680of the Jupyter protocol. It also provides client and kernel management APIs
4681for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4682installing @code{kernelspec}s for use with Jupyter frontends.")
4683 (license license:bsd-3)))
4684
4685(define-public python2-jupyter-client
4686 (package-with-python2 python-jupyter-client))
4687
4688(define-public python-ipykernel
4689 (package
4690 (name "python-ipykernel")
4691 (version "4.5.2")
4692 (source
4693 (origin
4694 (method url-fetch)
4695 (uri (pypi-uri "ipykernel" version))
4696 (sha256
4697 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
4698 (build-system python-build-system)
4699 ;; The tests load a submodule of IPython. However, IPython itself depends
4700 ;; on ipykernel.
4701 (arguments `(#:tests? #f))
4702 (propagated-inputs
4703 ;; imported at runtime during connect
4704 `(("python-jupyter-client" ,python-jupyter-client)))
4705 (home-page "https://ipython.org")
4706 (synopsis "IPython Kernel for Jupyter")
4707 (description
4708 "This package provides the IPython kernel for Jupyter.")
4709 (license license:bsd-3)))
4710
4711(define-public python2-ipykernel
4712 (package-with-python2 python-ipykernel))
4713
4714(define-public python-ipython
4715 (package
4716 (name "python-ipython")
4717 (version "5.5.0")
4718 (source
4719 (origin
4720 (method url-fetch)
4721 (uri (pypi-uri "ipython" version ".tar.gz"))
4722 (sha256
4723 (base32 "03qmzpfy00if10i9k8fjkam1s4xg22j73f933x5d228z9n4rwik6"))))
4724 (build-system python-build-system)
4725 (outputs '("out" "doc"))
4726 (propagated-inputs
4727 `(("python-pyzmq" ,python-pyzmq)
4728 ("python-prompt-toolkit" ,python-prompt-toolkit)
4729 ("python-terminado" ,python-terminado)
4730 ("python-matplotlib" ,python-matplotlib)
4731 ("python-numpy" ,python-numpy)
4732 ("python-numpydoc" ,python-numpydoc)
4733 ("python-jinja2" ,python-jinja2)
4734 ("python-jupyter-console"
4735 ;; The python-ipython and python-jupyter-console require each
4736 ;; other. To get the functionality in both packages working, strip
4737 ;; down the python-jupyter-console package when using it as an input
4738 ;; to python-ipython.
4739 ,python-jupyter-console-minimal)
4740 ("python-mistune" ,python-mistune)
4741 ("python-pexpect" ,python-pexpect)
4742 ("python-pickleshare" ,python-pickleshare)
4743 ("python-simplegeneric" ,python-simplegeneric)
4744 ("python-jsonschema" ,python-jsonschema)
4745 ("python-traitlets" ,python-traitlets)
4746 ("python-ipykernel" ,python-ipykernel)
4747 ("python-nbformat" ,python-nbformat)
4748 ("python-pygments" ,python-pygments)))
4749 (inputs
4750 `(("readline" ,readline)
4751 ("which" ,which)))
4752 (native-inputs
4753 `(("graphviz" ,graphviz)
4754 ("pkg-config" ,pkg-config)
4755 ("python-requests" ,python-requests) ;; for tests
4756 ("python-testpath" ,python-testpath)
4757 ("python-nose" ,python-nose)
4758 ("python-sphinx" ,python-sphinx)
4759 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
4760 ;; FIXME: It's possible that a smaller union would work just as well.
4761 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
4762 texlive-fonts-ec
4763 texlive-generic-ifxetex
4764 texlive-generic-pdftex
4765 texlive-latex-amsfonts
4766 texlive-latex-capt-of
4767 texlive-latex-cmap
4768 texlive-latex-environ
4769 texlive-latex-eqparbox
4770 texlive-latex-etoolbox
4771 texlive-latex-expdlist
4772 texlive-latex-fancyhdr
4773 texlive-latex-fancyvrb
4774 texlive-latex-fncychap
4775 texlive-latex-float
4776 texlive-latex-framed
4777 texlive-latex-geometry
4778 texlive-latex-graphics
4779 texlive-latex-hyperref
4780 texlive-latex-mdwtools
4781 texlive-latex-multirow
4782 texlive-latex-oberdiek
4783 texlive-latex-parskip
4784 texlive-latex-preview
4785 texlive-latex-tabulary
4786 texlive-latex-threeparttable
4787 texlive-latex-titlesec
4788 texlive-latex-trimspaces
4789 texlive-latex-ucs
4790 texlive-latex-upquote
4791 texlive-latex-url
4792 texlive-latex-varwidth
4793 texlive-latex-wrapfig)))
4794 ("texinfo" ,texinfo)))
4795 (arguments
4796 `(#:phases
4797 (modify-phases %standard-phases
4798 (add-after
4799 'install 'install-doc
4800 (lambda* (#:key inputs outputs #:allow-other-keys)
4801 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4802 (doc (string-append data "/doc/" ,name "-" ,version))
4803 (html (string-append doc "/html"))
4804 (man1 (string-append data "/man/man1"))
4805 (info (string-append data "/info"))
4806 (examples (string-append doc "/examples"))
4807 (python-arg (string-append "PYTHON=" (which "python"))))
4808 (setenv "LANG" "en_US.utf8")
4809 ;; Make installed package available for running the tests
4810 (add-installed-pythonpath inputs outputs)
4811 (with-directory-excursion "docs"
4812 ;; FIXME: pdf fails to build
4813 ;;(system* "make" "pdf" "PAPER=a4")
4814 (system* "make" python-arg "html")
4815 (system* "make" python-arg "info"))
4816 (copy-recursively "docs/man" man1)
4817 (copy-recursively "examples" examples)
4818 (copy-recursively "docs/build/html" html)
4819 ;; (copy-file "docs/build/latex/ipython.pdf"
4820 ;; (string-append doc "/ipython.pdf"))
4821 (mkdir-p info)
4822 (copy-file "docs/build/texinfo/ipython.info"
4823 (string-append info "/ipython.info"))
4824 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4825 ;; Tests can only be run after the library has been installed and not
4826 ;; within the source directory.
4827 (delete 'check)
4828 (add-after
4829 'install 'check
4830 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4831 (if tests?
4832 (with-directory-excursion "/tmp"
4833 ;; Make installed package available for running the tests
4834 (add-installed-pythonpath inputs outputs)
4835 (setenv "HOME" "/tmp/") ;; required by a test
4836 (zero? (system* (string-append (assoc-ref outputs "out")
4837 "/bin/iptest"))))
4838 #t)))
4839 (add-before
4840 'install 'fix-tests
4841 (lambda* (#:key inputs #:allow-other-keys)
4842 (substitute* "./IPython/utils/_process_posix.py"
4843 (("/usr/bin/env', 'which") (which "which")))
4844 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4845 (("#!/usr/bin/env python")
4846 (string-append "#!" (which "python"))))
4847 ;; Disable 1 failing test
4848 (substitute* "./IPython/core/tests/test_magic.py"
4849 (("def test_dirops\\(\\):" all)
4850 (string-append "@dec.skipif(True)\n" all))))))))
4851 (home-page "https://ipython.org")
4852 (synopsis "IPython is a tool for interactive computing in Python")
4853 (description
4854 "IPython provides a rich architecture for interactive computing with:
4855Powerful interactive shells, a browser-based notebook, support for interactive
4856data visualization, embeddable interpreters and tools for parallel
4857computing.")
4858 (license license:bsd-3)
4859 (properties `((python2-variant . ,(delay python2-ipython))))))
4860
4861(define-public python2-ipython
4862 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4863 (package
4864 (inherit ipython)
4865 ;; FIXME: add pyreadline once available.
4866 (propagated-inputs
4867 `(("python2-backports-shutil-get-terminal-size"
4868 ,python2-backports-shutil-get-terminal-size)
4869 ("python2-pathlib2" ,python2-pathlib2)
4870 ,@(package-propagated-inputs ipython)))
4871 (native-inputs
4872 `(("python2-mock" ,python2-mock)
4873 ,@(package-native-inputs ipython))))))
4874
4875(define-public python-urwid
4876 (package
4877 (name "python-urwid")
4878 (version "2.0.1")
4879 (source
4880 (origin
4881 (method url-fetch)
4882 (uri (pypi-uri "urwid" version))
4883 (sha256
4884 (base32
4885 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
4886 (build-system python-build-system)
4887 (home-page "http://urwid.org")
4888 (synopsis "Console user interface library for Python")
4889 (description
4890 "Urwid is a curses-based UI/widget library for Python. It includes many
4891features useful for text console applications.")
4892 (license license:lgpl2.1+)))
4893
4894(define-public python2-urwid
4895 (package-with-python2 python-urwid))
4896
4897(define-public python-urwidtrees
4898 (package
4899 (name "python-urwidtrees")
4900 (version "1.0.2")
4901 (source
4902 (origin
4903 (method url-fetch)
4904 ;; package author intends on distributing via github rather than pypi:
4905 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4906 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4907 version ".tar.gz"))
4908 (file-name (string-append name "-" version ".tar.gz"))
4909 (sha256
4910 (base32
4911 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
4912 (build-system python-build-system)
4913 (arguments
4914 '(#:tests? #f)) ; no tests
4915 (propagated-inputs `(("python-urwid" ,python-urwid)))
4916 (home-page "https://github.com/pazz/urwidtrees")
4917 (synopsis "Tree widgets for urwid")
4918 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4919toolkit. Use it to build trees of widgets.")
4920 (license license:gpl3+)))
4921
4922(define-public python2-urwidtrees
4923 (package-with-python2 python-urwidtrees))
4924
4925(define-public python-dbus
4926 (package
4927 (name "python-dbus")
4928 (version "1.2.0")
4929 (source
4930 (origin
4931 (method url-fetch)
4932 (uri (string-append
4933 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
4934 version ".tar.gz"))
4935 (sha256
4936 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
4937 (build-system gnu-build-system)
4938 (arguments
4939 '(#:phases
4940 (modify-phases %standard-phases
4941 (add-before
4942 'check 'pre-check
4943 (lambda _
4944 ;; XXX: For the missing '/etc/machine-id'.
4945 (substitute* "test/run-test.sh"
4946 (("DBUS_FATAL_WARNINGS=1")
4947 "DBUS_FATAL_WARNINGS=0"))
4948 #t)))))
4949 (native-inputs
4950 `(("pkg-config" ,pkg-config)))
4951 (inputs
4952 `(("python" ,python)
4953 ("dbus-glib" ,dbus-glib)))
4954 (synopsis "Python bindings for D-bus")
4955 (description "python-dbus provides bindings for libdbus, the reference
4956implementation of D-Bus.")
4957 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
4958 (license license:expat)))
4959
4960(define-public python2-dbus
4961 (package (inherit python-dbus)
4962 (name "python2-dbus")
4963 (inputs `(("python" ,python-2)
4964 ,@(alist-delete "python"
4965 (package-inputs python-dbus)
4966 equal?)))
4967 ;; FIXME: on Python 2, the test_utf8 fails with:
4968 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4969 (arguments `(#:tests? #f))))
4970
4971(define-public python-lxml
4972 (package
4973 (name "python-lxml")
4974 (version "3.8.0")
4975 (source
4976 (origin
4977 (method url-fetch)
4978 (uri (pypi-uri "lxml" version))
4979 (sha256
4980 (base32
4981 "15nvf6n285n282682qyw3wihsncb0x5amdhyi4b83bfa2nz74vvk"))))
4982 (build-system python-build-system)
4983 (inputs
4984 `(("libxml2" ,libxml2)
4985 ("libxslt" ,libxslt)))
4986 (home-page "http://lxml.de/")
4987 (synopsis
4988 "Python XML processing library")
4989 (description
4990 "The lxml XML toolkit is a Pythonic binding for the C libraries
4991libxml2 and libxslt.")
4992 (license license:bsd-3))) ; and a few more, see LICENSES.txt
4993
4994(define-public python2-lxml
4995 (package-with-python2 python-lxml))
4996
4997;; beautifulsoup4 has a totally different namespace than 3.x,
4998;; and pypi seems to put it under its own name, so I guess we should too
4999(define-public python-beautifulsoup4
5000 (package
5001 (name "python-beautifulsoup4")
5002 (version "4.5.3")
5003 (source
5004 (origin
5005 (method url-fetch)
5006 (uri (pypi-uri "beautifulsoup4" version))
5007 (sha256
5008 (base32
5009 "0glaw1vyxnbp03fni7h5496n6iib0n5iim4gax1n0ngscs9s075j"))))
5010 (build-system python-build-system)
5011 (arguments
5012 `(#:phases
5013 (modify-phases %standard-phases
5014 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5015 ;; must use this conversion script when building with Python 3. The
5016 ;; conversion script also runs the tests.
5017 ;; For more information, see the file 'convert-py3k' in the source
5018 ;; distribution.
5019 (replace 'check
5020 (lambda _ (zero? (system* "./convert-py3k")))))))
5021 (home-page
5022 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5023 (synopsis
5024 "Python screen-scraping library")
5025 (description
5026 "Beautiful Soup is a Python library designed for rapidly setting up
5027screen-scraping projects. It offers Pythonic idioms for navigating,
5028searching, and modifying a parse tree, providing a toolkit for
5029dissecting a document and extracting what you need. It automatically
5030converts incoming documents to Unicode and outgoing documents to UTF-8.")
5031 (license license:expat)
5032 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5033
5034(define-public python2-beautifulsoup4
5035 (package
5036 (inherit (package-with-python2
5037 (strip-python2-variant python-beautifulsoup4)))
5038 (arguments `(#:python ,python-2))))
5039
5040(define-public python-netifaces
5041 (package
5042 (name "python-netifaces")
5043 (version "0.10.7")
5044 (source
5045 (origin
5046 (method url-fetch)
5047 (uri (pypi-uri "netifaces" version))
5048 (sha256
5049 (base32
5050 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5051 (build-system python-build-system)
5052 (home-page "https://github.com/al45tair/netifaces")
5053 (synopsis
5054 "Python module for portable network interface information")
5055 (description
5056 "Netifaces is a Python module providing information on network
5057interfaces in an easy and portable manner.")
5058 (license license:expat)))
5059
5060(define-public python2-netifaces
5061 (package-with-python2 python-netifaces))
5062
5063(define-public python-networkx
5064 (package
5065 (name "python-networkx")
5066 (version "2.1")
5067 (source
5068 (origin
5069 (method url-fetch)
5070 (uri (pypi-uri "networkx" version ".zip"))
5071 (sha256
5072 (base32 "1ccb8mfz4m821k9y0cigkbq42q2sbb4dj5fbjshp0awp32j2q9v4"))))
5073 (build-system python-build-system)
5074 ;; python-decorator is needed at runtime
5075 (propagated-inputs
5076 `(("python-decorator" ,python-decorator)))
5077 (native-inputs
5078 `(("python-nose" ,python-nose)
5079 ("unzip" ,unzip)))
5080 (home-page "http://networkx.github.io/")
5081 (synopsis "Python module for creating and manipulating graphs and networks")
5082 (description
5083 "NetworkX is a Python package for the creation, manipulation, and study
5084of the structure, dynamics, and functions of complex networks.")
5085 (license license:bsd-3)))
5086
5087(define-public python2-networkx
5088 (package-with-python2 python-networkx))
5089
5090;; Define new package, because the current version of python-colormath does
5091;; not build against 2.0.
5092(define-public python-networkx2
5093 (package (inherit python-networkx)
5094 (name "python-networkx2")
5095 (version "2.0")
5096 (source
5097 (origin
5098 (method url-fetch)
5099 (uri (pypi-uri "networkx" version ".zip"))
5100 (sha256
5101 (base32
5102 "1ajl2jp8qry9nyjzzkqpy0vmsr14d23z1qk7y0vr5iwjbpvzhpyd"))
5103 (patches
5104 (search-patches "python-networkx2-reproducible-build.patch"))))))
5105
5106(define-public python2-networkx2
5107 (package-with-python2 python-networkx2))
5108
5109(define-public snakemake
5110 (package
5111 (name "snakemake")
5112 (version "4.4.0")
5113 (source
5114 (origin
5115 (method url-fetch)
5116 (uri (pypi-uri "snakemake" version))
5117 (sha256
5118 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5119 (build-system python-build-system)
5120 (arguments
5121 ;; TODO: Package missing test dependencies.
5122 '(#:tests? #f
5123 #:phases
5124 (modify-phases %standard-phases
5125 ;; For cluster execution Snakemake will call Python. Since there is
5126 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5127 ;; this by calling the snakemake wrapper instead.
5128 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5129 (lambda* (#:key outputs #:allow-other-keys)
5130 (substitute* "snakemake/executors.py"
5131 (("\\{sys.executable\\} -m snakemake")
5132 (string-append (assoc-ref outputs "out")
5133 "/bin/snakemake")))
5134 #t)))))
5135 (propagated-inputs
5136 `(("python-wrapt" ,python-wrapt)
5137 ("python-requests" ,python-requests)
5138 ("python-appdirs" ,python-appdirs)
5139 ("python-configargparse" ,python-configargparse)
5140 ("python-pyyaml" ,python-pyyaml)
5141 ("python-ratelimiter" ,python-ratelimiter)))
5142 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
5143 (synopsis "Python-based execution environment for make-like workflows")
5144 (description
5145 "Snakemake aims to reduce the complexity of creating workflows by
5146providing a clean and modern domain specific specification language (DSL) in
5147Python style, together with a fast and comfortable execution environment.")
5148 (license license:expat)))
5149
5150(define-public python-pyqrcode
5151 (package
5152 (name "python-pyqrcode")
5153 (version "1.2.1")
5154 (source
5155 (origin
5156 (method url-fetch)
5157 (uri (pypi-uri "PyQRCode" version))
5158 (sha256
5159 (base32
5160 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5161 (build-system python-build-system)
5162 (home-page
5163 "https://github.com/mnooner256/pyqrcode")
5164 (synopsis "QR code generator")
5165 (description
5166 "Pyqrcode is a QR code generator written purely in Python with
5167SVG, EPS, PNG and terminal output.")
5168 (license license:bsd-3)))
5169
5170(define-public python-seaborn
5171 (package
5172 (name "python-seaborn")
5173 (version "0.7.1")
5174 (source
5175 (origin
5176 (method url-fetch)
5177 (uri (pypi-uri "seaborn" version))
5178 (sha256
5179 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
5180 (build-system python-build-system)
5181 (arguments
5182 '(#:tests? #f)) ; Tests requires a running X11 server.
5183 (propagated-inputs
5184 `(("python-pandas" ,python-pandas)
5185 ("python-matplotlib" ,python-matplotlib)
5186 ("python-scipy" ,python-scipy)))
5187 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5188 (synopsis "Statistical data visualization")
5189 (description
5190 "Seaborn is a library for making attractive and informative statistical
5191graphics in Python. It is built on top of matplotlib and tightly integrated
5192with the PyData stack, including support for numpy and pandas data structures
5193and statistical routines from scipy and statsmodels.")
5194 (license license:bsd-3)
5195 (properties `((python2-variant . ,(delay python2-seaborn))))))
5196
5197(define-public python2-seaborn
5198 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5199 (package
5200 (inherit base)
5201 (propagated-inputs `(("python2-pytz" ,python2-pytz)
5202 ,@(package-propagated-inputs base))))))
5203
5204(define-public python-mpmath
5205 (package
5206 (name "python-mpmath")
5207 (version "0.19")
5208 (source (origin
5209 (method url-fetch)
5210 (uri (string-append "http://mpmath.org/files/mpmath-"
5211 version ".tar.gz"))
5212 (sha256
5213 (base32
5214 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5215 (build-system python-build-system)
5216 (arguments
5217 '(#:phases
5218 (modify-phases %standard-phases
5219 (replace 'check
5220 (lambda _
5221 (zero?
5222 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
5223 (home-page "http://mpmath.org")
5224 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5225 (description
5226 "@code{mpmath} can be used as an arbitrary-precision substitute for
5227Python's float/complex types and math/cmath modules, but also does much
5228more advanced mathematics.")
5229 (license license:bsd-3)))
5230
5231(define-public python2-mpmath
5232 (package-with-python2 python-mpmath))
5233
5234(define-public python-bigfloat
5235 (package
5236 (name "python-bigfloat")
5237 (version "0.3.0")
5238 (source
5239 (origin
5240 (method url-fetch)
5241 (uri (pypi-uri "bigfloat" version))
5242 (sha256
5243 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
5244 (build-system python-build-system)
5245 (inputs
5246 `(("mpfr" ,mpfr)))
5247 (home-page "https://github.com/mdickinson/bigfloat")
5248 (synopsis "Arbitrary precision floating-point arithmetic for Python")
5249 (description
5250 "This packages provides a Python interface to the MPFR library for
5251multiprecision arithmetic.")
5252 (license license:lgpl3+)))
5253
5254(define-public python2-bigfloat
5255 (package-with-python2 python-bigfloat))
5256
5257(define-public python-sympy
5258 (package
5259 (name "python-sympy")
5260 (version "1.1.1")
5261 (source
5262 (origin
5263 (method url-fetch)
5264 (uri (string-append
5265 "https://github.com/sympy/sympy/releases/download/sympy-"
5266 version "/sympy-" version ".tar.gz"))
5267 (sha256
5268 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
5269 (build-system python-build-system)
5270 (arguments
5271 `(#:phases
5272 (modify-phases %standard-phases
5273 ;; Run the core tests after installation. By default it would run
5274 ;; *all* tests, which take a very long time to complete and are known
5275 ;; to be flaky.
5276 (delete 'check)
5277 (add-after 'install 'check
5278 (lambda* (#:key outputs #:allow-other-keys)
5279 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
5280 #t)))))
5281 (propagated-inputs
5282 `(("python-mpmath" ,python-mpmath)))
5283 (home-page "http://www.sympy.org/")
5284 (synopsis "Python library for symbolic mathematics")
5285 (description
5286 "SymPy is a Python library for symbolic mathematics. It aims to become a
5287full-featured computer algebra system (CAS) while keeping the code as simple
5288as possible in order to be comprehensible and easily extensible.")
5289 (license license:bsd-3)))
5290
5291(define-public python2-sympy
5292 (package
5293 (inherit (package-with-python2 python-sympy))
5294 (arguments
5295 `(#:phases
5296 (modify-phases %standard-phases
5297 ;; Run the core tests after installation. By default it would run
5298 ;; *all* tests, which take a very long time to complete and are known
5299 ;; to be flaky.
5300 (delete 'check)
5301 (add-after 'install 'check
5302 (lambda* (#:key outputs #:allow-other-keys)
5303 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
5304 #t)))))))
5305
5306(define-public python-q
5307 (package
5308 (name "python-q")
5309 (version "2.6")
5310 (source
5311 (origin
5312 (method url-fetch)
5313 (uri (pypi-uri "q" version))
5314 (sha256
5315 (base32
5316 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5317 (build-system python-build-system)
5318 (home-page "https://github.com/zestyping/q")
5319 (synopsis "Quick-and-dirty debugging output for tired programmers")
5320 (description
5321 "q is a Python module for \"print\" style of debugging Python code. It
5322provides convenient short API for print out of values, tracebacks, and
5323falling into the Python interpreter.")
5324 (license license:asl2.0)))
5325
5326(define-public python2-q
5327 (package-with-python2 python-q))
5328
5329(define-public python2-xlib
5330 (package
5331 (name "python2-xlib")
5332 (version "0.14")
5333 (source (origin
5334 (method url-fetch)
5335 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5336 "/" version "/"
5337 "python-xlib-" version ".tar.gz"))
5338 (sha256
5339 (base32
5340 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5341 (build-system python-build-system)
5342 (arguments
5343 `(#:python ,python-2 ;Python 2 only
5344 #:tests? #f)) ;no tests
5345 (home-page "http://python-xlib.sourceforge.net/")
5346 (synopsis "Python X11 client library")
5347 (description
5348 "The Python X Library is intended to be a fully functional X client
5349library for Python programs. It is useful to implement low-level X clients.
5350It is written entirely in Python.")
5351 (license license:gpl2+)))
5352
5353(define-public python-singledispatch
5354 (package
5355 (name "python-singledispatch")
5356 (version "3.4.0.3")
5357 (source
5358 (origin
5359 (method url-fetch)
5360 (uri (pypi-uri "singledispatch" version))
5361 (sha256
5362 (base32
5363 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5364 (build-system python-build-system)
5365 (native-inputs
5366 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5367 (home-page
5368 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5369 (synopsis "Backport of singledispatch feature from Python 3.4")
5370 (description
5371 "This library brings functools.singledispatch from Python 3.4 to Python
53722.6-3.3.")
5373 (license license:expat)))
5374
5375(define-public python2-singledispatch
5376 (package-with-python2 python-singledispatch))
5377
5378;; the python- version can be removed with python-3.5
5379(define-public python-backports-abc
5380 (package
5381 (name "python-backports-abc")
5382 (version "0.5")
5383 (source
5384 (origin
5385 (method url-fetch)
5386 (uri (pypi-uri "backports_abc" version))
5387 (sha256
5388 (base32
5389 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5390 (build-system python-build-system)
5391 (home-page "https://github.com/cython/backports_abc")
5392 (synopsis "Backport of additions to the 'collections.abc' module")
5393 (description
5394 "Python-backports-abc provides a backport of additions to the
5395'collections.abc' module in Python-3.5.")
5396 (license license:psfl)))
5397
5398(define-public python2-backports-abc
5399 (package-with-python2 python-backports-abc))
5400
5401(define-public python-backports-csv
5402 (package
5403 (name "python-backports-csv")
5404 (version "1.0.5")
5405 (source
5406 (origin
5407 (method url-fetch)
5408 (uri (pypi-uri "backports.csv" version))
5409 (sha256
5410 (base32
5411 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
5412 (build-system python-build-system)
5413 (home-page "https://github.com/ryanhiebert/backports.csv")
5414 (synopsis "Backport of Python 3's csv module for Python 2")
5415 (description
5416 "Provides a backport of Python 3's @code{csv} module for parsing
5417comma separated values. The API of the @code{csv} module in Python 2
5418is drastically different from the @code{csv} module in Python 3.
5419This is due, for the most part, to the difference between str in
5420Python 2 and Python 3.")
5421 (license license:psfl)))
5422
5423(define-public python2-backports-csv
5424 (package-with-python2 python-backports-csv))
5425
5426(define-public python2-backports-shutil-get-terminal-size
5427 (package
5428 (name "python2-backports-shutil-get-terminal-size")
5429 (version "1.0.0")
5430 (source
5431 (origin
5432 (method url-fetch)
5433 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
5434 (sha256
5435 (base32
5436 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
5437 (build-system python-build-system)
5438 (arguments
5439 `(#:python ,python-2
5440 #:phases
5441 (modify-phases %standard-phases
5442 (replace 'check
5443 (lambda _
5444 (zero? (system* "py.test" "-v")))))))
5445 (native-inputs
5446 `(("python2-pytest" ,python2-pytest)))
5447 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
5448 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
5449 (description
5450 "This package provides a backport of the @code{get_terminal_size
5451function} from Python 3.3's @code{shutil}.
5452Unlike the original version it is written in pure Python rather than C,
5453so it might be a tiny bit slower.")
5454 (license license:expat)))
5455
5456(define-public python-waf
5457 (package
5458 (name "python-waf")
5459 (version "1.9.8")
5460 (source (origin
5461 (method url-fetch)
5462 (uri (string-append "https://waf.io/"
5463 "waf-" version ".tar.bz2"))
5464 (sha256
5465 (base32
5466 "0wl4cnmp06lfxqjxaan58bqxn27smhydz0sg5prrfbl3bsw4gv6q"))))
5467 (build-system python-build-system)
5468 (arguments
5469 '(#:phases
5470 (modify-phases %standard-phases
5471 (replace 'build
5472 (lambda _
5473 (invoke "python" "waf-light" "configure" "build")))
5474 (replace 'check
5475 (lambda _
5476 (invoke "python" "waf" "--version")))
5477 (replace 'install
5478 (lambda _
5479 (copy-file "waf" %output)
5480 #t)))))
5481 (home-page "https://waf.io/")
5482 (synopsis "Python-based build system")
5483 (description
5484 "Waf is a Python-based framework for configuring, compiling and installing
5485applications.")
5486 (license license:bsd-3)))
5487
5488(define-public python2-waf
5489 (package-with-python2 python-waf))
5490
5491(define-public python-pyzmq
5492 (package
5493 (name "python-pyzmq")
5494 (version "15.1.0")
5495 (source
5496 (origin
5497 (method url-fetch)
5498 (uri (pypi-uri "pyzmq" version))
5499 (sha256
5500 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
5501 (build-system python-build-system)
5502 (arguments
5503 `(#:configure-flags
5504 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5505 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5506 ;; --inplace' for 'python setup.py test' to work.
5507 #:tests? #f))
5508 (inputs
5509 `(("zeromq" ,zeromq)))
5510 (native-inputs
5511 `(("pkg-config" ,pkg-config)
5512 ("python-nose" ,python-nose)))
5513 (home-page "https://github.com/zeromq/pyzmq")
5514 (synopsis "Python bindings for 0MQ")
5515 (description
5516 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5517 (license license:bsd-4)))
5518
5519(define-public python2-pyzmq
5520 (package-with-python2 python-pyzmq))
5521
5522(define-public python-pep8
5523 (package
5524 (name "python-pep8")
5525 (version "1.7.0")
5526 (source
5527 (origin
5528 (method url-fetch)
5529 (uri (pypi-uri "pep8" version))
5530 (sha256
5531 (base32
5532 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5533 (build-system python-build-system)
5534 (home-page "http://pep8.readthedocs.org/")
5535 (synopsis "Python style guide checker")
5536 (description
5537 "This tools checks Python code against some of the style conventions in
5538PEP 8.")
5539 (license license:expat)))
5540
5541(define-public python2-pep8
5542 (package-with-python2 python-pep8))
5543
5544(define-public python-pyflakes
5545 (package
5546 (name "python-pyflakes")
5547 (version "1.5.0")
5548 (source
5549 (origin
5550 (method url-fetch)
5551 (uri (pypi-uri "pyflakes" version))
5552 (sha256
5553 (base32
5554 "1x1pcca4a24k4pw8x1c77sgi58cg1wl2k38mp8a25k608pzls3da"))))
5555 (build-system python-build-system)
5556 (home-page
5557 "https://github.com/pyflakes/pyflakes")
5558 (synopsis "Passive checker of Python programs")
5559 (description
5560 "Pyflakes statically checks Python source code for common errors.")
5561 (license license:expat)))
5562
5563(define-public python2-pyflakes
5564 (package-with-python2 python-pyflakes))
5565
5566(define-public python-mccabe
5567 (package
5568 (name "python-mccabe")
5569 (version "0.6.1")
5570 (source
5571 (origin
5572 (method url-fetch)
5573 (uri (pypi-uri "mccabe" version))
5574 (sha256
5575 (base32
5576 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
5577 (build-system python-build-system)
5578 (native-inputs
5579 `(("python-pytest" ,python-pytest-bootstrap)
5580 ("python-pytest-runner" ,python-pytest-runner)))
5581 (home-page "https://github.com/flintwork/mccabe")
5582 (synopsis "McCabe checker, plugin for flake8")
5583 (description
5584 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5585complexity of Python source code.")
5586 (license license:expat)))
5587
5588(define-public python2-mccabe
5589 (package-with-python2 python-mccabe))
5590
5591(define-public python-mccabe-0.2.1
5592 (package (inherit python-mccabe)
5593 (version "0.2.1")
5594 (source
5595 (origin
5596 (method url-fetch)
5597 (uri (pypi-uri "mccabe" version))
5598 (sha256
5599 (base32
5600 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5601
5602(define-public python2-mccabe-0.2.1
5603 (package-with-python2 python-mccabe-0.2.1))
5604
5605;; Flake8 2.4.1 requires an older version of pep8.
5606;; This should be removed ASAP.
5607(define-public python-pep8-1.5.7
5608 (package (inherit python-pep8)
5609 (version "1.5.7")
5610 (source
5611 (origin
5612 (method url-fetch)
5613 (uri (string-append
5614 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5615 version
5616 ".tar.gz"))
5617 (sha256
5618 (base32
5619 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
5620 (arguments
5621 ;; XXX Tests not compatible with Python 3.5.
5622 '(#:tests? #f))))
5623
5624(define-public python2-pep8-1.5.7
5625 (package-with-python2 python-pep8-1.5.7))
5626
5627;; Flake8 2.4.1 requires an older version of pyflakes.
5628;; This should be removed ASAP.
5629(define-public python-pyflakes-0.8.1
5630 (package (inherit python-pyflakes)
5631 (version "0.8.1")
5632 (source
5633 (origin
5634 (method url-fetch)
5635 (uri (string-append
5636 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5637 version
5638 ".tar.gz"))
5639 (sha256
5640 (base32
5641 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
5642 (arguments
5643 ;; XXX Tests not compatible with Python 3.5.
5644 '(#:tests? #f))))
5645
5646(define-public python2-pyflakes-0.8.1
5647 (package-with-python2 python-pyflakes-0.8.1))
5648
5649(define-public python-flake8
5650 (package
5651 (name "python-flake8")
5652 (version "3.4.1")
5653 (source
5654 (origin
5655 (method url-fetch)
5656 (uri (pypi-uri "flake8" version))
5657 (sha256
5658 (base32
5659 "1n0i38592vy3q0x2a9bf8z6rhhn04i30wsn5i5zzcj7qkxvl8062"))))
5660 (build-system python-build-system)
5661 (arguments
5662 `(#:phases
5663 (modify-phases %standard-phases
5664 (delete 'check)
5665 (add-after 'install 'check
5666 (lambda* (#:key inputs outputs #:allow-other-keys)
5667 (add-installed-pythonpath inputs outputs)
5668 (zero? (system* "pytest" "-v")))))))
5669 (propagated-inputs
5670 `(("python-pycodestyle" ,python-pycodestyle)
5671 ("python-pyflakes" ,python-pyflakes)
5672 ;; flake8 depends on a newer setuptools than provided by python.
5673 ("python-setuptools" ,python-setuptools)
5674 ("python-mccabe" ,python-mccabe)))
5675 (native-inputs
5676 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
5677 ("python-pytest" ,python-pytest-bootstrap)
5678 ("python-pytest-runner" ,python-pytest-runner)))
5679 (home-page "https://gitlab.com/pycqa/flake8")
5680 (synopsis
5681 "The modular source code checker: pep8, pyflakes and co")
5682 (description
5683 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5684 (properties `((python2-variant . ,(delay python2-flake8))))
5685 (license license:expat)))
5686
5687(define-public python2-flake8
5688 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
5689 (package (inherit base)
5690 (propagated-inputs
5691 `(("python2-configparser" ,python2-configparser)
5692 ("python2-enum34" ,python2-enum34)
5693 ,@(package-propagated-inputs base))))))
5694
5695;; python-hacking requires flake8 <2.6.0.
5696(define-public python-flake8-2.5
5697 (package
5698 (inherit python-flake8)
5699 (version "2.5.5")
5700 (source (origin
5701 (method url-fetch)
5702 (uri (pypi-uri "flake8" version))
5703 (sha256
5704 (base32
5705 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
5706 (propagated-inputs
5707 `(("python-pep8" ,python-pep8)
5708 ,@(package-propagated-inputs python-flake8)))
5709 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
5710
5711(define-public python2-flake8-2.5
5712 (package
5713 (inherit python2-flake8)
5714 (version (package-version python-flake8-2.5))
5715 (source (origin
5716 (inherit (package-source python-flake8-2.5))))
5717 (propagated-inputs
5718 `(("python2-pep8" ,python2-pep8)
5719 ,@(package-propagated-inputs python2-flake8)))))
5720
5721(define-public python-flake8-polyfill
5722 (package
5723 (name "python-flake8-polyfill")
5724 (version "1.0.2")
5725 (source
5726 (origin
5727 (method url-fetch)
5728 (uri (pypi-uri "flake8-polyfill" version))
5729 (sha256
5730 (base32
5731 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
5732 (build-system python-build-system)
5733 (arguments
5734 '(#:phases
5735 (modify-phases %standard-phases
5736 (replace 'check
5737 (lambda _
5738 (setenv "PYTHONPATH"
5739 (string-append (getcwd) "/build/lib:"
5740 (getenv "PYTHONPATH")))
5741 (zero? (system* "py.test" "-v")))))))
5742 (native-inputs
5743 `(("python-flake8" ,python-flake8)
5744 ("python-mock" ,python-mock)
5745 ("python-pep8" ,python-pep8)
5746 ("python-pycodestyle" ,python-pycodestyle)
5747 ("python-pytest" ,python-pytest)))
5748 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
5749 (synopsis "Polyfill package for Flake8 plugins")
5750 (description
5751 "This package that provides some compatibility helpers for Flake8
5752plugins that intend to support Flake8 2.x and 3.x simultaneously.")
5753 (license license:expat)))
5754
5755(define-public python2-flake8-polyfill
5756 (package-with-python2 python-flake8-polyfill))
5757
5758(define-public python-mistune
5759 (package
5760 (name "python-mistune")
5761 (version "0.8.3")
5762 (source
5763 (origin
5764 (method url-fetch)
5765 (uri (pypi-uri "mistune" version))
5766 (sha256
5767 (base32
5768 "06b662p6kf46wh2jsabaqhaq4bz1srh2zxkrnx4yg96azlxw645w"))))
5769 (build-system python-build-system)
5770 (native-inputs
5771 `(("python-nose" ,python-nose)
5772 ("python-cython" ,python-cython)))
5773 (home-page "https://github.com/lepture/mistune")
5774 (synopsis "Markdown parser in pure Python")
5775 (description "This package provides a fast markdown parser in pure
5776Python.")
5777 (license license:bsd-3)))
5778
5779(define-public python2-mistune
5780 (package-with-python2 python-mistune))
5781
5782(define-public python-markdown
5783 (package
5784 (name "python-markdown")
5785 (version "2.6.11")
5786 (source
5787 (origin
5788 (method url-fetch)
5789 (uri (pypi-uri "Markdown" version))
5790 (sha256
5791 (base32
5792 "108g80ryzykh8bj0i7jfp71510wrcixdi771lf2asyghgyf8cmm8"))))
5793 (build-system python-build-system)
5794 (arguments
5795 `(#:phases
5796 (modify-phases %standard-phases
5797 (replace 'check
5798 (lambda _
5799 (zero? (system* "python" "run-tests.py")))))))
5800 (native-inputs
5801 `(("python-nose" ,python-nose)
5802 ("python-pyyaml" ,python-pyyaml)))
5803 (home-page "https://pythonhosted.org/Markdown/")
5804 (synopsis "Python implementation of Markdown")
5805 (description
5806 "This package provides a Python implementation of John Gruber's
5807Markdown. The library features international input, various Markdown
5808extensions, and several HTML output formats. A command line wrapper
5809markdown_py is also provided to convert Markdown files to HTML.")
5810 (license license:bsd-3)))
5811
5812(define-public python2-markdown
5813 (package-with-python2 python-markdown))
5814
5815(define-public python-ptyprocess
5816 (package
5817 (name "python-ptyprocess")
5818 (version "0.5.2")
5819 (source
5820 (origin
5821 (method url-fetch)
5822 (uri (pypi-uri "ptyprocess" version))
5823 (sha256
5824 (base32
5825 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
5826 (build-system python-build-system)
5827 (native-inputs
5828 `(("python-nose" ,python-nose)))
5829 (arguments
5830 `(#:phases
5831 (modify-phases %standard-phases
5832 (replace 'check
5833 (lambda _
5834 (zero? (system* "nosetests")))))))
5835 (home-page "https://github.com/pexpect/ptyprocess")
5836 (synopsis "Run a subprocess in a pseudo terminal")
5837 (description
5838 "This package provides a Python library used to launch a subprocess in a
5839pseudo terminal (pty), and interact with both the process and its pty.")
5840 (license license:isc)))
5841
5842(define-public python2-ptyprocess
5843 (package-with-python2 python-ptyprocess))
5844
5845(define-public python-cram
5846 (package
5847 (name "python-cram")
5848 (version "0.7")
5849 (home-page "https://bitheap.org/cram/")
5850 (source (origin
5851 (method url-fetch)
5852 (uri (list (string-append home-page "cram-"
5853 version ".tar.gz")
5854 (pypi-uri "cram" version)))
5855 (sha256
5856 (base32
5857 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
5858 (arguments
5859 '(#:phases
5860 (modify-phases %standard-phases
5861 (add-after 'unpack 'patch-source
5862 (lambda _
5863 (substitute* (find-files "cram" ".*\\.py$")
5864 ;; Replace default shell path.
5865 (("/bin/sh") (which "sh")))
5866 (substitute* (find-files "tests" ".*\\.t$")
5867 (("md5") "md5sum")
5868 (("/bin/bash") (which "bash"))
5869 (("/bin/sh") (which "sh")))
5870 (substitute* "cram/_test.py"
5871 ;; This hack works around a bug triggered by substituting
5872 ;; the /bin/sh paths. "tests/usage.t" compares the output of
5873 ;; "cram -h", which breaks the output at 80 characters. This
5874 ;; causes the line showing the default shell to break into two
5875 ;; lines, but the test expects a single line...
5876 (("env\\['COLUMNS'\\] = '80'")
5877 "env['COLUMNS'] = '160'"))
5878 #t))
5879 (delete 'check)
5880 (add-after 'install 'check
5881 ;; The test phase uses the built library and executable.
5882 ;; It's easier to run it after install since the build
5883 ;; directory contains version-specific PATH.
5884 (lambda* (#:key inputs outputs #:allow-other-keys)
5885 (add-installed-pythonpath inputs outputs)
5886 (setenv "PATH" (string-append (getenv "PATH") ":"
5887 (assoc-ref outputs "out") "/bin"))
5888 (zero? (system* "make" "test")))))))
5889 (build-system python-build-system)
5890 (native-inputs
5891 `(("python-coverage" ,python-coverage)
5892 ("which" ,which)))
5893 (synopsis "Simple testing framework for command line applications")
5894 (description
5895 "Cram is a functional testing framework for command line applications.
5896Cram tests look like snippets of interactive shell sessions. Cram runs each
5897command and compares the command output in the test with the command’s actual
5898output.")
5899 (license license:gpl2+)))
5900
5901(define-public python2-cram
5902 (package-with-python2 python-cram))
5903
5904(define-public python-straight-plugin
5905 (package
5906 (name "python-straight-plugin")
5907 (version "1.4.1")
5908 (source
5909 (origin
5910 (method url-fetch)
5911 (uri (pypi-uri "straight.plugin" version))
5912 (sha256
5913 (base32
5914 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
5915 (build-system python-build-system)
5916 (home-page "https://github.com/ironfroggy/straight.plugin")
5917 (synopsis "Simple namespaced plugin facility")
5918 (description "Straight Plugin provides a type of plugin you can create from
5919almost any existing Python modules, and an easy way for outside developers to
5920add functionality and customization to your projects with their own plugins.")
5921 (license license:expat)))
5922
5923(define-public python2-straight-plugin
5924 (package-with-python2 python-straight-plugin))
5925
5926(define-public python-fonttools
5927 (package
5928 (name "python-fonttools")
5929 (version "3.15.1")
5930 (source (origin
5931 (method url-fetch)
5932 (uri (pypi-uri "fonttools" version ".zip"))
5933 (sha256
5934 (base32
5935 "1hhj97izwliy0vybmza72d90l5d4mcn50y8akq7kyccfl82vdx4d"))))
5936 (build-system python-build-system)
5937 (arguments
5938 '(#:test-target "check"
5939 #:phases
5940 (modify-phases %standard-phases
5941 (add-after 'unpack 'patch-setuppy
5942 ;; Remove the undocumented "extra_path" argument, which adds an
5943 ;; intervening directories between site-packages and the package
5944 ;; directory.
5945 (lambda _
5946 (substitute* "setup.py"
5947 (("^[ \t]*extra_path *= *'FontTools',") ""))
5948 #t)))))
5949 (native-inputs
5950 `(("unzip" ,unzip)))
5951 (home-page "https://github.com/behdad/fonttools")
5952 (synopsis "Tools to manipulate font files")
5953 (description
5954 "FontTools/TTX is a library to manipulate font files from Python. It
5955supports reading and writing of TrueType/OpenType fonts, reading and writing
5956of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5957also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5958from an XML-based format.")
5959 (license (license:non-copyleft
5960 "file://LICENSE.txt"
5961 "See LICENSE.txt in the distribution."))))
5962
5963(define-public python2-fonttools
5964 (package-with-python2 python-fonttools))
5965
5966(define-public python-ly
5967 (package
5968 (name "python-ly")
5969 (version "0.9.5")
5970 (source
5971 (origin
5972 (method url-fetch)
5973 (uri (pypi-uri name version))
5974 (sha256
5975 (base32
5976 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
5977 (build-system python-build-system)
5978 (arguments
5979 ;; FIXME: Some tests need network access.
5980 '(#:tests? #f))
5981 (synopsis "Tool and library for manipulating LilyPond files")
5982 (description "This package provides a Python library to parse, manipulate
5983or create documents in LilyPond format. A command line program ly is also
5984provided that can be used to do various manipulations with LilyPond files.")
5985 (home-page "https://pypi.python.org/pypi/python-ly")
5986 (license license:gpl2+)))
5987
5988(define-public python-appdirs
5989 (package
5990 (name "python-appdirs")
5991 (version "1.4.3")
5992 (source
5993 (origin
5994 (method url-fetch)
5995 (uri (pypi-uri "appdirs" version))
5996 (sha256
5997 (base32
5998 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
5999 (build-system python-build-system)
6000 (home-page "https://github.com/ActiveState/appdirs")
6001 (synopsis
6002 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6003 (description
6004 "This module provides a portable way of finding out where user data
6005should be stored on various operating systems.")
6006 (license license:expat)))
6007
6008(define-public python2-appdirs
6009 (package-with-python2 python-appdirs))
6010
6011(define-public python-llfuse
6012 (package
6013 (name "python-llfuse")
6014 (version "1.3.3")
6015 (source (origin
6016 (method url-fetch)
6017 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6018 (sha256
6019 (base32
6020 "1rqww632y2zz71xmr6ch7yq80kvza9mhqr2z773k0d8l1lwzl575"))))
6021 (build-system python-build-system)
6022 (inputs
6023 `(("fuse" ,fuse)
6024 ("attr" ,attr)))
6025 (native-inputs
6026 `(("pkg-config" ,pkg-config)))
6027 (synopsis "Python bindings for FUSE")
6028 (description
6029 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6030 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6031 (license license:lgpl2.0+)
6032 (properties `((python2-variant . ,(delay python2-llfuse))))))
6033
6034(define-public python2-llfuse
6035 (package (inherit (package-with-python2
6036 (strip-python2-variant python-llfuse)))
6037 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6038
6039;; For attic-0.16
6040(define-public python-llfuse-0.41
6041 (package (inherit python-llfuse)
6042 (version "0.41.1")
6043 (source (origin
6044 (method url-fetch)
6045 (uri (string-append
6046 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6047 "llfuse-" version ".tar.bz2"))
6048 (sha256
6049 (base32
6050 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6051 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6052 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6053 (license (list license:expat license:lgpl2.0+))))
6054
6055(define-public python-msgpack
6056 (package
6057 (name "python-msgpack")
6058 (version "0.5.6")
6059 (source (origin
6060 (method url-fetch)
6061 (uri (pypi-uri "msgpack" version))
6062 (sha256
6063 (base32
6064 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6065 (build-system python-build-system)
6066 (arguments
6067 `(#:modules ((guix build utils)
6068 (guix build python-build-system)
6069 (ice-9 ftw)
6070 (srfi srfi-1)
6071 (srfi srfi-26))
6072 #:phases
6073 (modify-phases %standard-phases
6074 (replace 'check
6075 (lambda _
6076 (let ((cwd (getcwd)))
6077 (setenv "PYTHONPATH"
6078 (string-append cwd "/build/"
6079 (find (cut string-prefix? "lib" <>)
6080 (scandir (string-append cwd "/build")))
6081 ":"
6082 (getenv "PYTHONPATH")))
6083 (invoke "pytest" "-v" "test")))))))
6084 (native-inputs
6085 `(("python-pytest" ,python-pytest)))
6086 (synopsis "MessagePack (de)serializer")
6087 (description "MessagePack is a fast, compact binary serialization format,
6088suitable for similar data to JSON. This package provides CPython bindings for
6089reading and writing MessagePack data.")
6090 (home-page "https://pypi.python.org/pypi/msgpack/")
6091 (license license:asl2.0)))
6092
6093;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6094;; release 0.5. Some packages like borg still call it by the old name for now.
6095;; <https://bugs.gnu.org/30662>
6096(define-public python-msgpack-transitional
6097 (package
6098 (inherit python-msgpack)
6099 (name "python-msgpack-transitional")
6100 (arguments
6101 (substitute-keyword-arguments (package-arguments python-msgpack)
6102 ((#:phases phases)
6103 `(modify-phases ,phases
6104 (add-after 'unpack 'configure-transitional
6105 (lambda _
6106 ;; Keep using the old name.
6107 (substitute* "setup.py"
6108 (("TRANSITIONAL = False")
6109 "TRANSITIONAL = 1"))
6110 #t))))))))
6111
6112(define-public python2-msgpack
6113 (package-with-python2 python-msgpack))
6114
6115(define-public python-netaddr
6116 (package
6117 (name "python-netaddr")
6118 (version "0.7.19")
6119 (source
6120 (origin
6121 (method url-fetch)
6122 (uri (pypi-uri "netaddr" version))
6123 (sha256
6124 (base32
6125 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6126 (build-system python-build-system)
6127 (arguments `(#:tests? #f)) ;; No tests.
6128 (home-page "https://github.com/drkjam/netaddr/")
6129 (synopsis "Pythonic manipulation of network addresses")
6130 (description
6131 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6132and MAC network addresses.")
6133 (license license:bsd-3)))
6134
6135(define-public python2-netaddr
6136 (package-with-python2 python-netaddr))
6137
6138(define-public python-wrapt
6139 (package
6140 (name "python-wrapt")
6141 (version "1.10.11")
6142 (source
6143 (origin
6144 (method url-fetch)
6145 (uri (pypi-uri "wrapt" version))
6146 (sha256
6147 (base32
6148 "1ip3dwib39xhp79kblskgvz3fjzcwxgx3fs3ahdixhpjg7a61mfl"))))
6149 (build-system python-build-system)
6150 (arguments
6151 ;; Tests are not included in the tarball, they are only available in the
6152 ;; git repository.
6153 `(#:tests? #f))
6154 (home-page "https://github.com/GrahamDumpleton/wrapt")
6155 (synopsis "Module for decorators, wrappers and monkey patching")
6156 (description
6157 "The aim of the wrapt module is to provide a transparent object proxy for
6158 Python, which can be used as the basis for the construction of function
6159 wrappers and decorator functions.")
6160 (license license:bsd-2)))
6161
6162(define-public python2-wrapt
6163 (package-with-python2 python-wrapt))
6164
6165(define-public python-xlrd
6166 (package
6167 (name "python-xlrd")
6168 (version "1.0.0")
6169 (source (origin
6170 (method url-fetch)
6171 (uri (pypi-uri "xlrd" version))
6172 (sha256
6173 (base32
6174 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6175 (build-system python-build-system)
6176 (arguments
6177 `(#:phases
6178 (modify-phases %standard-phases
6179 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6180 ;; run tests instead for now.
6181 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
6182 (native-inputs `(("python-nose" ,python-nose)))
6183 (home-page "http://www.python-excel.org/")
6184 (synopsis "Library for extracting data from Excel files")
6185 (description "This packages provides a library to extract data from
6186spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6187@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6188Unicode-aware. It is not intended as an end-user tool.")
6189 (license license:bsd-3)))
6190
6191(define-public python2-xlrd
6192 (package-with-python2 python-xlrd))
6193
6194(define-public python-prettytable
6195 (package
6196 (name "python-prettytable")
6197 (version "0.7.2")
6198 (source
6199 (origin
6200 (method url-fetch)
6201 (uri (string-append
6202 "https://pypi.python.org/packages/source/P/PrettyTable/"
6203 "prettytable-" version ".tar.bz2"))
6204 (sha256
6205 (base32
6206 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6207 (build-system python-build-system)
6208 (home-page "http://code.google.com/p/prettytable/")
6209 (synopsis "Display tabular data in an ASCII table format")
6210 (description
6211 "A library designed to represent tabular data in visually appealing ASCII
6212tables. PrettyTable allows for selection of which columns are to be printed,
6213independent alignment of columns (left or right justified or centred) and
6214printing of sub-tables by specifying a row range.")
6215 (license license:bsd-3)))
6216
6217(define-public python2-prettytable
6218 (package-with-python2 python-prettytable))
6219
6220(define-public python-tables
6221 (package
6222 (name "python-tables")
6223 (version "3.2.2")
6224 (source
6225 (origin
6226 (method url-fetch)
6227 (uri (pypi-uri "tables" version))
6228 (sha256
6229 (base32
6230 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
6231 (modules '((guix build utils)))
6232 (snippet
6233 '(begin
6234 ;; Remove pre-compiled .pyc files from source.
6235 (for-each delete-file-recursively
6236 (find-files "." "__pycache__" #:directories? #t))
6237 (for-each delete-file (find-files "." "\\.pyc$"))
6238 #t))))
6239 (build-system python-build-system)
6240 (arguments
6241 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6242 ;; or "check", so we must override the build and check phases.
6243 #:phases
6244 (modify-phases %standard-phases
6245 (add-after 'unpack 'use-gcc
6246 (lambda _
6247 (substitute* "setup.py"
6248 (("compiler = new_compiler\\(\\)" line)
6249 (string-append line
6250 "\ncompiler.set_executables(compiler='gcc',"
6251 "compiler_so='gcc',"
6252 "linker_exe='gcc',"
6253 "linker_so='gcc -shared')")))
6254 #t))
6255 (replace 'build
6256 (lambda* (#:key inputs #:allow-other-keys)
6257 (zero? (system* "python" "setup.py" "build"
6258 (string-append "--hdf5="
6259 (assoc-ref inputs "hdf5"))))))
6260 (replace 'check
6261 (lambda* (#:key inputs #:allow-other-keys)
6262 (zero? (system* "python" "setup.py" "check"
6263 (string-append "--hdf5="
6264 (assoc-ref inputs "hdf5")))))))))
6265 (propagated-inputs
6266 `(("python-numexpr" ,python-numexpr)
6267 ("python-numpy" ,python-numpy)))
6268 (native-inputs
6269 `(("python-cython" ,python-cython)
6270 ("pkg-config" ,pkg-config)))
6271 (inputs
6272 `(("hdf5" ,hdf5)
6273 ("bzip2" ,bzip2)
6274 ("zlib" ,zlib)))
6275 (home-page "http://www.pytables.org/")
6276 (synopsis "Hierarchical datasets for Python")
6277 (description "PyTables is a package for managing hierarchical datasets and
6278designed to efficiently cope with extremely large amounts of data.")
6279 (license license:bsd-3)))
6280
6281(define-public python2-tables
6282 (package-with-python2 python-tables))
6283
6284(define-public python-pyasn1
6285 (package
6286 (name "python-pyasn1")
6287 (version "0.4.2")
6288 (source
6289 (origin
6290 (method url-fetch)
6291 (uri (pypi-uri "pyasn1" version))
6292 (sha256
6293 (base32
6294 "05bxnr4wmrg62m4qr1pg1p3z7bhwrv74jll3k42pgxwl36kv0n6j"))))
6295 (build-system python-build-system)
6296 (home-page "http://pyasn1.sourceforge.net/")
6297 (synopsis "ASN.1 types and codecs")
6298 (description
6299 "This is an implementation of ASN.1 types and codecs in Python. It is
6300suitable for a wide range of protocols based on the ASN.1 specification.")
6301 (license license:bsd-2)))
6302
6303(define-public python2-pyasn1
6304 (package-with-python2 python-pyasn1))
6305
6306(define-public python-pyasn1-modules
6307 (package
6308 (name "python-pyasn1-modules")
6309 (version "0.0.8")
6310 (source
6311 (origin
6312 (method url-fetch)
6313 (uri (pypi-uri "pyasn1-modules" version))
6314 (sha256
6315 (base32
6316 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6317 (build-system python-build-system)
6318 (propagated-inputs
6319 `(("python-pyasn1" ,python-pyasn1)))
6320 (home-page "https://sourceforge.net/projects/pyasn1/")
6321 (synopsis "ASN.1 codec implementations")
6322 (description
6323 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6324implementations of ASN.1-based codecs and protocols.")
6325 (license license:bsd-3)))
6326
6327(define-public python2-pyasn1-modules
6328 (package-with-python2 python-pyasn1-modules))
6329
6330(define-public python-ipaddress
6331 (package
6332 (name "python-ipaddress")
6333 (version "1.0.19")
6334 (source (origin
6335 (method url-fetch)
6336 (uri (pypi-uri "ipaddress" version))
6337 (sha256
6338 (base32
6339 "10agaa1cys1bk1ycpl2w8lky9vjx8h1xh1z29mg0niqx0638c390"))))
6340 (build-system python-build-system)
6341 (home-page "https://github.com/phihag/ipaddress")
6342 (synopsis "IP address manipulation library")
6343 (description
6344 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6345 in Python. This library is used to create, poke at, and manipulate IPv4 and
6346 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6347 module to older versions of Python.")
6348 (license license:psfl)))
6349
6350(define-public python2-ipaddress
6351 (package-with-python2 python-ipaddress))
6352
6353(define-public python2-ipaddr
6354 (package
6355 (name "python2-ipaddr")
6356 (version "2.1.11")
6357 (source
6358 (origin
6359 (method url-fetch)
6360 (uri (pypi-uri "ipaddr" version))
6361 (sha256
6362 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6363 (build-system python-build-system)
6364 (arguments
6365 `(#:python ,python-2 ;version 2 only
6366 #:phases
6367 (modify-phases %standard-phases
6368 (replace 'check
6369 (lambda* _
6370 (zero? (system* "python" "ipaddr_test.py")))))))
6371 (home-page "https://github.com/google/ipaddr-py")
6372 (synopsis "IP address manipulation library")
6373 (description
6374 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6375IPv6 addresses and networks.
6376
6377For new implementations you may prefer to use the standard module
6378@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6379versions of Python.")
6380 (license license:asl2.0)))
6381
6382(define-public python-idna
6383 (package
6384 (name "python-idna")
6385 (version "2.6")
6386 (source
6387 (origin
6388 (method url-fetch)
6389 (uri (pypi-uri "idna" version))
6390 (sha256
6391 (base32
6392 "13qaab6d0s15gknz8v3zbcfmbj6v86hn9pjxgkdf62ch13imssic"))))
6393 (build-system python-build-system)
6394 (home-page "https://github.com/kjd/idna")
6395 (synopsis "Internationalized domain names in applications")
6396 (description
6397 "This is a library to support the Internationalised Domain Names in
6398Applications (IDNA) protocol as specified in RFC 5891. This version of the
6399protocol is often referred to as “IDNA2008” and can produce different results
6400from the earlier standard from 2003. The library is also intended to act as a
6401suitable drop-in replacement for the “encodings.idna” module that comes with
6402the Python standard library but currently only supports the older 2003
6403specification.")
6404 (license license:bsd-4)))
6405
6406(define-public python2-idna
6407 (package-with-python2 python-idna))
6408
6409(define-public python-idna-ssl
6410 (package
6411 (name "python-idna-ssl")
6412 (version "1.0.1")
6413 (source
6414 (origin
6415 (method url-fetch)
6416 (uri (pypi-uri "idna-ssl" version))
6417 (sha256
6418 (base32
6419 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
6420 (build-system python-build-system)
6421 (arguments
6422 `(#:tests? #f)) ;circular dependency with python-aiohttp
6423 (home-page "https://github.com/aio-libs/idna-ssl")
6424 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
6425 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
6426domains support.")
6427 (license license:expat)))
6428
6429(define-public python-pretend
6430 (package
6431 (name "python-pretend")
6432 (version "1.0.9")
6433 (source
6434 (origin
6435 (method url-fetch)
6436 (uri (string-append "https://pypi.python.org/packages/source/p/"
6437 "pretend/pretend-" version ".tar.gz"))
6438 (sha256
6439 (base32
6440 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
6441 (build-system python-build-system)
6442 (home-page "https://github.com/alex/pretend")
6443 (synopsis "Library for stubbing in Python")
6444 (description
6445 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6446technique for writing tests. You may hear the term mixed up with mocks,
6447fakes, or doubles. Basically, a stub is an object that returns pre-canned
6448responses, rather than doing any computation.")
6449 (license license:bsd-3)))
6450
6451(define-public python2-pretend
6452 (package-with-python2 python-pretend))
6453
6454(define-public python-pip
6455 (package
6456 (name "python-pip")
6457 (version "9.0.1")
6458 (source
6459 (origin
6460 (method url-fetch)
6461 (uri (pypi-uri "pip" version))
6462 (sha256
6463 (base32
6464 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
6465 (build-system python-build-system)
6466 (arguments
6467 '(#:tests? #f)) ; there are no tests in the pypi archive.
6468 (home-page "https://pip.pypa.io/")
6469 (synopsis "Package manager for Python software")
6470 (description
6471 "Pip is a package manager for Python software, that finds packages on the
6472Python Package Index (PyPI).")
6473 (license license:expat)))
6474
6475(define-public python2-pip
6476 (package-with-python2 python-pip))
6477
6478(define-public python-tlsh
6479 (package
6480 (name "python-tlsh")
6481 (version "3.4.4")
6482 (home-page "https://github.com/trendmicro/tlsh")
6483 (source (origin
6484 (method url-fetch)
6485 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6486 version ".tar.gz"))
6487 (sha256
6488 (base32
6489 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6490 (file-name (string-append name "-" version ".tar.gz"))))
6491 (build-system cmake-build-system)
6492 (arguments
6493 '(#:out-of-source? #f
6494 #:phases (modify-phases %standard-phases
6495 (replace
6496 'install
6497 (lambda* (#:key outputs #:allow-other-keys)
6498 ;; Build and install the Python bindings. The underlying
6499 ;; C++ library is apparently not meant to be installed.
6500 (let ((out (assoc-ref outputs "out")))
6501 (with-directory-excursion "py_ext"
6502 (and (system* "python" "setup.py" "build")
6503 (system* "python" "setup.py" "install"
6504 (string-append "--prefix=" out))))))))))
6505 (inputs `(("python" ,python-wrapper))) ;for the bindings
6506 (synopsis "Fuzzy matching library for Python")
6507 (description
6508 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6509Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6510value which can be used for similarity comparisons. Similar objects have
6511similar hash values, which allows for the detection of similar objects by
6512comparing their hash values. The byte stream should have a sufficient amount
6513of complexity; for example, a byte stream of identical bytes will not generate
6514a hash value.")
6515 (license license:asl2.0)))
6516
6517(define-public python2-tlsh
6518 (package
6519 (inherit python-tlsh)
6520 (name "python2-tlsh")
6521 (inputs `(("python" ,python-2)))))
6522
6523(define-public python-termcolor
6524 (package
6525 (name "python-termcolor")
6526 (version "1.1.0")
6527 (source
6528 (origin
6529 (method url-fetch)
6530 (uri (pypi-uri "termcolor" version))
6531 (sha256
6532 (base32
6533 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6534 (build-system python-build-system)
6535 (arguments
6536 ;; There are no tests.
6537 `(#:tests? #f))
6538 (home-page "https://pypi.python.org/pypi/termcolor")
6539 (synopsis "ANSII Color formatting for terminal output")
6540 (description
6541 "This package provides ANSII Color formatting for output in terminals.")
6542 (license license:expat)))
6543
6544(define-public python2-termcolor
6545 (package-with-python2 python-termcolor))
6546
6547(define-public python-libarchive-c
6548 (package
6549 (name "python-libarchive-c")
6550 (version "2.2")
6551 (source (origin
6552 (method url-fetch)
6553 (uri (pypi-uri "libarchive-c" version))
6554 (sha256
6555 (base32
6556 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
6557 (build-system python-build-system)
6558 (arguments
6559 '(#:phases (modify-phases %standard-phases
6560 (add-before
6561 'build 'reference-libarchive
6562 (lambda* (#:key inputs #:allow-other-keys)
6563 ;; Retain the absolute file name of libarchive.so.
6564 (let ((libarchive (assoc-ref inputs "libarchive")))
6565 (substitute* "libarchive/ffi.py"
6566 (("find_library\\('archive'\\)")
6567 (string-append "'" libarchive
6568 "/lib/libarchive.so'")))))))))
6569 (inputs
6570 `(("libarchive" ,libarchive)))
6571 (home-page "https://github.com/Changaco/python-libarchive-c")
6572 (synopsis "Python interface to libarchive")
6573 (description
6574 "This package provides Python bindings to libarchive, a C library to
6575access possibly compressed archives in many different formats. It uses
6576Python's @code{ctypes} foreign function interface (FFI).")
6577 (license license:lgpl2.0+)))
6578
6579(define-public python2-libarchive-c
6580 (package-with-python2 python-libarchive-c))
6581
6582(define-public python-file
6583 (package
6584 (inherit file)
6585 (name "python-file")
6586 (build-system python-build-system)
6587 (arguments
6588 '(#:tests? #f ;no tests
6589 #:configure-flags '("--single-version-externally-managed" "--root=/")
6590 #:phases (modify-phases %standard-phases
6591 (add-before 'build 'change-directory
6592 (lambda _
6593 (chdir "python")
6594 #t))
6595 (add-before 'build 'set-library-file-name
6596 (lambda* (#:key inputs #:allow-other-keys)
6597 (let ((file (assoc-ref inputs "file")))
6598 (substitute* "magic.py"
6599 (("find_library\\('magic'\\)")
6600 (string-append "'" file "/lib/libmagic.so'")))
6601 #t))))))
6602 (inputs `(("file" ,file)))
6603 (self-native-input? #f)
6604 (synopsis "Python bindings to the libmagic file type guesser. Note that
6605this module and the python-magic module both provide a \"magic.py\" file;
6606these two modules, which are different and were developed separately, both
6607serve the same purpose: provide Python bindings for libmagic.")))
6608
6609(define-public python2-file
6610 (package-with-python2 python-file))
6611
6612(define-public python-debian
6613 (package
6614 (name "python-debian")
6615 (version "0.1.28")
6616 (source
6617 (origin
6618 (method url-fetch)
6619 (uri (pypi-uri name version))
6620 (sha256
6621 (base32
6622 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
6623 (build-system python-build-system)
6624 (propagated-inputs
6625 `(("python-six" ,python-six)))
6626 (home-page "http://packages.debian.org/sid/python-debian")
6627 (synopsis "Debian package related modules")
6628 (description
6629 ;; XXX: Use @enumerate instead of @itemize to work around
6630 ;; <http://bugs.gnu.org/21772>.
6631 "This package provides Python modules that abstract many formats of
6632Debian-related files, such as:
6633
6634@enumerate
6635@item Debtags information;
6636@item @file{debian/changelog} files;
6637@item packages files, pdiffs;
6638@item control files of single or multiple RFC822-style paragraphs---e.g.
6639 @file{debian/control}, @file{.changes}, @file{.dsc};
6640@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6641 contained files and meta-information.
6642@end enumerate\n")
6643
6644 ;; Modules are either GPLv2+ or GPLv3+.
6645 (license license:gpl3+)))
6646
6647(define-public python2-debian
6648 (package-with-python2 python-debian))
6649
6650(define-public python-nbformat
6651 (package
6652 (name "python-nbformat")
6653 (version "4.4.0")
6654 (source
6655 (origin
6656 (method url-fetch)
6657 (uri (pypi-uri "nbformat" version))
6658 (sha256
6659 (base32
6660 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
6661 (build-system python-build-system)
6662 (arguments `(#:tests? #f)) ; no test target
6663 (propagated-inputs
6664 `(("python-ipython-genutils" ,python-ipython-genutils)
6665 ("python-jsonschema" ,python-jsonschema)
6666 ("python-jupyter-core" ,python-jupyter-core)
6667 ("python-traitlets" ,python-traitlets)))
6668 (home-page "http://jupyter.org")
6669 (synopsis "Jupyter Notebook format")
6670 (description "This package provides the reference implementation of the
6671Jupyter Notebook format and Python APIs for working with notebooks.")
6672 (license license:bsd-3)))
6673
6674(define-public python2-nbformat
6675 (package-with-python2 python-nbformat))
6676
6677(define-public python-bleach
6678 (package
6679 (name "python-bleach")
6680 (version "1.4.3")
6681 (source
6682 (origin
6683 (method url-fetch)
6684 (uri (pypi-uri "bleach" version))
6685 (sha256
6686 (base32
6687 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6688 (build-system python-build-system)
6689 (propagated-inputs
6690 `(("python-html5lib" ,python-html5lib-0.9)
6691 ("python-six" ,python-six)))
6692 (native-inputs
6693 `(("python-nose" ,python-nose)))
6694 (home-page "https://github.com/jsocol/bleach")
6695 (synopsis "Whitelist-based HTML-sanitizing tool")
6696 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6697 (license license:asl2.0)))
6698
6699(define-public python2-bleach
6700 (package-with-python2 python-bleach))
6701
6702(define-public python-entrypoints
6703 (package
6704 (name "python-entrypoints")
6705 (version "0.2.3")
6706 (source
6707 (origin
6708 (method url-fetch)
6709 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
6710 version ".tar.gz"))
6711 (file-name (string-append name "-" version ".tar.gz"))
6712 (sha256
6713 (base32
6714 "1pdvgfr5bxyvnfvxbsd3zi0dh3il71pc4k6rinx6zpps91b84a56"))))
6715 (build-system python-build-system)
6716 ;; The package does not come with a setup.py file, so we have to generate
6717 ;; one ourselves.
6718 (arguments
6719 `(#:tests? #f
6720 #:phases
6721 (modify-phases %standard-phases
6722 (add-after 'unpack 'create-setup.py
6723 (lambda _
6724 (call-with-output-file "setup.py"
6725 (lambda (port)
6726 (format port "\
6727from setuptools import setup
6728setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6729" ,version))))))))
6730 (home-page "https://github.com/takluyver/entrypoints")
6731 (synopsis "Discover and load entry points from installed Python packages")
6732 (description "Entry points are a way for Python packages to advertise
6733objects with some common interface. The most common examples are
6734@code{console_scripts} entry points, which define shell commands by
6735identifying a Python function to run. The @code{entrypoints} module contains
6736functions to find and load entry points.")
6737 (license license:expat)))
6738
6739(define-public python2-entrypoints
6740 (package-with-python2 python-entrypoints))
6741
6742(define-public python-nbconvert
6743 (package
6744 (name "python-nbconvert")
6745 (version "5.0.0b1")
6746 (source
6747 (origin
6748 (method url-fetch)
6749 (uri (pypi-uri "nbconvert" version))
6750 (sha256
6751 (base32
6752 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6753 (build-system python-build-system)
6754 (arguments
6755 `(;; The "bdist_egg" target is disabled by default, causing the installation
6756 ;; to fail.
6757 #:configure-flags (list "bdist_egg")
6758 ;; FIXME: 5 failures, 40 errors.
6759 #:tests? #f))
6760 ;; #:phases
6761 ;; (modify-phases %standard-phases
6762 ;; (replace 'check
6763 ;; (lambda _
6764 ;; (zero? (system* "py.test" "-v")))))
6765 (native-inputs
6766 `(("python-pytest" ,python-pytest)))
6767 (propagated-inputs
6768 `(("python-bleach" ,python-bleach)
6769 ("python-entrypoints" ,python-entrypoints)
6770 ("python-jinja2" ,python-jinja2)
6771 ("python-jupyter-core" ,python-jupyter-core)
6772 ("python-mistune" ,python-mistune)
6773 ("python-nbformat" ,python-nbformat)
6774 ("python-pygments" ,python-pygments)
6775 ("python-traitlets" ,python-traitlets)))
6776 (home-page "http://jupyter.org")
6777 (synopsis "Converting Jupyter Notebooks")
6778 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6779notebooks to various other formats via Jinja templates. It allows you to
6780convert an @code{.ipynb} notebook file into various static formats including:
6781
6782@enumerate
6783@item HTML
6784@item LaTeX
6785@item PDF
6786@item Reveal JS
6787@item Markdown (md)
6788@item ReStructured Text (rst)
6789@item executable script
6790@end enumerate\n")
6791 (license license:bsd-3)))
6792
6793(define-public python2-nbconvert
6794 (package-with-python2 python-nbconvert))
6795
6796(define-public python-notebook
6797 (package
6798 (name "python-notebook")
6799 (version "4.2.3")
6800 (source (origin
6801 (method url-fetch)
6802 (uri (pypi-uri "notebook" version))
6803 (sha256
6804 (base32
6805 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
6806 (build-system python-build-system)
6807 (arguments
6808 `(#:phases
6809 (modify-phases %standard-phases
6810 (replace 'check
6811 (lambda _
6812 ;; HOME must be set for tests
6813 (setenv "HOME" "/tmp")
6814 (zero? (system* "nosetests")))))))
6815 (propagated-inputs
6816 `(("python-jupyter-core" ,python-jupyter-core)
6817 ("python-nbformat" ,python-nbformat)
6818 ("python-nbconvert" ,python-nbconvert)
6819 ("python-ipython" ,python-ipython)))
6820 (native-inputs
6821 `(("python-nose" ,python-nose)
6822 ("python-sphinx" ,python-sphinx)
6823 ("python-requests" ,python-requests)))
6824 (home-page "http://jupyter.org/")
6825 (synopsis "Web-based notebook environment for interactive computing")
6826 (description
6827 "The Jupyter HTML notebook is a web-based notebook environment for
6828interactive computing.")
6829 (properties `((python2-variant . ,(delay python2-notebook))))
6830 (license license:bsd-3)))
6831
6832(define-public python2-notebook
6833 (let ((base (package-with-python2
6834 (strip-python2-variant python-notebook))))
6835 (package (inherit base)
6836 (native-inputs
6837 `(("python2-mock" ,python2-mock)
6838 ,@(package-native-inputs base)))
6839 (arguments
6840 (substitute-keyword-arguments (package-arguments base)
6841 ((#:phases phases)
6842 `(modify-phases ,phases
6843 (add-before 'check 'disable-test-case
6844 ;; The test requires network access to localhost. Curiously it
6845 ;; fails with Python 2 only. Simply make the test-case return
6846 ;; immediately.
6847 (lambda _
6848 (substitute*
6849 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
6850 (("formats = self.nbconvert_api") "return #")))))))))))
6851
6852(define-public python-widgetsnbextension
6853 (package
6854 (name "python-widgetsnbextension")
6855 (version "1.2.6")
6856 (source
6857 (origin
6858 (method url-fetch)
6859 (uri (pypi-uri "widgetsnbextension" version))
6860 (sha256
6861 (base32
6862 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
6863 (build-system python-build-system)
6864 (propagated-inputs
6865 `(("python-notebook" ,python-notebook)))
6866 (native-inputs
6867 `(("python-certifi" ,python-certifi)
6868 ("python-nose" ,python-nose)))
6869 (home-page "https://ipython.org")
6870 (synopsis "IPython HTML widgets for Jupyter")
6871 (description "This package provides interactive HTML widgets for Jupyter
6872notebooks.")
6873 (license license:bsd-3)))
6874
6875(define-public python2-widgetsnbextension
6876 (package-with-python2 python-widgetsnbextension))
6877
6878(define-public python-ipywidgets
6879 (package
6880 (name "python-ipywidgets")
6881 (version "5.2.2")
6882 (source
6883 (origin
6884 (method url-fetch)
6885 (uri (pypi-uri "ipywidgets" version))
6886 (sha256
6887 (base32
6888 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
6889 (build-system python-build-system)
6890 ;; FIXME: it's not clear how to run the tests.
6891 (arguments `(#:tests? #f))
6892 (propagated-inputs
6893 `(("python-ipykernel" ,python-ipykernel)
6894 ("python-ipython" ,python-ipython)
6895 ("python-traitlets" ,python-traitlets)
6896 ("python-widgetsnbextension" ,python-widgetsnbextension)))
6897 (home-page "https://ipython.org")
6898 (synopsis "IPython HTML widgets for Jupyter")
6899 (description "Ipywidgets are interactive HTML widgets for Jupyter
6900notebooks and the IPython kernel. Notebooks come alive when interactive
6901widgets are used. Users gain control of their data and can visualize changes
6902in the data.")
6903 (license license:bsd-3)))
6904
6905(define-public python2-ipywidgets
6906 (package-with-python2 python-ipywidgets))
6907
6908(define-public python-jupyter-console
6909 (package
6910 (name "python-jupyter-console")
6911 (version "5.2.0")
6912 (source
6913 (origin
6914 (method url-fetch)
6915 (uri (pypi-uri "jupyter_console" version))
6916 (sha256
6917 (base32
6918 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
6919 (build-system python-build-system)
6920 ;; FIXME: it's not clear how to run the tests.
6921 (arguments `(#:tests? #f))
6922 (propagated-inputs
6923 `(("python-ipykernel" ,python-ipykernel)
6924 ("python-ipython" ,python-ipython)
6925 ("python-jupyter-client" ,python-jupyter-client)
6926 ("python-prompt-toolkit" ,python-prompt-toolkit)
6927 ("python-pygments" ,python-pygments)))
6928 (home-page "https://jupyter.org")
6929 (synopsis "Jupyter terminal console")
6930 (description "This package provides a terminal-based console frontend for
6931Jupyter kernels. It also allows for console-based interaction with non-Python
6932Jupyter kernels such as IJulia and IRKernel.")
6933 (license license:bsd-3)))
6934
6935(define-public python2-jupyter-console
6936 (package-with-python2 python-jupyter-console))
6937
6938;; The python-ipython and python-jupyter-console require each other. To get
6939;; the functionality in both packages working, strip down the
6940;; python-jupyter-console package when using it as an input to python-ipython.
6941(define python-jupyter-console-minimal
6942 (package
6943 (inherit python-jupyter-console)
6944 (name "python-jupyter-console-minimal")
6945 (arguments
6946 (substitute-keyword-arguments
6947 (package-arguments python-jupyter-console)
6948 ((#:phases phases)
6949 `(modify-phases ,phases
6950 (add-after 'install 'delete-bin
6951 (lambda* (#:key outputs #:allow-other-keys)
6952 ;; Delete the bin files, to avoid conflicts in profiles
6953 ;; where python-ipython and python-jupyter-console are
6954 ;; both present.
6955 (delete-file-recursively
6956 (string-append
6957 (assoc-ref outputs "out") "/bin"))))))))
6958 ;; Remove the python-ipython propagated input, to avoid the cycle
6959 (propagated-inputs
6960 (alist-delete
6961 "python-ipython"
6962 (package-propagated-inputs python-jupyter-console)))))
6963
6964(define-public jupyter
6965 (package
6966 (name "jupyter")
6967 (version "1.0.0")
6968 (source
6969 (origin
6970 (method url-fetch)
6971 (uri (pypi-uri "jupyter" version))
6972 (sha256
6973 (base32
6974 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
6975 (build-system python-build-system)
6976 ;; FIXME: it's not clear how to run the tests.
6977 (arguments `(#:tests? #f))
6978 (propagated-inputs
6979 `(("python-ipykernel" ,python-ipykernel)
6980 ("python-ipywidgets" ,python-ipywidgets)
6981 ("python-jupyter-console" ,python-jupyter-console)
6982 ("python-nbconvert" ,python-nbconvert)
6983 ("python-notebook" ,python-notebook)))
6984
6985 (native-search-paths
6986 (list (search-path-specification
6987 (variable "JUPYTER_PATH")
6988 (files '("share/jupyter")))))
6989
6990 (home-page "http://jupyter.org")
6991 (synopsis "Web application for interactive documents")
6992 (description
6993 "The Jupyter Notebook is a web application that allows you to create and
6994share documents that contain live code, equations, visualizations and
6995explanatory text. Uses include: data cleaning and transformation, numerical
6996simulation, statistical modeling, machine learning and much more.")
6997 (license license:bsd-3)))
6998
6999(define-public python-chardet
7000 (package
7001 (name "python-chardet")
7002 (version "3.0.4")
7003 (source
7004 (origin
7005 (method url-fetch)
7006 (uri (pypi-uri "chardet" version))
7007 (sha256
7008 (base32
7009 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7010 (native-inputs
7011 `(("python-hypothesis" ,python-hypothesis)
7012 ("python-pytest" ,python-pytest)
7013 ("python-pytest-runner" ,python-pytest-runner)))
7014 (build-system python-build-system)
7015 (home-page "https://github.com/chardet/chardet")
7016 (synopsis "Universal encoding detector for Python 2 and 3")
7017 (description
7018 "This package provides @code{chardet}, a Python module that can
7019automatically detect a wide range of file encodings.")
7020 (license license:lgpl2.1+)))
7021
7022(define-public python2-chardet
7023 (package-with-python2 python-chardet))
7024
7025(define-public python-docopt
7026 (package
7027 (name "python-docopt")
7028 (version "0.6.2")
7029 (source
7030 (origin
7031 (method url-fetch)
7032 ;; The release on PyPI does not include tests.
7033 (uri (string-append
7034 "https://github.com/docopt/docopt/archive/"
7035 version ".tar.gz"))
7036 (file-name (string-append name "-" version ".tar.gz"))
7037 (sha256
7038 (base32
7039 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7040 (build-system python-build-system)
7041 (native-inputs
7042 `(("python-pytest" ,python-pytest)))
7043 (arguments
7044 `(#:phases
7045 (modify-phases %standard-phases
7046 (replace 'check
7047 (lambda _ (zero? (system* "py.test")))))))
7048 (home-page "http://docopt.org")
7049 (synopsis "Command-line interface description language for Python")
7050 (description "This library allows the user to define a command-line
7051interface from a program's help message rather than specifying it
7052programatically with command-line parsers like @code{getopt} and
7053@code{argparse}.")
7054 (license license:expat)))
7055
7056(define-public python2-docopt
7057 (package-with-python2 python-docopt))
7058
7059(define-public python-pythondialog
7060 (package
7061 (name "python-pythondialog")
7062 (version "3.4.0")
7063 (source
7064 (origin
7065 (method url-fetch)
7066 (uri (pypi-uri "pythondialog" version))
7067 (sha256
7068 (base32
7069 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7070 (build-system python-build-system)
7071 (arguments
7072 `(#:phases
7073 (modify-phases %standard-phases
7074 (add-after 'unpack 'patch-path
7075 (lambda* (#:key inputs #:allow-other-keys)
7076 (let* ((dialog (assoc-ref inputs "dialog")))
7077 ;; Since this library really wants to grovel the search path, we
7078 ;; must hardcode dialog's store path into it.
7079 (substitute* "dialog.py"
7080 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7081 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7082 #t))))
7083 #:tests? #f)) ; no test suite
7084 (propagated-inputs
7085 `(("dialog" ,dialog)))
7086 (home-page "http://pythondialog.sourceforge.net/")
7087 (synopsis "Python interface to the UNIX dialog utility")
7088 (description "A Python wrapper for the dialog utility. Its purpose is to
7089provide an easy to use, pythonic and comprehensive Python interface to dialog.
7090This allows one to make simple text-mode user interfaces on Unix-like systems")
7091 (license license:lgpl2.1)
7092 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7093
7094(define-public python2-pythondialog
7095 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7096 (package
7097 (inherit base)
7098 (version (package-version python-pythondialog))
7099 (source (origin
7100 (method url-fetch)
7101 (uri (pypi-uri "python2-pythondialog" version))
7102 (sha256
7103 (base32
7104 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7105
7106(define-public python-configobj
7107 (package
7108 (name "python-configobj")
7109 (version "5.0.6")
7110 (source (origin
7111 (method url-fetch)
7112 (uri (string-append
7113 "https://pypi.python.org/packages/source/c/configobj/"
7114 "configobj-" version ".tar.gz"))
7115 (sha256
7116 (base32
7117 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7118 ;; Patch setup.py so it looks for python-setuptools, which is
7119 ;; required to parse the keyword 'install_requires' in setup.py.
7120 (patches (search-patches "python-configobj-setuptools.patch"))))
7121 (build-system python-build-system)
7122 (propagated-inputs
7123 `(("python-six" ,python-six)))
7124 (synopsis "Config file reading, writing and validation")
7125 (description "ConfigObj is a simple but powerful config file reader and
7126writer: an ini file round tripper. Its main feature is that it is very easy to
7127use, with a straightforward programmer’s interface and a simple syntax for
7128config files.")
7129 (home-page "https://github.com/DiffSK/configobj")
7130 (license license:bsd-3)))
7131
7132(define-public python2-configobj
7133 (package-with-python2 python-configobj))
7134
7135(define-public python-configargparse
7136 (package
7137 (name "python-configargparse")
7138 (version "0.12.0")
7139 (source (origin
7140 (method url-fetch)
7141 (uri (string-append
7142 "https://pypi.io/packages/source/C/ConfigArgParse/"
7143 "ConfigArgParse-" version ".tar.gz"))
7144 (sha256
7145 (base32
7146 "0fgkiqh6r3rbkdq3k8c48m85g52k96686rw3a6jg4lcncrkpvk98"))))
7147 (build-system python-build-system)
7148 (native-inputs
7149 `(("python-pyyaml" ,python-pyyaml)))
7150 (arguments
7151 `(#:phases
7152 (modify-phases %standard-phases
7153 (replace 'check
7154 (lambda _
7155 ;; Bypass setuptools-shim because one test relies on "setup.py"
7156 ;; being the first argument passed to the python call.
7157 ;;
7158 ;; NOTE: Many tests do not run because they rely on Python's
7159 ;; built-in test.test_argparse, but we remove the unit tests from
7160 ;; our Python installation.
7161 (zero? (system* "python" "setup.py" "test")))))))
7162 (synopsis "Replacement for argparse")
7163 (description "A drop-in replacement for argparse that allows options to also
7164be set via config files and/or environment variables.")
7165 (home-page "https://github.com/bw2/ConfigArgParse")
7166 (license license:expat)))
7167
7168(define-public python2-configargparse
7169 (package-with-python2 python-configargparse))
7170
7171(define-public python-contextlib2
7172 (package
7173 (name "python-contextlib2")
7174 (version "0.4.0")
7175 (source
7176 (origin
7177 (method url-fetch)
7178 (uri (pypi-uri "contextlib2" version))
7179 (sha256
7180 (base32
7181 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7182 (build-system python-build-system)
7183 (arguments
7184 `(#:phases
7185 (modify-phases %standard-phases
7186 (replace 'check
7187 (lambda _ (zero?
7188 (system*
7189 "python" "test_contextlib2.py" "-v")))))))
7190 (home-page "http://contextlib2.readthedocs.org/")
7191 (synopsis "Tools for decorators and context managers")
7192 (description "This module is primarily a backport of the Python
71933.2 contextlib to earlier Python versions. Like contextlib, it
7194provides utilities for common tasks involving decorators and context
7195managers. It also contains additional features that are not part of
7196the standard library.")
7197 (license license:psfl)))
7198
7199(define-public python2-contextlib2
7200 (package-with-python2 python-contextlib2))
7201
7202(define-public python-texttable
7203 (package
7204 (name "python-texttable")
7205 (version "0.8.7")
7206 (source
7207 (origin
7208 (method url-fetch)
7209 (uri (pypi-uri "texttable" version))
7210 (sha256
7211 (base32
7212 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
7213 (build-system python-build-system)
7214 (arguments '(#:tests? #f)) ; no tests
7215 (home-page "https://github.com/foutaise/texttable/")
7216 (synopsis "Python module for creating simple ASCII tables")
7217 (description "Texttable is a Python module for creating simple ASCII
7218tables.")
7219 (license license:lgpl2.1+)))
7220
7221(define-public python2-texttable
7222 (package-with-python2 python-texttable))
7223
7224(define-public python-atomicwrites
7225 (package
7226 (name "python-atomicwrites")
7227 (version "1.1.5")
7228 (source (origin
7229 (method url-fetch)
7230 (uri (pypi-uri "atomicwrites" version))
7231 (sha256
7232 (base32
7233 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
7234 (build-system python-build-system)
7235 (synopsis "Atomic file writes in Python")
7236 (description "Library for atomic file writes using platform dependent tools
7237for atomic file system operations.")
7238 (home-page "https://github.com/untitaker/python-atomicwrites")
7239 (license license:expat)))
7240
7241(define-public python2-atomicwrites
7242 (package-with-python2 python-atomicwrites))
7243
7244(define-public python-click-threading
7245 (package
7246 (name "python-click-threading")
7247 (version "0.4.4")
7248 (source (origin
7249 (method url-fetch)
7250 (uri (pypi-uri "click-threading" version))
7251 (sha256
7252 (base32
7253 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
7254 (build-system python-build-system)
7255 (propagated-inputs
7256 `(("python-click" ,python-click)))
7257 (synopsis "Utilities for multithreading in Click")
7258 (description "This package provides utilities for multithreading in Click
7259applications.")
7260 (home-page "https://github.com/click-contrib/click-threading")
7261 (license license:expat)))
7262
7263(define-public python-click-log
7264 (package
7265 (name "python-click-log")
7266 (version "0.3.2")
7267 (source (origin
7268 (method url-fetch)
7269 (uri (pypi-uri "click-log" version))
7270 (sha256
7271 (base32
7272 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
7273 (build-system python-build-system)
7274 (propagated-inputs
7275 `(("python-click" ,python-click)))
7276 (synopsis "Logging for click applications")
7277 (description "This package provides a Python library for logging Click
7278applications.")
7279 (home-page "https://github.com/click-contrib/click-log")
7280 (license license:expat)))
7281
7282(define-public python-apipkg
7283 (package
7284 (name "python-apipkg")
7285 (version "1.4")
7286 (source (origin
7287 (method url-fetch)
7288 (uri (pypi-uri "apipkg" version))
7289 (sha256
7290 (base32
7291 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7292 (build-system python-build-system)
7293 (native-inputs
7294 `(("python-pytest" ,python-pytest)))
7295 (synopsis "Namespace control and lazy-import mechanism")
7296 (description "With apipkg you can control the exported namespace of a Python
7297package and greatly reduce the number of imports for your users. It is a small
7298pure Python module that works on virtually all Python versions.")
7299 (home-page "https://bitbucket.org/hpk42/apipkg")
7300 (license license:expat)))
7301
7302(define-public python2-apipkg
7303 (package-with-python2 python-apipkg))
7304
7305(define-public python-execnet
7306 (package
7307 (name "python-execnet")
7308 (version "1.4.1")
7309 (source (origin
7310 (method url-fetch)
7311 (uri (pypi-uri "execnet" version))
7312 (sha256
7313 (base32
7314 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7315 (build-system python-build-system)
7316 (arguments
7317 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7318 ;; The two test failures are caused by the lack of an `ssh` executable.
7319 ;; The test suite can be run with pytest after the 'install' phase.
7320 #:tests? #f))
7321 (native-inputs
7322 `(("python-pytest" ,python-pytest)
7323 ("python-setuptools-scm" ,python-setuptools-scm)))
7324 (propagated-inputs
7325 `(("python-apipkg" ,python-apipkg)))
7326 (synopsis "Rapid multi-Python deployment")
7327 (description "Execnet provides a share-nothing model with
7328channel-send/receive communication for distributing execution across many
7329Python interpreters across version, platform and network barriers. It has a
7330minimal and fast API targeting the following uses:
7331@enumerate
7332@item distribute tasks to (many) local or remote CPUs
7333@item write and deploy hybrid multi-process applications
7334@item write scripts to administer multiple environments
7335@end enumerate")
7336 (home-page "http://codespeak.net/execnet/")
7337 (license license:expat)))
7338
7339(define-public python2-execnet
7340 (package-with-python2 python-execnet))
7341
7342(define-public python-icalendar
7343 (package
7344 (name "python-icalendar")
7345 (version "4.0.1")
7346 (source (origin
7347 (method url-fetch)
7348 (uri (pypi-uri "icalendar" version))
7349 (sha256
7350 (base32
7351 "139y79y6ijl39m5bj771r43vpah9s4ly7d1k76la6hrx7l144ak8"))))
7352 (build-system python-build-system)
7353 (propagated-inputs
7354 `(("python-dateutil" ,python-dateutil)
7355 ("python-pytz" ,python-pytz)))
7356 (synopsis "Python library for parsing iCalendar files")
7357 (description "The icalendar package is a parser/generator of iCalendar
7358files for use with Python.")
7359 (home-page "https://github.com/collective/icalendar")
7360 (license license:bsd-2)))
7361
7362(define-public python-sphinxcontrib-newsfeed
7363 (package
7364 (name "python-sphinxcontrib-newsfeed")
7365 (version "0.1.4")
7366 (source (origin
7367 (method url-fetch)
7368 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7369 (sha256
7370 (base32
7371 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7372 (arguments '(#:tests? #f)) ; No tests.
7373 (build-system python-build-system)
7374 (propagated-inputs
7375 `(("python-sphinx" ,python-sphinx)))
7376 (synopsis "News Feed extension for Sphinx")
7377 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7378Blog, News or Announcements section to a Sphinx website.")
7379 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7380 (license license:bsd-2)))
7381
7382(define-public python-args
7383 (package
7384 (name "python-args")
7385 (version "0.1.0")
7386 (source (origin
7387 (method url-fetch)
7388 (uri (pypi-uri "args" version))
7389 (sha256
7390 (base32
7391 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7392 (build-system python-build-system)
7393 (home-page "https://github.com/kennethreitz/args")
7394 (synopsis "Command-line argument parser")
7395 (description
7396 "This library provides a Python module to parse command-line arguments.")
7397 (license license:bsd-3)))
7398
7399(define-public python2-args
7400 (package-with-python2 python-args))
7401
7402(define-public python-clint
7403 (package
7404 (name "python-clint")
7405 (version "0.5.1")
7406 (source (origin
7407 (method url-fetch)
7408 (uri (pypi-uri "clint" version))
7409 (sha256
7410 (base32
7411 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7412 (build-system python-build-system)
7413 (arguments
7414 '(#:phases
7415 (modify-phases %standard-phases
7416 (replace 'check
7417 (lambda _
7418 (zero? (system* "py.test" "-v")))))))
7419 (native-inputs
7420 `(("python-pytest" ,python-pytest)))
7421 (propagated-inputs
7422 `(("python-args" ,python-args)))
7423 (home-page "https://github.com/kennethreitz/clint")
7424 (synopsis "Command-line interface tools")
7425 (description
7426 "Clint is a Python module filled with a set of tools for developing
7427command-line applications, including tools for colored and indented
7428output, progress bar display, and pipes.")
7429 (license license:isc)))
7430
7431(define-public python2-clint
7432 (package-with-python2 python-clint))
7433
7434(define-public python-astor
7435 (package
7436 (name "python-astor")
7437 (version "0.5")
7438 (source (origin
7439 (method url-fetch)
7440 (uri (pypi-uri "astor" version))
7441 (sha256
7442 (base32
7443 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7444 (build-system python-build-system)
7445 (home-page "https://github.com/berkerpeksag/astor")
7446 (synopsis "Read and write Python ASTs")
7447 (description
7448 "Astor is designed to allow easy manipulation of Python source via the
7449Abstract Syntax Tree.")
7450 (license license:bsd-3)))
7451
7452(define-public python2-astor
7453 (package-with-python2 python-astor))
7454
7455(define-public python-rply
7456 (package
7457 (name "python-rply")
7458 (version "0.7.5")
7459 (source (origin
7460 (method url-fetch)
7461 (uri (pypi-uri "rply" version))
7462 (sha256
7463 (base32
7464 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
7465 (build-system python-build-system)
7466 (propagated-inputs
7467 `(("python-appdirs" ,python-appdirs)))
7468 (home-page "https://github.com/alex/rply")
7469 (synopsis "Parser generator for Python")
7470 (description
7471 "This package provides a pure Python based parser generator, that also
7472works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7473with a new public API, and RPython support.")
7474 (license license:bsd-3)))
7475
7476(define-public python2-rply
7477 (package-with-python2 python-rply))
7478
7479(define-public python-hy
7480 (package
7481 (name "python-hy")
7482 (version "0.13.0")
7483 (source (origin
7484 (method url-fetch)
7485 (uri (pypi-uri "hy" version))
7486 (sha256
7487 (base32
7488 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
7489 (build-system python-build-system)
7490 (arguments
7491 '(#:phases
7492 (modify-phases %standard-phases
7493 (replace 'check
7494 (lambda _
7495 ;; Tests require write access to HOME.
7496 (setenv "HOME" "/tmp")
7497 (zero? (system* "nosetests")))))))
7498 (native-inputs
7499 `(("python-coverage" ,python-coverage)
7500 ("python-nose" ,python-nose)))
7501 (propagated-inputs
7502 `(("python-astor" ,python-astor)
7503 ("python-clint" ,python-clint)
7504 ("python-rply" ,python-rply)))
7505 (home-page "http://hylang.org/")
7506 (synopsis "Lisp frontend to Python")
7507 (description
7508 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7509its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7510Python at your fingertips, in Lisp form.")
7511 (license license:expat)))
7512
7513(define-public python2-hy
7514 (package-with-python2 python-hy))
7515
7516(define-public python2-functools32
7517 (package
7518 (name "python2-functools32")
7519 (version "3.2.3-2")
7520 (source
7521 (origin
7522 (method url-fetch)
7523 (uri (pypi-uri "functools32" version))
7524 (sha256
7525 (base32
7526 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7527 (build-system python-build-system)
7528 (arguments
7529 `(#:python ,python-2
7530 #:tests? #f)) ; no test target
7531 (home-page "https://github.com/MiCHiLU/python-functools32")
7532 (synopsis
7533 "Backport of the functools module from Python 3.2.3")
7534 (description
7535 "This package is a backport of the @code{functools} module from Python
75363.2.3 for use with older versions of Python and PyPy.")
7537 (license license:expat)))
7538
7539(define-public python2-subprocess32
7540 (package
7541 (name "python2-subprocess32")
7542 (version "3.2.7")
7543 (source (origin
7544 (method url-fetch)
7545 (uri (pypi-uri "subprocess32" version))
7546 (sha256
7547 (base32
7548 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
7549 (patches
7550 (search-patches "python2-subprocess32-disable-input-test.patch"))))
7551 (build-system python-build-system)
7552 (arguments
7553 `(#:python ,python-2
7554 ;; The test suite fails with Python > 2.7.13:
7555 ;; import test.support
7556 ;; ImportError: No module named support
7557 #:tests? #f
7558 #:phases
7559 (modify-phases %standard-phases
7560 (add-after 'unpack 'patch-/bin/sh
7561 (lambda _
7562 (substitute* '("subprocess32.py"
7563 "test_subprocess32.py")
7564 (("/bin/sh") (which "sh")))
7565 #t)))))
7566 (home-page "https://github.com/google/python-subprocess32")
7567 (synopsis "Backport of the subprocess module from Python 3.2")
7568 (description
7569 "This is a backport of the @code{subprocess} standard library module
7570from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
7571new features. On POSIX systems it is guaranteed to be reliable when used
7572in threaded applications. It includes timeout support from Python 3.3 but
7573otherwise matches 3.2’s API.")
7574 (license license:psfl)))
7575
7576(define-public python2-futures
7577 (package
7578 (name "python2-futures")
7579 (version "3.0.5")
7580 (source
7581 (origin
7582 (method url-fetch)
7583 (uri (pypi-uri "futures" version))
7584 (sha256
7585 (base32
7586 "1pw1z4329xvlabdpwqa6b7v2fxf7hl64m4cgr22ckbym8m8m4hh5"))))
7587 (build-system python-build-system)
7588 (arguments `(#:python ,python-2))
7589 (home-page "https://github.com/agronholm/pythonfutures")
7590 (synopsis
7591 "Backport of the concurrent.futures package from Python 3.2")
7592 (description
7593 "The concurrent.futures module provides a high-level interface for
7594asynchronously executing callables. This package backports the
7595concurrent.futures package from Python 3.2")
7596 (license license:bsd-3)))
7597
7598(define-public python-promise
7599 (package
7600 (name "python-promise")
7601 (version "0.4.2")
7602 (source
7603 (origin
7604 (method url-fetch)
7605 (uri (pypi-uri "promise" version))
7606 (sha256
7607 (base32
7608 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7609 (build-system python-build-system)
7610 ;; Tests wants python-futures, which is a python2 only program, and
7611 ;; can't be found by python-promise at test time.
7612 (arguments `(#:tests? #f))
7613 (home-page "https://github.com/syrusakbary/promise")
7614 (synopsis "Promises/A+ implementation for Python")
7615 (description
7616 "Promises/A+ implementation for Python")
7617 (properties `((python2-variant . ,(delay python2-promise))))
7618 (license license:expat)))
7619
7620(define-public python2-promise
7621 (let ((promise (package-with-python2
7622 (strip-python2-variant python-promise))))
7623 (package (inherit promise)
7624 (arguments (substitute-keyword-arguments (package-arguments promise)
7625 ((#:tests? _) #t)))
7626 (native-inputs
7627 `(("python2-futures" ,python2-futures)
7628 ("python2-pytest" ,python2-pytest)
7629 ,@(package-native-inputs promise))))))
7630
7631(define-public python-colorama
7632 (package
7633 (name "python-colorama")
7634 (version "0.3.9")
7635 (source
7636 (origin
7637 (method url-fetch)
7638 (uri (pypi-uri "colorama" version))
7639 (sha256
7640 (base32
7641 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
7642 (build-system python-build-system)
7643 (synopsis "Colored terminal text rendering for Python")
7644 (description "Colorama is a Python library for rendering colored terminal
7645text.")
7646 (home-page "https://pypi.python.org/pypi/colorama")
7647 (license license:bsd-3)))
7648
7649(define-public python2-colorama
7650 (package-with-python2 python-colorama))
7651
7652(define-public python-rsa
7653 (package
7654 (name "python-rsa")
7655 (version "3.4.2")
7656 (source
7657 (origin
7658 (method url-fetch)
7659 (uri (pypi-uri "rsa" version))
7660 (sha256
7661 (base32
7662 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
7663 (build-system python-build-system)
7664 (propagated-inputs
7665 `(("python-pyasn1" ,python-pyasn1)))
7666 (synopsis "Pure-Python RSA implementation")
7667 (description "Python-RSA is a pure-Python RSA implementation. It supports
7668encryption and decryption, signing and verifying signatures, and key
7669generation according to PKCS#1 version 1.5. It can be used as a Python
7670library as well as on the command line.")
7671 (home-page "https://stuvel.eu/rsa")
7672 (license license:asl2.0)))
7673
7674(define-public python2-rsa
7675 (package-with-python2 python-rsa))
7676
7677(define-public python-pluggy
7678 (package
7679 (name "python-pluggy")
7680 (version "0.6.0")
7681 (source
7682 (origin
7683 (method url-fetch)
7684 (uri (pypi-uri "pluggy" version))
7685 (sha256
7686 (base32
7687 "1zqckndfn85l1cd8pndw212zg1bq9fkg1nnj32kp2mppppsyg2kz"))))
7688 (build-system python-build-system)
7689 (synopsis "Plugin and hook calling mechanism for Python")
7690 (description "Pluggy is an extraction of the plugin manager as used by
7691Pytest but stripped of Pytest specific details.")
7692 (home-page "https://pypi.python.org/pypi/pluggy")
7693 (license license:expat)))
7694
7695(define-public python2-pluggy
7696 (package-with-python2 python-pluggy))
7697
7698(define-public python-tox
7699 (package
7700 (name "python-tox")
7701 (version "2.8.1")
7702 (source
7703 (origin
7704 (method url-fetch)
7705 (uri (pypi-uri "tox" version))
7706 (sha256
7707 (base32
7708 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
7709 (build-system python-build-system)
7710 (arguments
7711 ;; FIXME: Tests require pytest-timeout, which itself requires
7712 ;; pytest>=2.8.0 for installation.
7713 '(#:tests? #f))
7714 (propagated-inputs
7715 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
7716 ("python-py" ,python-py)
7717 ("python-virtualenv" ,python-virtualenv)))
7718 (native-inputs
7719 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
7720 ("python-pytest" ,python-pytest) ; >= 2.3.5
7721 ("python-setuptools-scm" ,python-setuptools-scm)))
7722 (home-page "http://tox.testrun.org/")
7723 (synopsis "Virtualenv-based automation of test activities")
7724 (description "Tox is a generic virtualenv management and test command line
7725tool. It can be used to check that a package installs correctly with
7726different Python versions and interpreters, or run tests in each type of
7727supported environment, or act as a frontend to continuous integration
7728servers.")
7729 (license license:expat)))
7730
7731(define-public python2-tox
7732 (package-with-python2 python-tox))
7733
7734(define-public python-jmespath
7735 (package
7736 (name "python-jmespath")
7737 (version "0.9.3")
7738 (source
7739 (origin
7740 (method url-fetch)
7741 (uri (pypi-uri "jmespath" version))
7742 (sha256
7743 (base32
7744 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
7745 (build-system python-build-system)
7746 (native-inputs
7747 `(("python-nose" ,python-nose)))
7748 (synopsis "JSON Matching Expressions")
7749 (description "JMESPath (pronounced “james path”) is a Python library that
7750allows one to declaratively specify how to extract elements from a JSON
7751document.")
7752 (home-page "https://github.com/jmespath/jmespath.py")
7753 (license license:expat)))
7754
7755(define-public python2-jmespath
7756 (package-with-python2 python-jmespath))
7757
7758(define-public python-botocore
7759 (package
7760 (name "python-botocore")
7761 (version "1.8.43")
7762 (source
7763 (origin
7764 (method url-fetch)
7765 (uri (pypi-uri "botocore" version))
7766 (sha256
7767 (base32
7768 "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg"))))
7769 (build-system python-build-system)
7770 (arguments
7771 ;; FIXME: Many tests are failing.
7772 '(#:tests? #f))
7773 (propagated-inputs
7774 `(("python-dateutil" ,python-dateutil)
7775 ("python-docutils" ,python-docutils)
7776 ("python-jmespath" ,python-jmespath)))
7777 (native-inputs
7778 `(("python-mock" ,python-mock)
7779 ("python-nose" ,python-nose)
7780 ("behave" ,behave)
7781 ("python-tox" ,python-tox)
7782 ("python-wheel" ,python-wheel)))
7783 (home-page "https://github.com/boto/botocore")
7784 (synopsis "Low-level interface to AWS")
7785 (description "Botocore is a Python library that provides a low-level
7786interface to the Amazon Web Services (AWS) API.")
7787 (license license:asl2.0)))
7788
7789(define-public python2-botocore
7790 (package-with-python2 python-botocore))
7791
7792(define-public python-xdo
7793 (package
7794 (name "python-xdo")
7795 (version "0.3")
7796 (source (origin
7797 (method url-fetch)
7798 (uri (string-append
7799 "http://http.debian.net/debian/pool/main/p/python-xdo/"
7800 "python-xdo_" version ".orig.tar.gz"))
7801 (sha256
7802 (base32
7803 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
7804 (build-system python-build-system)
7805 (arguments
7806 '(#:phases
7807 (modify-phases %standard-phases
7808 (add-before 'install 'patch-libxdo-path
7809 ;; Hardcode the path of dynamically loaded libxdo library.
7810 (lambda* (#:key inputs #:allow-other-keys)
7811 (let ((libxdo (string-append
7812 (assoc-ref inputs "xdotool")
7813 "/lib/libxdo.so")))
7814 (substitute* "xdo/_xdo.py"
7815 (("find_library\\(\"xdo\"\\)")
7816 (simple-format #f "\"~a\"" libxdo)))
7817 #t))))
7818 #:tests? #f)) ; no tests provided
7819 (propagated-inputs
7820 `(("python-six" ,python-six)))
7821 (inputs
7822 `(("xdotool" ,xdotool)
7823 ("libX11" ,libx11)))
7824 (home-page "https://tracker.debian.org/pkg/python-xdo")
7825 (synopsis "Python library for simulating X11 keyboard/mouse input")
7826 (description "Provides bindings to libxdo for manipulating X11 via simulated
7827input. (Note that this is mostly a legacy library; you may wish to look at
7828python-xdo for newer bindings.)")
7829 (license license:bsd-3)))
7830
7831(define-public python2-xdo
7832 (package-with-python2 python-xdo))
7833
7834(define-public python-mako
7835 (package
7836 (name "python-mako")
7837 (version "1.0.6")
7838 (source
7839 (origin
7840 (method url-fetch)
7841 (uri (pypi-uri "Mako" version))
7842 (sha256
7843 (base32
7844 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
7845 (build-system python-build-system)
7846 (propagated-inputs
7847 `(("python-markupsafe" ,python-markupsafe)))
7848 (native-inputs
7849 `(("python-mock" ,python-mock)
7850 ("python-nose" ,python-nose)
7851 ("python-pytest" ,python-pytest)))
7852 (home-page "http://www.makotemplates.org/")
7853 (synopsis "Templating language for Python")
7854 (description "Mako is a templating language for Python that compiles
7855templates into Python modules.")
7856 (license license:expat)))
7857
7858(define-public python2-mako
7859 (package-with-python2 python-mako))
7860
7861(define-public python-waitress
7862 (package
7863 (name "python-waitress")
7864 (version "1.1.0")
7865 (source
7866 (origin
7867 (method url-fetch)
7868 (uri (pypi-uri "waitress" version))
7869 (patches (search-patches "python-waitress-fix-tests.patch"))
7870 (sha256
7871 (base32
7872 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
7873 (build-system python-build-system)
7874 (home-page "https://github.com/Pylons/waitress")
7875 (synopsis "Waitress WSGI server")
7876 (description "Waitress is meant to be a production-quality pure-Python WSGI
7877server with very acceptable performance.")
7878 (license license:zpl2.1)))
7879
7880(define-public python2-waitress
7881 (package-with-python2 python-waitress))
7882
7883(define-public python-pyquery
7884 (package
7885 (name "python-pyquery")
7886 (version "1.2.17")
7887 (source
7888 (origin
7889 (method url-fetch)
7890 (uri (pypi-uri "pyquery" version))
7891 (sha256
7892 (base32
7893 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
7894 (build-system python-build-system)
7895 (native-inputs
7896 `(("python-webob" ,python-webob)
7897 ("python-webtest" ,python-webtest)))
7898 (propagated-inputs
7899 `(("python-lxml" ,python-lxml)
7900 ("python-cssselect" ,python-cssselect)))
7901 (home-page "https://github.com/gawel/pyquery")
7902 (synopsis "Make jQuery-like queries on xml documents")
7903 (description "pyquery allows you to make jQuery queries on xml documents.
7904The API is as much as possible the similar to jQuery. pyquery uses lxml for
7905fast xml and html manipulation.")
7906 (license license:bsd-3)))
7907
7908(define-public python2-pyquery
7909 (package-with-python2 python-pyquery))
7910
7911(define-public python-anyjson
7912 (package
7913 (name "python-anyjson")
7914 (version "0.3.3")
7915 (source
7916 (origin
7917 (method url-fetch)
7918 (uri (pypi-uri "anyjson" version))
7919 (sha256
7920 (base32
7921 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
7922 (build-system python-build-system)
7923 (arguments
7924 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
7925 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
7926 ;; whatever) so this transformation needs to be done before the tests
7927 ;; can be run. Maybe we could add a build step to transform beforehand
7928 ;; but it could be annoying/difficult.
7929 ;; We can enable tests for the Python 2 version, though, and do below.
7930 #:tests? #f))
7931 (home-page "https://bitbucket.org/runeh/anyjson/")
7932 (synopsis
7933 "Wraps best available JSON implementation in a common interface")
7934 (description
7935 "Anyjson loads whichever is the fastest JSON module installed
7936and provides a uniform API regardless of which JSON implementation is used.")
7937 (license license:bsd-3)
7938 (properties `((python2-variant . ,(delay python2-anyjson))))))
7939
7940(define-public python2-anyjson
7941 (let ((anyjson (package-with-python2
7942 (strip-python2-variant python-anyjson))))
7943 (package
7944 (inherit anyjson)
7945 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
7946 #:tests? #t
7947 ,@(package-arguments anyjson)))
7948 (native-inputs `(("python2-nose" ,python2-nose))))))
7949
7950(define-public python-amqp
7951 (package
7952 (name "python-amqp")
7953 (version "1.4.9")
7954 (source
7955 (origin
7956 (method url-fetch)
7957 (uri (pypi-uri "amqp" version))
7958 (sha256
7959 (base32
7960 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
7961 (build-system python-build-system)
7962 (native-inputs
7963 `(("python-nose" ,python-nose)
7964 ("python-mock" ,python-mock)))
7965 (home-page "https://github.com/celery/py-amqp")
7966 (synopsis
7967 "Low-level AMQP client for Python (fork of amqplib)")
7968 (description
7969 "This is a fork of amqplib which was originally written by Barry Pederson.
7970It is maintained by the Celery project, and used by kombu as a pure python
7971alternative when librabbitmq is not available.")
7972 (license license:lgpl2.1+)
7973 (properties `((python2-variant . ,(delay python2-amqp))))))
7974
7975(define-public python2-amqp
7976 (let ((amqp (package-with-python2
7977 (strip-python2-variant python-amqp))))
7978 (package
7979 (inherit amqp)
7980 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
7981 ;; unmaintained. Weirdly, does not do this on the python 3
7982 ;; version?
7983 #:tests? #f
7984 ,@(package-arguments amqp))))))
7985
7986(define-public python-txamqp
7987 (package
7988 (name "python-txamqp")
7989 (version "0.8.0")
7990 (source
7991 (origin
7992 (method url-fetch)
7993 (uri (pypi-uri "txAMQP" version))
7994 (sha256
7995 (base32
7996 "1r43a66dd547mz40ikymm8y3d480cidy560fj81qc0jk4lncgmmr"))))
7997 (build-system python-build-system)
7998 (propagated-inputs
7999 `(("python-six" ,python-six)
8000 ("python-twisted" ,python-twisted)))
8001 (home-page "https://github.com/txamqp/txamqp")
8002 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8003 (description
8004 "This package provides a Python library for communicating with AMQP peers
8005and brokers using the asynchronous networking framework Twisted. It contains
8006all the necessary code to connect, send and receive messages to/from an
8007AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8008also includes support for using Thrift RPC over AMQP in Twisted
8009applications.")
8010 (license license:asl2.0)))
8011
8012(define-public python2-txamqp
8013 (package-with-python2 python-txamqp))
8014
8015(define-public python-kombu
8016 (package
8017 (name "python-kombu")
8018 (version "3.0.37")
8019 (source
8020 (origin
8021 (method url-fetch)
8022 (uri (pypi-uri "kombu" version))
8023 (sha256
8024 (base32
8025 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
8026 (build-system python-build-system)
8027 (native-inputs
8028 `(("python-mock" ,python-mock)
8029 ("python-nose" ,python-nose)))
8030 (propagated-inputs
8031 `(("python-anyjson" ,python-anyjson)
8032 ("python-amqp" ,python-amqp)
8033 ("python-redis" ,python-redis)))
8034 (home-page "http://kombu.readthedocs.org")
8035 (synopsis "Message passing library for Python")
8036 (description "The aim of Kombu is to make messaging in Python as easy as
8037possible by providing an idiomatic high-level interface for the AMQ protocol,
8038and also provide proven and tested solutions to common messaging problems.
8039AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8040message orientation, queuing, routing, reliability and security, for which the
8041RabbitMQ messaging server is the most popular implementation.")
8042 (license license:bsd-3)
8043 (properties `((python2-variant . ,(delay python2-kombu))))))
8044
8045(define-public python2-kombu
8046 (let ((kombu (package-with-python2
8047 (strip-python2-variant python-kombu))))
8048 (package
8049 (inherit kombu)
8050 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8051 ;; It works fine on the python3 variant.
8052 #:tests? #f
8053 ,@(package-arguments kombu)))
8054 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8055 ,@(package-native-inputs kombu))))))
8056
8057(define-public python-billiard
8058 (package
8059 (name "python-billiard")
8060 (version "3.3.0.23")
8061 (source
8062 (origin
8063 (method url-fetch)
8064 (uri (pypi-uri "billiard" version))
8065 (sha256
8066 (base32
8067 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
8068 (build-system python-build-system)
8069 (native-inputs
8070 `(("python-nose" ,python-nose)))
8071 (home-page "https://github.com/celery/billiard")
8072 (synopsis
8073 "Python multiprocessing fork with improvements and bugfixes")
8074 (description
8075 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8076multiprocessing package itself is a renamed and updated version of R Oudkerk's
8077pyprocessing package. This standalone variant is intended to be compatible with
8078Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8079 (license license:bsd-3)
8080 (properties `((python2-variant . ,(delay python2-billiard))))))
8081
8082(define-public python2-billiard
8083 (let ((billiard (package-with-python2
8084 (strip-python2-variant python-billiard))))
8085 (package
8086 (inherit billiard)
8087 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8088 ("python2-mock" ,python2-mock)
8089 ,@(package-native-inputs billiard))))))
8090
8091(define-public python-celery
8092 (package
8093 (name "python-celery")
8094 (version "3.1.24")
8095 (source
8096 (origin
8097 (method url-fetch)
8098 (uri (pypi-uri "celery" version))
8099 (sha256
8100 (base32
8101 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
8102 (build-system python-build-system)
8103 (arguments
8104 `(#:phases
8105 (modify-phases %standard-phases
8106 ;; These tests break with Python 3.5:
8107 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
8108 (replace 'check
8109 (lambda _
8110 (zero?
8111 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
8112 (native-inputs
8113 `(("python-nose" ,python-nose)))
8114 (propagated-inputs
8115 `(("python-pytz" ,python-pytz)
8116 ("python-billiard" ,python-billiard)
8117 ("python-kombu" ,python-kombu)))
8118 (home-page "http://celeryproject.org")
8119 (synopsis "Distributed Task Queue")
8120 (description "Celery is an asynchronous task queue/job queue based on
8121distributed message passing. It is focused on real-time operation, but
8122supports scheduling as well. The execution units, called tasks, are executed
8123concurrently on a single or more worker servers using multiprocessing,
8124Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8125synchronously (wait until ready).")
8126 (license license:bsd-3)
8127 (properties `((python2-variant . ,(delay python2-celery))))))
8128
8129(define-public python2-celery
8130 (let ((celery (package-with-python2
8131 (strip-python2-variant python-celery))))
8132 (package
8133 (inherit celery)
8134 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8135 ("python2-mock" ,python2-mock)
8136 ,@(package-native-inputs celery))))))
8137
8138(define-public python-translitcodec
8139 (package
8140 (name "python-translitcodec")
8141 (version "0.4.0")
8142 (source
8143 (origin
8144 (method url-fetch)
8145 (uri (pypi-uri "translitcodec" version))
8146 (sha256
8147 (base32
8148 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8149 (build-system python-build-system)
8150 (arguments
8151 `(#:tests? #f)) ; no tests provided
8152 (home-page
8153 "https://github.com/claudep/translitcodec")
8154 (synopsis
8155 "Unicode to 8-bit charset transliteration codec")
8156 (description
8157 "This package contains codecs for transliterating ISO 10646 texts into
8158best-effort representations using smaller coded character sets (ASCII,
8159ISO 8859, etc.).")
8160 (license license:expat)))
8161
8162(define-public python2-translitcodec
8163 (package-with-python2 python-translitcodec))
8164
8165(define-public python-editor
8166 (package
8167 (name "python-editor")
8168 (version "0.5")
8169 (source
8170 (origin
8171 (method url-fetch)
8172 (uri (pypi-uri "python-editor" version))
8173 (sha256
8174 (base32
8175 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8176 (build-system python-build-system)
8177 (home-page
8178 "https://github.com/fmoo/python-editor")
8179 (synopsis
8180 "Programmatically open an editor, capture the result")
8181 (description
8182 "python-editor is a library that provides the editor module for
8183programmatically interfacing with your system's $EDITOR.")
8184 (license license:asl2.0)))
8185
8186(define-public python2-editor
8187 (package-with-python2 python-editor))
8188
8189(define-public python-sphinxcontrib-programoutput
8190 (package
8191 (name "python-sphinxcontrib-programoutput")
8192 (version "0.10")
8193 (source (origin
8194 (method url-fetch)
8195 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8196 (sha256
8197 (base32
8198 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
8199 (build-system python-build-system)
8200 (arguments
8201 ;; FIXME: Many tests are failing and the upstream is gone.
8202 '(#:tests? #f))
8203 (propagated-inputs
8204 `(("python-sphinx" ,python-sphinx)))
8205 (synopsis "Sphinx extension to include program output")
8206 (description "A Sphinx extension to literally insert the output of arbitrary
8207commands into documents, helping you to keep your command examples up to date.")
8208 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8209 (license license:bsd-2)))
8210
8211(define-public python2-sphinxcontrib-programoutput
8212 (package-with-python2 python-sphinxcontrib-programoutput))
8213
8214(define-public python-sphinx-repoze-autointerface
8215 (package
8216 (name "python-sphinx-repoze-autointerface")
8217 (version "0.8")
8218 (source (origin
8219 (method url-fetch)
8220 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8221 (sha256
8222 (base32
8223 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8224 (build-system python-build-system)
8225 (arguments '(#:tests? #f)) ; No tests.
8226 (propagated-inputs
8227 `(("python-sphinx" ,python-sphinx)
8228 ("python-zope-interface" ,python-zope-interface)))
8229 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8230 (description "This package defines an extension for the Sphinx documentation
8231system. The extension allows generation of API documentation by
8232introspection of @code{zope.interface} instances in code.")
8233 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8234 (license license:repoze)))
8235
8236(define-public python2-sphinx-repoze-autointerface
8237 (package-with-python2 python-sphinx-repoze-autointerface))
8238
8239(define-public python-vobject
8240 (package
8241 (name "python-vobject")
8242 (version "0.9.5")
8243 (source (origin
8244 (method url-fetch)
8245 (uri (pypi-uri "vobject" version))
8246 (sha256
8247 (base32
8248 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
8249 (build-system python-build-system)
8250 (arguments
8251 '(;; The test suite relies on some non-portable Windows interfaces.
8252 #:tests? #f))
8253 (propagated-inputs
8254 `(("python-dateutil" ,python-dateutil)
8255 ("python-pyicu" ,python-pyicu)))
8256 (synopsis "Parse and generate vCard and vCalendar files")
8257 (description "Vobject is intended to be a full featured Python package for
8258parsing and generating vCard and vCalendar files. Currently, iCalendar files
8259are supported and well tested. vCard 3.0 files are supported, and all data
8260should be imported, but only a few components are understood in a sophisticated
8261way.")
8262 (home-page "http://eventable.github.io/vobject/")
8263 (license license:asl2.0)))
8264
8265(define-public python2-vobject
8266 (package-with-python2 python-vobject))
8267
8268(define-public python-munkres
8269 (package
8270 (name "python-munkres")
8271 (version "1.0.8")
8272 (source (origin
8273 (method url-fetch)
8274 (uri (pypi-uri "munkres" version))
8275 (sha256
8276 (base32
8277 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
8278 (build-system python-build-system)
8279 (arguments
8280 '(#:tests? #f)) ; no test suite
8281 (home-page "http://software.clapper.org/munkres/")
8282 (synopsis "Implementation of the Munkres algorithm")
8283 (description "The Munkres module provides an implementation of the Munkres
8284algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8285useful for solving the Assignment Problem.")
8286 (license license:bsd-3)))
8287
8288(define-public python2-munkres
8289 (package-with-python2 python-munkres))
8290
8291(define-public python-whoosh
8292 (package
8293 (name "python-whoosh")
8294 (version "2.7.4")
8295 (source
8296 (origin
8297 (method url-fetch)
8298 (uri (pypi-uri "Whoosh" version))
8299 (sha256
8300 (base32
8301 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8302 (build-system python-build-system)
8303 (native-inputs
8304 `(("python-pytest" ,python-pytest)))
8305 (home-page "https://bitbucket.org/mchaput/whoosh")
8306 (synopsis "Full text indexing, search, and spell checking library")
8307 (description
8308 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8309checking library.")
8310 (license license:bsd-2)))
8311
8312(define-public python2-whoosh
8313 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8314 (package (inherit whoosh)
8315 (propagated-inputs
8316 `(("python2-backport-ssl-match-hostname"
8317 ,python2-backport-ssl-match-hostname)
8318 ,@(package-propagated-inputs whoosh))))))
8319
8320(define-public python-pathlib
8321 (package
8322 (name "python-pathlib")
8323 (version "1.0.1")
8324 (source (origin
8325 (method url-fetch)
8326 (uri (pypi-uri "pathlib" version))
8327 (sha256
8328 (base32
8329 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8330 (build-system python-build-system)
8331 ;; The tests depend on the internal "test" module, which does not provide
8332 ;; a stable interface.
8333 (arguments `(#:tests? #f))
8334 (home-page "https://pathlib.readthedocs.org/")
8335 (synopsis "Object-oriented file system paths")
8336 (description "Pathlib offers a set of classes to handle file system paths.
8337It offers the following advantages over using string objects:
8338
8339@enumerate
8340@item No more cumbersome use of os and os.path functions. Everything can
8341be done easily through operators, attribute accesses, and method calls.
8342@item Embodies the semantics of different path types. For example,
8343comparing Windows paths ignores casing.
8344@item Well-defined semantics, eliminating any inconsistencies or
8345ambiguities (forward vs. backward slashes, etc.).
8346@end enumerate
8347
8348Note: In Python 3.4, pathlib is now part of the standard library. For other
8349Python versions please consider python-pathlib2 instead, which tracks the
8350standard library module. This module (python-pathlib) isn't maintained
8351anymore.")
8352 (license license:expat)))
8353
8354(define-public python2-pathlib
8355 (package-with-python2 python-pathlib))
8356
8357(define-public python2-pathlib2
8358 (package
8359 (name "python2-pathlib2")
8360 (version "2.3.2")
8361 (source (origin
8362 (method url-fetch)
8363 (uri (pypi-uri "pathlib2" version))
8364 (sha256
8365 (base32
8366 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
8367 (build-system python-build-system)
8368 ;; We only need the the Python 2 variant, since for Python 3 our minimum
8369 ;; version is 3.4 which already includes this package as part of the
8370 ;; standard library.
8371 (arguments
8372 `(#:python ,python-2))
8373 (propagated-inputs
8374 `(("python2-scandir" ,python2-scandir)
8375 ("python2-six" ,python2-six)))
8376 (home-page "https://pypi.python.org/pypi/pathlib2/")
8377 (synopsis "Object-oriented file system paths - backport of standard
8378pathlib module")
8379 (description "The goal of pathlib2 is to provide a backport of standard
8380pathlib module which tracks the standard library module, so all the newest
8381features of the standard pathlib can be used also on older Python versions.
8382
8383Pathlib offers a set of classes to handle file system paths. It offers the
8384following advantages over using string objects:
8385
8386@enumerate
8387@item No more cumbersome use of os and os.path functions. Everything can
8388be done easily through operators, attribute accesses, and method calls.
8389@item Embodies the semantics of different path types. For example,
8390comparing Windows paths ignores casing.
8391@item Well-defined semantics, eliminating any inconsistencies or
8392ambiguities (forward vs. backward slashes, etc.).
8393@end enumerate")
8394 (license license:expat)))
8395
8396(define-public python-jellyfish
8397 (package
8398 (name "python-jellyfish")
8399 (version "0.5.6")
8400 (source (origin
8401 (method url-fetch)
8402 (uri (pypi-uri "jellyfish" version))
8403 (sha256
8404 (base32
8405 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
8406 (build-system python-build-system)
8407 (native-inputs
8408 `(("python-pytest" ,python-pytest)))
8409 (home-page "https://github.com/jamesturk/jellyfish")
8410 (synopsis "Approximate and phonetic matching of strings")
8411 (description "Jellyfish uses a variety of string comparison and phonetic
8412encoding algorithms to do fuzzy string matching.")
8413 (license license:bsd-2)
8414 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8415
8416(define-public python2-jellyfish
8417 (let ((jellyfish (package-with-python2
8418 (strip-python2-variant python-jellyfish))))
8419 (package (inherit jellyfish)
8420 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
8421 ,@(package-native-inputs jellyfish))))))
8422
8423(define-public python2-unicodecsv
8424 (package
8425 (name "python2-unicodecsv")
8426 (version "0.14.1")
8427 (source (origin
8428 (method url-fetch)
8429 ;; The test suite is not included in the PyPi release.
8430 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8431 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8432 "archive/" version ".tar.gz"))
8433 (file-name (string-append name "-" version ".tar.gz"))
8434 (sha256
8435 (base32
8436 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8437 (build-system python-build-system)
8438 (arguments
8439 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8440 #:python ,python-2))
8441 (native-inputs
8442 `(("python2-unittest2" ,python2-unittest2)))
8443 (home-page "https://github.com/jdunck/python-unicodecsv")
8444 (synopsis "Unicode CSV module for Python 2")
8445 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8446module, adding support for Unicode strings.")
8447 (license license:bsd-2)))
8448
8449(define-public python-rarfile
8450 (package
8451 (name "python-rarfile")
8452 (version "2.8")
8453 (source (origin
8454 (method url-fetch)
8455 (uri (pypi-uri "rarfile" version))
8456 (sha256
8457 (base32
8458 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
8459 (build-system python-build-system)
8460 (arguments
8461 '(#:phases
8462 (modify-phases %standard-phases
8463 (replace 'check
8464 ;; Many tests fail, but the installation proceeds.
8465 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
8466 (native-inputs
8467 `(("which" ,which))) ; required for tests
8468 (propagated-inputs
8469 `(("libarchive" ,libarchive)))
8470 (home-page "https://github.com/markokr/rarfile")
8471 (synopsis "RAR archive reader for Python")
8472 (description "This is Python module for RAR archive reading. The interface
8473is made as zipfile like as possible.")
8474 (license license:isc)))
8475
8476(define-public python2-rarfile
8477 (package-with-python2 python-rarfile))
8478
8479(define-public python-magic
8480 (package
8481 (name "python-magic")
8482 (version "0.4.15")
8483 (source
8484 (origin
8485 (method url-fetch)
8486 (uri (pypi-uri "python-magic" version))
8487 (sha256
8488 (base32
8489 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
8490 (file-name (string-append name "-" version "-checkout"))))
8491 (build-system python-build-system)
8492 (arguments
8493 ;; The tests are unreliable, so don't run them. The tests fail
8494 ;; under Python3 because they were written for Python2 and
8495 ;; contain import statements that do not work in Python3. One of
8496 ;; the tests fails under Python2 because its assertions are
8497 ;; overly stringent; it relies on comparing output strings which
8498 ;; are brittle and can change depending on the version of
8499 ;; libmagic being used and the system on which the test is
8500 ;; running. In my case, under GuixSD 0.10.0, only one test
8501 ;; failed, and it seems to have failed only because the version
8502 ;; of libmagic that is packaged in Guix outputs a slightly
8503 ;; different (but not wrong) string than the one that the test
8504 ;; expected.
8505 '(#:tests? #f
8506 #:phases (modify-phases %standard-phases
8507 ;; Replace a specific method call with a hard-coded
8508 ;; path to the necessary libmagic.so file in the
8509 ;; store. If we don't do this, then the method call
8510 ;; will fail to find the libmagic.so file, which in
8511 ;; turn will cause any application using
8512 ;; python-magic to fail.
8513 (add-before 'build 'hard-code-path-to-libmagic
8514 (lambda* (#:key inputs #:allow-other-keys)
8515 (let ((file (assoc-ref inputs "file")))
8516 (substitute* "magic.py"
8517 (("ctypes.util.find_library\\('magic'\\)")
8518 (string-append "'" file "/lib/libmagic.so'")))
8519 #t)))
8520 (add-before 'install 'disable-egg-compression
8521 (lambda _
8522 (let ((port (open-file "setup.cfg" "a")))
8523 (display "\n[easy_install]\nzip_ok = 0\n"
8524 port)
8525 (close-port port)
8526 #t))))))
8527 (inputs
8528 ;; python-magic needs to be able to find libmagic.so.
8529 `(("file" ,file)))
8530 (home-page
8531 "https://github.com/ahupp/python-magic")
8532 (synopsis
8533 "File type identification using libmagic")
8534 (description
8535 "This module uses ctypes to access the libmagic file type
8536identification library. It makes use of the local magic database and
8537supports both textual and MIME-type output. Note that this module and
8538the python-file module both provide a \"magic.py\" file; these two
8539modules, which are different and were developed separately, both serve
8540the same purpose: to provide Python bindings for libmagic.")
8541 (license license:expat)))
8542
8543(define-public python2-magic
8544 (package-with-python2 python-magic))
8545
8546(define-public python2-s3cmd
8547 (package
8548 (name "python2-s3cmd")
8549 (version "1.6.1")
8550 (source
8551 (origin
8552 (method url-fetch)
8553 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
8554 "s3cmd-" version ".tar.gz"))
8555 (sha256
8556 (base32
8557 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8558 (build-system python-build-system)
8559 (arguments
8560 ;; s3cmd is written for python2 only and contains no tests.
8561 `(#:python ,python-2
8562 #:tests? #f))
8563 (propagated-inputs
8564 `(("python2-dateutil" ,python2-dateutil)
8565 ;; The python-file package also provides a magic.py module.
8566 ;; This is an unfortunate state of affairs; however, s3cmd
8567 ;; fails to install if it cannot find specifically the
8568 ;; python-magic package. Thus we include it, instead of using
8569 ;; python-file. Ironically, s3cmd sometimes works better
8570 ;; without libmagic bindings at all:
8571 ;; https://github.com/s3tools/s3cmd/issues/198
8572 ("python2-magic" ,python2-magic)))
8573 (home-page "http://s3tools.org/s3cmd")
8574 (synopsis "Command line tool for S3-compatible storage services")
8575 (description
8576 "S3cmd is a command line tool for uploading, retrieving and managing data
8577in storage services that are compatible with the Amazon Simple Storage
8578Service (S3) protocol, including S3 itself. It supports rsync-like backup,
8579GnuPG encryption, and more. It also supports management of Amazon's
8580CloudFront content delivery network.")
8581 (license license:gpl2+)))
8582
8583(define-public python-pkgconfig
8584 (package
8585 (name "python-pkgconfig")
8586 (version "1.1.0")
8587 (source
8588 (origin
8589 (method url-fetch)
8590 (uri (pypi-uri "pkgconfig" version))
8591 (sha256
8592 (base32
8593 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
8594 (build-system python-build-system)
8595 (native-inputs
8596 `(("python-nose" ,python-nose)))
8597 (inputs
8598 `(("pkg-config" ,pkg-config)))
8599 (arguments
8600 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
8601 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
8602 #:tests? #f
8603 ;; Hard-code the path to pkg-config.
8604 #:phases
8605 (modify-phases %standard-phases
8606 (add-before
8607 'build 'patch
8608 (lambda _
8609 (substitute* "pkgconfig/pkgconfig.py"
8610 (("cmd = 'pkg-config")
8611 (string-append "cmd = '" (which "pkg-config"))))
8612 #t)))))
8613 (home-page "https://github.com/matze/pkgconfig")
8614 (synopsis "Python interface for pkg-config")
8615 (description "This module provides a Python interface to pkg-config. It
8616can be used to find all pkg-config packages, check if a package exists,
8617check if a package meets certain version requirements, query CFLAGS and
8618LDFLAGS and parse the output to build extensions with setup.py.")
8619 (license license:expat)))
8620
8621(define-public python2-pkgconfig
8622 (package-with-python2 python-pkgconfig))
8623
8624(define-public python-bz2file
8625 (package
8626 (name "python-bz2file")
8627 (version "0.98")
8628 (source
8629 (origin
8630 (method url-fetch)
8631 (uri (pypi-uri "bz2file" version))
8632 (sha256
8633 (base32
8634 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
8635 (build-system python-build-system)
8636 (arguments
8637 `(#:tests? #f)) ; Tests use deprecated python modules.
8638 (home-page "https://github.com/nvawda/bz2file")
8639 (synopsis "Read and write bzip2-compressed files")
8640 (description
8641 "Bz2file is a Python library for reading and writing bzip2-compressed
8642files. It contains a drop-in replacement for the I/O interface in the
8643standard library's @code{bz2} module, including features from the latest
8644development version of CPython that are not available in older releases.")
8645 (license license:asl2.0)
8646 (properties `((python2-variant . ,(delay python2-bz2file))))))
8647
8648(define-public python2-bz2file
8649 (let ((base (package-with-python2
8650 (strip-python2-variant python-bz2file))))
8651 (package
8652 (inherit base)
8653 (arguments
8654 `(#:python ,python-2
8655 #:phases
8656 (modify-phases %standard-phases
8657 ;; 'python setup.py test' does not work as of 0.98.
8658 ;; There is only the one test file, so we run it directly.
8659 (replace 'check
8660 (lambda _ (zero? (system* "python"
8661 "test_bz2file.py"))))))))))
8662
8663(define-public python-future
8664 (package
8665 (name "python-future")
8666 (version "0.16.0")
8667 (source
8668 (origin
8669 (method url-fetch)
8670 (uri (pypi-uri "future" version))
8671 (sha256
8672 (base32
8673 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
8674 (build-system python-build-system)
8675 ;; Many tests connect to the network or are otherwise flawed.
8676 ;; https://github.com/PythonCharmers/python-future/issues/210
8677 (arguments
8678 `(#:tests? #f))
8679 (home-page "http://python-future.org")
8680 (synopsis "Single-source support for Python 3 and 2")
8681 (description
8682 "@code{python-future} is the missing compatibility layer between Python 2 and
8683Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
8684to support both Python 2 and Python 3 with minimal overhead.")
8685 (license license:expat)))
8686
8687(define-public python2-future
8688 (package-with-python2 python-future))
8689
8690(define-public python-cysignals
8691 (package
8692 (name "python-cysignals")
8693 (version "1.1.0")
8694 (source
8695 (origin
8696 (method url-fetch)
8697 (uri (pypi-uri "cysignals" version ".tar.bz2"))
8698 (sha256
8699 (base32
8700 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
8701 (build-system python-build-system)
8702 (native-inputs
8703 `(("python-cython" ,python-cython)
8704 ("python-sphinx" ,python-sphinx)))
8705 (inputs
8706 `(("pari-gp" ,pari-gp)))
8707 (arguments
8708 `(#:modules ((guix build python-build-system)
8709 ((guix build gnu-build-system) #:prefix gnu:)
8710 (guix build utils))
8711 ;; FIXME: Tests are executed after installation and currently fail
8712 ;; when not installing into standard locations; the author is working
8713 ;; on a fix.
8714 #:tests? #f
8715 #:phases
8716 (modify-phases %standard-phases
8717 (add-before
8718 'build 'configure
8719 (assoc-ref gnu:%standard-phases 'configure)))))
8720 (home-page
8721 "https://github.com/sagemath/cysignals")
8722 (synopsis
8723 "Handling of interrupts and signals for Cython")
8724 (description
8725 "The cysignals package provides mechanisms to handle interrupts (and
8726other signals and errors) in Cython code, using two related approaches,
8727for mixed Cython/Python code or external C libraries and pure Cython code,
8728respectively.")
8729 (license license:lgpl3+)))
8730
8731(define-public python2-cysignals
8732 (package-with-python2 python-cysignals))
8733
8734(define-public python2-shedskin
8735 (package
8736 (name "python2-shedskin")
8737 (version "0.9.4")
8738 (source
8739 (origin
8740 (method url-fetch)
8741 (uri (string-append "https://github.com/shedskin/shedskin/"
8742 "releases/download/v" version
8743 "/shedskin-" version ".tgz"))
8744 (sha256
8745 (base32
8746 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
8747 (build-system python-build-system)
8748 (arguments
8749 `(#:python ,python-2
8750 #:phases (modify-phases %standard-phases
8751 (add-after 'unpack 'fix-resulting-include-libs
8752 (lambda* (#:key inputs #:allow-other-keys)
8753 (let ((libgc (assoc-ref inputs "libgc"))
8754 (pcre (assoc-ref inputs "pcre")))
8755 (substitute* "shedskin/makefile.py"
8756 (("variable == 'CCFLAGS':[ ]*")
8757 (string-append "variable == 'CCFLAGS':\n"
8758 " line += ' -I " pcre "/include"
8759 " -I " libgc "/include'"))
8760 (("variable == 'LFLAGS':[ ]*")
8761 (string-append "variable == 'LFLAGS':\n"
8762 " line += ' -L" pcre "/lib"
8763 " -L " libgc "/lib'")))
8764 #t))))))
8765 (inputs `(("pcre" ,pcre)
8766 ("libgc" ,libgc)))
8767 (home-page "https://shedskin.github.io/")
8768 (synopsis "Experimental Python-2 to C++ Compiler")
8769 (description (string-append "This is an experimental compiler for a subset of
8770Python. It generates C++ code and a Makefile."))
8771 (license (list license:gpl3 license:bsd-3 license:expat))))
8772
8773(define-public python2-rope
8774 (package
8775 (name "python2-rope")
8776 (version "0.10.3")
8777 (source
8778 (origin
8779 (method url-fetch)
8780 (uri (pypi-uri "rope" version))
8781 (sha256
8782 (base32
8783 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
8784 (arguments
8785 ;; Rope is currently python-2 only.
8786 ;; https://github.com/python-rope/rope/issues/57
8787 `(#:python ,python-2))
8788 (build-system python-build-system)
8789 (native-inputs
8790 `(("python2-unittest2" ,python2-unittest2)))
8791 (home-page "https://github.com/python-rope/rope")
8792 (synopsis "Refactoring library for Python")
8793 (description "Rope is a refactoring library for Python. It facilitates
8794the renaming, moving and extracting of attributes, functions, modules, fields
8795and parameters in Python 2 source code. These refactorings can also be applied
8796to occurrences in strings and comments.")
8797 (license license:gpl2)))
8798
8799(define-public python-py3status
8800 (package
8801 (name "python-py3status")
8802 (version "3.7")
8803 (source
8804 (origin
8805 (method url-fetch)
8806 (uri (pypi-uri "py3status" version))
8807 (sha256
8808 (base32
8809 "0shxcfz4wcczj0mhwp4w0dvwd2fdd9bgprq8slim1519iiqzgwhq"))))
8810 (build-system python-build-system)
8811 (inputs
8812 `(("file" ,file)))
8813 (arguments
8814 '(#:phases
8815 (modify-phases %standard-phases
8816 ;; 'file' is used for detection of configuration file encoding
8817 ;; let's make link the dependency to particular input
8818 (add-before 'build 'patch-file-path
8819 (lambda* (#:key inputs #:allow-other-keys)
8820 (let ((file-path (assoc-ref inputs "file")))
8821 (substitute* "py3status/parse_config.py"
8822 (("\\['file', '-b'")
8823 (string-append "['" file-path "/bin/file', '-b'")))
8824 #t))))
8825 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
8826 (home-page "https://github.com/ultrabug/py3status")
8827 (synopsis "Extensible i3status wrapper written in Python")
8828 (description "py3status is an i3status wrapper which extends i3status
8829functionality in a modular way, allowing you to extend your panel with your
8830own code, responding to click events and updating clock every second.")
8831 (license license:bsd-3)))
8832
8833(define-public python-tblib
8834 (package
8835 (name "python-tblib")
8836 (version "1.3.2")
8837 (source (origin
8838 (method url-fetch)
8839 (uri (pypi-uri "tblib" version))
8840 (sha256 (base32
8841 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
8842 (build-system python-build-system)
8843 (arguments
8844 `(#:phases
8845 (modify-phases %standard-phases
8846 (replace 'check
8847 (lambda _
8848 ;; Upstream runs tests after installation and the package itself
8849 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
8850 ;; found.
8851 (setenv "PYTHONPATH"
8852 (string-append (getcwd) "/build/lib:"
8853 (getenv "PYTHONPATH")))
8854 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
8855 (native-inputs
8856 `(("python-pytest" ,python-pytest)
8857 ("python-six" ,python-six)))
8858 (home-page "https://github.com/ionelmc/python-tblib")
8859 (synopsis "Traceback serialization library")
8860 (description
8861 "Traceback serialization allows you to:
8862
8863@enumerate
8864@item Pickle tracebacks and raise exceptions with pickled tracebacks in
8865different processes. This allows better error handling when running code over
8866multiple processes (imagine multiprocessing, billiard, futures, celery etc).
8867
8868@item Parse traceback strings and raise with the parsed tracebacks.
8869@end enumerate\n")
8870 (license license:bsd-3)))
8871
8872(define-public python2-tblib
8873 (package-with-python2 python-tblib))
8874
8875(define-public python-greenlet
8876 (package
8877 (name "python-greenlet")
8878 (version "0.4.11")
8879 (source (origin
8880 (method url-fetch)
8881 (uri (pypi-uri "greenlet" version))
8882 (sha256
8883 (base32
8884 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
8885 (build-system python-build-system)
8886 (home-page "https://greenlet.readthedocs.io/")
8887 (synopsis "Lightweight in-process concurrent programming")
8888 (description
8889 "Greenlet package is a spin-off of Stackless, a version of CPython
8890that supports micro-threads called \"tasklets\". Tasklets run
8891pseudo-concurrently (typically in a single or a few OS-level threads) and
8892are synchronized with data exchanges on \"channels\".")
8893 (license (list license:psfl license:expat))))
8894
8895(define-public python2-greenlet
8896 (package-with-python2 python-greenlet))
8897
8898(define-public python-gevent
8899 (package
8900 (name "python-gevent")
8901 (version "1.2.2")
8902 (source (origin
8903 (method url-fetch)
8904 (uri (pypi-uri "gevent" version))
8905 (sha256
8906 (base32
8907 "0bbbjvi423y9k9xagrcsimnayaqymg6f2dj76m9z3mjpkjpci4a7"))
8908 (modules '((guix build utils)))
8909 (snippet
8910 '(begin
8911 ;; unbunding libev and c-ares
8912 (delete-file-recursively "deps")
8913 #t))))
8914 (build-system python-build-system)
8915 (arguments
8916 `(#:modules ((ice-9 ftw)
8917 (srfi srfi-26)
8918 (guix build utils)
8919 (guix build python-build-system))
8920 #:phases (modify-phases %standard-phases
8921 (add-after 'unpack 'unpack-libev
8922 (lambda* (#:key inputs #:allow-other-keys)
8923 (mkdir-p "deps/libev")
8924 ;; FIXME: gevent requires building libev, even though
8925 ;; it only links against the proper one.
8926 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
8927 "--strip-components=1" "-C" "deps/libev")))
8928 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
8929 (lambda _
8930 (substitute* "src/gevent/subprocess.py"
8931 (("/bin/sh") (which "sh")))
8932 (for-each (lambda (file)
8933 (substitute* file
8934 (("/bin/sh") (which "sh"))
8935 (("/bin/true") (which "true"))))
8936 (find-files "src/greentest" "\\.py$"))
8937 #t))
8938 (add-before 'build 'do-not-use-bundled-sources
8939 (lambda _
8940 (setenv "CONFIG_SHELL" (which "bash"))
8941 (setenv "LIBEV_EMBED" "false")
8942 (setenv "CARES_EMBED" "false")
8943 (setenv "EMBED" "false")
8944 #t))
8945 (replace 'check
8946 (lambda _
8947 ;; Make sure the build directory is on PYTHONPATH.
8948 (setenv "PYTHONPATH"
8949 (string-append
8950 (getenv "PYTHONPATH") ":"
8951 (getcwd) "/build/"
8952 (car (scandir "build" (cut string-prefix? "lib." <>)))))
8953 (with-directory-excursion "src/greentest"
8954 ;; XXX: Many tests require network access. Instead we only
8955 ;; run known-good tests. Unfortunately we cannot use
8956 ;; recursion here since this directory also contains
8957 ;; Python-version-specific subfolders.
8958 (apply invoke "python" "testrunner.py" "--config"
8959 "known_failures.py"
8960 (scandir "." (cut regexp-exec
8961 (make-regexp "test_+(subprocess|core)")
8962 <>)))))))))
8963 (propagated-inputs
8964 `(("python-greenlet" ,python-greenlet)))
8965 (native-inputs
8966 `(("libev-source" ,(package-source libev))
8967 ("python-six" ,python-six)))
8968 (inputs
8969 `(("c-ares" ,c-ares)
8970 ("libev" ,libev)))
8971 (home-page "http://www.gevent.org/")
8972 (synopsis "Coroutine-based network library")
8973 (description
8974 "gevent is a coroutine-based Python networking library that uses greenlet
8975to provide a high-level synchronous API on top of the libev event loop.")
8976 (license license:expat)))
8977
8978(define-public python2-gevent
8979 (package-with-python2 python-gevent))
8980
8981(define-public python-fastimport
8982 (package
8983 (name "python-fastimport")
8984 (version "0.9.6")
8985 (source
8986 (origin
8987 (method url-fetch)
8988 (uri (pypi-uri "fastimport" version))
8989 (sha256
8990 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
8991 (build-system python-build-system)
8992 (home-page "https://github.com/jelmer/python-fastimport")
8993 (synopsis "VCS fastimport parser and generator in Python")
8994 (description "This package provides a parser for and generator of the Git
8995@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
8996format.")
8997 (license license:gpl2+)))
8998
8999(define-public python2-fastimport
9000 (package-with-python2 python-fastimport))
9001
9002(define-public python-twisted
9003 (package
9004 (name "python-twisted")
9005 (version "17.1.0")
9006 (source (origin
9007 (method url-fetch)
9008 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9009 (sha256
9010 (base32
9011 "1p245mg15hkxp7hy5cyq2fgvlgjkb4cg0gwkwd148nzy1bbi3wnv"))))
9012 (build-system python-build-system)
9013 (arguments
9014 '(#:tests? #f)) ; FIXME: Some tests are failing.
9015 ;; #:phases
9016 ;; (modify-phases %standard-phases
9017 ;; (replace 'check
9018 ;; (lambda _
9019 ;; (zero? (system* "./bin/trial" "twisted")))))
9020 (propagated-inputs
9021 `(("python-zope-interface" ,python-zope-interface)
9022 ("python-incremental" ,python-incremental)
9023 ("python-constantly" ,python-constantly)
9024 ("python-automat" ,python-automat)))
9025 (home-page "https://twistedmatrix.com/")
9026 (synopsis "Asynchronous networking framework written in Python")
9027 (description
9028 "Twisted is an extensible framework for Python programming, with special
9029focus on event-based network programming and multiprotocol integration.")
9030 (license license:expat)))
9031
9032(define-public python2-twisted
9033 (package-with-python2 python-twisted))
9034
9035(define-public python-pika
9036 (package
9037 (name "python-pika")
9038 (version "0.10.0")
9039 (source
9040 (origin
9041 (method url-fetch)
9042 (uri (pypi-uri "pika" version))
9043 (sha256
9044 (base32
9045 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
9046 (build-system python-build-system)
9047 (native-inputs
9048 `(("python-pyev" ,python-pyev)
9049 ("python-tornado" ,python-tornado)
9050 ("python-twisted" ,python-twisted)))
9051 (home-page "https://pika.readthedocs.org")
9052 (synopsis "Pure Python AMQP Client Library")
9053 (description
9054 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9055Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9056network support library.")
9057 (license license:bsd-3)))
9058
9059(define-public python2-pika
9060 (package-with-python2 python-pika))
9061
9062(define-public python-ply
9063 (package
9064 (name "python-ply")
9065 (version "3.10")
9066 (source
9067 (origin
9068 (method url-fetch)
9069 (uri (pypi-uri "ply" version))
9070 (sha256
9071 (base32
9072 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9073 (build-system python-build-system)
9074 (home-page "http://www.dabeaz.com/ply/")
9075 (synopsis "Python Lex & Yacc")
9076 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9077It uses LR parsing and does extensive error checking.")
9078 (license license:bsd-3)))
9079
9080(define-public python2-ply
9081 (package-with-python2 python-ply))
9082
9083(define-public python-tabulate
9084 (package
9085 (name "python-tabulate")
9086 (version "0.7.7")
9087 (source (origin
9088 (method url-fetch)
9089 (uri (pypi-uri "tabulate" version))
9090 (sha256
9091 (base32
9092 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
9093 (build-system python-build-system)
9094 (arguments
9095 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
9096 ;; and the latest release is not tagged in the upstream repository.
9097 '(#:tests? #f))
9098 (home-page "https://bitbucket.org/astanin/python-tabulate")
9099 (synopsis "Pretty-print tabular data")
9100 (description
9101 "Tabulate is a library and command-line utility to pretty-print tabular
9102data in Python.")
9103 (license license:expat)))
9104
9105(define-public python2-tabulate
9106 (package-with-python2 python-tabulate))
9107
9108(define-public python-kazoo
9109 (package
9110 (name "python-kazoo")
9111 (version "2.4.0")
9112 (source
9113 (origin
9114 (method url-fetch)
9115 (uri (pypi-uri "kazoo" version))
9116 (sha256
9117 (base32
9118 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
9119 (build-system python-build-system)
9120 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9121 (propagated-inputs
9122 `(("python-six" ,python-six)))
9123 (home-page "https://kazoo.readthedocs.org")
9124 (synopsis "High-level Zookeeper client library")
9125 (description
9126 "Kazoo is a Python client library for the Apache Zookeeper distributed
9127application service. It is designed to be easy to use and to avoid common
9128programming errors.")
9129 (license license:asl2.0)))
9130
9131(define-public python2-kazoo
9132 (package-with-python2 python-kazoo))
9133
9134(define-public python-pykafka
9135 (package
9136 (name "python-pykafka")
9137 (version "2.4.0")
9138 (source (origin
9139 (method url-fetch)
9140 (uri (string-append
9141 "https://pypi.python.org/packages/8b/3e/"
9142 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
9143 "pykafka-" version ".tar.gz"))
9144 (sha256
9145 (base32
9146 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9147 (build-system python-build-system)
9148 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9149 (propagated-inputs
9150 `(("python-gevent" ,python-gevent)
9151 ("python-kazoo" ,python-kazoo)
9152 ("python-tabulate" ,python-tabulate)))
9153 (inputs
9154 `(("librdkafka" ,librdkafka)))
9155 (home-page "https://pykafka.readthedocs.io/")
9156 (synopsis "Apache Kafka client for Python")
9157 (description
9158 "PyKafka is a client for the Apache Kafka distributed messaging system.
9159It includes Python implementations of Kafka producers and consumers, which
9160are optionally backed by a C extension built on librdkafka.")
9161 (license license:asl2.0)))
9162
9163(define-public python2-pykafka
9164 (package-with-python2 python-pykafka))
9165
9166(define-public python-wcwidth
9167 (package
9168 (name "python-wcwidth")
9169 (version "0.1.7")
9170 (source
9171 (origin
9172 (method url-fetch)
9173 (uri (pypi-uri "wcwidth" version))
9174 (sha256
9175 (base32
9176 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
9177 (build-system python-build-system)
9178 (home-page "https://github.com/jquast/wcwidth")
9179 (synopsis "Measure number of terminal column cells of wide-character codes")
9180 (description "Wcwidth measures the number of terminal column cells of
9181wide-character codes. It is useful for those implementing a terminal emulator,
9182or programs that carefully produce output to be interpreted by one. It is a
9183Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9184specified in POSIX.1-2001 and POSIX.1-2008.")
9185 (license license:expat)))
9186
9187(define-public python2-wcwidth
9188 (package-with-python2 python-wcwidth))
9189
9190(define-public python2-jsonrpclib
9191 (package
9192 (name "python2-jsonrpclib")
9193 (version "0.1.7")
9194 (source (origin
9195 (method url-fetch)
9196 (uri (string-append
9197 "https://pypi.python.org/packages/source/j/jsonrpclib/"
9198 "jsonrpclib-" version ".tar.gz"))
9199 (sha256
9200 (base32
9201 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9202 (build-system python-build-system)
9203 (arguments
9204 `(#:tests? #f
9205 #:python ,python-2))
9206 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9207 (synopsis "Implementation of JSON-RPC specification for Python")
9208 (description
9209 "This library is an implementation of the JSON-RPC specification.
9210It supports both the original 1.0 specification, as well as the
9211new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9212etc.")
9213 (license license:asl2.0)))
9214
9215(define-public python-chai
9216 (package
9217 (name "python-chai")
9218 (version "1.1.2")
9219 (source (origin
9220 (method url-fetch)
9221 (uri (pypi-uri "chai" version))
9222 (sha256
9223 (base32
9224 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
9225 (build-system python-build-system)
9226 (home-page "https://github.com/agoragames/chai")
9227 (synopsis "Mocking framework for Python")
9228 (description
9229 "Chai provides an api for mocking, stubbing and spying your python
9230objects, patterned after the Mocha library for Ruby.")
9231 (license license:bsd-3)))
9232
9233(define-public python2-chai
9234 (package-with-python2 python-chai))
9235
9236(define-public python-inflection
9237 (package
9238 (name "python-inflection")
9239 (version "0.3.1")
9240 (source
9241 (origin (method url-fetch)
9242 (uri (pypi-uri "inflection" version))
9243 (sha256
9244 (base32
9245 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9246 (build-system python-build-system)
9247 (native-inputs
9248 `(("python-pytest" ,python-pytest)))
9249 (home-page "https://github.com/jpvanhal/inflection")
9250 (synopsis "Python string transformation library")
9251 (description
9252 "Inflection is a string transformation library. It singularizes
9253and pluralizes English words, and transforms strings from CamelCase to
9254underscored string.")
9255 (license license:expat)))
9256
9257(define-public python2-inflection
9258 (package-with-python2 python-inflection))
9259
9260(define-public python-pylev
9261 (package
9262 (name "python-pylev")
9263 (version "1.3.0")
9264 (source (origin
9265 (method url-fetch)
9266 (uri (pypi-uri "pylev" version))
9267 (sha256
9268 (base32
9269 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9270 (build-system python-build-system)
9271 (home-page "https://github.com/toastdriven/pylev")
9272 (synopsis "Levenshtein distance implementation in Python")
9273 (description "Pure Python Levenshtein implementation, based off the
9274Wikipedia code samples at
9275@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9276 (license license:bsd-3)))
9277
9278(define-public python2-pylev
9279 (package-with-python2 python-pylev))
9280
9281(define-public python-cleo
9282 (package
9283 (name "python-cleo")
9284 (version "0.6.1")
9285 (source (origin
9286 (method url-fetch)
9287 (uri (pypi-uri "cleo" version))
9288 (sha256
9289 (base32
9290 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
9291 (build-system python-build-system)
9292 (native-inputs
9293 `(;; For testing
9294 ("python-mock" ,python-mock)
9295 ("python-pytest-mock" ,python-pytest-mock)
9296 ("python-pytest" ,python-pytest)))
9297 (propagated-inputs
9298 `(("python-backpack" ,python-backpack)
9299 ("python-pastel" ,python-pastel)
9300 ("python-pylev" ,python-pylev)))
9301 (home-page "https://github.com/sdispater/cleo")
9302 (synopsis "Command-line arguments library for Python")
9303 (description
9304 "Cleo allows you to create command-line commands with signature in
9305docstring and colored output.")
9306 (license license:expat)))
9307
9308(define-public python2-cleo
9309 (package-with-python2 python-cleo))
9310
9311(define-public python-lazy-object-proxy
9312 (package
9313 (name "python-lazy-object-proxy")
9314 (version "1.2.2")
9315 (source (origin
9316 (method url-fetch)
9317 (uri (pypi-uri "lazy-object-proxy" version))
9318 (sha256
9319 (base32
9320 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
9321 (build-system python-build-system)
9322 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9323 (synopsis "Lazy object proxy for python")
9324 (description
9325 "Lazy object proxy is an object that wraps a callable but defers the call
9326until the object is actually required, and caches the result of said call.")
9327 (license license:bsd-2)))
9328
9329(define-public python2-lazy-object-proxy
9330 (package-with-python2 python-lazy-object-proxy))
9331
9332(define-public python-dnspython
9333 (package
9334 (name "python-dnspython")
9335 (version "1.15.0")
9336 (source (origin
9337 (method url-fetch)
9338 (uri (string-append "http://www.dnspython.org/kits/"
9339 version "/dnspython-" version ".tar.gz"))
9340 (sha256
9341 (base32
9342 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
9343 (build-system python-build-system)
9344 (arguments '(#:tests? #f)) ; XXX: requires internet access
9345 (home-page "http://www.dnspython.org")
9346 (synopsis "DNS toolkit for Python")
9347 (description
9348 "dnspython is a DNS toolkit for Python. It supports almost all record
9349types. It can be used for queries, zone transfers, and dynamic updates.
9350It supports TSIG authenticated messages and EDNS0.")
9351 (license license:expat)))
9352
9353(define-public python2-dnspython
9354 (package-with-python2 python-dnspython))
9355
9356(define-public python-email-validator
9357 (package
9358 (name "python-email-validator")
9359 (version "1.0.2")
9360 (source
9361 (origin (method url-fetch)
9362 (uri (pypi-uri "email_validator" version))
9363 (sha256
9364 (base32
9365 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
9366 (build-system python-build-system)
9367 (arguments
9368 '(#:phases
9369 (modify-phases %standard-phases
9370 (add-before 'build 'use-dnspython
9371 (lambda _
9372 (substitute* "setup.py"
9373 (("dnspython3") "dnspython"))
9374 #t)))))
9375 (propagated-inputs
9376 `(("python-dnspython" ,python-dnspython)
9377 ("python-idna" ,python-idna)))
9378 (home-page "https://github.com/JoshData/python-email-validator")
9379 (synopsis "Email address validation library for Python")
9380 (description
9381 "This library validates email address syntax and deliverability.")
9382 (license license:cc0)))
9383
9384(define-public python2-email-validator
9385 (package-with-python2 python-email-validator))
9386
9387(define-public python-ukpostcodeparser
9388 (package
9389 (name "python-ukpostcodeparser")
9390 (version "1.0.3")
9391 (source (origin
9392 (method url-fetch)
9393 (uri (pypi-uri "UkPostcodeParser" version))
9394 (sha256
9395 (base32
9396 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9397 (build-system python-build-system)
9398 (home-page "https://github.com/hamstah/ukpostcodeparser")
9399 (synopsis "UK Postcode parser for Python")
9400 (description
9401 "This library provides the @code{parse_uk_postcode} function for
9402parsing UK postcodes.")
9403 (license license:expat)))
9404
9405(define-public python2-ukpostcodeparser
9406 (package-with-python2 python-ukpostcodeparser))
9407
9408(define-public python-faker
9409 (package
9410 (name "python-faker")
9411 (version "0.7.9")
9412 (source (origin
9413 (method url-fetch)
9414 (uri (pypi-uri "Faker" version))
9415 (sha256
9416 (base32
9417 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
9418 (patches
9419 (search-patches "python-faker-fix-build-32bit.patch"))
9420 (modules '((guix build utils)))
9421 (snippet
9422 '(begin
9423 (for-each delete-file (find-files "." "\\.pyc$"))
9424 #t))))
9425 (build-system python-build-system)
9426 (arguments
9427 '(#:phases
9428 (modify-phases %standard-phases
9429 (replace 'check
9430 (lambda _
9431 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
9432 (native-inputs
9433 `(;; For testing
9434 ("python-email-validator" ,python-email-validator)
9435 ("python-mock" ,python-mock)
9436 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
9437 (propagated-inputs
9438 `(("python-dateutil" ,python-dateutil)
9439 ("python-six" ,python-six)))
9440 (home-page "https://github.com/joke2k/faker")
9441 (synopsis "Python package that generates fake data")
9442 (description
9443 "Faker is a Python package that generates fake data such as names,
9444addresses, and phone numbers.")
9445 (license license:expat)
9446 (properties `((python2-variant . ,(delay python2-faker))))))
9447
9448(define-public python2-faker
9449 (let ((base (package-with-python2 (strip-python2-variant
9450 python-faker))))
9451 (package
9452 (inherit base)
9453 (propagated-inputs
9454 `(("python2-ipaddress" ,python2-ipaddress)
9455 ,@(package-propagated-inputs base))))))
9456
9457(define-public python-pyaml
9458 (package
9459 (name "python-pyaml")
9460 (version "17.7.2")
9461 (source (origin
9462 (method url-fetch)
9463 (uri (pypi-uri "pyaml" version))
9464 (sha256
9465 (base32
9466 "132grrw0ajq4nrappi3ldbkb952k7yn9b6c7csi2rmvzm1g6ppp2"))))
9467 (build-system python-build-system)
9468 (native-inputs
9469 `(("python-unidecode" ,python-unidecode)))
9470 (propagated-inputs
9471 `(("python-pyyaml" ,python-pyyaml)))
9472 (home-page "https://github.com/mk-fg/pretty-yaml")
9473 (synopsis "YAML pretty-print library for Python")
9474 (description
9475 "pyaml is a PyYAML based python module to produce pretty and readable
9476YAML-serialized data.")
9477 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
9478
9479(define-public python2-pyaml
9480 (package-with-python2 python-pyaml))
9481
9482(define-public python-backpack
9483 (package
9484 (name "python-backpack")
9485 (version "0.1")
9486 (source
9487 (origin
9488 (method url-fetch)
9489 (uri (pypi-uri "backpack" version))
9490 (sha256
9491 (base32
9492 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
9493 (build-system python-build-system)
9494 (native-inputs
9495 `(("python-pytest" ,python-pytest)
9496 ("python-nose" ,python-nose)))
9497 (propagated-inputs
9498 `(("python-simplejson" ,python-simplejson)))
9499 (home-page "https://github.com/sdispater/backpack")
9500 (synopsis "Utilities for working with Python collections")
9501 (description "Backpack provides some useful utilities for working with
9502collections of data.")
9503 (license license:expat)))
9504
9505(define-public python2-backpack
9506 (package-with-python2 python-backpack))
9507
9508(define-public python-prompt-toolkit
9509 (package
9510 (name "python-prompt-toolkit")
9511 (version "1.0.15")
9512 (source
9513 (origin
9514 (method url-fetch)
9515 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9516 (sha256
9517 (base32
9518 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))
9519 (build-system python-build-system)
9520 (arguments
9521 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
9522 (propagated-inputs
9523 `(("python-wcwidth" ,python-wcwidth)
9524 ("python-six" ,python-six)
9525 ("python-pygments" ,python-pygments)))
9526 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
9527 (synopsis "Library for building command line interfaces in Python")
9528 (description
9529 "Prompt-Toolkit is a library for building interactive command line
9530interfaces in Python. It's like GNU Readline but it also features syntax
9531highlighting while typing, out-of-the-box multi-line input editing, advanced
9532code completion, incremental search, support for Chinese double-width
9533characters, mouse support, and auto suggestions.")
9534 (license license:bsd-3)))
9535
9536(define-public python2-prompt-toolkit
9537 (package-with-python2 python-prompt-toolkit))
9538
9539(define-public python-jedi
9540 (package
9541 (name "python-jedi")
9542 (version "0.12.0")
9543 (source
9544 (origin
9545 (method url-fetch)
9546 (uri (pypi-uri "jedi" version))
9547 (sha256
9548 (base32
9549 "1bcr7csx4xil1iwmk03d79jis0bkmgi9k0kir3xa4rmwqsagcwhr"))))
9550 (build-system python-build-system)
9551 (arguments
9552 `(#:phases
9553 (modify-phases %standard-phases
9554 (replace 'check (lambda _
9555 (invoke "py.test" "-vv"))))))
9556 (native-inputs
9557 `(("python-pytest" ,python-pytest)
9558 ("python-parso" ,python-parso)
9559 ("python-docopt" ,python-docopt)))
9560 (home-page "https://github.com/davidhalter/jedi")
9561 (synopsis
9562 "Autocompletion for Python that can be used for text editors")
9563 (description
9564 "Jedi is an autocompletion tool for Python that can be used for text
9565 editors.")
9566 (license license:expat)))
9567
9568(define-public python2-jedi
9569 (package-with-python2 python-jedi))
9570
9571(define-public ptpython
9572 (package
9573 (name "ptpython")
9574 (version "0.34")
9575 (source (origin
9576 (method url-fetch)
9577 (uri (pypi-uri "ptpython" version))
9578 (sha256
9579 (base32
9580 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
9581 (build-system python-build-system)
9582 (arguments
9583 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
9584 (propagated-inputs
9585 `(("python-docopt" ,python-docopt)
9586 ("python-jedi" ,python-jedi)
9587 ("python-prompt-toolkit" ,python-prompt-toolkit)
9588 ("python-pygments" ,python-pygments)))
9589 (home-page "https://github.com/jonathanslenders/ptpython")
9590 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
9591 (description
9592 "ptpython is a Python read-eval-print loop with IDE-like features.
9593It supports syntax highlighting, multiline editing, autocompletion, mouse,
9594color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
9595etc.")
9596 (license license:bsd-3)
9597 (properties `((python2-variant . ,(delay ptpython-2))))))
9598
9599(define-public ptpython-2
9600 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
9601 (package
9602 (inherit base)
9603 (name "ptpython2"))))
9604
9605(define-public python-stem
9606 (package
9607 (name "python-stem")
9608 (version "1.6.0")
9609 (source
9610 (origin
9611 (method url-fetch)
9612 (uri (pypi-uri "stem" version))
9613 (sha256
9614 (base32
9615 "1va9p3ij7lxg6ixfsvaql06dn11l3fgpxmss1dhlvafm7sqizznp"))))
9616 (build-system python-build-system)
9617 (arguments
9618 `(#:phases
9619 (modify-phases %standard-phases
9620 (add-before 'check 'fix-test-environment
9621 (lambda _
9622 ;; Fixes: FileNotFoundError: [Errno 2] No such file or directory:
9623 ;; '/tmp/guix-build-python-stem-1.6.0.drv-0/stem-1.6.0/.gitignore'.
9624 (with-output-to-file ".gitignore"
9625 (lambda _ (format #t "%")))
9626 #t))
9627 (replace 'check
9628 (lambda _
9629 (invoke "./run_tests.py" "--unit")
9630 #t)))))
9631 (native-inputs
9632 `(("python-mock" ,python-mock)
9633 ("python-pep8" ,python-pep8)
9634 ("python-pyflakes" ,python-pyflakes)))
9635 (home-page "https://stem.torproject.org/")
9636 (synopsis
9637 "Python controller library that allows applications to interact with Tor")
9638 (description
9639 "Stem is a Python controller library for Tor. With it you can use Tor's
9640control protocol to script against the Tor process and read descriptor data
9641relays publish about themselves.")
9642 (license license:lgpl3)))
9643
9644(define-public python2-stem
9645 (package-with-python2 python-stem))
9646
9647(define-public python-pyserial
9648 (package
9649 (name "python-pyserial")
9650 (version "3.1.1")
9651 (source
9652 (origin
9653 (method url-fetch)
9654 (uri (pypi-uri "pyserial" version))
9655 (sha256
9656 (base32
9657 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
9658 (build-system python-build-system)
9659 (arguments
9660 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
9661 ;; #:phases
9662 ;; (modify-phases %standard-phases
9663 ;; (replace 'check
9664 ;; (lambda _
9665 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
9666 (home-page
9667 "https://github.com/pyserial/pyserial")
9668 (synopsis "Python Serial Port Bindings")
9669 (description "@code{pyserial} provide serial port bindings for Python. It
9670supports different byte sizes, stop bits, parity and flow control with RTS/CTS
9671and/or Xon/Xoff. The port is accessed in RAW mode.")
9672 (license license:bsd-3)))
9673
9674(define-public python2-pyserial
9675 (package-with-python2 python-pyserial))
9676
9677(define-public python-kivy
9678 (package
9679 (name "python-kivy")
9680 (version "1.10.0")
9681 (source
9682 (origin
9683 (method url-fetch)
9684 (uri (pypi-uri "Kivy" version))
9685 (file-name (string-append name "-" version ".tar.gz"))
9686 (sha256
9687 (base32
9688 "1394zh6kvf7k5d8vlzxcsfcailr3q59xwg9b1n7qaf25bvyq1h98"))))
9689 (build-system python-build-system)
9690 (arguments
9691 `(#:tests? #f ; Tests require many optional packages
9692 #:phases
9693 (modify-phases %standard-phases
9694 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
9695 (lambda* (#:key inputs #:allow-other-keys)
9696 (setenv "KIVY_SDL2_PATH"
9697 (string-append (assoc-ref inputs "sdl-union")
9698 "/include/SDL2"))
9699 #t)))))
9700 (native-inputs
9701 `(("git" ,git)
9702 ("pkg-config" ,pkg-config)
9703 ("python-cython" ,python-cython)))
9704 (inputs
9705 `(("gstreamer" ,gstreamer)
9706 ("mesa" ,mesa)
9707 ("sdl-union"
9708 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
9709 (home-page "http://kivy.org")
9710 (synopsis
9711 "Multitouch application framework")
9712 (description
9713 "A software library for rapid development of
9714hardware-accelerated multitouch applications.")
9715 (license license:expat)))
9716
9717(define-public python2-kivy
9718 (package-with-python2 python-kivy))
9719
9720(define-public python-kivy-next
9721 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
9722 (revision "1"))
9723 (package (inherit python-kivy)
9724 (name "python-kivy-next")
9725 (version (string-append "1.9.1-" revision "."
9726 (string-take commit 7)))
9727 (source
9728 (origin
9729 (method git-fetch)
9730 (uri (git-reference
9731 (url "https://github.com/kivy/kivy")
9732 (commit commit)))
9733 (file-name (string-append name "-" version "-checkout"))
9734 (sha256
9735 (base32
9736 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
9737
9738(define-public python2-kivy-next
9739 (package-with-python2 python-kivy-next))
9740
9741(define-public python-binaryornot
9742 (package
9743 (name "python-binaryornot")
9744 (version "0.4.0")
9745 (source (origin
9746 (method url-fetch)
9747 (uri (pypi-uri "binaryornot" version))
9748 (sha256
9749 (base32
9750 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
9751 (build-system python-build-system)
9752 (propagated-inputs
9753 `(("python-chardet" ,python-chardet)
9754 ("python-hypothesis" ,python-hypothesis)))
9755 (home-page "https://github.com/audreyr/binaryornot")
9756 (synopsis "Package to check if a file is binary or text")
9757 (description "Ultra-lightweight pure Python package to check if a file is
9758binary or text.")
9759 (license license:bsd-3)
9760 (properties `((python2-variant . ,(delay python2-binaryornot))))))
9761
9762(define-public python2-binaryornot
9763 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
9764 (package (inherit base)
9765 (propagated-inputs
9766 `(("python2-enum34" ,python2-enum34)
9767 ,@(package-propagated-inputs base))))))
9768
9769(define-public python-nltk
9770 (package
9771 (name "python-nltk")
9772 (version "3.2.1")
9773 (source (origin
9774 (method url-fetch)
9775 (uri (pypi-uri "nltk" version))
9776 (sha256
9777 (base32
9778 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
9779 (build-system python-build-system)
9780 (arguments
9781 '(;; The tests require some extra resources to be downloaded.
9782 ;; TODO Try packaging these resources.
9783 #:tests? #f))
9784 (home-page "http://nltk.org/")
9785 (synopsis "Natural Language Toolkit")
9786 (description "It provides interfaces to over 50 corpora and lexical
9787resources such as WordNet, along with a suite of text processing libraries
9788for classification, tokenization, stemming, tagging, parsing, and semantic
9789reasoning, wrappers for natural language processing libraries.")
9790 (license license:asl2.0)))
9791
9792(define-public python2-nltk
9793 (package-with-python2 python-nltk))
9794
9795(define-public python-pymongo
9796 (package
9797 (name "python-pymongo")
9798 (version "3.3.0")
9799 (source (origin
9800 (method url-fetch)
9801 (uri (pypi-uri "pymongo" version))
9802 (sha256
9803 (base32
9804 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
9805 (build-system python-build-system)
9806 (propagated-inputs
9807 `(("python-certifi" ,python-certifi)))
9808 (home-page "https://github.com/mongodb/mongo-python-driver")
9809 (synopsis "Python driver for MongoDB")
9810 (description "Python driver for MongoDB.")
9811 (license license:asl2.0)))
9812
9813(define-public python2-pymongo
9814 (package-with-python2 python-pymongo))
9815
9816(define-public python-sh
9817 (package
9818 (name "python-sh")
9819 (version "1.11")
9820 (source (origin
9821 (method url-fetch)
9822 (uri (pypi-uri "sh" version))
9823 (sha256
9824 (base32
9825 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
9826 (build-system python-build-system)
9827 (arguments
9828 `(#:tests? #f)) ; no tests
9829 (home-page "https://github.com/amoffat/sh")
9830 (synopsis "Python subprocess interface")
9831 (description "Abstracts process invocation by providing a function
9832interface for programs.")
9833 (license license:expat)))
9834
9835(define-public python2-sh
9836 (package-with-python2 python-sh))
9837
9838(define-public python-consul
9839 (package
9840 (name "python-consul")
9841 (version "0.6.1")
9842 (source
9843 (origin
9844 (method url-fetch)
9845 (uri (pypi-uri "python-consul" version))
9846 (sha256
9847 (base32
9848 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
9849 (build-system python-build-system)
9850 (arguments
9851 '(#:tests? #f)) ; The tests are not distributed
9852 (propagated-inputs
9853 `(("python-requests" ,python-requests)
9854 ("python-six" ,python-six)))
9855 (home-page "https://github.com/cablehead/python-consul")
9856 (synopsis "Python client for Consul")
9857 (description
9858 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
9859discovery, monitoring and configuration.")
9860 (license license:expat)))
9861
9862(define-public python2-consul
9863 (package-with-python2 python-consul))
9864
9865(define-public python-schematics
9866 (package
9867 (name "python-schematics")
9868 (version "1.1.1")
9869 (source
9870 (origin
9871 (method url-fetch)
9872 (uri (string-append
9873 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
9874 (file-name (string-append name "-" version ".tar.gz"))
9875 (sha256
9876 (base32
9877 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
9878 (build-system python-build-system)
9879 (propagated-inputs
9880 `(("python-six" ,python-six)))
9881 (arguments
9882 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
9883 ; version requirements (eg python-coveralls)
9884 (home-page "https://github.com/schematics/schematics")
9885 (synopsis "Python Data Structures for Humans")
9886 (description "Python Data Structures for Humans.")
9887 (license license:bsd-3)))
9888
9889(define-public python2-schematics
9890 (package-with-python2 python-schematics))
9891
9892(define-public python-odfpy
9893 (package
9894 (name "python-odfpy")
9895 (version "1.3.3")
9896 (source (origin
9897 (method url-fetch)
9898 (uri (pypi-uri "odfpy" version))
9899 (sha256
9900 (base32
9901 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
9902 (arguments
9903 `(#:modules ((srfi srfi-1)
9904 (guix build python-build-system)
9905 (guix build utils))
9906 #:phases
9907 (modify-phases %standard-phases
9908 (replace 'check
9909 ;; The test runner invokes python2 and python3 for test*.py.
9910 ;; To avoid having both in inputs, we replicate it here.
9911 (lambda _
9912 (every (lambda (test-file)
9913 (zero? (system* "python" test-file)))
9914 (find-files "tests" "^test.*\\.py$")))))))
9915 (build-system python-build-system)
9916 (home-page "https://github.com/eea/odfpy")
9917 (synopsis "Python API and tools to manipulate OpenDocument files")
9918 (description "Collection of libraries and utility programs written in
9919Python to manipulate OpenDocument 1.2 files.")
9920 (license
9921 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
9922 ;; number of files with other licenses.
9923 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
9924
9925(define-public python2-odfpy
9926 (package-with-python2 python-odfpy))
9927
9928(define-public python-natsort
9929 (package
9930 (name "python-natsort")
9931 (version "5.0.2")
9932 (source (origin
9933 (method url-fetch)
9934 (uri (pypi-uri "natsort" version))
9935 (sha256
9936 (base32
9937 "0bh6j0l8iapjnsgg3bs6q075cnzjl6zw1vlgqyv3qrygm2cxypkn"))))
9938 (build-system python-build-system)
9939 (arguments
9940 `(#:phases
9941 (modify-phases %standard-phases
9942 (add-before 'check 'set-cachedir
9943 ;; Tests require write access to $HOME by default
9944 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
9945 (native-inputs
9946 `(("python-hypothesis" ,python-hypothesis)
9947 ("python-pytest-cache" ,python-pytest-cache)
9948 ("python-pytest-cov" ,python-pytest-cov)
9949 ("python-pytest-flakes" ,python-pytest-flakes)
9950 ("python-pytest-pep8" ,python-pytest-pep8)))
9951 (propagated-inputs ; TODO: Add python-fastnumbers.
9952 `(("python-pyicu" ,python-pyicu)))
9953 (home-page "https://github.com/SethMMorton/natsort")
9954 (synopsis "Natural sorting for python and shell")
9955 (description
9956 "Natsort lets you apply natural sorting on lists instead of
9957lexicographical. If you use the built-in @code{sorted} method in python
9958on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
9959returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
9960function @code{natsorted} that identifies numbers and sorts them separately
9961from strings. It can also sort version numbers, real numbers, mixed types
9962and more, and comes with a shell command @command{natsort} that exposes this
9963functionality in the command line.")
9964 (license license:expat)
9965 (properties `((python2-variant . ,(delay python2-natsort))))))
9966
9967(define-public python2-natsort
9968 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
9969 (package (inherit base)
9970 (native-inputs
9971 `(("python2-pathlib" ,python2-pathlib)
9972 ("python2-mock" ,python2-mock)
9973 ("python2-enum34" ,python2-enum34)
9974 ,@(package-native-inputs base))))))
9975
9976(define-public python-glances
9977 (package
9978 (name "python-glances")
9979 (version "2.7.1")
9980 (source
9981 (origin
9982 (method url-fetch)
9983 (uri (pypi-uri "Glances" version))
9984 (sha256
9985 (base32
9986 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
9987 (build-system python-build-system)
9988 (propagated-inputs
9989 `(("python-psutil" ,python-psutil)))
9990 (home-page
9991 "https://github.com/nicolargo/glances")
9992 (synopsis
9993 "A cross-platform curses-based monitoring tool")
9994 (description
9995 "Glances is a curses-based monitoring tool for a wide variety of platforms.
9996Glances uses the PsUtil library to get information from your system. It monitors
9997CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
9998 (license license:lgpl3+)))
9999
10000(define-public python2-glances
10001 (package-with-python2 python-glances))
10002
10003(define-public python-graphql-core
10004 (package
10005 (name "python-graphql-core")
10006 (version "0.5.3")
10007 (source
10008 (origin
10009 (method url-fetch)
10010 (uri (pypi-uri "graphql-core" version))
10011 (sha256
10012 (base32
10013 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10014 (build-system python-build-system)
10015 (arguments
10016 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10017 #:phases
10018 (modify-phases %standard-phases
10019 (add-after 'unpack 'patch-hardcoded-version
10020 (lambda _ (substitute*
10021 "setup.py"
10022 (("'gevent==1.1rc1'") "'gevent'"))
10023 #t)))))
10024 (native-inputs
10025 `(("python-gevent" ,python-gevent)
10026 ("python-mock" ,python-mock)
10027 ("python-pytest-mock" ,python-pytest-mock)))
10028 (propagated-inputs
10029 `(("python-promise" ,python-promise)
10030 ("python-six" ,python-six)))
10031 (home-page "https://github.com/graphql-python/graphql-core")
10032 (synopsis "GraphQL implementation for Python")
10033 (description
10034 "GraphQL implementation for Python. GraphQL is a data query language and
10035runtime designed and used to request and deliver data to mobile and web apps.
10036This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10037to Python.")
10038 (license license:expat)))
10039
10040(define-public python2-graphql-core
10041 (package-with-python2 python-graphql-core))
10042
10043(define-public python-graphql-relay
10044 (package
10045 (name "python-graphql-relay")
10046 (version "0.4.5")
10047 (source
10048 (origin
10049 (method url-fetch)
10050 (uri (pypi-uri "graphql-relay" version))
10051 (sha256
10052 (base32
10053 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10054 (build-system python-build-system)
10055 (arguments
10056 '(#:tests? #f)) ; The tests are not distributed
10057 (propagated-inputs
10058 `(("python-graphql-core" ,python-graphql-core)
10059 ("python-promise" ,python-promise)
10060 ("python-six" ,python-six)))
10061 (home-page "https://github.com/graphql-python/graphql-relay-py")
10062 (synopsis "Relay implementation for Python")
10063 (description
10064 "This is a library to allow the easy creation of Relay-compliant servers
10065using the GraphQL Python reference implementation of a GraphQL server. It
10066should be noted that the code is a exact port of the original
10067@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10068from Facebook.")
10069 (license license:expat)))
10070
10071(define-public python2-graphql-relay
10072 (package-with-python2 python-graphql-relay))
10073
10074(define-public python-graphene
10075 (package
10076 (name "python-graphene")
10077 (version "0.10.2")
10078 (source
10079 (origin
10080 (method url-fetch)
10081 (uri (pypi-uri "graphene" version))
10082 (sha256
10083 (base32
10084 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10085 (build-system python-build-system)
10086 (propagated-inputs
10087 `(("python-graphql-core" ,python-graphql-core)
10088 ("python-graphql-relay" ,python-graphql-relay)
10089 ("python-iso8601" ,python-iso8601)
10090 ("python-promise" ,python-promise)
10091 ("python-six" ,python-six)))
10092 (arguments
10093 `(#:tests? #f)) ; no tests/ in the PyPI tarball
10094 (home-page "http://graphene-python.org/")
10095 (synopsis "GraphQL Framework for Python")
10096 (description
10097 "Graphene is a Python library for building GraphQL schemas/types.
10098A GraphQL schema describes your data model, and provides a GraphQL server
10099with an associated set of resolve methods that know how to fetch data.")
10100 (properties `((python2-variant . ,(delay python2-graphene))))
10101 (license license:expat)))
10102
10103(define-public python2-graphene
10104 (let ((base (package-with-python2
10105 (strip-python2-variant python-graphene))))
10106 (package (inherit base)
10107 (native-inputs
10108 `(("python2-sqlalchemy" ,python2-sqlalchemy)
10109 ,@(package-native-inputs base))))))
10110
10111(define-public python-nautilus
10112 (package
10113 (name "python-nautilus")
10114 (version "0.4.9")
10115 (source
10116 (origin
10117 (method url-fetch)
10118 (uri (pypi-uri "nautilus" version))
10119 (sha256
10120 (base32
10121 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
10122 (build-system python-build-system)
10123 (arguments `(#:tests? #f)) ; fails to import test modules
10124 (propagated-inputs
10125 `(("python-bcrypt" ,python-bcrypt)
10126 ("python-click" ,python-click)
10127 ("python-consul" ,python-consul)
10128 ("python-graphene" ,python-graphene)
10129 ("python-jinja2" ,python-jinja2)
10130 ("python-peewee" ,python-peewee)
10131 ("python-pika" ,python-pika)
10132 ("python-tornado" ,python-tornado)
10133 ("python-wtforms" ,python-wtforms)))
10134 (native-inputs
10135 `(("python-nose2" ,python-nose2)))
10136 (home-page "https://github.com/AlecAivazis/nautilus")
10137 (synopsis "Library for creating microservice applications")
10138 (description
10139 "Nautilus is a framework for flux based microservices that looks to
10140provide extendible implementations of common aspects of a cloud so that you can
10141focus on building massively scalable web applications.")
10142 (license license:expat)))
10143
10144(define-public python-snowballstemmer
10145 (package
10146 (name "python-snowballstemmer")
10147 (version "1.2.1")
10148 (source (origin
10149 (method url-fetch)
10150 (uri (pypi-uri "snowballstemmer" version))
10151 (sha256
10152 (base32
10153 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
10154 (build-system python-build-system)
10155 (arguments
10156 `(;; No tests exist
10157 #:tests? #f))
10158 (home-page "https://github.com/shibukawa/snowball_py")
10159 (synopsis "Snowball stemming library collection for Python")
10160 (description "This package provides 16 word stemmer algorithms generated
10161from Snowball algorithms. It includes the 15 original ones plus the Poerter
10162English stemmer.")
10163 (license license:bsd-3)))
10164
10165(define-public python2-snowballstemmer
10166 (package-with-python2 python-snowballstemmer))
10167
10168(define-public python-sphinx-cloud-sptheme
10169 (package
10170 (name "python-sphinx-cloud-sptheme")
10171 (version "1.8.0")
10172 (source (origin
10173 (method url-fetch)
10174 (uri (pypi-uri "cloud_sptheme" version))
10175 (sha256
10176 (base32
10177 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
10178 (build-system python-build-system)
10179 ;; FIXME: The 'pypi' release archive does not contain tests.
10180 (arguments '(#:tests? #f))
10181 (native-inputs
10182 `(("python-sphinx" ,python-sphinx)))
10183 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
10184 (synopsis "'Cloud' theme for Sphinx documenter")
10185 (description "This package contains the \"Cloud\" theme for Sphinx and some
10186related extensions.")
10187 (license license:bsd-3)))
10188
10189(define-public python2-sphinx-cloud-sptheme
10190 (package-with-python2 python-sphinx-cloud-sptheme))
10191
10192(define-public python-sphinx-alabaster-theme
10193 (package
10194 (name "python-sphinx-alabaster-theme")
10195 (version "0.7.9")
10196 (source (origin
10197 (method url-fetch)
10198 (uri (pypi-uri "alabaster" version))
10199 (sha256
10200 (base32
10201 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
10202 (build-system python-build-system)
10203 (propagated-inputs
10204 `(("python-pygments" ,python-pygments)))
10205 (home-page "https://alabaster.readthedocs.io/")
10206 (synopsis "Configurable sidebar-enabled Sphinx theme")
10207 (description "Alabaster is a visually (c)lean, responsive, configurable
10208theme for the Sphinx documentation system. It's the default theme of Sphinx.")
10209 (license license:bsd-3)))
10210
10211(define-public python2-sphinx-alabaster-theme
10212 (package-with-python2 python-sphinx-alabaster-theme))
10213
10214(define-public python-setproctitle
10215(package
10216 (name "python-setproctitle")
10217 (version "1.1.10")
10218 (source
10219 (origin
10220 (method url-fetch)
10221 (uri (pypi-uri "setproctitle" version))
10222 (sha256
10223 (base32
10224 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
10225 (build-system python-build-system)
10226 (arguments
10227 '(#:phases
10228 (modify-phases %standard-phases
10229 (add-before 'check 'patch-Makefile
10230 ;; Stricly this is only required for the python2 variant.
10231 ;; But adding a phase in an inherited package seems to be
10232 ;; cumbersum. So we patch even for python3.
10233 (lambda _
10234 (let ((nose (assoc-ref %build-inputs "python2-nose")))
10235 (when nose
10236 (substitute* "Makefile"
10237 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
10238 (string-append nose "/bin/nosetests "))))
10239 #t)))
10240 (replace 'check
10241 (lambda _
10242 (setenv "PYTHON" (or (which "python3") (which "python")))
10243 (setenv "PYCONFIG" (or (which "python3-config")
10244 (which "python-config")))
10245 (setenv "CC" "gcc")
10246 ;; No need to extend PYTHONPATH to find the built package, since
10247 ;; the Makefile will build anyway
10248 (zero? (system* "make" "check")))))))
10249 (native-inputs
10250 `(("procps" ,procps))) ; required for tests
10251 (home-page
10252 "https://github.com/dvarrazzo/py-setproctitle")
10253 (synopsis
10254 "Setproctitle implementation for Python to customize the process title")
10255 (description "The library allows a process to change its title (as displayed
10256by system tools such as ps and top).
10257
10258Changing the title is mostly useful in multi-process systems, for
10259example when a master process is forked: changing the children's title
10260allows to identify the task each process is busy with. The technique
10261is used by PostgreSQL and the OpenSSH Server for example.")
10262 (license license:bsd-3)
10263 (properties `((python2-variant . ,(delay python2-setproctitle))))))
10264
10265(define-public python2-setproctitle
10266 (let ((base (package-with-python2
10267 (strip-python2-variant python-setproctitle))))
10268 (package
10269 (inherit base)
10270 (native-inputs `(("python2-nose" ,python2-nose)
10271 ,@(package-native-inputs base))))))
10272
10273(define-public python-validictory
10274 (package
10275 (name "python-validictory")
10276 (version "1.0.1")
10277 (source
10278 (origin
10279 (method url-fetch)
10280 (uri (pypi-uri "validictory" version))
10281 (sha256
10282 (base32
10283 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
10284 (build-system python-build-system)
10285 (arguments
10286 '(#:phases
10287 (modify-phases %standard-phases
10288 (add-after 'unpack 'bootstrap
10289 ;; Move the tests out of the package directory to avoid
10290 ;; packaging them.
10291 (lambda* _
10292 (rename-file "validictory/tests" "tests")
10293 (delete-file "tests/__init__.py")))
10294 (replace 'check
10295 (lambda _
10296 ;; Extend PYTHONPATH so the built package will be found.
10297 (setenv "PYTHONPATH"
10298 (string-append (getcwd) "/build/lib:"
10299 (getenv "PYTHONPATH")))
10300 (zero? (system* "py.test" "-vv" )))))))
10301 (native-inputs
10302 `(("python-pytest" ,python-pytest)))
10303 (home-page
10304 "https://github.com/jamesturk/validictory")
10305 (synopsis "General purpose Python data validator")
10306 (description "It allows validation of arbitrary Python data structures.
10307
10308The schema format is based on the JSON Schema
10309proposal (http://json-schema.org), so combined with json the library is also
10310useful as a validator for JSON data.")
10311 (license license:expat)))
10312
10313(define-public python2-validictory
10314 (package-with-python2 python-validictory))
10315
10316(define-public python-pyev
10317 (package
10318 (name "python-pyev")
10319 (version "0.9.0")
10320 (source
10321 (origin
10322 (method url-fetch)
10323 (uri (pypi-uri "pyev" version))
10324 (sha256
10325 (base32
10326 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
10327 (build-system python-build-system)
10328 (arguments
10329 `(#:tests? #f ; no test suite
10330 #:phases
10331 (modify-phases %standard-phases
10332 (add-after 'unpack 'patch
10333 (lambda* (#:key inputs #:allow-other-keys)
10334 (let ((libev (string-append (assoc-ref inputs "libev")
10335 "/lib/libev.so.4")))
10336 (substitute* "setup.py"
10337 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
10338 (string-append "libev_dll_name = \"" libev "\"")))))))))
10339 (inputs
10340 `(("libev" ,libev)))
10341 (home-page "http://pythonhosted.org/pyev/")
10342 (synopsis "Python libev interface")
10343 (description "Pyev provides a Python interface to libev.")
10344 (license license:gpl3)))
10345
10346(define-public python2-pyev
10347 (package-with-python2 python-pyev))
10348
10349(define-public python-imagesize
10350 (package
10351 (name "python-imagesize")
10352 (version "0.7.1")
10353 (source
10354 (origin
10355 (method url-fetch)
10356 (uri (pypi-uri "imagesize" version))
10357 (sha256
10358 (base32
10359 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
10360 (build-system python-build-system)
10361 (arguments
10362 '(;; Test files are not distributed on PyPi:
10363 ;; https://github.com/shibukawa/imagesize_py/issues/7
10364 #:tests? #f))
10365 (home-page "https://github.com/shibukawa/imagesize_py")
10366 (synopsis "Gets image size of files in variaous formats in Python")
10367 (description
10368 "This package allows determination of image size from
10369PNG, JPEG, JPEG2000 and GIF files in pure Python.")
10370 (license license:expat)))
10371
10372(define-public python2-imagesize
10373 (package-with-python2 python-imagesize))
10374
10375(define-public python-termstyle
10376 (package
10377 (name "python-termstyle")
10378 (version "0.1.11")
10379 (source
10380 (origin
10381 (method url-fetch)
10382 (uri (pypi-uri "termstyle" version))
10383 (sha256
10384 (base32
10385 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
10386 (build-system python-build-system)
10387 (arguments
10388 '(#:phases
10389 (modify-phases %standard-phases
10390 (replace 'check
10391 (lambda _
10392 (zero? (system* "python" "test3.py")))))))
10393 (home-page "https://github.com/gfxmonk/termstyle")
10394 (synopsis "Console text coloring for Python")
10395 (description "This package provides console text coloring for Python.")
10396 (license license:bsd-3)))
10397
10398(define-public python-argcomplete
10399 (package
10400 (name "python-argcomplete")
10401 (version "1.7.0")
10402 (source
10403 (origin
10404 (method url-fetch)
10405 (uri (pypi-uri "argcomplete" version))
10406 (sha256
10407 (base32
10408 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
10409 (build-system python-build-system)
10410 (native-inputs
10411 `(("python-pexpect" ,python-pexpect)
10412 ("tcsh" ,tcsh)
10413 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
10414 (home-page "https://github.com/kislyuk/argcomplete")
10415 (synopsis "Shell tab completion for Python argparse")
10416 (description "argcomplete provides extensible command line tab completion
10417of arguments and options for Python scripts using @code{argparse}. It's
10418particularly useful for programs with many options or sub-parsers that can
10419dynamically suggest completions; for example, when browsing resources over the
10420network.")
10421 (license license:asl2.0)))
10422
10423(define-public python2-argcomplete
10424 (package-with-python2 python-argcomplete))
10425
10426(define-public python-xopen
10427 (package
10428 (name "python-xopen")
10429 (version "0.3.3")
10430 (source
10431 (origin
10432 (method url-fetch)
10433 (uri (pypi-uri "xopen" version))
10434 (sha256
10435 (base32
10436 "1a0wbil552wsmklwd89ssmgz3pjd86qa9i7jh8wqb9wslc8a2qjr"))
10437 (file-name (string-append name "-" version ".tar.gz"))))
10438 (build-system python-build-system)
10439 (home-page "https://github.com/marcelm/xopen/")
10440 (synopsis "Open compressed files transparently")
10441 (description "This module provides an @code{xopen} function that works like
10442Python's built-in @code{open} function, but can also deal with compressed files.
10443Supported compression formats are gzip, bzip2 and, xz, and are automatically
10444recognized by their file extensions. The focus is on being as efficient as
10445possible on all supported Python versions.")
10446 (license license:expat)))
10447
10448(define-public python2-xopen
10449 (let ((base (package-with-python2
10450 (strip-python2-variant python-xopen))))
10451 (package
10452 (inherit base)
10453 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
10454 ,@(package-propagated-inputs base))))))
10455
10456(define-public python2-cheetah
10457 (package
10458 (name "python2-cheetah")
10459 (version "2.4.4")
10460 (source
10461 (origin
10462 (method url-fetch)
10463 (uri (pypi-uri "Cheetah" version))
10464 (sha256
10465 (base32
10466 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
10467 (build-system python-build-system)
10468 (arguments
10469 `(#:python ,python-2))
10470 (propagated-inputs
10471 `(("python2-markdown" ,python2-markdown)))
10472 (home-page "https://pythonhosted.org/Cheetah/")
10473 (synopsis "Template engine")
10474 (description "Cheetah is a text-based template engine and Python code
10475generator.
10476
10477Cheetah can be used as a standalone templating utility or referenced as
10478a library from other Python applications. It has many potential uses,
10479but web developers looking for a viable alternative to ASP, JSP, PHP and
10480PSP are expected to be its principle user group.
10481
10482Features:
10483@enumerate
10484@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
10485 text-based format.
10486@item Cleanly separates content, graphic design, and program code.
10487@item Blends the power and flexibility of Python with a simple template language
10488 that non-programmers can understand.
10489@item Gives template writers full access to any Python data structure, module,
10490 function, object, or method in their templates.
10491@item Makes code reuse easy by providing an object-orientated interface to
10492 templates that is accessible from Python code or other Cheetah templates.
10493 One template can subclass another and selectively reimplement sections of it.
10494@item Provides a simple, yet powerful, caching mechanism that can dramatically
10495 improve the performance of a dynamic website.
10496@item Compiles templates into optimized, yet readable, Python code.
10497@end enumerate")
10498 (license (license:x11-style "file://LICENSE"))))
10499
10500(define-public python-dulwich
10501 (package
10502 (name "python-dulwich")
10503 (version "0.18.6")
10504 (source
10505 (origin
10506 (method url-fetch)
10507 (uri (list (string-append "https://www.dulwich.io/releases/"
10508 "dulwich-" version ".tar.gz")
10509 (pypi-uri "dulwich" version)))
10510 (sha256
10511 (base32
10512 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
10513 (build-system python-build-system)
10514 (arguments
10515 `(#:phases
10516 (modify-phases %standard-phases
10517 (add-before 'check 'fix-tests
10518 (lambda* (#:key inputs #:allow-other-keys)
10519 ;; The tests use Popen with a custom environment which doesn't
10520 ;; include PATH.
10521 (substitute* "dulwich/tests/compat/utils.py"
10522 (("'git'") (string-append "'"
10523 (which "git")
10524 "'")))
10525 (substitute* '("dulwich/tests/test_repository.py"
10526 "dulwich/tests/test_hooks.py")
10527 (("#!/bin/sh") (string-append "#!" (which "sh"))))
10528 (setenv "TEST_RUNNER" "unittest")
10529 (setenv "PYTHONHASHSEED" "random")
10530 #t)))))
10531 (propagated-inputs
10532 `(("python-fastimport" ,python-fastimport)))
10533 (native-inputs
10534 `(("python-mock" ,python-mock)
10535 ("python-geventhttpclient" ,python-geventhttpclient)
10536 ("git" ,git)))
10537 (home-page "https://www.dulwich.io/")
10538 (synopsis "Git implementation in Python")
10539 (description "Dulwich is an implementation of the Git file formats and
10540protocols written in pure Python.")
10541 ;; Can be used with either license.
10542 (license (list license:asl2.0 license:gpl2+))))
10543
10544(define-public python2-dulwich
10545 (package-with-python2 python-dulwich))
10546
10547(define-public python-pbkdf2
10548 (package
10549 (name "python-pbkdf2")
10550 (version "1.3")
10551 (source
10552 (origin
10553 (method url-fetch)
10554 (uri (pypi-uri "pbkdf2" version))
10555 (sha256
10556 (base32
10557 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
10558 (build-system python-build-system)
10559 (arguments
10560 '(#:phases
10561 (modify-phases %standard-phases
10562 (replace 'check
10563 (lambda _
10564 (setenv "PYTHONPATH"
10565 (string-append (getcwd) "/build/lib:"
10566 (getenv "PYTHONPATH")))
10567 (zero? (system* "python" "test/test_pbkdf2.py")))))))
10568 (propagated-inputs
10569 `(("python-pycrypto" ,python-pycrypto))) ; optional
10570 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
10571 (synopsis "Password-based key derivation")
10572 (description "This module implements the password-based key derivation
10573function, PBKDF2, specified in RSA PKCS#5 v2.0.
10574
10575PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
10576is part of the RSA Public Key Cryptography Standards series. The provided
10577implementation takes a password or a passphrase and a salt value (and
10578optionally a iteration count, a digest module, and a MAC module) and provides
10579a file-like object from which an arbitrarly-sized key can be read.")
10580 (license license:expat)))
10581
10582(define-public python2-pbkdf2
10583 (package-with-python2 python-pbkdf2))
10584
10585(define-public python-qrcode
10586 (package
10587 (name "python-qrcode")
10588 (version "6.0")
10589 (source
10590 (origin
10591 (method url-fetch)
10592 (uri (pypi-uri "qrcode" version))
10593 (sha256
10594 (base32
10595 "1gz1g2n9kqwqkak78aavr354z1v3yyiksk7q6xp5hi1zr6s0syq3"))))
10596 (build-system python-build-system)
10597 (arguments
10598 ;; FIXME: Tests require packaging 'pymaging'.
10599 '(#:tests? #f))
10600 (propagated-inputs
10601 `(("python-lxml" ,python-lxml) ; for SVG output
10602 ("python-pillow" ,python-pillow) ; for PNG output
10603 ("python-six" ,python-six)))
10604 (inputs
10605 `(;; The setup.cfg file needs to be used, and support for this requires
10606 ;; at least version 30.3.0 of setuptools
10607 ("python-setuptools" ,python-setuptools)))
10608 (home-page "https://github.com/lincolnloop/python-qrcode")
10609 (synopsis "QR Code image generator")
10610 (description "This package provides a pure Python QR Code generator
10611module. It uses the Python Imaging Library (PIL) to allow for the generation
10612of QR Codes.
10613
10614In addition this package provides a command line tool to generate QR codes and
10615either write these QR codes to a file or do the output as ascii art at the
10616console.")
10617 (license license:bsd-3)))
10618
10619(define-public python2-qrcode
10620 (package-with-python2 python-qrcode))
10621
10622(define-public python-rst2ansi
10623 (package
10624 (name "python-rst2ansi")
10625 (version "0.1.5")
10626 (source
10627 (origin
10628 (method url-fetch)
10629 (uri (pypi-uri "rst2ansi" version))
10630 (sha256
10631 (base32
10632 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
10633 (build-system python-build-system)
10634 (propagated-inputs
10635 `(("python-docutils" ,python-docutils)))
10636 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
10637 (synopsis "Convert RST to ANSI-decorated console output")
10638 (description
10639 "Python module dedicated to rendering RST (reStructuredText) documents
10640to ansi-escaped strings suitable for display in a terminal.")
10641 (license license:expat)))
10642
10643(define-public python-ansi2html
10644 (package
10645 (name "python-ansi2html")
10646 (version "1.2.0")
10647 (source
10648 (origin
10649 (method url-fetch)
10650 (uri (pypi-uri "ansi2html" version))
10651 (sha256
10652 (base32
10653 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
10654 (build-system python-build-system)
10655 (native-inputs
10656 `(("python-mock" ,python-mock)
10657 ("python-nose" ,python-nose)))
10658 (propagated-inputs
10659 `(("python-six" ,python-six)))
10660 (home-page "https://github.com/ralphbean/ansi2html")
10661 (synopsis "Convert ANSI-decorated console output to HTML")
10662 (description
10663 "@command{ansi2html} is a Python library and command line utility for
10664convering text with ANSI color codes to HTML or LaTeX.")
10665 (license license:gpl3+)))
10666
10667(define-public python2-ansi2html
10668 (package-with-python2 python-ansi2html))
10669
10670(define-public python-ddt
10671 (package
10672 (name "python-ddt")
10673 (version "1.1.3")
10674 (source
10675 (origin
10676 (method url-fetch)
10677 (uri (pypi-uri "ddt" version))
10678 (sha256
10679 (base32
10680 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
10681 (build-system python-build-system)
10682 (native-inputs
10683 `(("python-mock" ,python-mock)
10684 ("python-nose" ,python-nose)))
10685 (propagated-inputs
10686 `(("python-six" ,python-six)
10687 ("python-pyyaml" ,python-pyyaml)))
10688 (home-page "https://github.com/txels/ddt")
10689 (synopsis "Data-Driven Tests")
10690 (description
10691 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
10692running it with different test data, and make it appear as multiple test
10693cases.")
10694 (license license:expat)))
10695
10696(define-public python2-ddt
10697 (package-with-python2 python-ddt))
10698
10699(define-public python-pycosat
10700 (package
10701 (name "python-pycosat")
10702 (version "0.6.1")
10703 (source
10704 (origin
10705 (method url-fetch)
10706 (uri (pypi-uri "pycosat" version))
10707 (sha256
10708 (base32
10709 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
10710 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
10711 (build-system python-build-system)
10712 (home-page "https://github.com/ContinuumIO/pycosat")
10713 (synopsis "Bindings to picosat (a SAT solver)")
10714 (description
10715 "This package provides efficient Python bindings to @code{picosat} on
10716the C level. When importing pycosat, the @code{picosat} solver becomes part
10717of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
10718Problem} (SAT) solver.")
10719 (license license:expat)))
10720
10721(define-public python2-pycosat
10722 (package-with-python2 python-pycosat))
10723
10724(define-public python2-ruamel.ordereddict
10725 (package
10726 (name "python2-ruamel.ordereddict")
10727 (version "0.4.9")
10728 (source
10729 (origin
10730 (method url-fetch)
10731 (uri (pypi-uri "ruamel.ordereddict" version))
10732 (sha256
10733 (base32
10734 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
10735 (build-system python-build-system)
10736 (arguments
10737 `(#:python ,python-2
10738 #:phases
10739 (modify-phases %standard-phases
10740 (delete 'check)
10741 (add-after 'install 'check
10742 (lambda* (#:key inputs outputs #:allow-other-keys)
10743 (add-installed-pythonpath inputs outputs)
10744 (zero? (system* "python" "test/testordereddict.py")))))))
10745 (home-page "https://bitbucket.org/ruamel/ordereddict")
10746 (synopsis "Version of dict that keeps keys in insertion order")
10747 (description
10748 "This is an implementation of an ordered dictionary with @dfn{Key
10749Insertion Order} (KIO: updates of values do not affect the position of the
10750key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
10751removed and put at the back). The standard library module @code{OrderedDict},
10752implemented later, implements a subset of @code{ordereddict} functionality.
10753Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
10754Order} (KSO, no sorting function can be specified, but a transform can be
10755specified to apply on the key before comparison (e.g. @code{string.lower})).")
10756 (license license:expat)))
10757
10758(define-public python-pypeg2
10759 (package
10760 (name "python-pypeg2")
10761 (version "2.15.2")
10762 (source
10763 (origin
10764 (method url-fetch)
10765 (uri (pypi-uri "pyPEG2" version))
10766 (sha256
10767 (base32
10768 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
10769 (build-system python-build-system)
10770 (propagated-inputs `(("python-lxml" ,python-lxml)))
10771 (arguments
10772 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
10773 '(#:tests? #f))
10774 (home-page "https://fdik.org/pyPEG/")
10775 (synopsis "Parsering Expression Grammars in Python")
10776 (description "PyPEG is an intrinsic parser interpreter framework for
10777Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
10778parse many formal languages.")
10779 (license license:gpl2)))
10780
10781(define-public python-incremental
10782 (package
10783 (name "python-incremental")
10784 (version "17.5.0")
10785 (source
10786 (origin
10787 (method url-fetch)
10788 (uri (pypi-uri "incremental" version))
10789 (sha256
10790 (base32
10791 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
10792 (build-system python-build-system)
10793 (home-page "https://github.com/hawkowl/incremental")
10794 (synopsis "Library for versioning Python projects")
10795 (description "Incremental is a small library that versions your Python
10796projects.")
10797 (license license:expat)))
10798
10799(define-public python2-incremental
10800 (package-with-python2 python-incremental))
10801
10802(define-public python-automat
10803 (package
10804 (name "python-automat")
10805 (version "0.6.0")
10806 (source (origin
10807 (method url-fetch)
10808 (uri (pypi-uri "Automat" version))
10809 (sha256
10810 (base32
10811 "1a7nsrljysfmdqmpn2apfa1gg6rfah4y9sizvns8gb08rx7d07rw"))))
10812 (build-system python-build-system)
10813 ;; We disable the tests because they require python-twisted, while
10814 ;; python-twisted depends on python-automat. Twisted is optional, but the
10815 ;; tests fail if it is not available. Also see
10816 ;; <https://github.com/glyph/automat/issues/71>.
10817 (arguments '(#:tests? #f))
10818 (native-inputs
10819 `(("python-m2r" ,python-m2r)
10820 ("python-setuptools-scm" ,python-setuptools-scm)
10821 ("python-graphviz" ,python-graphviz)))
10822 (propagated-inputs
10823 `(("python-six" ,python-six)
10824 ("python-attrs" ,python-attrs)))
10825 (home-page "https://github.com/glyph/Automat")
10826 (synopsis "Self-service finite-state machines")
10827 (description "Automat is a library for concise, idiomatic Python
10828expression of finite-state automata (particularly deterministic finite-state
10829transducers).")
10830 (license license:expat)))
10831
10832(define-public python2-automat
10833 (package-with-python2 python-automat))
10834
10835(define-public python-m2r
10836 (package
10837 (name "python-m2r")
10838 (version "0.1.12")
10839 (source (origin
10840 (method url-fetch)
10841 (uri (pypi-uri "m2r" version))
10842 (sha256
10843 (base32
10844 "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd"))))
10845 (build-system python-build-system)
10846 (propagated-inputs
10847 `(("python-docutils" ,python-docutils)
10848 ("python-mistune" ,python-mistune)))
10849 (native-inputs
10850 `(("python-pygments" ,python-pygments)
10851 ("python-mock" ,python-mock)))
10852 (home-page "https://github.com/miyakogi/m2r")
10853 (synopsis "Markdown to reStructuredText converter")
10854 (description "M2R converts a markdown file including reST markups to valid
10855reST format.")
10856 (license license:expat)))
10857
10858(define-public python2-m2r
10859 (package-with-python2 python-m2r))
10860
10861(define-public python-constantly
10862 (package
10863 (name "python-constantly")
10864 (version "15.1.0")
10865 (source (origin
10866 (method url-fetch)
10867 (uri (pypi-uri "constantly" version))
10868 (sha256
10869 (base32
10870 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
10871 (build-system python-build-system)
10872 (home-page "https://github.com/twisted/constantly")
10873 (synopsis "Symbolic constants in Python")
10874 (description "Constantly is a Python library that provides symbolic
10875constant support. It includes collections and constants with text, numeric,
10876and bit flag values.")
10877 (license license:expat)))
10878
10879(define-public python2-constantly
10880 (package-with-python2 python-constantly))
10881
10882(define-public python-attrs
10883 (package
10884 (name "python-attrs")
10885 (version "17.4.0")
10886 (source (origin
10887 (method url-fetch)
10888 (uri (pypi-uri "attrs" version))
10889 (sha256
10890 (base32
10891 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
10892 (build-system python-build-system)
10893 (native-inputs
10894 `(("python-coverage" ,python-coverage)
10895 ("python-hypothesis" ,python-hypothesis)
10896 ("python-pytest" ,python-pytest)
10897 ("python-six" ,python-six)
10898 ("python-sphinx" ,python-sphinx)
10899 ("python-zope-interface" ,python-zope-interface)))
10900 (home-page "https://github.com/python-attrs/attrs/")
10901 (synopsis "Attributes without boilerplate")
10902 (description "@code{attrs} is a Python package with class decorators that
10903ease the chores of implementing the most common attribute-related object
10904protocols.")
10905 (license license:expat)))
10906
10907(define-public python2-attrs
10908 (package-with-python2 python-attrs))
10909
10910(define-public python-attrs-bootstrap
10911 (package
10912 (inherit python-attrs)
10913 (name "python-attrs-bootstrap")
10914 (native-inputs `())
10915 (arguments `(#:tests? #f))))
10916
10917(define-public python2-attrs-bootstrap
10918 (package-with-python2 python-attrs-bootstrap))
10919
10920(define-public python2-cliapp
10921 (package
10922 (name "python2-cliapp")
10923 (version "1.20170823")
10924 (source
10925 (origin
10926 (method url-fetch)
10927 (uri (string-append
10928 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
10929 version ".tar.gz"))
10930 (sha256
10931 (base32
10932 "1i9gik0xrj6jmi95s5w988jl1y265baz5xm5pbqdyvsh8h9ln6yq"))))
10933 (build-system python-build-system)
10934 (arguments
10935 `(#:python ,python-2
10936 #:phases
10937 (modify-phases %standard-phases
10938 ;; check phase needs to be run before the build phase. If not,
10939 ;; coverage-test-runner looks for tests for the built source files,
10940 ;; and fails.
10941 (delete 'check)
10942 (add-before 'build 'check
10943 (lambda _
10944 ;; Disable python3 tests
10945 (substitute* "check"
10946 (("python3") "# python3"))
10947 (zero? (system* "./check")))))))
10948 (native-inputs
10949 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
10950 ("python2-pep8" ,python2-pep8)))
10951 (propagated-inputs
10952 `(("python2-pyaml" ,python2-pyaml)))
10953 (home-page "https://liw.fi/cliapp/")
10954 (synopsis "Python framework for command line programs")
10955 (description "@code{python2-cliapp} is a python framework for
10956command line programs. It contains the typical stuff such programs
10957need to do, such as parsing the command line for options, and
10958iterating over input files.")
10959 (license license:gpl2+)))
10960
10961(define-public python2-ttystatus
10962 (package
10963 (name "python2-ttystatus")
10964 (version "0.35")
10965 (source
10966 (origin
10967 (method url-fetch)
10968 (uri (string-append
10969 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
10970 version ".tar.gz"))
10971 (sha256
10972 (base32
10973 "0vivqbw7ddhsq1zj3g9cvvv4f0phl0pis2smsnwcr2szz2fk3hl6"))))
10974 (build-system python-build-system)
10975 (native-inputs
10976 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
10977 ("python2-pep8" ,python2-pep8)))
10978 (arguments
10979 `(#:python ,python-2
10980 #:phases
10981 (modify-phases %standard-phases
10982 ;; check phase needs to be run before the build phase. If not,
10983 ;; coverage-test-runner looks for tests for the built source files,
10984 ;; and fails.
10985 (delete 'check)
10986 (add-before 'build 'check
10987 (lambda _
10988 (zero? (system* "make" "check")))))))
10989 (home-page "https://liw.fi/ttystatus/")
10990 (synopsis "Python library for showing progress reporting and
10991status updates on terminals")
10992 (description "@code{python2-ttystatus} is a python library for
10993showing progress reporting and status updates on terminals, for
10994command line programs. Output is automatically adapted to the width
10995of the terminal: truncated if it does not fit, and resized if the
10996terminal size changes.")
10997 (license license:gpl3+)))
10998
10999(define-public python2-tracing
11000 (package
11001 (name "python2-tracing")
11002 (version "0.10")
11003 (source
11004 (origin
11005 (method url-fetch)
11006 (uri (string-append
11007 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
11008 version ".tar.gz"))
11009 (sha256
11010 (base32
11011 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
11012 (build-system python-build-system)
11013 (arguments
11014 `(#:python ,python-2))
11015 (home-page "https://liw.fi/tracing/")
11016 (synopsis "Python debug logging helper")
11017 (description "@code{python2-tracing} is a python library for
11018logging debug messages. It provides a way to turn debugging messages
11019on and off, based on the filename they occur in. It is much faster
11020than using @code{logging.Filter} to accomplish the same thing, which
11021matters when code is run in production mode. The actual logging still
11022happens using the @code{logging} library.")
11023 (license license:gpl3+)))
11024
11025(define-public python2-larch
11026 (package
11027 (name "python2-larch")
11028 (version "1.20151025")
11029 (source
11030 (origin
11031 (method url-fetch)
11032 (uri (string-append
11033 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
11034 version ".tar.gz"))
11035 (patches (search-patches
11036 "python2-larch-coverage-4.0a6-compatibility.patch"))
11037 (sha256
11038 (base32
11039 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
11040 (build-system python-build-system)
11041 (arguments
11042 `(#:python ,python-2
11043 #:phases
11044 (modify-phases %standard-phases
11045 ;; check phase needs to be run before the build phase. If not,
11046 ;; coverage-test-runner looks for tests for the built source files,
11047 ;; and fails.
11048 (delete 'check)
11049 (add-before 'build 'check
11050 (lambda _
11051 (zero? (system* "make" "check")))))))
11052 (native-inputs
11053 `(("cmdtest" ,cmdtest)
11054 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
11055 (propagated-inputs
11056 `(("python2-tracing" ,python2-tracing)))
11057 (home-page "https://liw.fi/larch/")
11058 (synopsis "Python copy-on-write B-tree library")
11059 (description "@code{python2-larch} is an implementation of
11060particular kind of B-tree, based on research by Ohad Rodeh. See
11061@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
11062on the data structure.
11063
11064The distinctive feature of this B-tree is that a node is never
11065(conceptually) modified. Instead, all updates are done by
11066copy-on-write. This makes it easy to clone a tree, and modify only the
11067clone, while other processes access the original tree.")
11068 (license license:gpl3+)))
11069
11070(define-public python-astroid
11071 (package
11072 (name "python-astroid")
11073 (version "1.5.3")
11074 (source
11075 (origin
11076 (method url-fetch)
11077 (uri (string-append
11078 "https://github.com/PyCQA/astroid/archive/astroid-"
11079 version ".tar.gz"))
11080 (sha256
11081 (base32
11082 "0isn5p7f9n48hmksgbrj7dkm9dyglnayzn5jngk37qywg8a74ngn"))))
11083 (build-system python-build-system)
11084 (propagated-inputs
11085 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
11086 ("python-six" ,python-six)
11087 ("python-wrapt" ,python-wrapt)))
11088 (arguments
11089 `(#:phases
11090 (modify-phases %standard-phases
11091 (replace 'check
11092 (lambda _
11093 (zero? (system* "python" "-m" "unittest" "discover"
11094 "-p" "unittest*.py")))))))
11095 (home-page "https://github.com/PyCQA/astroid")
11096 (synopsis "Common base representation of python source code for pylint and
11097other projects")
11098 (description "@code{python-astroid} provides a common base representation
11099of python source code for projects such as pychecker, pyreverse, pylint, etc.
11100
11101It provides a compatible representation which comes from the _ast module. It
11102rebuilds the tree generated by the builtin _ast module by recursively walking
11103down the AST and building an extended ast. The new node classes have
11104additional methods and attributes for different usages. They include some
11105support for static inference and local name scopes. Furthermore, astroid
11106builds partial trees by inspecting living objects.")
11107 (license license:lgpl2.1+)
11108 (properties `((python2-variant . ,(delay python2-astroid))))))
11109
11110(define-public python2-astroid
11111 (let ((base (package-with-python2
11112 (strip-python2-variant python-astroid))))
11113 (package (inherit base)
11114 (propagated-inputs
11115 `(("python2-backports-functools-lru-cache"
11116 ,python2-backports-functools-lru-cache)
11117 ("python2-enum34" ,python2-enum34)
11118 ("python2-singledispatch" ,python2-singledispatch)
11119 ,@(package-propagated-inputs base))))))
11120
11121(define-public python-isort
11122 (package
11123 (name "python-isort")
11124 (version "4.2.5")
11125 (source
11126 (origin
11127 (method url-fetch)
11128 (uri (string-append
11129 "https://github.com/timothycrosley/isort/archive/"
11130 version ".tar.gz"))
11131 (file-name (string-append name "-" version ".tar.gz"))
11132 (sha256
11133 (base32
11134 "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh"))))
11135 (build-system python-build-system)
11136 (native-inputs
11137 `(("python-mock" ,python-mock)
11138 ("python-pytest" ,python-pytest)))
11139 (home-page "https://github.com/timothycrosley/isort")
11140 (synopsis "Python utility/library to sort python imports")
11141 (description "@code{python-isort} is a python utility/library to sort
11142imports alphabetically, and automatically separated into sections. It
11143provides a command line utility, a python library and plugins for various
11144editors.")
11145 (license license:expat)))
11146
11147(define-public python2-isort
11148 (package-with-python2 python-isort))
11149
11150(define-public python2-backports-functools-lru-cache
11151 (package
11152 (name "python2-backports-functools-lru-cache")
11153 (version "1.3")
11154 (source
11155 (origin
11156 (method url-fetch)
11157 ;; only the pypi tarballs contain the necessary metadata
11158 (uri (pypi-uri "backports.functools_lru_cache" version))
11159 (sha256
11160 (base32
11161 "158ysf2hb0q4p4695abfiym9x1ywg0dgh8a3apd7gqaaxjy22jj4"))))
11162 (build-system python-build-system)
11163 (native-inputs
11164 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
11165 (arguments
11166 `(#:python ,python-2))
11167 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
11168 (synopsis "Backport of functools.lru_cache from Python 3.3")
11169 (description "@code{python2-backports-functools-lru-cache} is a backport
11170of @code{functools.lru_cache} from python 3.3.")
11171 (license license:expat)))
11172
11173(define-public python-configparser
11174 (package
11175 (name "python-configparser")
11176 (version "3.5.0")
11177 (source
11178 (origin
11179 (method url-fetch)
11180 (uri (string-append
11181 "https://bitbucket.org/ambv/configparser/get/"
11182 version ".tar.bz2"))
11183 (file-name (string-append name "-" version ".tar.gz"))
11184 (sha256
11185 (base32
11186 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
11187 (build-system python-build-system)
11188 (home-page "http://docs.python.org/py3k/library/configparser.html")
11189 (synopsis "Backport of configparser from python 3.5")
11190 (description "@code{python-configparser} is a backport of
11191@code{configparser} from Python 3.5 so that it can be used directly
11192in other versions.")
11193 (license license:expat)))
11194
11195(define-public python2-configparser
11196 (package-with-python2 python-configparser))
11197
11198(define-public python-mando
11199 (package
11200 (name "python-mando")
11201 (version "0.6.4")
11202 (source (origin
11203 (method url-fetch)
11204 (uri (pypi-uri "mando" version))
11205 (sha256
11206 (base32
11207 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
11208 (build-system python-build-system)
11209 (propagated-inputs
11210 `(("python-rst2ansi" ,python-rst2ansi)
11211 ("python-six" ,python-six)))
11212 (native-inputs
11213 `(("python-pytest" ,python-pytest)))
11214 (home-page "https://mando.readthedocs.org/")
11215 (synopsis
11216 "Wrapper around argparse, allowing creation of complete CLI applications")
11217 (description
11218 "This package is a wrapper around argparse, allowing you to write complete CLI
11219applications in seconds while maintaining all the flexibility.")
11220 (license license:expat)))
11221
11222(define-public python2-mando
11223 (package-with-python2 python-mando))
11224
11225(define-public python-fudge
11226 (package
11227 (name "python-fudge")
11228 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
11229 ;; package, which is currently the only use of this package.
11230 (version "0.9.6")
11231 (source
11232 (origin
11233 (method url-fetch)
11234 (uri (pypi-uri "fudge" version))
11235 (sha256
11236 (base32
11237 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
11238 (build-system python-build-system)
11239 (arguments
11240 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
11241 (home-page "https://github.com/fudge-py/fudge")
11242 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
11243 (description
11244 "Fudge is a Python module for using fake objects (mocks and stubs) to
11245test real ones.
11246
11247In readable Python code, you declare the methods available on your fake object
11248and how they should be called. Then you inject that into your application and
11249start testing. This declarative approach means you don’t have to record and
11250playback actions and you don’t have to inspect your fakes after running code.
11251If the fake object was used incorrectly then you’ll see an informative
11252exception message with a traceback that points to the culprit.")
11253 (license license:expat)))
11254
11255(define-public python2-fudge
11256 (package-with-python2 python-fudge))
11257
11258(define-public python-mwclient
11259 (package
11260 (name "python-mwclient")
11261 (version "0.8.4")
11262 (source
11263 (origin
11264 (method url-fetch)
11265 ;; The PyPI version wouldn't contain tests.
11266 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
11267 "v" version ".tar.gz"))
11268 (file-name (string-append name "-" version ".tar.gz"))
11269 (sha256
11270 (base32
11271 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
11272 (build-system python-build-system)
11273 (propagated-inputs
11274 `(("python-requests" ,python-requests)
11275 ("python-requests-oauthlib"
11276 ,python-requests-oauthlib)
11277 ("python-six" ,python-six)))
11278 (native-inputs
11279 `(("python-mock" ,python-mock)
11280 ("python-pytest" ,python-pytest)
11281 ("python-pytest-pep8" ,python-pytest-pep8)
11282 ("python-pytest-cache" ,python-pytest-cache)
11283 ("python-pytest-cov" ,python-pytest-cov)
11284 ("python-responses" ,python-responses)))
11285 (home-page "https://github.com/btongminh/mwclient")
11286 (synopsis "MediaWiki API client")
11287 (description "This package provides a MediaWiki API client.")
11288 (license license:expat)))
11289
11290(define-public python2-mwclient
11291 (package-with-python2 python-mwclient))
11292
11293(define-public python-utils
11294 (package
11295 (name "python-utils")
11296 (version "2.1.0")
11297 (source (origin
11298 (method url-fetch)
11299 (uri (pypi-uri "python-utils" version))
11300 (sha256
11301 (base32
11302 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
11303 (build-system python-build-system)
11304 (native-inputs
11305 `(("pytest-runner" ,python-pytest-runner)
11306 ("pytest" ,python-pytest)
11307 ("six" ,python-six)))
11308 (home-page "https://github.com/WoLpH/python-utils")
11309 (synopsis "Convenient utilities not included with the standard Python install")
11310 (description
11311 "Python Utils is a collection of small Python functions and classes which
11312make common patterns shorter and easier.")
11313 (license license:bsd-2)))
11314
11315(define-public python2-utils
11316 (package-with-python2 python-utils))
11317
11318(define-public python-sphinx-me
11319 (package
11320 (name "python-sphinx-me")
11321 (version "0.3")
11322 (source
11323 (origin
11324 (method url-fetch)
11325 (uri (pypi-uri "sphinx-me" version))
11326 (sha256
11327 (base32
11328 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
11329 (build-system python-build-system)
11330 (home-page "https://github.com/stephenmcd/sphinx-me")
11331 (synopsis "Create a Sphinx documentation shell")
11332 (description
11333 "Create a Sphinx documentation shell for your project and include the
11334README file as the documentation index. It handles extracting the required
11335meta data such as the project name, author and version from your project for
11336use in your Sphinx docs.")
11337 (license license:bsd-2)))
11338
11339(define-public python2-sphinx-me
11340 (package-with-python2 python-sphinx-me))
11341
11342(define-public python-diff-match-patch
11343 (package
11344 (name "python-diff-match-patch")
11345 (version "20121119")
11346 (source
11347 (origin
11348 (method url-fetch)
11349 (uri (pypi-uri "diff-match-patch" version))
11350 (sha256
11351 (base32
11352 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
11353 (build-system python-build-system)
11354 (home-page "https://code.google.com/p/google-diff-match-patch")
11355 (synopsis "Synchronize plain text")
11356 (description "Diff Match and Patch libraries offer robust algorithms to
11357perform the operations required for synchronizing plain text.")
11358 (license license:asl2.0)))
11359
11360(define-public python2-diff-match-patch
11361 (package-with-python2 python-diff-match-patch))
11362
11363(define-public python-dirsync
11364 (package
11365 (name "python-dirsync")
11366 (version "2.2.2")
11367 (source
11368 (origin
11369 (method url-fetch)
11370 (uri (pypi-uri "dirsync" version ".zip"))
11371 (sha256
11372 (base32
11373 "1hcdvmkwd5512zbxpin0k7bx5bkgzy3swjx7d0kj1y45af6r75v2"))))
11374 (build-system python-build-system)
11375 (native-inputs
11376 `(("unzip" ,unzip)))
11377 (propagated-inputs
11378 `(("six" ,python-six)))
11379 (home-page "https://bitbucket.org/tkhyn/dirsync")
11380 (synopsis "Advanced directory tree synchronisation tool")
11381 (description "Advanced directory tree synchronisation tool.")
11382 (license license:expat)))
11383
11384(define-public python2-dirsync
11385 (package-with-python2 python-dirsync))
11386
11387(define-public python-levenshtein
11388 (package
11389 (name "python-levenshtein")
11390 (version "0.12.0")
11391 (source
11392 (origin
11393 (method url-fetch)
11394 (uri (pypi-uri "python-Levenshtein" version))
11395 (sha256
11396 (base32
11397 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
11398 (build-system python-build-system)
11399 (home-page "https://github.com/ztane/python-Levenshtein")
11400 (synopsis "Fast computation of Levenshtein distance and string similarity")
11401 (description
11402 "The Levenshtein Python C extension module contains functions for fast computation of
11403@enumerate
11404@item Levenshtein (edit) distance, and edit operations
11405@item string similarity
11406@item approximate median strings, and generally string averaging
11407@item string sequence and set similarity
11408@end enumerate
11409It supports both normal and Unicode strings.")
11410 (license license:gpl2+)))
11411
11412(define-public python2-levenshtein
11413 (package-with-python2 python-levenshtein))
11414
11415(define-public python-scandir
11416 (package
11417 (name "python-scandir")
11418 (version "1.7")
11419 (source
11420 (origin
11421 (method url-fetch)
11422 (uri (pypi-uri "scandir" version))
11423 (sha256
11424 (base32 "0gbnhjzg42rj87ljv9kb648rfxph69ly3c8r9841dxy4d7l5pmdj"))))
11425 (build-system python-build-system)
11426 (arguments
11427 `(#:phases (modify-phases %standard-phases
11428 (replace 'check
11429 (lambda _
11430 (invoke "python" "test/run_tests.py"))))))
11431 (home-page "https://github.com/benhoyt/scandir")
11432 (synopsis "Directory iteration function")
11433 (description
11434 "Directory iteration function like os.listdir(), except that instead of
11435returning a list of bare filenames, it yields DirEntry objects that include
11436file type and stat information along with the name. Using scandir() increases
11437the speed of os.walk() by 2-20 times (depending on the platform and file
11438system) by avoiding unnecessary calls to os.stat() in most cases.
11439
11440This package is part of the Python standard library since version 3.5.")
11441 (license license:bsd-3)))
11442
11443(define-public python2-scandir
11444 (package-with-python2 python-scandir))
11445
11446(define-public python2-stemming
11447 (package
11448 (name "python2-stemming")
11449 (version "1.0.1")
11450 (source
11451 (origin
11452 (method url-fetch)
11453 (uri (pypi-uri "stemming" version))
11454 (sha256
11455 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
11456 (build-system python-build-system)
11457 (arguments
11458 `(#:python ,python-2))
11459 (home-page "https://bitbucket.org/mchaput/stemming/overview")
11460 (synopsis "Python implementations of various stemming algorithms")
11461 (description
11462 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
11463stemming algorithms for English. These implementations are straightforward and
11464efficient, unlike some Python versions of the same algorithms available on the
11465Web. This package is an extraction of the stemming code included in the Whoosh
11466search engine.")
11467 (license license:public-domain)))
11468
11469(define-public python-factory-boy
11470 (package
11471 (name "python-factory-boy")
11472 (version "2.8.1")
11473 (source
11474 (origin
11475 (method url-fetch)
11476 (uri (pypi-uri "factory_boy" version))
11477 (sha256
11478 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
11479 (build-system python-build-system)
11480 (arguments
11481 ;; Tests are not included in the tarball.
11482 `(#:tests? #f))
11483 (propagated-inputs
11484 `(("faker" ,python-faker)))
11485 (home-page "https://github.com/benhoyt/scandir")
11486 (synopsis "Versatile test fixtures replacement")
11487 (description
11488 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
11489
11490As a fixtures replacement tool, it aims to replace static, hard to maintain
11491fixtures with easy-to-use factories for complex object.
11492
11493Instead of building an exhaustive test setup with every possible combination
11494of corner cases, factory_boy allows you to use objects customized for the
11495current test, while only declaring the test-specific fields")
11496 (license license:expat)))
11497
11498(define-public python2-factory-boy
11499 (package-with-python2 python-factory-boy))
11500
11501(define-public python-translate-toolkit
11502 (package
11503 (name "python-translate-toolkit")
11504 (version "2.1.0")
11505 (source
11506 (origin
11507 (method url-fetch)
11508 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
11509 (sha256
11510 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
11511 (build-system python-build-system)
11512 (native-inputs
11513 `(("python-pytest" ,python-pytest)
11514 ("python-sphinx" ,python-sphinx)))
11515 (propagated-inputs
11516 `(("python-babel" ,python-babel)
11517 ("python-beautifulsoup4" ,python-beautifulsoup4)
11518 ("python-chardet" ,python-chardet)
11519 ("python-diff-match-patch" ,python-diff-match-patch)
11520 ("python-levenshtein" ,python-levenshtein)
11521 ("python-lxml" ,python-lxml)
11522 ("python-six" ,python-six)
11523 ("python-vobject" ,python-vobject)
11524 ("python-pyyaml" ,python-pyyaml)))
11525 (arguments
11526 ;; TODO: tests are not run, because they end with
11527 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
11528 ;; 'parse_funcs'
11529 ;; during test setup.
11530 `(#:tests? #f))
11531 (home-page "http://toolkit.translatehouse.org")
11532 (synopsis "Tools and API for translation and localization engineering")
11533 (description
11534 "Tools and API for translation and localization engineering. It contains
11535several utilities, as well as an API for building localization tools.")
11536 (license license:gpl2+)))
11537
11538(define-public python2-translate-toolkit
11539 (package-with-python2 python-translate-toolkit))
11540
11541(define-public python-packaging
11542 (package
11543 (name "python-packaging")
11544 (version "16.8")
11545 (source
11546 (origin
11547 (method url-fetch)
11548 (uri (pypi-uri "packaging" version))
11549 (sha256
11550 (base32
11551 "17k1xbjshackwvbsnxqixbph8rbqhz4bf4g3al5xyzhavxgq6l2x"))))
11552 (build-system python-build-system)
11553 (native-inputs
11554 `(("python-pretend" ,python-pretend)
11555 ("python-pytest" ,python-pytest)))
11556 (propagated-inputs
11557 `(("python-pyparsing" ,python-pyparsing)
11558 ("python-six" ,python-six)))
11559 (home-page "https://github.com/pypa/packaging")
11560 (synopsis "Core utilities for Python packages")
11561 (description "Packaging is a Python module for dealing with Python packages.
11562It offers an interface for working with package versions, names, and dependency
11563information.")
11564 ;; From 'LICENSE': This software is made available under the terms of
11565 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
11566 ;; Contributions to this software is made under the terms of *both* these
11567 ;; licenses.
11568 (license (list license:asl2.0 license:bsd-2))))
11569
11570(define-public python2-packaging
11571 (package-with-python2 python-packaging))
11572
11573(define-public python-relatorio
11574 (package
11575 (name "python-relatorio")
11576 (version "0.8.0")
11577 (source
11578 (origin
11579 (method url-fetch)
11580 (uri (pypi-uri "relatorio" version))
11581 (sha256
11582 (base32
11583 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
11584 (build-system python-build-system)
11585 (propagated-inputs
11586 `(("python-lxml" ,python-lxml)
11587 ("python-genshi" ,python-genshi)))
11588 (native-inputs
11589 `(("python-magic" ,python-magic)))
11590 (home-page "https://relatorio.tryton.org/")
11591 (synopsis "Templating library able to output ODT and PDF files")
11592 (description "Relatorio is a templating library which provides a way to
11593easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
11594for more filetypes can be easily added by creating plugins for them.")
11595 (license license:gpl3+)))
11596
11597(define-public python2-relatorio
11598 (package-with-python2 python-relatorio))
11599
11600(define-public python-radon
11601 (package
11602 (name "python-radon")
11603 (version "2.2.0")
11604 (source
11605 (origin
11606 (method url-fetch)
11607 (uri (pypi-uri "radon" version))
11608 (sha256
11609 (base32
11610 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
11611 (build-system python-build-system)
11612 (arguments
11613 `(#:phases (modify-phases %standard-phases
11614 (replace 'check
11615 (lambda _
11616 (invoke "python" "radon/tests/run.py"))))))
11617 (propagated-inputs
11618 `(("python-colorama" ,python-colorama)
11619 ("python-flake8-polyfill" ,python-flake8-polyfill)
11620 ("python-mando" ,python-mando)))
11621 (native-inputs
11622 `(("python-pytest" ,python-pytest)
11623 ("python-pytest-mock" ,python-pytest-mock)))
11624 (home-page "https://radon.readthedocs.org/")
11625 (synopsis "Code Metrics in Python")
11626 (description "Radon is a Python tool which computes various code metrics.
11627Supported metrics are:
11628@itemize @bullet
11629@item raw metrics: SLOC, comment lines, blank lines, &c.
11630@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
11631@item Halstead metrics (all of them)
11632@item the Maintainability Index (a Visual Studio metric)
11633@end itemize")
11634 (license license:expat)))
11635
11636(define-public python2-radon
11637 (package-with-python2 python-radon))
11638
11639(define-public python-sure
11640 (package
11641 (name "python-sure")
11642 (version "1.4.6")
11643 (source
11644 (origin
11645 (method url-fetch)
11646 (uri (pypi-uri "sure" version))
11647 (sha256
11648 (base32
11649 "1iyqsy2d6radi88g1qf0lziy5b39h5cpb3g5jiqyb4xi46ig3x1z"))))
11650 (build-system python-build-system)
11651 (propagated-inputs
11652 `(("python-mock" ,python-mock)
11653 ("python-six" ,python-six)))
11654 (native-inputs
11655 `(("python-nose" ,python-nose)))
11656 (home-page "https://github.com/gabrielfalcao/sure")
11657 (synopsis "Automated testing library in python for python")
11658 (description
11659 "Sure is a python library that leverages a DSL for writing assertions.
11660Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
11661 (license license:gpl3+)))
11662
11663(define-public python2-sure
11664 (package-with-python2 python-sure))
11665
11666(define-public python2-couleur
11667 ;; This package does not seem to support python3 at all, hence,
11668 ;; only the python2 variant definition is provided.
11669 (package
11670 (name "python2-couleur")
11671 (version "0.6.2")
11672 (source
11673 (origin
11674 (method url-fetch)
11675 (uri (pypi-uri "couleur" version))
11676 (sha256
11677 (base32
11678 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
11679 (build-system python-build-system)
11680 (arguments
11681 `(#:python ,python-2))
11682 (home-page "https://github.com/gabrielfalcao/couleur")
11683 (synopsis
11684 "ANSI terminal tool for python, colored shell and other handy fancy features")
11685 (description
11686 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
11687terminal such as coloured output in the shell, overwriting output, indentation, etc.")
11688 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
11689 ;; https://github.com/gabrielfalcao/couleur/issues/11
11690 (license license:lgpl3+)))
11691
11692(define-public python-misaka
11693 (package
11694 (name "python-misaka")
11695 (version "2.1.0")
11696 (source
11697 (origin
11698 (method url-fetch)
11699 (uri (pypi-uri "misaka" version))
11700 (sha256
11701 (base32
11702 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
11703 (build-system python-build-system)
11704 (arguments
11705 `(;; Line 37 of setup.py calls self.run_command('develop')
11706 ;; in the 'check' phase. This command seems to be trying
11707 ;; to write to
11708 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
11709 ;; for which it does not have the permission to write.
11710 #:tests? #f))
11711 (propagated-inputs
11712 `(("python-cffi" ,python-cffi)))
11713 (home-page "https://github.com/FSX/misaka")
11714 (synopsis "Python binding for Hoedown")
11715 (description
11716 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
11717library written in C. It features a fast HTML renderer and functionality to make custom
11718renderers (e.g. man pages or LaTeX).")
11719 (license license:expat)))
11720
11721(define-public python2-misaka
11722 (package-with-python2 python-misaka))
11723
11724(define-public python2-steadymark
11725 ;; This is forced into being a python2 only variant
11726 ;; due to its dependence on couleur that has no support
11727 ;; for python3
11728 (package
11729 (name "python2-steadymark")
11730 (version "0.7.3")
11731 (source
11732 (origin
11733 (method url-fetch)
11734 (uri (pypi-uri "steadymark" version))
11735 (sha256
11736 (base32
11737 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
11738 (build-system python-build-system)
11739 (native-inputs
11740 `(("python-couleur" ,python2-couleur)
11741 ("python-sure" ,python2-sure)
11742 ("python-misaka" ,python2-misaka)))
11743 (arguments
11744 `(#:python ,python-2
11745 #:phases
11746 (modify-phases %standard-phases
11747 (add-before 'build 'patch-setup-py
11748 (lambda _
11749 ;; Update requirements from dependency==version
11750 ;; to dependency>=version
11751 (substitute* "setup.py"
11752 (("==") ">="))
11753 #t)))))
11754 (home-page "https://github.com/gabrielfalcao/steadymark")
11755 (synopsis "Markdown-based test runner for python")
11756 (description
11757 "@code{Steadymark} allows documentation to be written in github-flavoured
11758markdown. The documentation may contain snippets of code surrounded by python
11759code blocks and @code{Steadymark} will find these snippets and run them, making
11760sure that there are no old malfunctional examples in the documentation examples.")
11761 (license license:expat)))
11762
11763(define-public python-jsonpointer
11764 (package
11765 (name "python-jsonpointer")
11766 (version "1.10")
11767 (source
11768 (origin
11769 (method url-fetch)
11770 (uri (pypi-uri "jsonpointer" version))
11771 (sha256
11772 (base32
11773 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
11774 (build-system python-build-system)
11775 (home-page "https://github.com/stefankoegl/python-json-pointer")
11776 (synopsis "Identify specific nodes in a JSON document")
11777 (description "@code{jsonpointer} allows you to access specific nodes
11778by path in a JSON document (see RFC 6901).")
11779 (license license:bsd-3)))
11780
11781(define-public python2-jsonpointer
11782 (package-with-python2 python-jsonpointer))
11783
11784(define-public python-jsonpatch
11785 (package
11786 (name "python-jsonpatch")
11787 (version "1.16")
11788 (source
11789 (origin
11790 (method url-fetch)
11791 ;; pypi version lacks tests.js
11792 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
11793 "archive/v" version ".tar.gz"))
11794 (file-name (string-append name "-" version ".tar.gz"))
11795 (sha256
11796 (base32
11797 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
11798 (build-system python-build-system)
11799 (native-inputs
11800 `(("python-jsonpointer" ,python-jsonpointer)))
11801 (home-page "https://github.com/stefankoegl/python-json-patch")
11802 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
11803 (description "@code{jsonpatch} is a library and program that allows
11804applying JSON Patches according to RFC 6902.")
11805 (license license:bsd-3)))
11806
11807(define-public python2-jsonpatch
11808 (package-with-python2 python-jsonpatch))
11809
11810(define-public python-jsonpatch-0.4
11811 (package (inherit python-jsonpatch)
11812 (name "python-jsonpatch")
11813 (version "0.4")
11814 (source
11815 (origin
11816 (method url-fetch)
11817 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
11818 "archive/v" version ".tar.gz"))
11819 (file-name (string-append name "-" version ".tar.gz"))
11820 (sha256
11821 (base32
11822 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
11823
11824(define-public python2-jsonpatch-0.4
11825 (package-with-python2 python-jsonpatch-0.4))
11826
11827(define-public python-rfc3986
11828 (package
11829 (name "python-rfc3986")
11830 (version "1.1.0")
11831 (source (origin
11832 (method url-fetch)
11833 (uri (pypi-uri "rfc3986" version))
11834 (sha256
11835 (base32
11836 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
11837 (build-system python-build-system)
11838 (arguments
11839 `(#:modules ((guix build utils)
11840 (guix build python-build-system)
11841 (ice-9 ftw)
11842 (srfi srfi-1)
11843 (srfi srfi-26))
11844 #:phases
11845 (modify-phases %standard-phases
11846 (replace 'check
11847 (lambda _
11848 (let ((cwd (getcwd)))
11849 (setenv "PYTHONPATH"
11850 (string-append cwd "/build/"
11851 (find (cut string-prefix? "lib" <>)
11852 (scandir (string-append cwd "/build")))
11853 ":"
11854 (getenv "PYTHONPATH")))
11855 (invoke "pytest" "-v")))))))
11856 (native-inputs
11857 `(("python-pytest" ,python-pytest)))
11858 (home-page "https://rfc3986.readthedocs.io/")
11859 (synopsis "Parse and validate URI references")
11860 (description
11861 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
11862validation and authority parsing. This module also supports RFC@tie{}6874
11863which adds support for zone identifiers to IPv6 addresses.")
11864 (license license:asl2.0)))
11865
11866(define-public python2-rfc3986
11867 (package-with-python2 python-rfc3986))
11868
11869(define-public python-rfc3987
11870 (package
11871 (name "python-rfc3987")
11872 (version "1.3.7")
11873 (source
11874 (origin
11875 (method url-fetch)
11876 (uri (pypi-uri "rfc3987" version))
11877 (sha256
11878 (base32
11879 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
11880 (build-system python-build-system)
11881 (home-page "https://pypi.python.org/pypi/rfc3987")
11882 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
11883 (description "@code{rfc3987} provides routines for parsing and
11884validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
11885 (license license:gpl3+)))
11886
11887(define-public python2-rfc3987
11888 (package-with-python2 python-rfc3987))
11889
11890(define-public python-validate-email
11891 (package
11892 (name "python-validate-email")
11893 (version "1.3")
11894 (source
11895 (origin
11896 (method url-fetch)
11897 (uri (pypi-uri "validate_email" version))
11898 (sha256
11899 (base32
11900 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
11901 (build-system python-build-system)
11902 (home-page "https://github.com/syrusakbary/validate_email")
11903 (synopsis "Verifies if an email address is valid and really exists")
11904 (description "@code{validate_email} can be used to verify if an email
11905address is valid and really exists.")
11906 (license license:lgpl3+)))
11907
11908(define-public python2-validate-email
11909 (package-with-python2 python-validate-email))
11910
11911(define-public python-flex
11912 (package
11913 (name "python-flex")
11914 (version "6.10.0")
11915 (source
11916 (origin
11917 (method url-fetch)
11918 (uri (pypi-uri "flex" version))
11919 (sha256
11920 (base32
11921 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
11922 (build-system python-build-system)
11923 (propagated-inputs
11924 `(("python-click" ,python-click)
11925 ("python-iso8601" ,python-iso8601)
11926 ("python-jsonpointer" ,python-jsonpointer)
11927 ("python-pyyaml" ,python-pyyaml)
11928 ("python-requests" ,python-requests)
11929 ("python-rfc3987" ,python-rfc3987)
11930 ("python-six" ,python-six)
11931 ("python-validate-email" ,python-validate-email)))
11932 (home-page "https://github.com/pipermerriam/flex")
11933 (synopsis "Validates Swagger schemata")
11934 (description "@code{flex} can be used to validate Swagger schemata.")
11935 (license license:bsd-3)))
11936
11937(define-public python2-flex
11938 (package-with-python2 python-flex))
11939
11940(define-public python-marshmallow
11941 (package
11942 (name "python-marshmallow")
11943 (version "3.0.0b3")
11944 (source
11945 (origin
11946 (method url-fetch)
11947 (uri (pypi-uri "marshmallow" version))
11948 (sha256
11949 (base32
11950 "07mcrij1yvk85lvgx44wwr9pc80xryghvlgayb057g1cazcypysd"))))
11951 (build-system python-build-system)
11952 (propagated-inputs
11953 `(("python-dateutil" ,python-dateutil)
11954 ("python-simplejson" ,python-simplejson)))
11955 (native-inputs
11956 `(("python-pytest" ,python-pytest)
11957 ("python-pytz" ,python-pytz)))
11958 (home-page "https://github.com/marshmallow-code/marshmallow")
11959 (synopsis "Convert complex datatypes to and from native
11960Python datatypes.")
11961 (description "@code{marshmallow} provides a library for converting
11962complex datatypes to and from native Python datatypes.")
11963 (license license:expat)))
11964
11965(define-public python2-marshmallow
11966 (package-with-python2 python-marshmallow))
11967
11968(define-public python-apispec
11969 (package
11970 (name "python-apispec")
11971 (version "0.25.3")
11972 (source
11973 (origin
11974 (method url-fetch)
11975 (uri (pypi-uri "apispec" version))
11976 (sha256
11977 (base32
11978 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
11979 (build-system python-build-system)
11980 (propagated-inputs
11981 `(("python-pyyaml" ,python-pyyaml)))
11982 (native-inputs
11983 `(("python-pytest" ,python-pytest)
11984 ("python-flask" ,python-flask)
11985 ("python-marshmallow" ,python-marshmallow)
11986 ("python-tornado" ,python-tornado)
11987 ("python-bottle" ,python-bottle)
11988 ("python-mock" ,python-mock)))
11989 (home-page "https://github.com/marshmallow-code/apispec")
11990 (synopsis "Swagger 2.0 API specification generator")
11991 (description "@code{python-apispec} is a pluggable API specification
11992generator. Currently supports the OpenAPI specification (f.k.a.
11993Swagger 2.0).")
11994 (license license:expat)))
11995
11996(define-public python2-apispec
11997 (package-with-python2 python-apispec))
11998
11999(define-public python-flasgger
12000 (package
12001 (name "python-flasgger")
12002 (version "0.6.3")
12003 (source
12004 (origin
12005 (method url-fetch)
12006 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
12007 version ".tar.gz"))
12008 (file-name (string-append name "-" version ".tar.gz"))
12009 (sha256
12010 (base32
12011 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
12012 (build-system python-build-system)
12013 (arguments
12014 `(#:phases
12015 (modify-phases %standard-phases
12016 (replace 'check
12017 (lambda* (#:key inputs outputs #:allow-other-keys)
12018 (substitute* "Makefile"
12019 (("flake8 flasgger --ignore=F403")
12020 "flake8 flasgger --ignore=E731,F403"))
12021 (setenv "PYTHONPATH" (string-append (getcwd)
12022 ":"
12023 (getenv "PYTHONPATH")))
12024 (zero? (system* "py.test")))))))
12025 (propagated-inputs
12026 `(("python-flask" ,python-flask)
12027 ("python-pyyaml" ,python-pyyaml)
12028 ("python-jsonschema" ,python-jsonschema)
12029 ("python-mistune" ,python-mistune)
12030 ("python-six" ,python-six)))
12031 (native-inputs
12032 `(("python-decorator" ,python-decorator)
12033 ("python-flake8" ,python-flake8)
12034 ("python-flask-restful" ,python-flask-restful)
12035 ("python-flex" ,python-flex)
12036 ("python-pytest" ,python-pytest)
12037 ("python-pytest-cov" ,python-pytest-cov)
12038 ("python-marshmallow" ,python-marshmallow)
12039 ("python-apispec" ,python-apispec)))
12040 (home-page "https://github.com/rochacbruno/flasgger/")
12041 (synopsis "Extract Swagger specs from your Flask project")
12042 (description "@code{python-flasgger} allows extracting Swagger specs
12043from your Flask project. It is a fork of Flask-Swagger.")
12044 (license license:expat)))
12045
12046(define-public python2-flasgger
12047 (package-with-python2 python-flasgger))
12048
12049(define-public python-swagger-spec-validator
12050 (package
12051 (name "python-swagger-spec-validator")
12052 (version "2.1.0")
12053 (source
12054 (origin
12055 (method url-fetch)
12056 (uri (pypi-uri "swagger-spec-validator" version))
12057 (sha256
12058 (base32
12059 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
12060 (build-system python-build-system)
12061 (propagated-inputs
12062 `(("python-jsonschema" ,python-jsonschema)
12063 ("python-six" ,python-six)))
12064 (home-page
12065 "https://github.com/Yelp/swagger_spec_validator")
12066 (synopsis "Validation of Swagger specifications")
12067 (description "@code{swagger_spec_validator} provides a library for
12068validating Swagger API specifications.")
12069 (license license:asl2.0)))
12070
12071(define-public python2-swagger-spec-validator
12072 (package-with-python2 python-swagger-spec-validator))
12073
12074(define-public python-apache-libcloud
12075 (package
12076 (name "python-apache-libcloud")
12077 (version "2.0.0")
12078 (source
12079 (origin
12080 (method url-fetch)
12081 (uri (pypi-uri "apache-libcloud" version))
12082 (sha256
12083 (base32
12084 "1a71z02ckcxld72k4qgmdnkjan52c4wczncs3p2mp5yafh7dsan7"))))
12085 (build-system python-build-system)
12086 (arguments
12087 `(#:phases
12088 (modify-phases %standard-phases
12089 (add-after 'unpack 'patch-ssh
12090 (lambda* (#:key inputs #:allow-other-keys)
12091 (substitute* "libcloud/compute/ssh.py"
12092 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
12093 "/bin/ssh" "'")))
12094 #t))
12095 (add-after 'unpack 'patch-tests
12096 (lambda _
12097 (substitute* "./libcloud/test/test_file_fixtures.py"
12098 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
12099 (("def _ascii") "def _raw_data(self, method, url, body, headers):
12100 return (httplib.OK,
12101 \"1234abcd\",
12102 {\"test\": \"value\"},
12103 httplib.responses[httplib.OK])
12104 def _ascii"))
12105 (substitute* "libcloud/test/compute/test_ssh_client.py"
12106 (("class ShellOutSSHClientTests")
12107 "@unittest.skip(\"Guix container doesn't have ssh service\")
12108class ShellOutSSHClientTests")
12109 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
12110 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
12111 (("'.xF0', '.x90', '.x8D', '.x88'")
12112 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
12113 #t)))))
12114 (inputs
12115 `(("openssh" ,openssh)))
12116 (propagated-inputs
12117 `(("python-paramiko" ,python-paramiko)
12118 ("python-requests" ,python-requests)))
12119 (native-inputs
12120 `(("python-lockfile" ,python-lockfile)
12121 ("python-mock" ,python-mock)
12122 ("python-requests-mock" ,python-requests-mock)))
12123 (home-page "https://libcloud.apache.org/")
12124 (synopsis "Unified Cloud API")
12125 (description "@code{libcloud} is a Python library for interacting with
12126many of the popular cloud service providers using a unified API.")
12127 (license license:asl2.0)))
12128
12129(define-public python2-apache-libcloud
12130 (package-with-python2 python-apache-libcloud))
12131
12132(define-public python-smmap2
12133 (package
12134 (name "python-smmap2")
12135 (version "2.0.3")
12136 (source
12137 (origin
12138 (method url-fetch)
12139 (uri (pypi-uri "smmap2" version))
12140 (sha256
12141 (base32
12142 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
12143 (build-system python-build-system)
12144 (native-inputs
12145 `(("python-nosexcover" ,python-nosexcover)))
12146 (home-page "https://github.com/Byron/smmap")
12147 (synopsis "Python sliding window memory map manager")
12148 (description "@code{smmap2} is a pure Python implementation of a sliding
12149window memory map manager.")
12150 (license license:bsd-3)))
12151
12152(define-public python2-smmap2
12153 (package-with-python2 python-smmap2))
12154
12155(define-public python-regex
12156 (package
12157 (name "python-regex")
12158 (version "2017.06.07")
12159 (source (origin
12160 (method url-fetch)
12161 (uri (pypi-uri "regex" version))
12162 (sha256
12163 (base32
12164 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
12165 (build-system python-build-system)
12166 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
12167 (synopsis "Alternative regular expression module")
12168 (description "This regular expression implementation is backwards-
12169compatible with the standard @code{re} module, but offers additional
12170functionality like full case-folding for case-insensitive matches in Unicode.")
12171 (license license:psfl)))
12172
12173(define-public python2-regex
12174 (package-with-python2 python-regex))
12175
12176(define-public python2-pyopengl
12177 (package
12178 (name "python2-pyopengl")
12179 (version "3.1.0")
12180 (source
12181 (origin
12182 (method url-fetch)
12183 (uri (pypi-uri "PyOpenGL" version))
12184 (sha256
12185 (base32
12186 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
12187 (arguments
12188 `(#:python ,python-2))
12189 (build-system python-build-system)
12190 (home-page "http://pyopengl.sourceforge.net")
12191 (synopsis "Standard OpenGL bindings for Python")
12192 (description
12193 "PyOpenGL is the most common cross platform Python binding to OpenGL and
12194related APIs. The binding is created using the standard @code{ctypes}
12195library.")
12196 (license license:bsd-3)))
12197
12198(define-public python2-pyopengl-accelerate
12199 (package
12200 (inherit python2-pyopengl)
12201 (name "python2-pyopengl-accelerate")
12202 (version "3.1.0")
12203 (source
12204 (origin
12205 (method url-fetch)
12206 (uri (pypi-uri "PyOpenGL-accelerate" version))
12207 (sha256
12208 (base32
12209 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
12210 (synopsis "Acceleration code for PyOpenGL")
12211 (description
12212 "This is the Cython-coded accelerator module for PyOpenGL.")))
12213
12214(define-public python-rencode
12215 (package
12216 (name "python-rencode")
12217 (version "1.0.3")
12218 (source
12219 (origin
12220 (method url-fetch)
12221 (uri (pypi-uri "rencode" version))
12222 (sha256
12223 (base32
12224 "08if5yax1xn5yfp8p3765ccjmfcv9di7i4m5jckgnwvdsgznwkbj"))))
12225 (build-system python-build-system)
12226 (native-inputs `(("pkg-config" ,pkg-config)
12227 ("python-cython" ,python-cython)))
12228 (home-page "https://github.com/aresch/rencode")
12229 (synopsis "Serialization of heterogeneous data structures")
12230 (description
12231 "The @code{rencode} module is a data structure serialization library,
12232similar to @code{bencode} from the BitTorrent project. For complex,
12233heterogeneous data structures with many small elements, r-encoding stake up
12234significantly less space than b-encodings. This version of rencode is a
12235complete rewrite in Cython to attempt to increase the performance over the
12236pure Python module.")
12237 (license license:bsd-3)))
12238
12239(define-public python2-rencode
12240 (package-with-python2 python-rencode))
12241
12242(define-public python-xenon
12243 (package
12244 (name "python-xenon")
12245 (version "0.5.1")
12246 (source
12247 (origin
12248 (method url-fetch)
12249 (uri (pypi-uri "xenon" version))
12250 (sha256
12251 (base32
12252 "14kby2y48vp3sgwxqlm5d5789yibqwb1qli5fwcmdqg3iayrbklc"))))
12253 (build-system python-build-system)
12254 (native-inputs
12255 `(("python-pyyaml" ,python-pyyaml)
12256 ("python-radon" ,python-radon)
12257 ("python-requests" ,python-requests)
12258 ("python-flake8" ,python-flake8)
12259 ("python-tox" ,python-tox)))
12260 (arguments
12261 `(#:phases
12262 (modify-phases %standard-phases
12263 (add-before 'build 'patch-test-requirements
12264 (lambda* (#:key inputs #:allow-other-keys)
12265 ;; Update requirements from dependency==version to
12266 ;; dependency>=version.
12267 (substitute* "requirements.txt"
12268 (("==") ">=")
12269 ((",<1.5.0") ""))
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.
12278Ideally, @code{xenon} is run every time code is committed. Through command
12279line options, various thresholds can be set for the complexity of code. It
12280will fail (i.e. it will exit with a non-zero exit code) when any of these
12281requirements 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
12303version 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
12325ignoring 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
12351iterable with @code{|tqdm(iterable)|}. Offers many options to define
12352design 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
12379source distriubtion (an sdist) or a binary distribution (e.g., created by
12380running bdist_egg). It can also query the EGG-INFO directory of an installed
12381distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
12382created 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
12409distributions. It authenticates the user over HTTPS, allows them to pre-sign
12410their 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
12438attempting to optimize internally, using a cache, the common case where many
12439lines 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
12469stack traces of Python programs. It exactly mimics the behavior of the Python
12470interpreter 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
12494executed 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
12518embeddable 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
12542specification (backwards-compatible) as a client library for Python. This
12543version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
12544services.")
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
12570setuptools_scm, which supports obtaining versions from git archives that
12571belong 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
12631boolean 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
12653deleted with all their contents when they are no longer needed. It is
12654particularly 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
12708combine data, code, and documentation in single-file packages,
12709suitable for publication as supplementary material or on repositories
12710such 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
12785written in Python that is designed to be easy to use. It resembles
12786Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
12787which is a system and language independent Distributed Object Technology
12788and has much more to offer than Pyro or RMI. Pyro 3.x is no
12789longer maintained. New projects should use Pyro4 instead, which
12790is 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
12827useful for scientific computing. Most modules are rather general (Geometry,
12828physical units, automatic derivatives, ...) whereas others are more
12829domain-specific (e.g. netCDF and PDB support). The library is currently
12830not 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
12868on biomolecules. It provides widely used methods such as Molecular Dynamics
12869and normal mode analysis, but also basic routines for implementing new methods
12870for simulation and analysis. The library is currently not actively maintained
12871and 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
12922user'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
12955takes the code and reformats it to the best formatting that conforms to the
12956style 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.
12987It can be used to generate XCode projects, Visual Studio projects, Ninja build
12988files, 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
13019functions 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.
13051Examples 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
13092implements the week definition of ISO 8601. This standard also defines
13093a notation for identifying weeks; yyyyWww (where the W is a literal).
13094Week 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
13116standard 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}
13118and @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
13140source 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}
13159module to Python versions older than 3.5. Typing defines a standard notation
13160for Python function and variable type annotations. The notation can be used
13161for documenting code in a concise, standard format, and it has been designed
13162to also be used by static and runtime type checkers, static analyzers, IDEs
13163and 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
13213interpreter. 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
13274file 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.1.0")
13340 (source
13341 (origin
13342 (method url-fetch)
13343 (uri (pypi-uri "more-itertools" version))
13344 (sha256
13345 (base32
13346 "0i3ch700g5fyjp692gprlnzbysl8w0sa2vijbp3s40drvk67xkn9"))))
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
13353number of iterator building blocks inspired by constructs from APL, Haskell,
13354and SML. @code{more-itertools} includes additional building blocks for
13355working 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
13403in 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
13421time-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
13441round-trip parsing for different Python versions (in multiple Python versions).
13442Parso 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
13465generators 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
13484manager 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
13506adds:
13507
13508@itemize
13509@item The ability to capture the text matched by glob patterns, and return
13510those 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
13514on virtual file systems.
13515@item Compatible with Python 2 and Python 3 (tested with 3.3).
13516@end itemize
13517
13518Glob2 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
13543gevent-powered application may raise problems. With @code{gipc},
13544process-based child processes can safely be created anywhere within a
13545gevent-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
13578MacFUSE. 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
13622under 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
13647C++ types in Python and vice versa, mainly to create Python bindings of
13648existing C++ code. Its goals and syntax are similar to the excellent
13649Boost.Python library by David Abrahams: to minimize boilerplate code in
13650traditional extension modules by inferring type information using compile-time
13651introspection.")
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
13706library 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
13737subdomains of a URL, using the Public Suffix List. By default, this includes
13738the public ICANN TLDs and their exceptions. It can optionally support the
13739Public 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
13795providers in a standardized way. It has a CLI but it can also be used as a
13796Python library. It was designed to be used in automation, specifically with
13797Let'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
13819development that supports command line argument parsing, command string
13820validation testing and application logic.")
13821 (license license:expat)))