Merge branch 'origin/core-updates-next' into core-updates
[jackhill/guix/guix.git] / gnu / packages / python.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016, 2017 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016, 2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 Nils Gillmann <ng0@n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017, 2018 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016, 2017 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
34 ;;; Copyright © 2016, 2017 Julien Lepiller <julien@lepiller.eu>
35 ;;; Copyright © 2016, 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
36 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39 ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
40 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
41 ;;; Copyright © 2017, 2018 Mathieu Othacehe <m.othacehe@gmail.com>
42 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
44 ;;; Copyright © 2017, 2018 Kei Kebreau <kkebreau@posteo.net>
45 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
47 ;;; Copyright © 2017 Brendan Tildesley <brendan.tildesley@openmailbox.org>
48 ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
49 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
50 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
51 ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
52 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
53 ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
54 ;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
55 ;;;
56 ;;; This file is part of GNU Guix.
57 ;;;
58 ;;; GNU Guix is free software; you can redistribute it and/or modify it
59 ;;; under the terms of the GNU General Public License as published by
60 ;;; the Free Software Foundation; either version 3 of the License, or (at
61 ;;; your option) any later version.
62 ;;;
63 ;;; GNU Guix is distributed in the hope that it will be useful, but
64 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
65 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
66 ;;; GNU General Public License for more details.
67 ;;;
68 ;;; You should have received a copy of the GNU General Public License
69 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
70
71 (define-module (gnu packages python)
72 #:use-module ((guix licenses) #:prefix license:)
73 #:use-module (gnu packages)
74 #:use-module (gnu packages algebra)
75 #:use-module (gnu packages adns)
76 #:use-module (gnu packages attr)
77 #:use-module (gnu packages backup)
78 #:use-module (gnu packages bash)
79 #:use-module (gnu packages check)
80 #:use-module (gnu packages compression)
81 #:use-module (gnu packages crypto)
82 #:use-module (gnu packages databases)
83 #:use-module (gnu packages file)
84 #:use-module (gnu packages fontutils)
85 #:use-module (gnu packages gcc)
86 #:use-module (gnu packages geo)
87 #:use-module (gnu packages ghostscript)
88 #:use-module (gnu packages gl)
89 #:use-module (gnu packages glib)
90 #:use-module (gnu packages graphviz)
91 #:use-module (gnu packages graphics)
92 #:use-module (gnu packages gstreamer)
93 #:use-module (gnu packages gtk)
94 #:use-module (gnu packages icu4c)
95 #:use-module (gnu packages image)
96 #:use-module (gnu packages imagemagick)
97 #:use-module (gnu packages libevent)
98 #:use-module (gnu packages libffi)
99 #:use-module (gnu packages linux)
100 #:use-module (gnu packages machine-learning)
101 #:use-module (gnu packages man)
102 #:use-module (gnu packages maths)
103 #:use-module (gnu packages multiprecision)
104 #:use-module (gnu packages networking)
105 #:use-module (gnu packages ncurses)
106 #:use-module (gnu packages openstack)
107 #:use-module (gnu packages pcre)
108 #:use-module (gnu packages perl)
109 #:use-module (gnu packages pkg-config)
110 #:use-module (gnu packages python-crypto)
111 #:use-module (gnu packages python-web)
112 #:use-module (gnu packages qt)
113 #:use-module (gnu packages readline)
114 #:use-module (gnu packages sdl)
115 #:use-module (gnu packages search)
116 #:use-module (gnu packages shells)
117 #:use-module (gnu packages ssh)
118 #:use-module (gnu packages statistics)
119 #:use-module (gnu packages terminals)
120 #:use-module (gnu packages tex)
121 #:use-module (gnu packages texinfo)
122 #:use-module (gnu packages time)
123 #:use-module (gnu packages tls)
124 #:use-module (gnu packages version-control)
125 #:use-module (gnu packages video)
126 #:use-module (gnu packages web)
127 #:use-module (gnu packages base)
128 #:use-module (gnu packages xml)
129 #:use-module (gnu packages xorg)
130 #:use-module (gnu packages xdisorg)
131 #:use-module (gnu packages tcl)
132 #:use-module (gnu packages bdw-gc)
133 #:use-module (guix packages)
134 #:use-module (guix download)
135 #:use-module (guix git-download)
136 #:use-module (guix utils)
137 #:use-module (guix build-system gnu)
138 #:use-module (guix build-system cmake)
139 #:use-module (guix build-system python)
140 #:use-module (guix build-system trivial)
141 #:use-module (srfi srfi-1))
142
143 (define-public python-2.7
144 (package
145 (name "python2")
146 (version "2.7.15")
147 (source
148 (origin
149 (method url-fetch)
150 (uri (string-append "https://www.python.org/ftp/python/"
151 version "/Python-" version ".tar.xz"))
152 (sha256
153 (base32
154 "0x2mvz9dp11wj7p5ccvmk9s0hzjk2fa1m462p395l4r6bfnb3n92"))
155 (patches (search-patches "python-2.7-search-paths.patch"
156 "python-2-deterministic-build-info.patch"
157 "python-2.7-site-prefixes.patch"
158 "python-2.7-source-date-epoch.patch"
159 "python-2.7-adjust-tests.patch"))
160 (modules '((guix build utils)))
161 ;; suboptimal to delete failing tests here, but if we delete them in the
162 ;; arguments then we need to make sure to strip out that phase when it
163 ;; gets inherited by python and python-minimal.
164 (snippet
165 '(begin
166 (for-each delete-file
167 '("Lib/test/test_compileall.py"
168 "Lib/test/test_ctypes.py" ; fails on mips64el
169 "Lib/test/test_distutils.py"
170 "Lib/test/test_import.py"
171 "Lib/test/test_shutil.py"
172 "Lib/test/test_socket.py"
173 "Lib/test/test_subprocess.py"))
174 #t))))
175 (outputs '("out"
176 "tk")) ;tkinter; adds 50 MiB to the closure
177 (build-system gnu-build-system)
178 (arguments
179 `(;; 356 tests OK.
180 ;; 6 tests failed:
181 ;; test_compileall test_distutils test_import test_shutil test_socket
182 ;; test_subprocess
183 ;; 39 tests skipped:
184 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
185 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
186 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
187 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
188 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
189 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
190 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
191 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
192 ;; test_winreg test_winsound test_zipfile64
193 ;; 4 skips unexpected on linux2:
194 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
195 #:test-target "test"
196 #:configure-flags
197 (list "--enable-shared" ;allow embedding
198 "--with-system-ffi" ;build ctypes
199 "--with-ensurepip=install" ;install pip and setuptools
200 "--enable-unicode=ucs4"
201 (string-append "LDFLAGS=-Wl,-rpath="
202 (assoc-ref %outputs "out") "/lib"))
203
204 #:modules ((ice-9 ftw) (ice-9 match)
205 (guix build utils) (guix build gnu-build-system))
206 #:phases
207 (modify-phases %standard-phases
208 (add-before
209 'configure 'patch-lib-shells
210 (lambda _
211 ;; Filter for existing files, since some may not exist in all
212 ;; versions of python that are built with this recipe.
213 (substitute* (filter file-exists?
214 '("Lib/subprocess.py"
215 "Lib/popen2.py"
216 "Lib/distutils/tests/test_spawn.py"
217 "Lib/test/support/__init__.py"
218 "Lib/test/test_subprocess.py"))
219 (("/bin/sh") (which "sh")))
220
221 ;; Use zero as the timestamp in .pyc files so that builds are
222 ;; deterministic. TODO: Remove it when this variable is set in
223 ;; gnu-build-system.scm.
224 (setenv "SOURCE_DATE_EPOCH" "1")
225 #t))
226 (add-before 'configure 'do-not-record-configure-flags
227 (lambda* (#:key configure-flags #:allow-other-keys)
228 ;; Remove configure flags from the installed '_sysconfigdata.py'
229 ;; and 'Makefile' so we don't end up keeping references to the
230 ;; build tools.
231 ;;
232 ;; Preserve at least '--with-system-ffi' since otherwise the
233 ;; thing tries to build libffi, fails, and we end up with a
234 ;; Python that lacks ctypes.
235 (substitute* "configure"
236 (("^CONFIG_ARGS=.*$")
237 (format #f "CONFIG_ARGS='~a'\n"
238 (if (member "--with-system-ffi" configure-flags)
239 "--with-system-ffi"
240 ""))))
241 #t))
242 (add-before
243 'check 'pre-check
244 (lambda _
245 ;; 'Lib/test/test_site.py' needs a valid $HOME
246 (setenv "HOME" (getcwd))
247 #t))
248 (add-after
249 'unpack 'set-source-file-times-to-1980
250 ;; XXX One of the tests uses a ZIP library to pack up some of the
251 ;; source tree, and fails with "ZIP does not support timestamps
252 ;; before 1980". Work around this by setting the file times in the
253 ;; source tree to sometime in early 1980.
254 (lambda _
255 (let ((circa-1980 (* 10 366 24 60 60)))
256 (ftw "." (lambda (file stat flag)
257 (utime file circa-1980 circa-1980)
258 #t))
259 #t)))
260 (add-after 'install 'remove-tests
261 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
262 ;; because these files are used by some libraries out there.
263 (lambda* (#:key outputs #:allow-other-keys)
264 (let ((out (assoc-ref outputs "out")))
265 (match (scandir (string-append out "/lib")
266 (lambda (name)
267 (string-prefix? "python" name)))
268 ((pythonX.Y)
269 (let ((testdir (string-append out "/lib/" pythonX.Y
270 "/test")))
271 (with-directory-excursion testdir
272 (for-each delete-file-recursively
273 (scandir testdir
274 (match-lambda
275 ((or "." "..") #f)
276 (file
277 (not
278 (string-prefix? "test_support."
279 file))))))
280 (call-with-output-file "__init__.py" (const #t))
281 #t)))))))
282 (add-before 'strip 'make-libraries-writable
283 (lambda* (#:key outputs #:allow-other-keys)
284 ;; Make .so files writable so they can be stripped.
285 (let ((out (assoc-ref outputs "out")))
286 (for-each (lambda (file)
287 (chmod file #o755))
288 (find-files (string-append out "/lib")
289 "\\.so"))
290 #t)))
291 (add-after 'install 'move-tk-inter
292 (lambda* (#:key outputs #:allow-other-keys)
293 ;; When Tkinter support is built move it to a separate output so
294 ;; that the main output doesn't contain a reference to Tcl/Tk.
295 (let ((out (assoc-ref outputs "out"))
296 (tk (assoc-ref outputs "tk")))
297 (when tk
298 (match (find-files out "tkinter.*\\.so")
299 ((tkinter.so)
300 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
301 ;; want it under TK/lib/pythonX.Y/site-packages.
302 (let* ((len (string-length out))
303 (target (string-append
304 tk "/"
305 (string-drop
306 (dirname (dirname tkinter.so))
307 len)
308 "/site-packages")))
309 (install-file tkinter.so target)
310 (delete-file tkinter.so)))))
311 #t))))))
312 (inputs
313 `(("bzip2" ,bzip2)
314 ("gdbm" ,gdbm)
315 ("libffi" ,libffi) ; for ctypes
316 ("sqlite" ,sqlite) ; for sqlite extension
317 ("openssl" ,openssl)
318 ("readline" ,readline)
319 ("zlib" ,zlib)
320 ("tcl" ,tcl)
321 ("tk" ,tk))) ; for tkinter
322 (native-inputs
323 `(("pkg-config" ,pkg-config)))
324 (native-search-paths
325 (list (search-path-specification
326 (variable "PYTHONPATH")
327 (files '("lib/python2.7/site-packages")))))
328 (home-page "https://www.python.org")
329 (synopsis "High-level, dynamically-typed programming language")
330 (description
331 "Python is a remarkably powerful dynamic programming language that
332 is used in a wide variety of application domains. Some of its key
333 distinguishing features include: clear, readable syntax; strong
334 introspection capabilities; intuitive object orientation; natural
335 expression of procedural code; full modularity, supporting hierarchical
336 packages; exception-based error handling; and very high level dynamic
337 data types.")
338 (license license:psfl)))
339
340 ;; Current 2.x version.
341 (define-public python-2 python-2.7)
342
343 (define-public python-3.6
344 (package (inherit python-2)
345 (name "python")
346 (version "3.6.5")
347 (source (origin
348 (method url-fetch)
349 (uri (string-append "https://www.python.org/ftp/python/"
350 version "/Python-" version ".tar.xz"))
351 (patches (search-patches
352 "python-fix-tests.patch"
353 "python-3-fix-tests.patch"
354 "python-3-deterministic-build-info.patch"
355 "python-3-search-paths.patch"))
356 (patch-flags '("-p0"))
357 (sha256
358 (base32
359 "19l7inxm056jjw33zz97z0m02hsi7jnnx5kyb76abj5ml4xhad7l"))
360 (snippet
361 '(begin
362 (for-each delete-file
363 '("Lib/ctypes/test/test_structures.py" ; fails on aarch64
364 "Lib/ctypes/test/test_win32.py" ; fails on aarch64
365 "Lib/test/test_fcntl.py")) ; fails on aarch64
366 #t))))
367 (arguments
368 (substitute-keyword-arguments (package-arguments python-2)
369 ((#:tests? _) #t)
370 ((#:phases phases)
371 `(modify-phases ,phases
372 (add-after 'unpack 'patch-timestamp-for-pyc-files
373 (lambda _
374 ;; We set DETERMINISTIC_BUILD to only override the mtime when
375 ;; building with Guix, lest we break auto-compilation in
376 ;; environments.
377 (setenv "DETERMINISTIC_BUILD" "1")
378 (substitute* "Lib/py_compile.py"
379 (("source_stats\\['mtime'\\]")
380 "(1 if 'DETERMINISTIC_BUILD' in os.environ else source_stats['mtime'])"))
381
382 ;; Use deterministic hashes for strings, bytes, and datetime
383 ;; objects.
384 (setenv "PYTHONHASHSEED" "0")
385
386 ;; Reset mtime when validating bytecode header.
387 (substitute* "Lib/importlib/_bootstrap_external.py"
388 (("source_mtime = int\\(source_stats\\['mtime'\\]\\)")
389 "source_mtime = 1"))
390 #t))
391 ;; These tests fail because of our change to the bytecode
392 ;; validation. They fail because expected exceptions do not get
393 ;; thrown. This seems to be no problem.
394 (add-after 'unpack 'disable-broken-bytecode-tests
395 (lambda _
396 (substitute* "Lib/test/test_importlib/source/test_file_loader.py"
397 (("test_bad_marshal")
398 "disable_test_bad_marshal")
399 (("test_no_marshal")
400 "disable_test_no_marshal")
401 (("test_non_code_marshal")
402 "disable_test_non_code_marshal"))
403 #t))
404 ;; Unset DETERMINISTIC_BUILD to allow for tests that check that
405 ;; stale pyc files are rebuilt.
406 (add-before 'check 'allow-non-deterministic-compilation
407 (lambda _ (unsetenv "DETERMINISTIC_BUILD") #t))
408 ;; We need to rebuild all pyc files for three different
409 ;; optimization levels to replace all files that were not built
410 ;; deterministically.
411
412 ;; FIXME: Without this phase we have close to 2000 files that
413 ;; differ across different builds of this package. With this phase
414 ;; there are about 500 files left that differ.
415 (add-after 'install 'rebuild-bytecode
416 (lambda* (#:key outputs #:allow-other-keys)
417 (setenv "DETERMINISTIC_BUILD" "1")
418 (let ((out (assoc-ref outputs "out")))
419 (for-each
420 (lambda (opt)
421 (format #t "Compiling with optimization level: ~a\n"
422 (if (null? opt) "none" (car opt)))
423 (for-each (lambda (file)
424 (apply invoke
425 `(,(string-append out "/bin/python3")
426 ,@opt
427 "-m" "compileall"
428 "-f" ; force rebuild
429 ;; Don't build lib2to3, because it's Python 2 code.
430 ;; Also don't build obviously broken test code.
431 "-x" "(lib2to3|test/bad.*)"
432 ,file)))
433 (find-files out "\\.py$")))
434 (list '() '("-O") '("-OO")))
435 #t)))))))
436 (native-search-paths
437 (list (search-path-specification
438 (variable "PYTHONPATH")
439 (files (list (string-append "lib/python"
440 (version-major+minor version)
441 "/site-packages"))))))))
442
443 ;; Current 3.x version.
444 (define-public python-3 python-3.6)
445
446 ;; Current major version.
447 (define-public python python-3)
448
449 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
450 ;; Python (Tk -> libxcb -> Python.)
451
452 (define-public python2-minimal
453 (package (inherit python-2)
454 (name "python2-minimal")
455 (outputs '("out"))
456
457 ;; Keep zlib, which is used by 'pip' (via the 'zipimport' module), which
458 ;; is invoked upon 'make install'. 'pip' also expects 'ctypes' and thus
459 ;; libffi.
460 (inputs `(("libffi" ,libffi)
461 ("zlib" ,zlib)))))
462
463 (define-public python-minimal
464 (package (inherit python)
465 (name "python-minimal")
466 (outputs '("out"))
467
468 ;; Build fails due to missing ctypes without libffi.
469 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
470 ;; zlib is required by 'zipimport', used by pip.
471 (inputs `(("libffi" ,libffi)
472 ("openssl" ,openssl)
473 ("zlib" ,zlib)))))
474
475 (define-public python-debug
476 (package
477 (inherit python)
478 (name "python-debug")
479 (outputs '("out" "debug"))
480 (build-system gnu-build-system)
481 (arguments
482 (substitute-keyword-arguments (package-arguments python)
483 ((#:configure-flags flags '())
484 `(cons "--with-pydebug" ,flags))))
485 (synopsis
486 "High-level, dynamically-typed programming language (for debugging)")
487 (description
488 "This variant of Python provides an interpreter built with
489 @code{--with-pydebug} to help develop and debug extensions. See
490 @url{https://pythonextensionpatterns.readthedocs.io/en/latest/debugging/debug.html},
491 for more information.")))
492
493 (define* (wrap-python3 python
494 #:optional
495 (name (string-append (package-name python) "-wrapper")))
496 (package (inherit python)
497 (name name)
498 (source #f)
499 (build-system trivial-build-system)
500 (outputs '("out"))
501 (inputs `(("bash" ,bash)))
502 (propagated-inputs `(("python" ,python)))
503 (arguments
504 `(#:modules ((guix build utils))
505 #:builder
506 (begin
507 (use-modules (guix build utils))
508 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
509 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
510 (mkdir-p bin)
511 (for-each
512 (lambda (old new)
513 (symlink (string-append python old)
514 (string-append bin "/" new)))
515 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
516 `("python" ,"pydoc" ,"idle" ,"pip"))
517 ;; python-config outputs search paths based upon its location,
518 ;; use a bash wrapper to avoid changing its outputs.
519 (let ((bash (string-append (assoc-ref %build-inputs "bash")
520 "/bin/bash"))
521 (old (string-append python "python3-config"))
522 (new (string-append bin "/python-config")))
523 (with-output-to-file new
524 (lambda ()
525 (format #t "#!~a~%" bash)
526 (format #t "exec \"~a\" \"$@\"~%" old)
527 (chmod new #o755)
528 #t)))))))
529 (synopsis "Wrapper for the Python 3 commands")
530 (description
531 "This package provides wrappers for the commands of Python@tie{}3.x such
532 that they can be invoked under their usual name---e.g., @command{python}
533 instead of @command{python3}.")))
534
535 (define-public python-wrapper (wrap-python3 python))
536 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
537
538 (define-public python-psutil
539 (package
540 (name "python-psutil")
541 (version "5.4.3")
542 (source
543 (origin
544 (method url-fetch)
545 (uri (pypi-uri "psutil" version))
546 (sha256
547 (base32
548 "063v69x7spyclyaxrd3gmzj3p16q5ayg97xqhwb1kyn22a9pwip2"))))
549 (build-system python-build-system)
550 (arguments
551 ;; FIXME: some tests does not return and times out.
552 '(#:tests? #f))
553 (home-page "https://www.github.com/giampaolo/psutil")
554 (synopsis "Library for retrieving information on running processes")
555 (description
556 "psutil (Python system and process utilities) is a library for retrieving
557 information on running processes and system utilization (CPU, memory, disks,
558 network) in Python. It is useful mainly for system monitoring, profiling and
559 limiting process resources and management of running processes. It implements
560 many functionalities offered by command line tools such as: ps, top, lsof,
561 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
562 pidof, tty, taskset, pmap.")
563 (properties `((python2-variant . ,(delay python2-psutil))))
564 (license license:bsd-3)))
565
566 (define-public python2-psutil
567 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
568 (package
569 (inherit base)
570 (propagated-inputs
571 `(("python2-enum34" ,python2-enum34) ;optional
572 ,@(package-propagated-inputs base))))))
573
574 (define-public python-shapely
575 (package
576 (name "python-shapely")
577 (version "1.6.3")
578 (source
579 (origin
580 (method url-fetch)
581 (uri (pypi-uri "Shapely" version))
582 (sha256
583 (base32
584 "0svc58dzcw9gj92b4sgq35sdxkf85z0qwlzxarkzq4bp3h8jy58l"))))
585 (build-system python-build-system)
586 (native-inputs
587 `(("python-cython" ,python-cython)
588 ("python-matplotlib" ,python-matplotlib)
589 ("python-pytest" ,python-pytest)
590 ("python-pytest-cov" ,python-pytest-cov)))
591 (inputs
592 `(("geos" ,geos)))
593 (propagated-inputs
594 `(("python-numpy" ,python-numpy)))
595 (arguments
596 `(#:phases
597 (modify-phases %standard-phases
598 (add-after 'unpack 'patch-geos-path
599 (lambda* (#:key inputs #:allow-other-keys)
600 (let ((geos (assoc-ref inputs "geos"))
601 (glibc (assoc-ref inputs ,(if (%current-target-system)
602 "cross-libc" "libc"))))
603 (substitute* "shapely/geos.py"
604 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
605 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
606 geos "/lib/libgeos_c.so'])"))
607 (("free = load_dll\\('c'\\)\\.free")
608 (string-append "free = load_dll('c', fallbacks=['"
609 glibc "/lib/libc.so.6']).free"))))
610 #t)))))
611 (home-page "https://github.com/Toblerity/Shapely")
612 (synopsis "Library for the manipulation and analysis of geometric objects")
613 (description "Shapely is a Python package for manipulation and analysis of
614 planar geometric objects. It is based on the @code{GEOS} library.")
615 (license license:bsd-3)))
616
617 (define-public python-logwrap
618 (package
619 (name "python-logwrap")
620 (version "3.2.1")
621 (source
622 (origin
623 (method url-fetch)
624 (uri (pypi-uri "logwrap" version ".zip"))
625 (sha256
626 (base32
627 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
628 (build-system python-build-system)
629 (propagated-inputs
630 `(("python-six" ,python-six)
631 ("python-typing" ,python-typing)))
632 (native-inputs
633 `(("unzip" ,unzip)
634 ("python-cython" ,python-cython)
635 ("python-pytest" ,python-pytest)
636 ("python-pytest-cov" ,python-pytest-cov)
637 ("python-pytest-runner" ,python-pytest-runner)))
638 (home-page "https://github.com/penguinolog/logwrap")
639 (synopsis "Decorator for logging function arguments")
640 (description "This package provides a decorator to log function arguments
641 and function call return values in a human-readable way.")
642 (license license:asl2.0)))
643
644 (define-public python2-shapely
645 (package-with-python2 python-shapely))
646
647 (define-public python-clyent
648 (package
649 (name "python-clyent")
650 (version "1.2.1")
651 (source
652 (origin
653 (method url-fetch)
654 (uri (pypi-uri "clyent" version))
655 (sha256
656 (base32
657 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
658 (build-system python-build-system)
659 (native-inputs
660 `(("python-mock" ,python-mock)))
661 (home-page "https://github.com/binstar/clyent")
662 (synopsis "Command line client library")
663 (description "Clyent is a Python command line utiliy library. It is used
664 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
665 (license license:bsd-3)))
666
667 (define-public python2-clyent
668 (package-with-python2 python-clyent))
669
670 (define-public python-babel
671 (package
672 (name "python-babel")
673 (version "2.3.4")
674 (source
675 (origin
676 (method url-fetch)
677 (uri (pypi-uri "Babel" version))
678 (sha256
679 (base32
680 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
681 (build-system python-build-system)
682 (propagated-inputs
683 `(("python-pytz" ,python-pytz)))
684 (arguments `(#:tests? #f)) ; no test target
685 (home-page "http://babel.pocoo.org/")
686 (synopsis
687 "Tools for internationalizing Python applications")
688 (description
689 "Babel is composed of two major parts:
690 - tools to build and work with gettext message catalogs
691 - a Python interface to the CLDR (Common Locale Data Repository), providing
692 access to various locale display names, localized number and date formatting,
693 etc. ")
694 (license license:bsd-3)))
695
696 (define-public python2-babel
697 (package-with-python2 python-babel))
698
699 (define-public python2-backport-ssl-match-hostname
700 (package
701 (name "python2-backport-ssl-match-hostname")
702 (version "3.5.0.1")
703 (source
704 (origin
705 (method url-fetch)
706 (uri (string-append
707 "https://pypi.python.org/packages/source/b/"
708 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
709 version ".tar.gz"))
710 (sha256
711 (base32
712 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
713 (build-system python-build-system)
714 (arguments
715 `(#:python ,python-2
716 #:tests? #f)) ; no test target
717 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
718 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
719 (description
720 "This backport brings the ssl.match_hostname() function to users of
721 earlier versions of Python. The function checks the hostname in the
722 certificate returned by the server to which a connection has been established,
723 and verifies that it matches the intended target hostname.")
724 (license license:psfl)))
725
726 (define-public python-hdf4
727 (package
728 (name "python-hdf4")
729 (version "0.9")
730 (source
731 (origin
732 (method url-fetch)
733 (uri (pypi-uri name version))
734 (sha256
735 (base32
736 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
737 (build-system python-build-system)
738 (native-inputs `(("nose" ,python-nose)))
739 (propagated-inputs `(("numpy" ,python-numpy)))
740 (inputs
741 `(("hdf4" ,hdf4)
742 ("libjpeg" ,libjpeg)
743 ("zlib" ,zlib)))
744 (arguments
745 `(#:phases
746 (modify-phases %standard-phases
747 (replace 'check
748 (lambda _
749 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
750 ;; on to import numpy. Somehow this works on their CI system.
751 ;; Let's just manage PYTHONPATH here instead.
752 (substitute* "runexamples.sh"
753 (("export PYTHONPATH=.*") ""))
754 (setenv "PYTHONPATH"
755 (string-append (getcwd) ":"
756 (getenv "PYTHONPATH")))
757 (and (zero? (system* "./runexamples.sh"))
758 (zero? (system* "nosetests" "-v"))))))))
759 (home-page "https://github.com/fhs/python-hdf4")
760 (synopsis "Python interface to the NCSA HDF4 library")
761 (description
762 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
763 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
764 NetCDF files can also be read and modified. Python-HDF4 is a fork of
765 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
766 (license license:expat)))
767
768 (define-public python2-hdf4
769 (package-with-python2 python-hdf4))
770
771 (define-public python-h5py
772 (package
773 (name "python-h5py")
774 (version "2.7.0")
775 (source
776 (origin
777 (method url-fetch)
778 (uri (pypi-uri "h5py" version))
779 (sha256
780 (base32
781 "0433sdv6xc9p7v1xs1gvbxp7p152ywi3nplgjb258q9fvw9469br"))))
782 (build-system python-build-system)
783 (arguments
784 `(#:tests? #f ; no test target
785 #:phases
786 (modify-phases %standard-phases
787 (add-after 'unpack 'fix-hdf5-paths
788 (lambda* (#:key inputs #:allow-other-keys)
789 (let ((prefix (assoc-ref inputs "hdf5")))
790 (substitute* "setup_build.py"
791 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
792 (string-append "['" prefix "/lib" "']"))
793 (("'/opt/local/include', '/usr/local/include'")
794 (string-append "'" prefix "/include" "'")))
795 (substitute* "setup_configure.py"
796 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
797 (string-append "['" prefix "/lib" "']")))
798 #t))))))
799 (propagated-inputs
800 `(("python-six" ,python-six)
801 ("python-numpy" ,python-numpy)))
802 (inputs
803 `(("hdf5" ,hdf5)))
804 (native-inputs
805 `(("python-cython" ,python-cython)
806 ("python-pkgconfig" ,python-pkgconfig)))
807 (home-page "http://www.h5py.org/")
808 (synopsis "Read and write HDF5 files from Python")
809 (description
810 "The h5py package provides both a high- and low-level interface to the
811 HDF5 library from Python. The low-level interface is intended to be a
812 complete wrapping of the HDF5 API, while the high-level component supports
813 access to HDF5 files, datasets and groups using established Python and NumPy
814 concepts.")
815 (license license:bsd-3)))
816
817 (define-public python2-h5py
818 (package-with-python2 python-h5py))
819
820 (define-public python-netcdf4
821 (package
822 (name "python-netcdf4")
823 (version "1.2.9")
824 (source
825 (origin
826 (method url-fetch)
827 (uri (pypi-uri "netCDF4" version))
828 (sha256
829 (base32
830 "1h6jq338amlbk0ilzvjyl7cck80i0bah9a5spn9in71vy2qxm7i5"))))
831 (build-system python-build-system)
832 (native-inputs
833 `(("python-cython" ,python-cython)))
834 (propagated-inputs
835 `(("python-numpy" ,python-numpy)))
836 (inputs
837 `(("netcdf" ,netcdf)
838 ("hdf4" ,hdf4)
839 ("hdf5" ,hdf5)))
840 (arguments
841 '(#:phases
842 (modify-phases %standard-phases
843 (replace 'check
844 (lambda _
845 (setenv "NO_NET" "1") ; disable opendap tests
846 (with-directory-excursion "test"
847 (setenv "PYTHONPATH" ; find and add the library we just built
848 (string-append
849 (car (find-files "../build" "lib.*"
850 #:directories? #:t
851 #:fail-on-error? #:t))
852 ":" (getenv "PYTHONPATH")))
853 (zero? (system* "python" "run_all.py"))))))))
854 (home-page
855 "https://github.com/Unidata/netcdf4-python")
856 (synopsis "Python/numpy interface to the netCDF library")
857 (description "Netcdf4-python is a Python interface to the netCDF C
858 library. netCDF version 4 has many features not found in earlier
859 versions of the library and is implemented on top of HDF5. This module
860 can read and write files in both the new netCDF 4 and the old netCDF 3
861 format, and can create files that are readable by HDF5 clients. The
862 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
863 to users of that module.")
864 ;; The software is mainly ISC, but includes some files covered
865 ;; by the Expat license.
866 (license (list license:isc license:expat))))
867
868 (define-public python2-netcdf4
869 (package-with-python2 python-netcdf4))
870
871 (define-public python-lockfile
872 (package
873 (name "python-lockfile")
874 (version "0.12.2")
875 (source
876 (origin
877 (method url-fetch)
878 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
879 "lockfile-" version ".tar.gz"))
880 (sha256
881 (base32
882 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
883 (build-system python-build-system)
884 (arguments '(#:test-target "check"))
885 (native-inputs
886 `(("python-pbr" ,python-pbr)))
887 (home-page "https://launchpad.net/pylockfile")
888 (synopsis "Platform-independent file locking module")
889 (description
890 "The lockfile package exports a LockFile class which provides a simple
891 API for locking files.")
892 (license license:expat)))
893
894 (define-public python2-lockfile
895 (package-with-python2 python-lockfile))
896
897 (define-public python-setuptools
898 (package
899 (name "python-setuptools")
900 (version "31.0.0")
901 (source
902 (origin
903 (method url-fetch)
904 (uri (pypi-uri "setuptools" version))
905 (sha256
906 (base32
907 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
908 (modules '((guix build utils)))
909 (snippet
910 '(begin
911 ;; Remove included binaries which are used to build self-extracting
912 ;; installers for Windows.
913 ;; TODO: Find some way to build them ourself so we can include them.
914 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
915 #t))))
916 (build-system python-build-system)
917 ;; FIXME: Tests require pytest, which itself relies on setuptools.
918 ;; One could bootstrap with an internal untested setuptools.
919 (arguments
920 `(#:tests? #f))
921 (home-page "https://pypi.python.org/pypi/setuptools")
922 (synopsis
923 "Library designed to facilitate packaging Python projects")
924 (description
925 "Setuptools is a fully-featured, stable library designed to facilitate
926 packaging Python projects, where packaging includes:
927 Python package and module definitions,
928 distribution package metadata,
929 test hooks,
930 project installation,
931 platform-specific details,
932 Python 3 support.")
933 ;; TODO: setuptools now bundles the following libraries:
934 ;; packaging, pyparsing, six and appdirs. How to unbundle?
935 (license (list license:psfl ; setuptools itself
936 license:expat ; six, appdirs, pyparsing
937 license:asl2.0 ; packaging is dual ASL2/BSD-2
938 license:bsd-2))))
939
940 (define-public python2-setuptools
941 (package-with-python2 python-setuptools))
942
943 (define-public python-uniseg
944 (package
945 (name "python-uniseg")
946 (version "0.7.1")
947 (source
948 (origin
949 (method url-fetch)
950 (uri (pypi-uri "uniseg" version ".zip"))
951 (sha256
952 (base32
953 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
954 (build-system python-build-system)
955 (arguments
956 '(#:tests? #f)) ; The test suite requires network access.
957 (native-inputs
958 `(("unzip" ,unzip)))
959 (home-page
960 "https://bitbucket.org/emptypage/uniseg-python")
961 (synopsis
962 "Python library to determine Unicode text segmentations")
963 (description
964 "Uniseg is a Python package used to determine Unicode text segmentations.
965 Supported segmentations include:
966 @enumerate
967 @item @dfn{Code point} (any value in the Unicode codespace)
968 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
969 multiple Unicode code points, e.g. \"G\" + acute-accent)
970 @item Word break
971 @item Sentence break
972 @item Line break
973 @end enumerate")
974 (license license:expat)))
975
976 (define-public python2-uniseg
977 (package-with-python2 python-uniseg))
978
979 (define-public python-humanfriendly
980 (package
981 (name "python-humanfriendly")
982 (version "4.4.1")
983 (source
984 (origin
985 (method url-fetch)
986 (uri (pypi-uri "humanfriendly" version))
987 (sha256
988 (base32
989 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
990 (build-system python-build-system)
991 (arguments
992 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
993 #:tests? #f))
994 (propagated-inputs
995 `(("python-monotonic" ,python-monotonic)))
996 (home-page "https://humanfriendly.readthedocs.io")
997 (synopsis "Human-friendly input and output in Python")
998 (description
999 "The functions and classes in @code{humanfriendly} can be used to make
1000 text interfaces more user-friendly. It includes tools to parse and format
1001 numbers, file sizes, and timespans, timers for long-running operations, menus
1002 to allow the user to choose from a list of options, and terminal interaction
1003 helpers.")
1004 (license license:expat)))
1005
1006 (define-public python2-humanfriendly
1007 (package-with-python2 python-humanfriendly))
1008
1009 (define-public python-capturer
1010 (package
1011 (name "python-capturer")
1012 (version "2.4")
1013 (source
1014 (origin
1015 (method url-fetch)
1016 (uri (pypi-uri "capturer" version))
1017 (sha256
1018 (base32
1019 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1020 (build-system python-build-system)
1021 (arguments
1022 `(#:tests? #f))
1023 (propagated-inputs
1024 `(("python-humanfriendly" ,python-humanfriendly)))
1025 (home-page "https://capturer.readthedocs.io")
1026 (synopsis "Capture stdout and stderr streams of the current process")
1027 (description
1028 "The capturer package makes it easy to capture the stdout and stderr
1029 streams of the current process and subprocesses. Output can be relayed
1030 to the terminal in real time but is also available to the Python program
1031 for additional processing.")
1032 (license license:expat)))
1033
1034 (define-public python2-capturer
1035 (package-with-python2 python-capturer))
1036
1037 (define-public python-verboselogs
1038 (package
1039 (name "python-verboselogs")
1040 (version "1.7")
1041 (source
1042 (origin
1043 (method url-fetch)
1044 (uri (pypi-uri "verboselogs" version))
1045 (sha256
1046 (base32
1047 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1048 (build-system python-build-system)
1049 (native-inputs
1050 `(("python-mock" ,python-mock)
1051 ("python-astroid" ,python-astroid)
1052 ("python-pylint" ,python-pylint)))
1053 (home-page "https://verboselogs.readthedocs.io")
1054 (synopsis "Verbose logging level for Python's logging module")
1055 (description
1056 "The @code{verboselogs} package extends Python's @code{logging} module to
1057 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1058 (license license:expat)))
1059
1060 (define-public python2-verboselogs
1061 (package-with-python2 python-verboselogs))
1062
1063 (define-public python-coloredlogs
1064 (package
1065 (name "python-coloredlogs")
1066 (version "7.3")
1067 (source
1068 (origin
1069 (method url-fetch)
1070 (uri (pypi-uri "coloredlogs" version))
1071 (sha256
1072 (base32
1073 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
1074 (build-system python-build-system)
1075 (arguments
1076 `(;Tests require some updated modules
1077 #:tests? #f))
1078 (propagated-inputs
1079 `(("python-capturer" ,python-capturer)))
1080 (home-page "https://coloredlogs.readthedocs.io")
1081 (synopsis "Colored stream handler for Python's logging module")
1082 (description
1083 "The @code{coloredlogs} package enables colored terminal output for
1084 Python's logging module. The @code{ColoredFormatter} class inherits from
1085 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
1086 messages in color.")
1087 (license license:expat)))
1088
1089 (define-public python2-coloredlogs
1090 (package-with-python2 python-coloredlogs))
1091
1092 (define-public python-eventlet
1093 (package
1094 (name "python-eventlet")
1095 (version "0.20.1")
1096 (source
1097 (origin
1098 (method url-fetch)
1099 (uri (pypi-uri "eventlet" version))
1100 (sha256
1101 (base32
1102 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1103 (build-system python-build-system)
1104 (propagated-inputs
1105 `(("python-greenlet" ,python-greenlet)))
1106 (arguments
1107 ;; TODO: Requires unpackaged 'enum-compat'.
1108 '(#:tests? #f))
1109 (home-page "http://eventlet.net")
1110 (synopsis "Concurrent networking library for Python")
1111 (description
1112 "Eventlet is a concurrent networking library for Python that
1113 allows you to change how you run your code, not how you write it.
1114 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1115 Coroutines ensure that the developer uses a blocking style of programming
1116 that is similar to threading, but provide the benefits of non-blocking I/O.
1117 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1118 from the Python interpreter, or as a small part of a larger application.")
1119 (license license:expat)))
1120
1121 (define-public python2-eventlet
1122 (let ((base (package-with-python2
1123 (strip-python2-variant python-eventlet))))
1124 (package (inherit base)
1125 (propagated-inputs
1126 `(("python2-enum34" ,python2-enum34)
1127 ,@(package-propagated-inputs base))))))
1128
1129 (define-public python-six
1130 (package
1131 (name "python-six")
1132 (version "1.11.0")
1133 (source
1134 (origin
1135 (method url-fetch)
1136 (uri (pypi-uri "six" version))
1137 (sha256
1138 (base32
1139 "1scqzwc51c875z23phj48gircqjgnn3af8zy2izjwmnlxrxsgs3h"))))
1140 (build-system python-build-system)
1141 (arguments
1142 `(#:phases
1143 (modify-phases %standard-phases
1144 (replace 'check
1145 (lambda _
1146 (invoke "py.test" "-v"))))))
1147 (native-inputs
1148 `(("python-py" ,python-py)
1149 ("python-pytest" ,python-pytest-bootstrap)))
1150 (home-page "https://pypi.python.org/pypi/six/")
1151 (synopsis "Python 2 and 3 compatibility utilities")
1152 (description
1153 "Six is a Python 2 and 3 compatibility library. It provides utility
1154 functions for smoothing over the differences between the Python versions with
1155 the goal of writing Python code that is compatible on both Python versions.
1156 Six supports every Python version since 2.5. It is contained in only one
1157 Python file, so it can be easily copied into your project.")
1158 (license license:x11)))
1159
1160 (define-public python2-six
1161 (package-with-python2 python-six))
1162
1163 (define-public python-six-bootstrap
1164 (package
1165 (inherit python-six)
1166 (name "python-six-bootstrap")
1167 (native-inputs `())
1168 (arguments `(#:tests? #f))))
1169
1170 (define-public python2-six-bootstrap
1171 (package-with-python2 python-six-bootstrap))
1172
1173 (define-public python-schedule
1174 (package
1175 (name "python-schedule")
1176 (version "0.4.3")
1177 (source
1178 (origin
1179 (method url-fetch)
1180 (uri (pypi-uri "schedule" version))
1181 (sha256
1182 (base32
1183 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1184 (build-system python-build-system)
1185 (native-inputs
1186 `(("python-pytest" ,python-pytest)
1187 ("python-mock" ,python-mock)))
1188 (home-page "https://github.com/dbader/schedule")
1189 (synopsis "Schedule periodic function calls in Python")
1190 (description
1191 "Schedule is an in-process scheduler for periodic jobs that uses the
1192 builder pattern for configuration. Schedule lets you run Python functions (or
1193 any other callable) periodically at pre-determined intervals using a simple,
1194 human-friendly syntax.")
1195 (license license:expat)))
1196
1197 (define-public python2-schedule
1198 (package-with-python2 python-schedule))
1199
1200 (define-public python-pandas
1201 (package
1202 (name "python-pandas")
1203 (version "0.22.0")
1204 (source
1205 (origin
1206 (method url-fetch)
1207 (uri (pypi-uri "pandas" version))
1208 (sha256
1209 (base32 "0v0fi2i10kwnmlpsl6f1fgajcpx3q6766qf6xqi5kw3ivn8l1aa4"))))
1210 (build-system python-build-system)
1211 (arguments
1212 `(#:modules ((guix build utils)
1213 (guix build python-build-system)
1214 (ice-9 ftw)
1215 (srfi srfi-26))
1216 #:phases (modify-phases %standard-phases
1217 (replace 'check
1218 (lambda _
1219 (let ((build-directory
1220 (string-append
1221 (getcwd) "/build/"
1222 (car (scandir "build"
1223 (cut string-prefix? "lib." <>))))))
1224 (with-directory-excursion build-directory
1225 ;; Delete tests that require "moto" which is not yet in Guix.
1226 (for-each delete-file
1227 '("pandas/tests/io/conftest.py"
1228 "pandas/tests/io/json/test_compression.py"
1229 "pandas/tests/io/test_excel.py"))
1230 (invoke "pytest" "-v" "pandas" "-k"
1231 (string-append
1232 "not network and not disabled"
1233 ;; XXX: Due to the deleted tests above.
1234 " and not test_read_s3_jsonl")))))))))
1235 (propagated-inputs
1236 `(("python-numpy" ,python-numpy)
1237 ("python-pytz" ,python-pytz)
1238 ("python-dateutil" ,python-dateutil)))
1239 (native-inputs
1240 `(("python-cython" ,python-cython)
1241 ("python-lxml" ,python-lxml)
1242 ("python-nose" ,python-nose)
1243 ("python-pytest" ,python-pytest)))
1244 (home-page "https://pandas.pydata.org")
1245 (synopsis "Data structures for data analysis, time series, and statistics")
1246 (description
1247 "Pandas is a Python package providing fast, flexible, and expressive data
1248 structures designed to make working with structured (tabular,
1249 multidimensional, potentially heterogeneous) and time series data both easy
1250 and intuitive. It aims to be the fundamental high-level building block for
1251 doing practical, real world data analysis in Python.")
1252 (license license:bsd-3)))
1253
1254 (define-public python2-pandas
1255 (package-with-python2 python-pandas))
1256
1257 (define-public python2-mechanize
1258 (package
1259 (name "python2-mechanize")
1260 (version "0.2.5")
1261 (source
1262 (origin
1263 (method url-fetch)
1264 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1265 version ".tar.gz"))
1266 (sha256
1267 (base32
1268 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1269 (build-system python-build-system)
1270 (arguments
1271 `(#:python ,python-2 ; apparently incompatible with Python 3
1272 #:tests? #f))
1273 ;; test fails with message
1274 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1275 ;; (python-3.3.2) or
1276 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1277 ;; (python-2.7.5).
1278 ;; The source code is from March 2011 and probably not up-to-date
1279 ;; with respect to python unit tests.
1280 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1281 (synopsis
1282 "Stateful programmatic web browsing in Python")
1283 (description
1284 "Mechanize implements stateful programmatic web browsing in Python,
1285 after Andy Lester’s Perl module WWW::Mechanize.")
1286 (license (license:non-copyleft
1287 "file://COPYING"
1288 "See COPYING in the distribution."))))
1289
1290
1291 (define-public python-simplejson
1292 (package
1293 (name "python-simplejson")
1294 (version "3.14.0")
1295 (source
1296 (origin
1297 (method url-fetch)
1298 (uri (pypi-uri "simplejson" version))
1299 (sha256
1300 (base32
1301 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1302 (build-system python-build-system)
1303 (home-page "http://simplejson.readthedocs.org/en/latest/")
1304 (synopsis
1305 "Json library for Python")
1306 (description
1307 "JSON (JavaScript Object Notation) is a subset of JavaScript
1308 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1309 format.
1310
1311 Simplejson exposes an API familiar to users of the standard library marshal
1312 and pickle modules. It is the externally maintained version of the json
1313 library contained in Python 2.6, but maintains compatibility with Python 2.5
1314 and (currently) has significant performance advantages, even without using
1315 the optional C extension for speedups. Simplejson is also supported on
1316 Python 3.3+.")
1317 (license license:x11)))
1318
1319 (define-public python2-simplejson
1320 (package-with-python2 python-simplejson))
1321
1322
1323 (define-public python-pyicu
1324 (package
1325 (name "python-pyicu")
1326 (version "1.9.8")
1327 (source
1328 (origin
1329 (method url-fetch)
1330 (uri (pypi-uri "PyICU" version))
1331 (sha256
1332 (base32
1333 "05nz4p2dpkhwj6y9kik24xbvmfxji39nl0xw0sc0nvp9fgzf6xnd"))))
1334 (build-system python-build-system)
1335 (inputs
1336 `(("icu4c" ,icu4c)))
1337 (native-inputs
1338 `(("python-pytest" ,python-pytest)
1339 ("python-six" ,python-six)))
1340 (home-page "https://github.com/ovalhub/pyicu")
1341 (synopsis "Python extension wrapping the ICU C++ API")
1342 (description
1343 "PyICU is a python extension wrapping the ICU C++ API.")
1344 (properties `((python2-variant . ,(delay python2-pyicu))))
1345 (license license:x11)))
1346
1347 (define-public python2-pyicu
1348 (let ((base (package-with-python2
1349 (strip-python2-variant python-pyicu))))
1350 (package
1351 (inherit base)
1352 (arguments
1353 `(,@(package-arguments base)
1354 #:phases
1355 (modify-phases %standard-phases
1356 (add-before 'check 'delete-failing-test
1357 (λ _
1358 ;; XXX: This fails due to Unicode issues unique to Python 2,
1359 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1360 (delete-file "test/test_Script.py")
1361 #t))))))))
1362
1363 (define-public python2-dogtail
1364 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1365 ;; spaces in indentation" with Python 3.
1366 (package
1367 (name "python2-dogtail")
1368 (version "0.9.9")
1369 (source (origin
1370 (method url-fetch)
1371 (uri (pypi-uri "dogtail" version))
1372 (sha256
1373 (base32
1374 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1375 (build-system python-build-system)
1376 (arguments `(#:python ,python-2
1377 #:tests? #f)) ; invalid command "test"
1378 ;; Currently no offical homepage.
1379 (home-page "https://pypi.python.org/pypi/dogtail/")
1380 (synopsis "GUI test tool and automation framework written in Python")
1381 (description
1382 "Dogtail is a GUI test tool and automation framework written in Python.
1383 It uses Accessibility (a11y) technologies to communicate with desktop
1384 applications. dogtail scripts are written in Python and executed like any
1385 other Python program.")
1386 (license license:gpl2+)))
1387
1388 (define-public python-empy
1389 (package
1390 (name "python-empy")
1391 (version "3.3")
1392 (source (origin
1393 (method url-fetch)
1394 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1395 version ".tar.gz"))
1396 (sha256
1397 (base32
1398 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1399 (build-system python-build-system)
1400 (arguments
1401 `(#:tests? #f)) ;python2 only
1402 (home-page "http://www.alcyone.com/software/empy/")
1403 (synopsis "Templating system for Python")
1404 (description
1405 "EmPy is a system for embedding Python expressions and statements in
1406 template text; it takes an EmPy source file, processes it, and produces
1407 output. This is accomplished via expansions, which are special signals to the
1408 EmPy system and are set off by a special prefix (by default the at sign, @@).
1409 EmPy can expand arbitrary Python expressions and statements in this way, as
1410 well as a variety of special forms. Textual data not explicitly delimited in
1411 this way is sent unaffected to the output, allowing Python to be used in
1412 effect as a markup language. Also supported are callbacks via hooks,
1413 recording and playback via diversions, and dynamic, chainable filters. The
1414 system is highly configurable via command line options and embedded
1415 commands.")
1416 (license license:lgpl2.1+)))
1417
1418 (define-public python2-empy
1419 (package-with-python2 python-empy))
1420
1421 (define-public python2-element-tree
1422 (package
1423 (name "python2-element-tree")
1424 (version "1.2.6")
1425 (source (origin
1426 (method url-fetch)
1427 (uri (string-append
1428 "http://effbot.org/media/downloads/elementtree-"
1429 version "-20050316.tar.gz"))
1430 (sha256
1431 (base32
1432 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1433 (build-system python-build-system)
1434 (arguments
1435 `(#:python ,python-2 ; seems to be part of Python 3
1436 #:tests? #f)) ; no 'test' sub-command
1437 (synopsis "Toolkit for XML processing in Python")
1438 (description
1439 "ElementTree is a Python library supporting lightweight XML processing.")
1440 (home-page "http://effbot.org/zone/element-index.htm")
1441 (license (license:x11-style
1442 "http://docs.python.org/2/license.html"
1443 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1444
1445 (define-public python2-pybugz
1446 (package
1447 (name "python2-pybugz")
1448 (version "0.6.11")
1449 (source (origin
1450 (method url-fetch)
1451 (uri (string-append
1452 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1453 version ".tar.gz"))
1454 (sha256
1455 (base32
1456 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1457 (patches (search-patches "pybugz-stty.patch"
1458 "pybugz-encode-error.patch"))))
1459 (build-system python-build-system)
1460 (arguments
1461 `(#:python ,python-2 ; SyntaxError with Python 3
1462 #:tests? #f)) ; no 'test' sub-command
1463 (propagated-inputs
1464 `(("element-tree" ,python2-element-tree)))
1465 (synopsis "Python and command-line interface to Bugzilla")
1466 (description
1467 "PyBugz is a Python library and command-line tool to query the Bugzilla
1468 bug tracking system. It is meant as an aid to speed up interaction with the
1469 bug tracker.")
1470 (home-page "http://www.liquidx.net/pybugz/")
1471 (license license:gpl2)))
1472
1473 (define-public python2-enum
1474 (package
1475 (name "python2-enum")
1476 (version "0.4.6")
1477 (source (origin
1478 (method url-fetch)
1479 (uri (pypi-uri "enum" version))
1480 (sha256
1481 (base32
1482 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1483 (build-system python-build-system)
1484 (arguments
1485 `(#:python ,python-2))
1486 (home-page "http://pypi.python.org/pypi/enum/")
1487 (synopsis "Robust enumerated type support in Python")
1488 (description
1489 "This provides a module for robust enumerations in Python. It has
1490 been superseded by the Python standard library and is provided only for
1491 compatibility.")
1492 ;; Choice of either license.
1493 (license (list license:gpl3+ license:psfl))))
1494
1495 (define-public python-enum34
1496 (package
1497 (name "python-enum34")
1498 (version "1.1.6")
1499 (source
1500 (origin
1501 (method url-fetch)
1502 (uri (pypi-uri "enum34" version))
1503 (sha256
1504 (base32
1505 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1506 (build-system python-build-system)
1507 (home-page "https://pypi.python.org/pypi/enum34")
1508 (synopsis "Backported Python 3.4 Enum")
1509 (description
1510 "Enum34 is the new Python stdlib enum module available in Python 3.4
1511 backported for previous versions of Python from 2.4 to 3.3.")
1512 (license license:bsd-3)))
1513
1514 (define-public python2-enum34
1515 (package-with-python2 python-enum34))
1516
1517 (define-public python-parse-type
1518 (package
1519 (name "python-parse-type")
1520 (version "0.4.2")
1521 (source
1522 (origin
1523 (method url-fetch)
1524 (uri (pypi-uri "parse_type" version))
1525 (sha256
1526 (base32
1527 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1528 (build-system python-build-system)
1529 (propagated-inputs
1530 `(("python-six" ,python-six)
1531 ("python-parse" ,python-parse)))
1532 (native-inputs
1533 `(("python-pytest" ,python-pytest)
1534 ("python-pytest-runner" ,python-pytest-runner)))
1535 (home-page "https://github.com/jenisys/parse_type")
1536 (synopsis "Extended parse module")
1537 (description
1538 "Parse_type extends the python parse module.")
1539 (properties
1540 `((python2-variant . ,(delay python2-parse-type))))
1541 (license license:bsd-3)))
1542
1543 (define-public python2-parse-type
1544 (let ((base (package-with-python2
1545 (strip-python2-variant python-parse-type))))
1546 (package (inherit base)
1547 (propagated-inputs
1548 `(("python2-enum34" ,python2-enum34)
1549 ,@(package-propagated-inputs base))))))
1550
1551 (define-public python-parse
1552 (package
1553 (name "python-parse")
1554 (version "1.8.2")
1555 (source
1556 (origin
1557 (method url-fetch)
1558 (uri (pypi-uri "parse" version))
1559 (sha256
1560 (base32
1561 "1lj9v1q4imszyhvipb6drsm3xdl35nan011mqxxas1yaypixsj40"))))
1562 (build-system python-build-system)
1563 (arguments
1564 `(#:phases
1565 (modify-phases %standard-phases
1566 (replace 'check
1567 (lambda _ (invoke "python" "test_parse.py"))))))
1568 (home-page "https://github.com/r1chardj0n3s/parse")
1569 (synopsis "Parse strings")
1570 (description
1571 "Parse strings using a specification based on the Python format()
1572 syntax.")
1573 (license license:x11)))
1574
1575 (define-public python-polib
1576 (package
1577 (name "python-polib")
1578 (version "1.0.8")
1579 (source (origin
1580 (method url-fetch)
1581 (uri (pypi-uri "polib" version))
1582 (sha256
1583 (base32
1584 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1585 (build-system python-build-system)
1586 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1587 (synopsis "Manipulate, create and modify gettext files")
1588 (description "Polib can manipulate any gettext format (po, pot and mo)
1589 files. It can be used to create po files from scratch or to modify
1590 existing ones.")
1591 (license license:expat)))
1592
1593 (define-public python2-polib
1594 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1595 (package
1596 (inherit base)
1597 (arguments `(,@(package-arguments base)
1598 ;; Tests don't work with python2.
1599 #:tests? #f)))))
1600
1601 (define-public scons
1602 (package
1603 (name "scons")
1604 (version "3.0.1")
1605 (source (origin
1606 (method url-fetch)
1607 (uri (string-append "mirror://sourceforge/scons/scons/" version
1608 "/scons-" version ".tar.gz"))
1609 (sha256
1610 (base32
1611 "0wzid419mlwqw9llrg8gsx4nkzhqy16m4m40r0xnh6cwscw5wir4"))))
1612 (build-system python-build-system)
1613 (arguments
1614 `(#:use-setuptools? #f ; still relies on distutils
1615 #:tests? #f)) ; no 'python setup.py test' command
1616 (home-page "http://scons.org/")
1617 (synopsis "Software construction tool written in Python")
1618 (description
1619 "SCons is a software construction tool. Think of SCons as an improved,
1620 cross-platform substitute for the classic Make utility with integrated
1621 functionality similar to autoconf/automake and compiler caches such as ccache.
1622 In short, SCons is an easier, more reliable and faster way to build
1623 software.")
1624 (license license:x11)))
1625
1626 (define-public scons-python2
1627 (package
1628 (inherit (package-with-python2 scons))
1629 (name "scons-python2")))
1630
1631 (define-public python-extras
1632 (package
1633 (name "python-extras")
1634 (version "1.0.0")
1635 (source
1636 (origin
1637 (method url-fetch)
1638 (uri (pypi-uri "extras" version))
1639 (sha256
1640 (base32
1641 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1642 (build-system python-build-system)
1643 (arguments
1644 ;; FIXME: Circular dependency on testtools.
1645 '(#:tests? #f))
1646 (home-page "https://github.com/testing-cabal/extras")
1647 (synopsis "Useful extensions to the Python standard library")
1648 (description
1649 "Extras is a set of extensions to the Python standard library.")
1650 (license license:expat)))
1651
1652 (define-public python2-extras
1653 (package-with-python2 python-extras))
1654
1655 (define-public python-mimeparse
1656 (package
1657 (name "python-mimeparse")
1658 (version "0.1.4")
1659 (source
1660 (origin
1661 (method url-fetch)
1662 (uri (string-append
1663 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1664 version ".tar.gz"))
1665 (sha256
1666 (base32
1667 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1668 (build-system python-build-system)
1669 (arguments
1670 '(#:tests? #f)) ; no setup.py test command
1671 (home-page
1672 "https://github.com/dbtsai/python-mimeparse")
1673 (synopsis "Python library for parsing MIME types")
1674 (description
1675 "Mimeparse provides basic functions for parsing MIME type names and
1676 matching them against a list of media-ranges.")
1677 (license license:expat)))
1678
1679 (define-public python2-mimeparse
1680 (package-with-python2 python-mimeparse))
1681
1682 (define-public python-pafy
1683 (package
1684 (name "python-pafy")
1685 (version "0.5.3.1")
1686 (source
1687 (origin
1688 (method url-fetch)
1689 (uri (pypi-uri "pafy" version))
1690 (sha256
1691 (base32
1692 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1693 (build-system python-build-system)
1694 (arguments
1695 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1696 (propagated-inputs
1697 ;; Youtube-dl is a python package which is imported in the file
1698 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1699 `(("youtube-dl" ,youtube-dl)))
1700 (home-page "https://np1.github.io/pafy/")
1701 (synopsis "Retrieve YouTube content and metadata")
1702 (description
1703 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1704 (license license:lgpl3+)))
1705
1706 (define-public python2-funcsigs
1707 (package
1708 (name "python2-funcsigs")
1709 (version "1.0.2")
1710 (source (origin
1711 (method url-fetch)
1712 (uri (pypi-uri "funcsigs" version))
1713 (sha256
1714 (base32
1715 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1716 (build-system python-build-system)
1717 (arguments
1718 `(#:python ,python-2))
1719 (native-inputs
1720 `(("python2-unittest2" ,python2-unittest2)))
1721 (home-page "http://funcsigs.readthedocs.org")
1722 (synopsis "Python function signatures from PEP362")
1723 (description
1724 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1725 (license license:asl2.0)))
1726
1727 (define-public python2-funcsigs-bootstrap
1728 (package
1729 (inherit python2-funcsigs)
1730 (name "python2-funcsigs-bootstrap")
1731 (native-inputs `())
1732 (arguments
1733 `(#:tests? #f
1734 ,@(package-arguments python2-funcsigs)))))
1735
1736 (define-public python-pafy
1737 (package
1738 (name "python-pafy")
1739 (version "0.5.3.1")
1740 (source
1741 (origin
1742 (method url-fetch)
1743 (uri (pypi-uri "pafy" version))
1744 (sha256
1745 (base32
1746 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1747 (build-system python-build-system)
1748 (arguments
1749 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1750 (propagated-inputs
1751 ;; Youtube-dl is a python package which is imported in the file
1752 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1753 `(("youtube-dl" ,youtube-dl)))
1754 (home-page "https://np1.github.io/pafy/")
1755 (synopsis "Retrieve YouTube content and metadata")
1756 (description
1757 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1758 (license license:lgpl3+)))
1759
1760 (define-public python-py
1761 (package
1762 (name "python-py")
1763 (version "1.5.3")
1764 (source
1765 (origin
1766 (method url-fetch)
1767 (uri (pypi-uri "py" version))
1768 (sha256
1769 (base32
1770 "10gq2lckvgwlk9w6yzijhzkarx44hsaknd0ypa08wlnpjnsgmj99"))))
1771 (build-system python-build-system)
1772 (arguments
1773 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1774 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1775 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1776 ;; Is this module globally installed?"
1777 '(#:tests? #f))
1778 (home-page "http://pylib.readthedocs.io/")
1779 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1780 (description
1781 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1782 code introspection, and logging.")
1783 (license license:expat)))
1784
1785 (define-public python2-py
1786 (package-with-python2 python-py))
1787
1788 ;; Recent versions of python-fixtures and python-testrepository need
1789 ;; python-pbr for packaging, which itself needs these two packages for
1790 ;; testing.
1791 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1792 ;; same source, just without any test dependencies and with tests disabled.
1793 ;; python-pbr-minmal is then used to package python-fixtures and
1794 ;; python-testrepository.
1795 ;; Strictly speaking we currently could remove the test-requirements from the
1796 ;; normal python-pbr package (and save this package) since test are disabled
1797 ;; there anyway. But this may change in future.
1798 (define-public python-pbr-minimal
1799 (package
1800 (name "python-pbr-minimal")
1801 (version "3.0.1")
1802 (source
1803 (origin
1804 (method url-fetch)
1805 (uri (pypi-uri "pbr" version))
1806 (sha256
1807 (base32
1808 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1809 (build-system python-build-system)
1810 (arguments
1811 `(#:tests? #f))
1812 (home-page "http://docs.openstack.org/developer/pbr/")
1813 (synopsis "Minimal build of python-pbr used for bootstrapping")
1814 (description
1815 "Used only for bootstrapping python2-pbr, you should not need this.")
1816 (license license:asl2.0)))
1817
1818 (define-public python2-pbr-minimal
1819 (package-with-python2 python-pbr-minimal))
1820
1821 (define-public python-pbr
1822 (package
1823 (inherit python-pbr-minimal)
1824 (name "python-pbr")
1825 (arguments
1826 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1827 (propagated-inputs
1828 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1829 (native-inputs
1830 `(("python-fixtures" ,python-fixtures-bootstrap)
1831 ;; discover, coverage, hacking, subunit
1832 ("python-mock" ,python-mock)
1833 ("python-six" ,python-six)
1834 ("python-sphinx" ,python-sphinx)
1835 ("python-testrepository" ,python-testrepository-bootstrap)
1836 ("python-testresources" ,python-testresources-bootstrap)
1837 ("python-testscenarios" ,python-testscenarios-bootstrap)
1838 ("python-testtools" ,python-testtools-bootstrap)
1839 ("python-virtualenv" ,python-virtualenv)))
1840 (synopsis "Enhance the default behavior of Python’s setuptools")
1841 (description
1842 "Python Build Reasonableness (PBR) is a library that injects some useful
1843 and sensible default behaviors into your setuptools run. It will set
1844 versions, process requirements files and generate AUTHORS and ChangeLog file
1845 from git information.
1846 ")))
1847
1848 (define-public python2-pbr
1849 (package-with-python2 python-pbr))
1850
1851 (define-public python-exif-read
1852 (package
1853 (name "python-exif-read")
1854 (version "2.1.2")
1855 (source (origin
1856 (method url-fetch)
1857 (uri (pypi-uri "ExifRead" version))
1858 (sha256
1859 (base32
1860 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1861 (build-system python-build-system)
1862 (arguments `(#:tests? #f)) ; no tests
1863 (home-page "https://github.com/ianare/exif-py")
1864 (synopsis "Python library to extract EXIF data from image files")
1865 (description
1866 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1867 files.")
1868 (license license:bsd-3)))
1869
1870 (define-public python2-exif-read
1871 (package-with-python2 python-exif-read))
1872
1873 (define-public python-pyld
1874 (package
1875 (name "python-pyld")
1876 (version "1.0.3")
1877 (source (origin
1878 (method url-fetch)
1879 (uri (pypi-uri "PyLD" version))
1880 (sha256
1881 (base32
1882 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1883 (build-system python-build-system)
1884 (home-page "https://github.com/digitalbazaar/pyld")
1885 (synopsis "Python implementation of the JSON-LD specification")
1886 (description
1887 "PyLD is an implementation of the JSON-LD specification.")
1888 (license license:bsd-3)))
1889
1890 (define-public python2-pyld
1891 (package-with-python2 python-pyld))
1892
1893 (define-public python-click
1894 (package
1895 (name "python-click")
1896 (version "6.7")
1897 (source
1898 (origin
1899 (method url-fetch)
1900 (uri (pypi-uri "click" version))
1901 (sha256
1902 (base32
1903 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
1904 (build-system python-build-system)
1905 (arguments
1906 `(;; The tests are fragile, depending on a specific version of pytest:
1907 ;; <https://github.com/pallets/click/issues/823>
1908 #:tests? #f
1909 #:phases
1910 (modify-phases %standard-phases
1911 (add-after 'unpack 'fix-paths
1912 (lambda* (#:key inputs #:allow-other-keys)
1913 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1914 "cross-libc" "libc"))))
1915 (substitute* "click/_unicodefun.py"
1916 (("'locale'")
1917 (string-append "'" glibc "/bin/locale'"))))
1918 #t)))))
1919 (native-inputs
1920 `(("python-pytest" ,python-pytest)))
1921 (home-page "http://click.pocoo.org")
1922 (synopsis "Command line library for Python")
1923 (description
1924 "Click is a Python package for creating command line interfaces in a
1925 composable way with as little code as necessary. Its name stands for
1926 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1927 with sensible defaults out of the box.")
1928 (license license:bsd-3)))
1929
1930 (define-public python2-click
1931 (package-with-python2 python-click))
1932
1933 (define-public python-wheel
1934 (package
1935 (name "python-wheel")
1936 (version "0.30.0a0")
1937 (source
1938 (origin
1939 (method url-fetch)
1940 (uri (pypi-uri "wheel" version))
1941 (sha256
1942 (base32
1943 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
1944 (build-system python-build-system)
1945 (native-inputs
1946 `(("python-jsonschema" ,python-jsonschema)
1947 ("python-pytest-cov" ,python-pytest-cov)))
1948 (home-page "https://bitbucket.org/pypa/wheel/")
1949 (synopsis "Format for built Python packages")
1950 (description
1951 "A wheel is a ZIP-format archive with a specially formatted filename and
1952 the @code{.whl} extension. It is designed to contain all the files for a PEP
1953 376 compatible install in a way that is very close to the on-disk format. Many
1954 packages will be properly installed with only the @code{Unpack} step and the
1955 unpacked archive preserves enough information to @code{Spread} (copy data and
1956 scripts to their final locations) at any later time. Wheel files can be
1957 installed with a newer @code{pip} or with wheel's own command line utility.")
1958 (license license:expat)
1959 (properties `((python2-variant . ,(delay python2-wheel))))))
1960
1961 (define-public python2-wheel
1962 (let ((wheel (package-with-python2
1963 (strip-python2-variant python-wheel))))
1964 (package (inherit wheel)
1965 (native-inputs `(("python2-functools32" ,python2-functools32)
1966 ,@(package-native-inputs wheel))))))
1967
1968 (define-public python-vcversioner
1969 (package
1970 (name "python-vcversioner")
1971 (version "2.16.0.0")
1972 (source
1973 (origin
1974 (method url-fetch)
1975 (uri (pypi-uri "vcversioner" version))
1976 (sha256
1977 (base32
1978 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1979 (build-system python-build-system)
1980 (synopsis "Python library for version number discovery")
1981 (description "Vcversioner is a Python library that inspects tagging
1982 information in a variety of version control systems in order to discover
1983 version numbers.")
1984 (home-page "https://github.com/habnabit/vcversioner")
1985 (license license:isc)))
1986
1987 (define-public python2-vcversioner
1988 (package-with-python2 python-vcversioner))
1989
1990 (define-public python-jsonschema
1991 (package
1992 (name "python-jsonschema")
1993 (version "2.6.0")
1994 (source (origin
1995 (method url-fetch)
1996 (uri
1997 (string-append
1998 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
1999 version ".tar.gz"))
2000 (sha256
2001 (base32
2002 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2003 (build-system python-build-system)
2004 (arguments
2005 '(#:phases
2006 (modify-phases %standard-phases
2007 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
2008 (native-inputs
2009 `(("python-nose" ,python-nose)
2010 ("python-vcversioner" ,python-vcversioner)))
2011 (home-page "https://github.com/Julian/jsonschema")
2012 (synopsis "Implementation of JSON Schema for Python")
2013 (description
2014 "Jsonschema is an implementation of JSON Schema for Python.")
2015 (license license:expat)
2016 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2017
2018 (define-public python2-jsonschema
2019 (let ((jsonschema (package-with-python2
2020 (strip-python2-variant python-jsonschema))))
2021 (package (inherit jsonschema)
2022 (native-inputs
2023 `(("python2-mock" ,python2-mock)
2024 ,@(package-native-inputs jsonschema)))
2025 (propagated-inputs
2026 `(("python2-functools32" ,python2-functools32))))))
2027
2028 (define-public python-schema
2029 (package
2030 (name "python-schema")
2031 (version "0.6.6")
2032 (source
2033 (origin
2034 (method url-fetch)
2035 (uri (pypi-uri "schema" version))
2036 (sha256
2037 (base32
2038 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2039 (build-system python-build-system)
2040 (native-inputs
2041 `(("python-pytest" ,python-pytest)))
2042 (home-page "https://github.com/keleshev/schema")
2043 (synopsis "Simple data validation library")
2044 (description
2045 "@code{python-schema} is a library for validating Python data
2046 structures, such as those obtained from config-files, forms, external
2047 services or command-line parsing, converted from JSON/YAML (or
2048 something else) to Python data-types.")
2049 (license license:psfl)))
2050
2051 (define-public python2-schema
2052 (package-with-python2 python-schema))
2053
2054 (define-public python-schema-0.5
2055 (package (inherit python-schema)
2056 (version "0.5.0")
2057 (source
2058 (origin
2059 (method url-fetch)
2060 (uri (pypi-uri "schema" version))
2061 (sha256
2062 (base32
2063 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2064
2065 (define-public python2-schema-0.5
2066 (package-with-python2 python-schema-0.5))
2067
2068 (define-public python-kitchen
2069 (package
2070 (name "python-kitchen")
2071 (version "1.2.5")
2072 (source
2073 (origin
2074 (method url-fetch)
2075 (uri (pypi-uri "kitchen" version))
2076 (sha256
2077 (base32
2078 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2079 (build-system python-build-system)
2080 (propagated-inputs
2081 `(("python-chardet" ,python-chardet)))
2082 (home-page "https://github.com/fedora-infra/kitchen")
2083 (synopsis "Python API for snippets")
2084 (description "@code{kitchen} module provides a python API for all sorts of
2085 little useful snippets of code that everybody ends up writing for their projects
2086 but never seem big enough to build an independent release. Use kitchen and stop
2087 cutting and pasting that code over and over.")
2088 (license (list license:lgpl2.1+
2089 ;; subprocess.py, test_subprocess.py,
2090 ;; kitchen/pycompat25/defaultdict.py:
2091 license:psfl))))
2092
2093 (define-public python2-kitchen
2094 (package-with-python2 python-kitchen))
2095
2096 (define-public python-unidecode
2097 (package
2098 (name "python-unidecode")
2099 (version "0.04.21")
2100 (source (origin
2101 (method url-fetch)
2102 (uri (pypi-uri "Unidecode" version))
2103 (sha256
2104 (base32
2105 "0lfhp9c5xrbpjvbpr12ji52g1lx04404bzzdg6pvabhzisw6l2i8"))))
2106 (build-system python-build-system)
2107 (home-page "https://pypi.python.org/pypi/Unidecode")
2108 (synopsis "ASCII transliterations of Unicode text")
2109 (description
2110 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2111 useful when integrating with legacy code that doesn't support Unicode, or for
2112 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2113 machine identifiers from human-readable Unicode strings that should still be
2114 somewhat intelligible.")
2115 (license license:gpl2+)))
2116
2117 (define-public python2-unidecode
2118 (package-with-python2 python-unidecode))
2119
2120 (define-public python-pyjwt
2121 (package
2122 (name "python-pyjwt")
2123 (version "1.5.3")
2124 (source
2125 (origin
2126 (method url-fetch)
2127 (uri (pypi-uri "PyJWT" version))
2128 (sha256
2129 (base32
2130 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2131 (modules '((guix build utils)))
2132 (snippet
2133 '(begin
2134 (for-each delete-file-recursively
2135 (find-files "." "\\.pyc$"))
2136 #t))))
2137 (build-system python-build-system)
2138 (native-inputs
2139 `(("python-pytest" ,python-pytest)
2140 ("python-pytest-cov" ,python-pytest-cov)
2141 ("python-pytest-runner" ,python-pytest-runner)))
2142 (home-page "https://github.com/progrium/pyjwt")
2143 (synopsis "JSON Web Token implementation in Python")
2144 (description
2145 "PyJWT is a JSON Web Token implementation written in Python.")
2146 (license license:expat)))
2147
2148 (define-public python2-pyjwt
2149 (package-with-python2 python-pyjwt))
2150
2151 (define-public python-pykka
2152 (package
2153 (name "python-pykka")
2154 (version "1.2.1")
2155 (source
2156 (origin
2157 (method url-fetch)
2158 (uri (pypi-uri "Pykka" version))
2159 (sha256
2160 (base32
2161 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2162 (build-system python-build-system)
2163 (native-inputs
2164 `(("python-mock" ,python-mock)
2165 ("python-nose" ,python-nose)
2166 ("python-gevent" ,python-gevent)
2167 ("python-eventlet" ,python-eventlet)))
2168 (home-page "https://www.pykka.org/")
2169 (synopsis "Pykka is a Python implementation of the actor model")
2170 (description
2171 "Pykka is a Python implementation of the actor model.
2172 The actor model introduces some simple rules to control the sharing
2173 of state and cooperation between execution units, which makes it
2174 easier to build concurrent applications.")
2175 (license license:asl2.0)))
2176
2177 (define-public python2-pykka
2178 (package-with-python2 python-pykka))
2179
2180 (define-public python-itsdangerous
2181 (package
2182 (name "python-itsdangerous")
2183 (version "0.24")
2184 (source
2185 (origin
2186 (method url-fetch)
2187 (uri (string-append
2188 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2189 version ".tar.gz"))
2190 (sha256
2191 (base32
2192 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2193 (build-system python-build-system)
2194 (home-page "https://github.com/mitsuhiko/itsdangerous")
2195 (synopsis "Python library for passing data to/from untrusted environments")
2196 (description
2197 "Itsdangerous provides various helpers to pass trusted data to untrusted
2198 environments and back.")
2199 (license license:bsd-3)))
2200
2201 (define-public python2-itsdangerous
2202 (package-with-python2 python-itsdangerous))
2203
2204 (define-public python-pyyaml
2205 (package
2206 (name "python-pyyaml")
2207 (version "3.12")
2208 (source
2209 (origin
2210 (method url-fetch)
2211 (uri (pypi-uri "PyYAML" version))
2212 (sha256
2213 (base32
2214 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
2215 (build-system python-build-system)
2216 (inputs
2217 `(("libyaml" ,libyaml)))
2218 (home-page "http://pyyaml.org/wiki/PyYAML")
2219 (synopsis "YAML parser and emitter for Python")
2220 (description
2221 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2222 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2223 API, and sensible error messages. PyYAML supports standard YAML tags and
2224 provides Python-specific tags that allow to represent an arbitrary Python
2225 object.")
2226 (license license:expat)))
2227
2228 (define-public python2-pyyaml
2229 (package-with-python2 python-pyyaml))
2230
2231 (define-public python-virtualenv
2232 (package
2233 (name "python-virtualenv")
2234 (version "15.0.3")
2235 (source
2236 (origin
2237 (method url-fetch)
2238 (uri (pypi-uri "virtualenv" version))
2239 (sha256
2240 (base32
2241 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
2242 (build-system python-build-system)
2243 (arguments
2244 `(#:phases
2245 (modify-phases %standard-phases
2246 (replace 'check
2247 (lambda _
2248 ;; Disable failing test. See upstream bug report
2249 ;; https://github.com/pypa/virtualenv/issues/957
2250 (substitute* "tests/test_virtualenv.py"
2251 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2252 (zero? (system* "py.test")))))))
2253 (native-inputs
2254 `(("python-mock" ,python-mock)
2255 ("python-pytest" ,python-pytest)))
2256 (home-page "https://virtualenv.pypa.io/")
2257 (synopsis "Virtual Python environment builder")
2258 (description
2259 "Virtualenv is a tool to create isolated Python environments.")
2260 (license license:expat)))
2261
2262 (define-public python2-virtualenv
2263 (package-with-python2 python-virtualenv))
2264
2265 (define-public python-markupsafe
2266 (package
2267 (name "python-markupsafe")
2268 (version "0.23")
2269 (source
2270 (origin
2271 (method url-fetch)
2272 (uri (string-append
2273 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2274 version ".tar.gz"))
2275 (sha256
2276 (base32
2277 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2278 (build-system python-build-system)
2279 (home-page "https://github.com/mitsuhiko/markupsafe")
2280 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2281 (description
2282 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2283 for Python.")
2284 (license license:bsd-3)))
2285
2286 (define-public python2-markupsafe
2287 (package-with-python2 python-markupsafe))
2288
2289 (define-public python-jinja2
2290 (package
2291 (name "python-jinja2")
2292 (version "2.9.6")
2293 (source
2294 (origin
2295 (method url-fetch)
2296 (uri (pypi-uri "Jinja2" version))
2297 (sha256
2298 (base32
2299 "1zzrkywhziqffrzks14kzixz7nd4yh2vc0fb04a68vfd2ai03anx"))))
2300 (build-system python-build-system)
2301 (propagated-inputs
2302 `(("python-markupsafe" ,python-markupsafe)))
2303 (home-page "http://jinja.pocoo.org/")
2304 (synopsis "Python template engine")
2305 (description
2306 "Jinja2 is a small but fast and easy to use stand-alone template engine
2307 written in pure Python.")
2308 (license license:bsd-3)))
2309
2310 (define-public python2-jinja2
2311 (package-with-python2 python-jinja2))
2312
2313 (define-public python-pystache
2314 (package
2315 (name "python-pystache")
2316 (version "0.5.4")
2317 (source (origin
2318 (method url-fetch)
2319 (uri (pypi-uri "pystache" version))
2320 (sha256
2321 (base32
2322 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2323 (build-system python-build-system)
2324 (arguments
2325 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2326 (home-page "http://defunkt.io/pystache/")
2327 (synopsis "Python logic-less template engine")
2328 (description
2329 "Pystache is a Python implementation of the framework agnostic,
2330 logic-free templating system Mustache.")
2331 (license license:expat)
2332 (properties `((python2-variant . ,(delay python2-pystache))))))
2333
2334 (define-public python2-pystache
2335 (package (inherit (package-with-python2
2336 (strip-python2-variant python-pystache)))
2337 (arguments
2338 `(#:python ,python-2
2339 #:phases
2340 (modify-phases %standard-phases
2341 (replace 'check
2342 (lambda _
2343 (zero? (system* "python" "test_pystache.py")))))))))
2344
2345 (define-public python-joblib
2346 (package
2347 (name "python-joblib")
2348 (version "0.10.3")
2349 (source (origin
2350 (method url-fetch)
2351 (uri (pypi-uri "joblib" version))
2352 (sha256
2353 (base32
2354 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2355 (modules '((guix build utils)))
2356 (snippet
2357 '(begin
2358 ;; Remove pre-compiled .pyc files from source.
2359 (for-each delete-file-recursively
2360 (find-files "." "__pycache__" #:directories? #t))
2361 (for-each delete-file (find-files "." "\\.pyc$"))
2362 #t))))
2363 (build-system python-build-system)
2364 (arguments
2365 `(#:phases
2366 (modify-phases %standard-phases
2367 (add-before 'check 'disable-failing-tests
2368 (lambda _
2369 ;; This numpydoc tests fails for unknown reasons
2370 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2371 ;; This numpydoc test depends on matplotlib, which is not a
2372 ;; required input.
2373 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2374 ;; These tests fail to execute sys.executable
2375 (substitute* "joblib/test/test_parallel.py"
2376 (("import nose" line)
2377 (string-append "from nose.plugins.skip import SkipTest\n" line))
2378 (("def test_nested_parallel_warnings" line)
2379 (string-append "@SkipTest\n" line))
2380 (("def test_parallel_with_interactively_defined_functions" line)
2381 (string-append "@SkipTest\n" line)))
2382 #t)))))
2383 ;; Provide nose to enable tests command
2384 (native-inputs
2385 `(("python-nose" ,python-nose)
2386 ("python-sphinx" ,python-sphinx)
2387 ("python-docutils" ,python-docutils)
2388 ("python-numpydoc" ,python-numpydoc)))
2389 (home-page "http://pythonhosted.org/joblib/")
2390 (synopsis "Using Python functions as pipeline jobs")
2391 (description
2392 "Joblib is a set of tools to provide lightweight pipelining in Python.
2393 In particular, joblib offers: transparent disk-caching of the output values
2394 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2395 logging and tracing of the execution.")
2396 (license license:bsd-3)))
2397
2398 (define-public python2-joblib
2399 (package-with-python2 python-joblib))
2400
2401 (define-public python-docutils
2402 (package
2403 (name "python-docutils")
2404 (version "0.14")
2405 (source
2406 (origin
2407 (method url-fetch)
2408 (uri (pypi-uri "docutils" version))
2409 (sha256
2410 (base32
2411 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2412 (build-system python-build-system)
2413 (arguments
2414 '(#:tests? #f)) ; no setup.py test command
2415 (home-page "http://docutils.sourceforge.net/")
2416 (synopsis "Python Documentation Utilities")
2417 (description
2418 "Docutils is a modular system for processing documentation into useful
2419 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2420 reStructuredText.")
2421 ;; Most of the source code is public domain, but some source files are
2422 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2423 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2424
2425 (define-public python2-docutils
2426 (package-with-python2 python-docutils))
2427
2428 (define-public python-pygments
2429 (package
2430 (name "python-pygments")
2431 (version "2.2.0")
2432 (source
2433 (origin
2434 (method url-fetch)
2435 (uri (pypi-uri "Pygments" version))
2436 (sha256
2437 (base32
2438 "1k78qdvir1yb1c634nkv6rbga8wv4289xarghmsbbvzhvr311bnv"))))
2439 (build-system python-build-system)
2440 (arguments
2441 ;; FIXME: Tests require sphinx, which depends on this.
2442 '(#:tests? #f))
2443 (home-page "http://pygments.org/")
2444 (synopsis "Syntax highlighting")
2445 (description
2446 "Pygments is a syntax highlighting package written in Python.")
2447 (license license:bsd-2)))
2448
2449 (define-public python2-pygments
2450 (package-with-python2 python-pygments))
2451
2452 (define-public python-sphinxcontrib-websupport
2453 (package
2454 (name "python-sphinxcontrib-websupport")
2455 (version "1.0.1")
2456 (source (origin
2457 (method url-fetch)
2458 (uri (pypi-uri "sphinxcontrib-websupport" version))
2459 (sha256
2460 (base32
2461 "1f9f0wjpi9nhikbyaz6d19s7qvzdf1nq2g5dsh640fma4q9rd1bs"))))
2462 (build-system python-build-system)
2463 (propagated-inputs
2464 `(("python-mock" ,python-mock)
2465 ("python-pytest" ,python-pytest)
2466 ("python-xapian-bindings" ,python-xapian-bindings)))
2467 ;; Needed for running the test suite
2468 (native-inputs
2469 `(("python-six" ,python-six)
2470 ("python-jinja2" ,python-jinja2)
2471 ("python-docutils" ,python-docutils)
2472 ("python-sphinx" ,python-sphinx)
2473 ("python-sqlalchemy" ,python-sqlalchemy)
2474 ("python-whoosh" ,python-whoosh)))
2475 (home-page "http://sphinx-doc.org/")
2476 (synopsis "Sphinx API for web applications")
2477 (description "This package provides a Python API to easily integrate
2478 Sphinx documentation into your web application. It provides tools to
2479 integrate Sphinx documents in web templates and to handle searches.")
2480 (license license:bsd-3)))
2481
2482 (define-public python-sphinx
2483 (package
2484 (name "python-sphinx")
2485 (version "1.5.1")
2486 (source
2487 (origin
2488 (method url-fetch)
2489 (uri (pypi-uri "Sphinx" version))
2490 (sha256
2491 (base32
2492 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
2493 (build-system python-build-system)
2494 (arguments
2495 `(#:phases
2496 (modify-phases %standard-phases
2497 (replace 'check
2498 (lambda _
2499 ;; Requires Internet access.
2500 (delete-file "tests/test_build_linkcheck.py")
2501 (zero? (system* "make" "test")))))))
2502 (propagated-inputs
2503 `(("python-imagesize" ,python-imagesize)
2504 ("python-sphinx-alabaster-theme"
2505 ,python-sphinx-alabaster-theme)
2506 ("python-babel" ,python-babel)
2507 ("python-snowballstemmer" ,python-snowballstemmer)
2508 ("python-docutils" ,python-docutils)
2509 ("python-jinja2" ,python-jinja2)
2510 ("python-pygments" ,python-pygments)
2511 ("python-requests" ,python-requests)
2512 ("python-six" ,python-six)))
2513 (native-inputs
2514 `(("graphviz" ,graphviz)
2515 ("python-html5lib" ,python-html5lib)
2516 ("python-mock" ,python-mock)
2517 ("python-nose" ,python-nose)))
2518 (home-page "http://sphinx-doc.org/")
2519 (synopsis "Python documentation generator")
2520 (description "Sphinx is a tool that makes it easy to create documentation
2521 for Python projects or other documents consisting of multiple reStructuredText
2522 sources.")
2523 (license license:bsd-3)
2524 (properties `((python2-variant . ,(delay python2-sphinx))))))
2525
2526 (define-public python-sphinx-1.6
2527 (package (inherit python-sphinx)
2528 (name "python-sphinx")
2529 (version "1.6.4")
2530 (source (origin
2531 (method url-fetch)
2532 (uri (pypi-uri "Sphinx" version))
2533 (sha256
2534 (base32
2535 "0gjakw9fv5pwqb5yyclxycs36sapxizk1vx6mkcdizmzgzcfy0gi"))))
2536 (arguments
2537 `(#:phases
2538 (modify-phases %standard-phases
2539 (replace 'check
2540 (lambda _
2541 ;; Requires Internet access.
2542 (delete-file "tests/test_build_linkcheck.py")
2543 (substitute* "tests/test_build_latex.py"
2544 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
2545 "@pytest.mark.skip()"))
2546 (zero? (system* "make" "test")))))))
2547 (propagated-inputs
2548 `(("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)
2549 ,@(package-propagated-inputs python-sphinx)))
2550 (native-inputs
2551 `(("python-pytest" ,python-pytest)
2552 ("imagemagick" ,imagemagick) ; for "convert"
2553 ,@(package-native-inputs python-sphinx)))
2554 (properties `((python2-variant . ,(delay python2-sphinx-1.6))))))
2555
2556 (define-public python2-sphinx-1.6
2557 (let ((base (package-with-python2 (strip-python2-variant python-sphinx-1.6))))
2558 (package
2559 (inherit base)
2560 (propagated-inputs
2561 `(("python2-typing" ,python2-typing)
2562 ,@(package-propagated-inputs base)))
2563 (native-inputs `(("python2-enum34" ,python2-enum34)
2564 ,@(package-native-inputs base))))))
2565
2566 (define-public python-sphinx-1.5.3
2567 (package
2568 (inherit python-sphinx)
2569 (name "python-sphinx")
2570 (version "1.5.3")
2571 (source
2572 (origin
2573 (method url-fetch)
2574 (uri (pypi-uri "Sphinx" version))
2575 (sha256
2576 (base32
2577 "0kw1axswbvaavr8ggyf4qr6hnisnrzlbkkcdada69vk1x9xjassg"))))
2578 (native-inputs
2579 `(("python-pytest" ,python-pytest)
2580 ,@(package-native-inputs python-sphinx)))))
2581
2582 (define-public python2-sphinx
2583 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
2584 (package
2585 (inherit base)
2586 (native-inputs `(("python2-mock" ,python2-mock)
2587 ("python2-enum34" ,python2-enum34)
2588 ,@(package-native-inputs base)))
2589 (propagated-inputs `(("python2-pytz" ,python2-pytz)
2590 ,@(package-propagated-inputs base))))))
2591
2592 (define-public python-sphinx-gallery
2593 (package
2594 (name "python-sphinx-gallery")
2595 (version "0.1.13")
2596 (source (origin
2597 (method url-fetch)
2598 (uri (string-append "https://github.com/sphinx-gallery/sphinx-gallery"
2599 "/archive/v" version ".tar.gz"))
2600 (file-name (string-append name "-" version ".tar.gz"))
2601 (sha256
2602 (base32
2603 "03fs99mcb1r7qp0xixqv07vcz98sk21yq19ffdysi0infdcpzfkd"))))
2604 (build-system python-build-system)
2605 (arguments
2606 ;; FIXME: Tests attempt to download <https://docs.python.org/3/objects.inv>,
2607 ;; <https://docs.scipy.org/doc/numpy/objects.inv>, and
2608 ;; <https://matplotlib.org/objects.inv>.
2609 `(#:tests? #f))
2610 (native-inputs
2611 `(("python-pytest-runner" ,python-pytest-runner)))
2612 (home-page "https://sphinx-gallery.github.io/")
2613 (synopsis "Generate an examples gallery automatically")
2614 (description
2615 "@code{sphinx_gallery} is a Sphinx extension that builds an HTML version
2616 from any set of Python scripts and puts it into an examples gallery.")
2617 (license license:bsd-3)))
2618
2619 (define-public python2-sphinx-gallery
2620 (package-with-python2 python-sphinx-gallery))
2621
2622 (define-public python-sphinx-rtd-theme
2623 (package
2624 (name "python-sphinx-rtd-theme")
2625 (version "0.2.4")
2626 (source
2627 (origin
2628 (method url-fetch)
2629 (uri (pypi-uri "sphinx_rtd_theme" version))
2630 (sha256
2631 (base32
2632 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
2633 (build-system python-build-system)
2634 (arguments '(#:tests? #f)) ; No tests.
2635 (propagated-inputs
2636 `(("python-sphinx" ,python-sphinx)))
2637 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2638 (synopsis "ReadTheDocs.org theme for Sphinx")
2639 (description "A theme for Sphinx used by ReadTheDocs.org.")
2640 (license license:expat)))
2641
2642 (define-public python2-sphinx-rtd-theme
2643 (package-with-python2 python-sphinx-rtd-theme))
2644
2645 (define-public python-guzzle-sphinx-theme
2646 (package
2647 (name "python-guzzle-sphinx-theme")
2648 (version "0.7.11")
2649 (source
2650 (origin
2651 (method url-fetch)
2652 (uri (pypi-uri "guzzle_sphinx_theme" version))
2653 (sha256
2654 (base32
2655 "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
2656 (build-system python-build-system)
2657 (propagated-inputs
2658 `(("python-sphinx" ,python-sphinx)))
2659 (home-page "https://github.com/guzzle/guzzle_sphinx_theme")
2660 (synopsis "Sphinx theme used by Guzzle")
2661 (description "This package provides guzzle_sphinx_theme, a theme for the
2662 Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
2663 and several other projects.")
2664 (license license:expat)))
2665
2666 (define-public python2-guzzle-sphinx-theme
2667 (package-with-python2 python-guzzle-sphinx-theme))
2668
2669 (define-public python-rst.linker
2670 (package
2671 (name "python-rst.linker")
2672 (version "1.9")
2673 (source
2674 (origin
2675 (method url-fetch)
2676 (uri (pypi-uri "rst.linker" version))
2677 (sha256
2678 (base32
2679 "16crgnai6020vdmnpwdimw1vm3jb74ysfyb3kmcidb0lgma5xq2d"))))
2680 (build-system python-build-system)
2681 (propagated-inputs
2682 `(("python-dateutil" ,python-dateutil)
2683 ("python-six" ,python-six)))
2684 (native-inputs
2685 `(("python-setuptools-scm" ,python-setuptools-scm)))
2686 ;; Test would require path.py, which would introduce a cyclic dependence.
2687 (arguments `(#:tests? #f))
2688 ;; Note: As of version 1.7 the documentation is not worth building.
2689 (home-page "https://github.com/jaraco/rst.linker")
2690 (synopsis "Sphinx plugin to add links and timestamps")
2691 (description "rst.linker allows to automatically replace text by a
2692 reStructuredText external reference or timestamps. It's primary purpose is to
2693 augment the changelog, but it can be used for other documents, too.")
2694 (license license:expat)))
2695
2696 (define-public python2-rst.linker
2697 (package-with-python2 python-rst.linker))
2698
2699 (define-public python-feedgenerator
2700 (package
2701 (name "python-feedgenerator")
2702 (version "1.9")
2703 (source
2704 (origin
2705 (method url-fetch)
2706 (uri (pypi-uri "feedgenerator" version))
2707 (sha256
2708 (base32
2709 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2710 (modules '((guix build utils)))
2711 (snippet
2712 '(begin
2713 ;; Remove pre-compiled .pyc files from source.
2714 (for-each delete-file-recursively
2715 (find-files "." "__pycache__" #:directories? #t))
2716 (for-each delete-file (find-files "." "\\.pyc$"))
2717 #t))))
2718 (build-system python-build-system)
2719 (propagated-inputs
2720 `(("python-pytz" ,python-pytz)
2721 ("python-six" ,python-six)))
2722 (home-page "https://github.com/getpelican/feedgenerator")
2723 (synopsis
2724 "Standalone version of Django's Atom/RSS feed generator")
2725 (description
2726 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2727 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2728 (license license:bsd-3)))
2729
2730 (define-public python2-feedgenerator
2731 (package-with-python2 python-feedgenerator))
2732
2733 (define-public python-blinker
2734 (package
2735 (name "python-blinker")
2736 (version "1.4")
2737 (source
2738 (origin
2739 (method url-fetch)
2740 (uri (pypi-uri "blinker" version))
2741 (sha256
2742 (base32
2743 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2744 (build-system python-build-system)
2745 (home-page "http://pythonhosted.org/blinker/")
2746 (synopsis "Fast, simple object-to-object and broadcast signaling")
2747 (description
2748 "Blinker provides a fast dispatching system that allows any number of
2749 interested parties to subscribe to events, or \"signals\".")
2750 (license license:expat)))
2751
2752 (define-public python2-blinker
2753 (package-with-python2 python-blinker))
2754
2755 (define-public pelican
2756 (package
2757 (name "pelican")
2758 (version "3.6.3")
2759 (source
2760 (origin
2761 (method url-fetch)
2762 (uri (pypi-uri "pelican" version))
2763 (sha256
2764 (base32
2765 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
2766 (build-system python-build-system)
2767 (propagated-inputs
2768 `(("python-feedgenerator" ,python-feedgenerator)
2769 ("python-jinja2" ,python-jinja2)
2770 ("python-pygments" ,python-pygments)
2771 ("python-docutils" ,python-docutils)
2772 ("python-pytz" ,python-pytz)
2773 ("python-blinker" ,python-blinker)
2774 ("python-unidecode" ,python-unidecode)
2775 ("python-six" ,python-six)
2776 ("python-dateutil" ,python-dateutil)
2777 ("python-markdown" ,python-markdown)))
2778 (home-page "http://getpelican.com/")
2779 (arguments
2780 `(;; XXX Requires a lot more packages to do unit tests :P
2781 #:tests? #f
2782 #:phases (modify-phases %standard-phases
2783 (add-before
2784 'install 'adjust-requires
2785 ;; Since feedgenerator is installed from git, it doesn't
2786 ;; conform to the version requirements.
2787 ;;
2788 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2789 ;; version requirement so setuptools doesn't get confused.
2790 (lambda _
2791 (substitute* "setup.py"
2792 (("['\"]feedgenerator.*?['\"]")
2793 "'feedgenerator'")))))))
2794 (synopsis "Python-based static site publishing system")
2795 (description
2796 "Pelican is a tool to generate a static blog from reStructuredText,
2797 Markdown input files, and more. Pelican uses Jinja2 for templating
2798 and is very extensible.")
2799 (license license:agpl3+)))
2800
2801 (define-public python-scikit-image
2802 (package
2803 (name "python-scikit-image")
2804 (version "0.11.3")
2805 (source
2806 (origin
2807 (method url-fetch)
2808 (uri (string-append
2809 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
2810 version ".tar.gz"))
2811 (sha256
2812 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
2813 (build-system python-build-system)
2814 (arguments
2815 ;; TODO: Some tests require running X11 server. Disable them?
2816 '(#:tests? #f))
2817 ;; See DEPENDS.txt for the list of build and run time requiremnts
2818 (propagated-inputs
2819 `(("python-matplotlib" ,python-matplotlib)
2820 ("python-networkx" ,python-networkx)
2821 ("python-scipy" ,python-scipy)
2822 ("python-pillow" ,python-pillow)))
2823 (native-inputs
2824 `(("python-numpy" ,python-numpy)
2825 ("python-cython" ,python-cython)
2826 ("python-six" ,python-six)))
2827 (home-page "http://scikit-image.org/")
2828 (synopsis "Image processing in Python")
2829 (description
2830 "Scikit-image is a collection of algorithms for image processing.")
2831 (license license:bsd-3)))
2832
2833 (define-public python2-scikit-image
2834 (package-with-python2 python-scikit-image))
2835
2836 (define-public python-cython
2837 (package
2838 (name "python-cython")
2839 (version "0.27")
2840 (source
2841 (origin
2842 (method url-fetch)
2843 (uri (pypi-uri "Cython" version))
2844 (sha256
2845 (base32
2846 "02y0pp1nx77b8s1mpxc6da2dccl6wd31pp4ksi9via479qcvacmr"))))
2847 (build-system python-build-system)
2848 ;; we need the full python package and not just the python-wrapper
2849 ;; because we need libpython3.3m.so
2850 (inputs
2851 `(("python" ,python)))
2852 (arguments
2853 `(#:phases
2854 (modify-phases %standard-phases
2855 (add-before 'check 'set-HOME
2856 ;; some tests require access to "$HOME/.cython"
2857 (lambda _ (setenv "HOME" "/tmp") #t))
2858 (replace 'check
2859 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
2860 (home-page "http://cython.org/")
2861 (synopsis "C extensions for Python")
2862 (description "Cython is an optimising static compiler for both the Python
2863 programming language and the extended Cython programming language. It makes
2864 writing C extensions for Python as easy as Python itself.")
2865 (license license:asl2.0)
2866 (properties `((python2-variant . ,(delay python2-cython))))))
2867
2868 (define-public python2-cython
2869 (package (inherit (package-with-python2
2870 (strip-python2-variant python-cython)))
2871 (name "python2-cython")
2872 (inputs
2873 `(("python-2" ,python-2))))) ; this is not automatically changed
2874
2875 ;; The RPython toolchain currently does not support Python 3.
2876 (define-public python2-rpython
2877 (package
2878 (name "python2-rpython")
2879 (version "0.2.1")
2880 (source
2881 (origin
2882 (method url-fetch)
2883 (uri (pypi-uri "rpython" version))
2884 (sha256
2885 (base32
2886 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
2887 (build-system python-build-system)
2888 (arguments `(#:python ,python-2))
2889 (native-inputs
2890 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
2891 (home-page "https://rpython.readthedocs.org")
2892 (synopsis "Framework for implementing interpreters and virtual machines")
2893 (description "RPython is a translation and support framework for
2894 producing implementations of dynamic languages, emphasizing a clean separation
2895 between language specification and implementation aspects.")
2896 (license license:expat)))
2897
2898 ;; NOTE: when upgrading numpy please make sure that python-pandas and
2899 ;; python-scipy still build, as these three packages are often used together.
2900 (define-public python-numpy
2901 (package
2902 (name "python-numpy")
2903 (version "1.14.3")
2904 (source
2905 (origin
2906 (method url-fetch)
2907 (uri (string-append
2908 "https://github.com/numpy/numpy/releases/download/v"
2909 version "/numpy-" version ".tar.gz"))
2910 (sha256
2911 (base32
2912 "1yim2bxlycn4dhxmfxid6slplpmcb4ynhp411b37ahmsm2lwgkyg"))))
2913 (build-system python-build-system)
2914 (inputs
2915 `(("openblas" ,openblas)
2916 ("lapack" ,lapack)))
2917 (native-inputs
2918 `(("python-cython" ,python-cython)
2919 ("python-nose" ,python-nose)
2920 ("gfortran" ,gfortran)))
2921 (arguments
2922 `(#:phases
2923 (modify-phases %standard-phases
2924 (add-before 'build 'configure-blas-lapack
2925 (lambda* (#:key inputs #:allow-other-keys)
2926 (call-with-output-file "site.cfg"
2927 (lambda (port)
2928 (format port
2929 "[openblas]
2930 libraries = openblas
2931 library_dirs = ~a/lib
2932 include_dirs = ~a/include
2933
2934 # backslash-n to make emacs happy
2935 \n[lapack]
2936 lapack_libs = lapack
2937 library_dirs = ~a/lib
2938 include_dirs = ~a/include
2939 "
2940 (assoc-ref inputs "openblas")
2941 (assoc-ref inputs "openblas")
2942 (assoc-ref inputs "lapack")
2943 (assoc-ref inputs "lapack"))))
2944 #t))
2945 (add-before 'build 'fix-executable-paths
2946 (lambda* (#:key inputs #:allow-other-keys)
2947 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
2948 ;; instead of /bin/sh.
2949 (substitute* "numpy/distutils/exec_command.py"
2950 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
2951 (string-append match-start (assoc-ref inputs "bash") match-end)))
2952 ;; Use "gcc" executable, not "cc".
2953 (substitute* "numpy/distutils/system_info.py"
2954 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
2955 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2956 #t))
2957 ;; Tests can only be run after the library has been installed and not
2958 ;; within the source directory.
2959 (delete 'check)
2960 (add-after 'install 'check
2961 (lambda* (#:key outputs inputs #:allow-other-keys)
2962 ;; Make installed package available for running the tests
2963 (add-installed-pythonpath inputs outputs)
2964 (with-directory-excursion "/tmp"
2965 (zero? (system* "python" "-c"
2966 "import numpy; numpy.test(verbose=2)"))))))))
2967 (home-page "http://www.numpy.org/")
2968 (synopsis "Fundamental package for scientific computing with Python")
2969 (description "NumPy is the fundamental package for scientific computing
2970 with Python. It contains among other things: a powerful N-dimensional array
2971 object, sophisticated (broadcasting) functions, tools for integrating C/C++
2972 and Fortran code, useful linear algebra, Fourier transform, and random number
2973 capabilities.")
2974 (license license:bsd-3)))
2975
2976 (define-public python2-numpy
2977 (package-with-python2 python-numpy))
2978
2979 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
2980 ;; interest only for legacy code going back to NumPy's predecessor
2981 ;; Numeric.
2982 (define-public python2-numpy-1.8
2983 (package (inherit python2-numpy)
2984 (version "1.8.2")
2985 (source
2986 (origin
2987 (method url-fetch)
2988 (uri (string-append
2989 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
2990 (file-name (string-append "python2-numpy-" version ".tar.gz"))
2991 (sha256
2992 (base32
2993 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
2994 (arguments
2995 (substitute-keyword-arguments (package-arguments python2-numpy)
2996 ((#:phases phases)
2997 `(modify-phases ,phases
2998 (replace 'configure-blas-lapack
2999 (lambda* (#:key inputs #:allow-other-keys)
3000 (call-with-output-file "site.cfg"
3001 (lambda (port)
3002 (format port
3003 "[openblas]
3004 libraries = openblas,lapack
3005 library_dirs = ~a/lib:~a/lib
3006 include_dirs = ~a/include:~a/include
3007 "
3008 (assoc-ref inputs "openblas")
3009 (assoc-ref inputs "lapack")
3010 (assoc-ref inputs "openblas")
3011 (assoc-ref inputs "lapack"))))
3012 #t))))))
3013 (description "NumPy is the fundamental package for scientific computing
3014 with Python. It contains among other things: a powerful N-dimensional array
3015 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3016 and Fortran code, useful linear algebra, Fourier transform, and random number
3017 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3018 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3019 Numeric.")
3020 (license license:bsd-3)))
3021
3022 (define-public python-munch
3023 (package
3024 (name "python-munch")
3025 (version "2.0.4")
3026 (source
3027 (origin
3028 (method url-fetch)
3029 (uri (pypi-uri "munch" version))
3030 (sha256
3031 (base32
3032 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3033 (build-system python-build-system)
3034 (home-page "https://github.com/Infinidat/munch")
3035 (synopsis "Dot-accessible dictionary")
3036 (description "Munch is a dot-accessible dictionary similar to JavaScript
3037 objects.")
3038 (license license:expat)))
3039
3040 (define-public python2-munch
3041 (package-with-python2 python-munch))
3042
3043 (define-public python-colormath
3044 (package
3045 (name "python-colormath")
3046 (version "3.0.0")
3047 (source
3048 (origin
3049 (method url-fetch)
3050 (uri (pypi-uri "colormath" version))
3051 (sha256
3052 (base32
3053 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3054 (build-system python-build-system)
3055 (propagated-inputs
3056 `(("python-networkx" ,python-networkx)
3057 ("python-numpy" ,python-numpy)))
3058 (home-page "https://github.com/gtaylor/python-colormath")
3059 (synopsis "Color math and conversion library")
3060 (description
3061 "This is a Python library for color math and conversions.")
3062 (license license:bsd-3)))
3063
3064 (define-public python2-colormath
3065 (package-with-python2 python-colormath))
3066
3067 (define-public python-spectra
3068 (package
3069 (name "python-spectra")
3070 (version "0.0.11")
3071 (source
3072 (origin
3073 (method url-fetch)
3074 (uri (pypi-uri "spectra" version))
3075 (sha256
3076 (base32
3077 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3078 (build-system python-build-system)
3079 (arguments
3080 `(#:phases
3081 (modify-phases %standard-phases
3082 (replace 'check
3083 (lambda _
3084 (zero? (system* "nosetests" "-v")))))))
3085 (propagated-inputs
3086 `(("python-colormath" ,python-colormath)))
3087 (native-inputs
3088 `(("python-nose" ,python-nose)))
3089 (home-page "https://github.com/jsvine/spectra")
3090 (synopsis "Color scales and color conversion")
3091 (description
3092 "This package provides a Python library intended to make color math,
3093 color scales, and color space conversion easy. It has support for:
3094
3095 @enumerate
3096 @item Color scales
3097 @item Color ranges
3098 @item Color blending
3099 @item Brightening/darkening colors
3100 @item Saturating/desaturating colors
3101 @item Conversion to/from multiple color spaces.
3102 @end enumerate\n")
3103 (license license:expat)))
3104
3105 (define-public python2-spectra
3106 (package-with-python2 python-spectra))
3107
3108 (define-public python2-fastlmm
3109 (package
3110 (name "python2-fastlmm")
3111 (version "0.2.21")
3112 (source
3113 (origin
3114 (method url-fetch)
3115 (uri (pypi-uri "fastlmm" version ".zip"))
3116 (sha256
3117 (base32
3118 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3119 (build-system python-build-system)
3120 (arguments
3121 `(#:python ,python-2)) ; only Python 2.7 is supported
3122 (propagated-inputs
3123 `(("python2-numpy" ,python2-numpy)
3124 ("python2-scipy" ,python2-scipy)
3125 ("python2-matplotlib" ,python2-matplotlib)
3126 ("python2-pandas" ,python2-pandas)
3127 ("python2-scikit-learn" ,python2-scikit-learn)
3128 ("python2-pysnptools" ,python2-pysnptools)))
3129 (native-inputs
3130 `(("unzip" ,unzip)
3131 ("python2-cython" ,python2-cython)
3132 ("python2-mock" ,python2-mock)
3133 ("python2-nose" ,python2-nose)))
3134 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3135 (synopsis "Perform genome-wide association studies on large data sets")
3136 (description
3137 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3138 Models, is a program for performing both single-SNP and SNP-set genome-wide
3139 association studies (GWAS) on extremely large data sets.")
3140 (license license:asl2.0)))
3141
3142 (define-public python-numpy-documentation
3143 (package
3144 (name "python-numpy-documentation")
3145 (version (package-version python-numpy))
3146 (source (package-source python-numpy))
3147 (build-system python-build-system)
3148 (native-inputs
3149 `(("python-matplotlib" ,python-matplotlib)
3150 ("python-numpy" ,python-numpy)
3151 ("pkg-config" ,pkg-config)
3152 ("python-sphinx" ,python-sphinx)
3153 ("python-numpydoc" ,python-numpydoc)
3154 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3155 texlive-fonts-ec
3156 texlive-generic-ifxetex
3157 texlive-generic-pdftex
3158 texlive-latex-amsfonts
3159 texlive-latex-capt-of
3160 texlive-latex-cmap
3161 texlive-latex-environ
3162 texlive-latex-eqparbox
3163 texlive-latex-etoolbox
3164 texlive-latex-expdlist
3165 texlive-latex-fancyhdr
3166 texlive-latex-fancyvrb
3167 texlive-latex-fncychap
3168 texlive-latex-float
3169 texlive-latex-framed
3170 texlive-latex-geometry
3171 texlive-latex-graphics
3172 texlive-latex-hyperref
3173 texlive-latex-mdwtools
3174 texlive-latex-multirow
3175 texlive-latex-oberdiek
3176 texlive-latex-parskip
3177 texlive-latex-preview
3178 texlive-latex-tabulary
3179 texlive-latex-threeparttable
3180 texlive-latex-titlesec
3181 texlive-latex-trimspaces
3182 texlive-latex-ucs
3183 texlive-latex-upquote
3184 texlive-latex-url
3185 texlive-latex-varwidth
3186 texlive-latex-wrapfig)))
3187 ("texinfo" ,texinfo)
3188 ("perl" ,perl)
3189 ("scipy-sphinx-theme"
3190 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3191 (method git-fetch)
3192 (uri (git-reference
3193 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3194 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3195 (sha256
3196 (base32
3197 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3198 ,@(package-native-inputs python-numpy)))
3199 (arguments
3200 `(#:tests? #f ; we're only generating the documentation
3201 #:phases
3202 (modify-phases %standard-phases
3203 (delete 'build)
3204 (replace 'install
3205 (lambda* (#:key inputs outputs #:allow-other-keys)
3206 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3207 (doc (string-append
3208 data "/doc/" ,name "-"
3209 ,(package-version python-numpy)))
3210 (info-reader (string-append data "/info"))
3211 (html (string-append doc "/html"))
3212 (scipy-sphinx-theme "scipy-sphinx-theme")
3213 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3214 (pyver ,(string-append "PYVER=")))
3215
3216 ;; FIXME: this is needed to for texlive-union to generate
3217 ;; fonts, which are not found.
3218 (setenv "HOME" "/tmp")
3219
3220 (with-directory-excursion "doc"
3221 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3222 (mkdir-p html)
3223 (system* "make" "html" pyver)
3224 (system* "make" "latex" "PAPER=a4" pyver)
3225 (system* "make" "-C" "build/latex"
3226 "all-pdf" "PAPER=a4" pyver)
3227 ;; FIXME: Generation of the info file fails.
3228 ;; (system* "make" "info" pyver)
3229 ;; (mkdir-p info)
3230 ;; (copy-file "build/texinfo/numpy.info"
3231 ;; (string-append info "/numpy.info"))
3232 (for-each (lambda (file)
3233 (copy-file (string-append "build/latex" file)
3234 (string-append doc file)))
3235 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3236 (with-directory-excursion "build/html"
3237 (for-each (lambda (file)
3238 (let* ((dir (dirname file))
3239 (tgt-dir (string-append html "/" dir)))
3240 (unless (equal? "." dir)
3241 (mkdir-p tgt-dir))
3242 (install-file file html)))
3243 (find-files "." ".*")))))
3244 #t)))))
3245 (home-page (package-home-page python-numpy))
3246 (synopsis "Documentation for the python-numpy package")
3247 (description (package-description python-numpy))
3248 (license (package-license python-numpy))))
3249
3250 (define-public python2-numpy-documentation
3251 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3252 (package
3253 (inherit numpy-documentation)
3254 (native-inputs `(("python2-functools32" ,python2-functools32)
3255 ,@(package-native-inputs numpy-documentation))))))
3256
3257 (define-public python-pygit2
3258 (package
3259 (name "python-pygit2")
3260 (version "0.26.0")
3261 (source
3262 (origin
3263 (method url-fetch)
3264 (uri (pypi-uri "pygit2" version))
3265 (sha256
3266 (base32
3267 "1cbc488ra3kg7r3qky17ms0szi3cda2d96qfkv1l9djsy9hnvw57"))
3268 (patches
3269 (search-patches "python-pygit2-disable-network-tests.patch"))))
3270 (build-system python-build-system)
3271 (propagated-inputs
3272 `(("python-six" ,python-six)
3273 ("python-cffi" ,python-cffi)
3274 ("libgit2" ,libgit2)
3275 ("python-tox" ,python-tox)))
3276 (home-page "https://github.com/libgit2/pygit2")
3277 (synopsis "Python bindings for libgit2")
3278 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3279 library, libgit2 implements Git plumbing.")
3280 ;; GPL2.0 only, with linking exception.
3281 (license license:gpl2)))
3282
3283 (define-public python2-pygit2
3284 (package-with-python2 python-pygit2))
3285
3286 (define-public python-pyparsing
3287 (package
3288 (name "python-pyparsing")
3289 (version "2.2.0")
3290 (source
3291 (origin
3292 (method url-fetch)
3293 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3294 "/pyparsing-" version
3295 "/pyparsing-" version ".tar.gz"))
3296 (sha256
3297 (base32
3298 "016b9gh606aa44sq92jslm89bg874ia0yyiyb643fa6dgbsbqch8"))))
3299 (build-system python-build-system)
3300 (outputs '("out" "doc"))
3301 (arguments
3302 `(#:tests? #f ; no test target
3303 #:phases
3304 (modify-phases %standard-phases
3305 (add-after 'install 'install-doc
3306 (lambda* (#:key outputs #:allow-other-keys)
3307 (let* ((doc (string-append (assoc-ref outputs "doc")
3308 "/share/doc/" ,name "-" ,version))
3309 (html-doc (string-append doc "/html"))
3310 (examples (string-append doc "/examples")))
3311 (mkdir-p html-doc)
3312 (mkdir-p examples)
3313 (for-each
3314 (lambda (dir tgt)
3315 (map (lambda (file)
3316 (install-file file tgt))
3317 (find-files dir ".*")))
3318 (list "docs" "htmldoc" "examples")
3319 (list doc html-doc examples))
3320 #t))))))
3321 (home-page "http://pyparsing.wikispaces.com")
3322 (synopsis "Python parsing class library")
3323 (description
3324 "The pyparsing module is an alternative approach to creating and
3325 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3326 of regular expressions. The pyparsing module provides a library of classes
3327 that client code uses to construct the grammar directly in Python code.")
3328 (license license:expat)))
3329
3330 (define-public python2-pyparsing
3331 (package-with-python2 python-pyparsing))
3332
3333 (define-public python-numpydoc
3334 (package
3335 (name "python-numpydoc")
3336 (version "0.5")
3337 (source
3338 (origin
3339 (method url-fetch)
3340 (uri (string-append
3341 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3342 version ".tar.gz"))
3343 (sha256
3344 (base32
3345 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3346 (modules '((guix build utils)))
3347 (snippet
3348 '(begin
3349 ;; Drop a test requiring matplotlib, which we cannot add as an
3350 ;; input since it would create a circular dependency: Extend the
3351 ;; test for Python 3, where it is already dropped, to Python 2.
3352 (substitute* "numpydoc/tests/test_plot_directive.py"
3353 (("3") "2"))
3354 #t))))
3355 (build-system python-build-system)
3356 (propagated-inputs
3357 `(("python-sphinx" ,python-sphinx)))
3358 (native-inputs
3359 `(("python-nose" ,python-nose)))
3360 (home-page "https://pypi.python.org/pypi/numpydoc")
3361 (synopsis
3362 "Numpy's Sphinx extensions")
3363 (description
3364 "Sphinx extension to support docstrings in Numpy format.")
3365 (license license:bsd-2)))
3366
3367 (define-public python2-numpydoc
3368 (package-with-python2 python-numpydoc))
3369
3370 (define-public python-numexpr
3371 (package
3372 (name "python-numexpr")
3373 (version "2.6.5")
3374 (source
3375 (origin
3376 (method url-fetch)
3377 (uri (pypi-uri "numexpr" version))
3378 (sha256
3379 (base32
3380 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3381 (build-system python-build-system)
3382 (arguments `(#:tests? #f)) ; no tests included
3383 (propagated-inputs
3384 `(("python-numpy" ,python-numpy)))
3385 (home-page "https://github.com/pydata/numexpr")
3386 (synopsis "Fast numerical expression evaluator for NumPy")
3387 (description
3388 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3389 expressions that operate on arrays are accelerated and use less memory than
3390 doing the same calculation in Python. In addition, its multi-threaded
3391 capabilities can make use of all your cores, which may accelerate
3392 computations, most specially if they are not memory-bounded (e.g. those using
3393 transcendental functions).")
3394 (license license:expat)))
3395
3396 (define-public python2-numexpr
3397 (package-with-python2 python-numexpr))
3398
3399 (define-public python-cycler
3400 (package
3401 (name "python-cycler")
3402 (version "0.10.0")
3403 (source (origin
3404 (method url-fetch)
3405 (uri (pypi-uri "cycler" version))
3406 (sha256
3407 (base32
3408 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3409 (build-system python-build-system)
3410 (arguments
3411 ;; XXX: The current version requires 'coveralls' which we don't have.
3412 ;; Enable this for the next release which uses 'python-pytest'.
3413 '(#:tests? #f))
3414 (propagated-inputs
3415 `(("python-six" ,python-six)))
3416 (home-page "http://matplotlib.org/cycler/")
3417 (synopsis "Composable keyword argument iterator")
3418 (description
3419 "When using @code{matplotlib} and plotting more than one line, it is
3420 common to want to be able to want to be able to cycle over one or more artist
3421 styles; but the plotting logic can quickly become involved.
3422 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3423 @code{Cycler} class was developed.")
3424 (license license:bsd-3)))
3425
3426 (define-public python2-cycler
3427 (package-with-python2 python-cycler))
3428
3429 (define-public python-colorspacious
3430 (package
3431 (name "python-colorspacious")
3432 (version "1.1.0")
3433 (source
3434 (origin
3435 (method url-fetch)
3436 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3437 version ".tar.gz"))
3438 (file-name (string-append name "-" version))
3439 (sha256
3440 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3441 (build-system python-build-system)
3442 (propagated-inputs
3443 `(("python-numpy" ,python-numpy)))
3444 (native-inputs
3445 `(("python-nose" ,python-nose)))
3446 (arguments
3447 `(#:phases
3448 (modify-phases %standard-phases
3449 (replace 'check
3450 (lambda _
3451 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
3452 (home-page "https://github.com/njsmith/colorspacious")
3453 (synopsis "Python library for colorspace conversions")
3454 (description "@code{colorspacious} is a Python library that lets you
3455 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3456 (license license:expat)))
3457
3458 (define-public python2-colorspacious
3459 (package-with-python2 python-colorspacious))
3460
3461 (define-public python-matplotlib
3462 (package
3463 (name "python-matplotlib")
3464 (version "2.2.2")
3465 (source
3466 (origin
3467 (method url-fetch)
3468 (uri (pypi-uri "matplotlib" version))
3469 (sha256
3470 (base32
3471 "1s6dv225w3k4fv52h8lfjc7qq5y56i9755ayx0mz48ddi99fzisd"))))
3472 (build-system python-build-system)
3473 (propagated-inputs ; the following packages are all needed at run time
3474 `(("python-cycler" ,python-cycler)
3475 ("python-kiwisolver" ,python-kiwisolver)
3476 ("python-pyparsing" ,python-pyparsing)
3477 ("python-pygobject" ,python-pygobject)
3478 ("gobject-introspection" ,gobject-introspection)
3479 ("python-tkinter" ,python "tk")
3480 ("python-dateutil" ,python-dateutil)
3481 ("python-numpy" ,python-numpy)
3482 ("python-pillow" ,python-pillow)
3483 ("python-pytz" ,python-pytz)
3484 ("python-six" ,python-six)
3485 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3486 ;; from 'gtk+') provides the required 'typelib' files used by
3487 ;; 'gobject-introspection'. The location of these files is set with the
3488 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3489 ;; is done automatically by a 'native-search-path' procedure. However,
3490 ;; at run-time the user must set this variable as follows:
3491 ;;
3492 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3493 ("gtk+" ,gtk+)
3494 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3495 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3496 ;; object. For this reason we need to import both libraries.
3497 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3498 ("python-pycairo" ,python-pycairo)
3499 ("python-pyqt" ,python-pyqt)
3500 ("python-cairocffi" ,python-cairocffi)))
3501 (inputs
3502 `(("libpng" ,libpng)
3503 ("imagemagick" ,imagemagick)
3504 ("freetype" ,freetype)
3505 ("cairo" ,cairo)
3506 ("glib" ,glib)
3507 ;; FIXME: Add backends when available.
3508 ;("python-wxpython" ,python-wxpython)
3509 ("tcl" ,tcl)
3510 ("tk" ,tk)))
3511 (native-inputs
3512 `(("pkg-config" ,pkg-config)
3513 ("python-nose" ,python-nose)
3514 ("python-mock" ,python-mock)))
3515 (arguments
3516 `(#:phases
3517 (modify-phases %standard-phases
3518 (add-before 'build 'configure-environment
3519 (lambda* (#:key outputs inputs #:allow-other-keys)
3520 (let ((cairo (assoc-ref inputs "cairo"))
3521 (gtk+ (assoc-ref inputs "gtk+")))
3522 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3523 ;; has not effect.
3524 (setenv "LD_LIBRARY_PATH"
3525 (string-append cairo "/lib:" gtk+ "/lib"))
3526 (setenv "HOME" (getcwd))
3527 (call-with-output-file "setup.cfg"
3528 (lambda (port)
3529 (format port "[directories]~%
3530 basedirlist = ~a,~a~%
3531 [rc_options]~%
3532 backend = TkAgg~%"
3533 (assoc-ref inputs "tcl")
3534 (assoc-ref inputs "tk")))))
3535 #t)))))
3536 (home-page "http://matplotlib.org")
3537 (synopsis "2D plotting library for Python")
3538 (description
3539 "Matplotlib is a Python 2D plotting library which produces publication
3540 quality figures in a variety of hardcopy formats and interactive environments
3541 across platforms. Matplotlib can be used in Python scripts, the python and
3542 ipython shell, web application servers, and six graphical user interface
3543 toolkits.")
3544 (license license:psfl)
3545 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3546
3547 (define-public python2-matplotlib
3548 (let ((matplotlib (package-with-python2
3549 (strip-python2-variant python-matplotlib))))
3550 (package (inherit matplotlib)
3551 ;; Make sure to use special packages for Python 2 instead
3552 ;; of those automatically rewritten by package-with-python2.
3553 (propagated-inputs
3554 `(("python2-pycairo" ,python2-pycairo)
3555 ("python2-backports-functools-lru-cache"
3556 ,python2-backports-functools-lru-cache)
3557 ("python2-functools32" ,python2-functools32)
3558 ("python2-pygobject-2" ,python2-pygobject-2)
3559 ("python2-subprocess32" ,python2-subprocess32)
3560 ("python2-tkinter" ,python-2 "tk")
3561 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3562 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3563
3564 (define-public python-matplotlib-documentation
3565 (package
3566 (name "python-matplotlib-documentation")
3567 (version (package-version python-matplotlib))
3568 (source (package-source python-matplotlib))
3569 (build-system python-build-system)
3570 (native-inputs
3571 `(("python-matplotlib" ,python-matplotlib)
3572 ("python-colorspacious" ,python-colorspacious)
3573 ("python-sphinx" ,python-sphinx-1.6)
3574 ("python-sphinx-gallery" ,python-sphinx-gallery)
3575 ("python-numpydoc" ,python-numpydoc)
3576 ("python-ipython" ,python-ipython)
3577 ("python-mock" ,python-mock)
3578 ("graphviz" ,graphviz)
3579 ("texlive" ,texlive)
3580 ("texinfo" ,texinfo)
3581 ,@(package-native-inputs python-matplotlib)))
3582 (arguments
3583 `(#:tests? #f ; we're only generating documentation
3584 #:phases
3585 (modify-phases %standard-phases
3586 (replace 'build
3587 (lambda _
3588 (chdir "doc")
3589 ;; Produce pdf in 'A4' format.
3590 (substitute* "conf.py"
3591 (("latex_paper_size = 'letter'") "")
3592 ;; latex_paper_size is deprecated -> set paper size using
3593 ;; latex_elements
3594 (("latex_elements\\['pointsize'\\] = '11pt'" match)
3595 ;; insert at a point where latex_elements{} is defined:
3596 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
3597 (invoke "make" "SPHINXBUILD=sphinx-build" "html" "latex" "texinfo")))
3598 (replace 'install
3599 (lambda* (#:key inputs outputs #:allow-other-keys)
3600 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3601 (doc (string-append data "/doc/python-matplotlib-" ,version))
3602 (info (string-append data "/info"))
3603 (html (string-append doc "/html")))
3604 (mkdir-p html)
3605 (mkdir-p info)
3606 (copy-recursively "build/html" html)
3607 (symlink (string-append html "/_images")
3608 (string-append info "/matplotlib-figures"))
3609 (with-directory-excursion "build/texinfo"
3610 (substitute* "matplotlib.texi"
3611 (("@image\\{([^,]*)" all file)
3612 (string-append "@image{matplotlib-figures/" file)))
3613 (symlink (string-append html "/_images")
3614 "./matplotlib-figures")
3615 (system* "makeinfo" "--no-split"
3616 "-o" "matplotlib.info" "matplotlib.texi"))
3617 (copy-file "build/texinfo/matplotlib.info"
3618 (string-append info "/matplotlib.info"))
3619 (copy-file "build/latex/Matplotlib.pdf"
3620 (string-append doc "/Matplotlib.pdf")))
3621 #t)))))
3622 (home-page (package-home-page python-matplotlib))
3623 (synopsis "Documentation for the python-matplotlib package")
3624 (description (package-description python-matplotlib))
3625 (license (package-license python-matplotlib))))
3626
3627 (define-public python2-matplotlib-documentation
3628 (package-with-python2 python-matplotlib-documentation))
3629
3630 (define-public python2-pysnptools
3631 (package
3632 (name "python2-pysnptools")
3633 (version "0.3.9")
3634 (source
3635 (origin
3636 (method url-fetch)
3637 (uri (pypi-uri "pysnptools" version ".zip"))
3638 (sha256
3639 (base32
3640 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
3641 (build-system python-build-system)
3642 (arguments
3643 `(#:python ,python-2)) ; only Python 2.7 is supported
3644 (propagated-inputs
3645 `(("python2-numpy" ,python2-numpy)
3646 ("python2-scipy" ,python2-scipy)
3647 ("python2-pandas" ,python2-pandas)))
3648 (native-inputs
3649 `(("python2-cython" ,python2-cython)))
3650 (native-inputs
3651 `(("unzip" ,unzip)))
3652 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3653 (synopsis "Library for reading and manipulating genetic data")
3654 (description
3655 "PySnpTools is a library for reading and manipulating genetic data. It
3656 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3657 those files. It can also efficiently manipulate ranges of integers using set
3658 operators such as union, intersection, and difference.")
3659 (license license:asl2.0)))
3660
3661 (define-public python-rpy2
3662 (package
3663 (name "python-rpy2")
3664 (version "2.9.0")
3665 (source
3666 (origin
3667 (method url-fetch)
3668 (uri (pypi-uri "rpy2" version))
3669 (sha256
3670 (base32
3671 "0bqihjrdqwj5r1h86shvfb1p5hfr4a6klv1v54bzfr9r144w3rni"))))
3672 (build-system python-build-system)
3673 (arguments
3674 '(#:modules ((ice-9 ftw)
3675 (srfi srfi-1)
3676 (srfi srfi-26)
3677 (guix build utils)
3678 (guix build python-build-system))
3679 #:phases
3680 (modify-phases %standard-phases
3681 ;; Without this phase the test loader cannot find the directories, in
3682 ;; which it is supposed to look for test files.
3683 (add-after 'unpack 'fix-tests
3684 (lambda* (#:key outputs #:allow-other-keys)
3685 (substitute* "rpy/tests.py"
3686 (("loader.discover\\(")
3687 "loader.discover(rpy_root + '/' +"))
3688 #t))
3689 (replace 'check
3690 (lambda* (#:key outputs inputs #:allow-other-keys)
3691 (let ((cwd (getcwd)))
3692 (setenv "PYTHONPATH"
3693 (string-append cwd "/build/"
3694 (find (cut string-prefix? "lib" <>)
3695 (scandir (string-append cwd "/build")))
3696 ":"
3697 (getenv "PYTHONPATH"))))
3698 ;; FIXME: Even when all tests pass, the check phase will fail.
3699 (system* "python" "-m" "rpy2.tests" "-v"))))))
3700 (propagated-inputs
3701 `(("python-six" ,python-six)
3702 ("python-jinja2" ,python-jinja2)
3703 ("python-pytz" ,python-pytz)))
3704 (inputs
3705 `(("readline" ,readline)
3706 ("icu4c" ,icu4c)
3707 ("pcre" ,pcre)
3708 ("r-minimal" ,r-minimal)
3709 ("r-survival" ,r-survival)
3710 ("r-ggplot2" ,r-ggplot2)
3711 ("r-rsqlite" ,r-rsqlite)
3712 ("r-dplyr" ,r-dplyr)
3713 ("r-dbplyr" ,r-dbplyr)
3714 ("python-numpy" ,python-numpy)))
3715 (native-inputs
3716 `(("zlib" ,zlib)))
3717 (home-page "http://rpy.sourceforge.net/")
3718 (synopsis "Python interface to the R language")
3719 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3720 low-level interface to R from Python, a proposed high-level interface,
3721 including wrappers to graphical libraries, as well as R-like structures and
3722 functions.")
3723 ;; Any of these licenses can be picked for the R interface. The whole
3724 ;; project is released under GPLv2+ according to the license declaration
3725 ;; in "setup.py".
3726 (license (list license:mpl2.0 license:gpl2+ license:lgpl2.1+))))
3727
3728 (define-public python-scipy
3729 (package
3730 (name "python-scipy")
3731 (version "1.0.1")
3732 (source
3733 (origin
3734 (method url-fetch)
3735 (uri (pypi-uri "scipy" version))
3736 (sha256
3737 (base32
3738 "1fj0r7bg0cfk5clvl57ga06y9bfh05iwlv1dqqs1r6pd89wccfc7"))))
3739 (build-system python-build-system)
3740 (propagated-inputs
3741 `(("python-numpy" ,python-numpy)
3742 ("python-matplotlib" ,python-matplotlib)
3743 ("python-pyparsing" ,python-pyparsing)))
3744 (inputs
3745 `(("lapack" ,lapack)
3746 ("openblas" ,openblas)))
3747 (native-inputs
3748 `(("python-cython" ,python-cython)
3749 ("python-pytest" ,python-pytest)
3750 ("python-sphinx" ,python-sphinx)
3751 ("python-numpydoc" ,python-numpydoc)
3752 ("gfortran" ,gfortran)
3753 ("perl" ,perl)
3754 ("which" ,which)))
3755 (outputs '("out" "doc"))
3756 (arguments
3757 `(#:phases
3758 (modify-phases %standard-phases
3759 (add-before 'build 'configure-openblas
3760 (lambda* (#:key inputs #:allow-other-keys)
3761 (call-with-output-file "site.cfg"
3762 (lambda (port)
3763 (format port
3764 "[blas]
3765 libraries = openblas
3766 library_dirs = ~a/lib
3767 include_dirs = ~a/include
3768
3769 # backslash-n to make emacs happy
3770 \n[atlas]
3771 library_dirs = ~a/lib
3772 atlas_libs = openblas
3773 "
3774 (assoc-ref inputs "openblas")
3775 (assoc-ref inputs "openblas")
3776 (assoc-ref inputs "openblas"))))
3777 #t))
3778 (add-after 'install 'install-doc
3779 (lambda* (#:key inputs outputs #:allow-other-keys)
3780 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3781 (doc (string-append data "/doc/" ,name "-" ,version))
3782 (html (string-append doc "/html"))
3783 (pyver ,(string-append "PYVER=" (version-major+minor
3784 (package-version python))))
3785 ;; By default it tries to run sphinx-build through the Python
3786 ;; interpreter which won't work with our shell wrapper.
3787 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
3788 ;; Make installed package available for building the
3789 ;; documentation
3790 (add-installed-pythonpath inputs outputs)
3791 (with-directory-excursion "doc"
3792 ;; Fix generation of images for mathematical expressions.
3793 (substitute* (find-files "source" "conf\\.py")
3794 (("pngmath_use_preview = True")
3795 "pngmath_use_preview = False"))
3796 (mkdir-p html)
3797 (invoke "make" "html" pyver sphinxbuild)
3798 (with-directory-excursion "build/html"
3799 (for-each (lambda (file)
3800 (let* ((dir (dirname file))
3801 (tgt-dir (string-append html "/" dir)))
3802 (install-file file html)))
3803 (find-files "." ".*")))))
3804 #t))
3805 ;; Tests can only be run after the library has been installed and not
3806 ;; within the source directory.
3807 (delete 'check)
3808 (add-after 'install 'check
3809 (lambda* (#:key inputs outputs #:allow-other-keys)
3810 (add-installed-pythonpath inputs outputs)
3811 (with-directory-excursion "/tmp"
3812 (invoke "python" "-c"
3813 "import scipy; scipy.test('full', verbose=2)")))))))
3814 (home-page "https://www.scipy.org/")
3815 (synopsis "The Scipy library provides efficient numerical routines")
3816 (description "The SciPy library is one of the core packages that make up
3817 the SciPy stack. It provides many user-friendly and efficient numerical
3818 routines such as routines for numerical integration and optimization.")
3819 (properties `((python2-variant . ,(delay python2-scipy))))
3820 (license license:bsd-3)))
3821
3822 (define-public python2-scipy
3823 (package-with-python2
3824 (strip-python2-variant python-scipy)))
3825
3826 (define-public python-socksipy-branch
3827 (package
3828 (name "python-socksipy-branch")
3829 (version "1.01")
3830 (source
3831 (origin
3832 (method url-fetch)
3833 (uri (pypi-uri "SocksiPy-branch" version))
3834 (sha256
3835 (base32
3836 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3837 (build-system python-build-system)
3838 (arguments
3839 `(#:tests? #f)) ; There are no tests
3840 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3841 (synopsis "Python SOCKS module")
3842 (description
3843 "SocksiPy - A Python SOCKS client module. It provides a
3844 socket-like interface that supports connections to any TCP
3845 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3846 The original version was developed by Dan Haim, this is a
3847 branch created by Mario Vilas to address some open issues,
3848 as the original project seems to have been abandoned circa 2007.")
3849 (license license:bsd-3)))
3850
3851 (define-public python2-socksipy-branch
3852 (package-with-python2 python-socksipy-branch))
3853
3854 (define-public python-pycodestyle
3855 (package
3856 (name "python-pycodestyle")
3857 (version "2.3.1")
3858 (source
3859 (origin
3860 (method url-fetch)
3861 (uri (pypi-uri "pycodestyle" version))
3862 (sha256
3863 (base32
3864 "0rk78b66p57ala26mdldl9lafr48blv5s659sah9q50qnfjmc8k8"))))
3865 (build-system python-build-system)
3866 (home-page "https://pycodestyle.readthedocs.io/")
3867 (synopsis "Python style guide checker")
3868 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3869 Python code against some of the style conventions in
3870 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3871 (license license:expat)))
3872
3873 (define-public python2-pycodestyle
3874 (package-with-python2 python-pycodestyle))
3875
3876 (define-public python-multidict
3877 (package
3878 (name "python-multidict")
3879 (version "4.2.0")
3880 (source
3881 (origin
3882 (method url-fetch)
3883 (uri (pypi-uri "multidict" version))
3884 (sha256
3885 (base32
3886 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
3887 (build-system python-build-system)
3888 (native-inputs
3889 `(("python-pytest" ,python-pytest)
3890 ("python-pytest-runner" ,python-pytest-runner)))
3891 (home-page "https://github.com/aio-libs/multidict/")
3892 (synopsis "Multidict implementation")
3893 (description "Multidict is dict-like collection of key-value pairs
3894 where key might be occurred more than once in the container.")
3895 (license license:asl2.0)))
3896
3897 (define-public python-orderedmultidict
3898 (package
3899 (name "python-orderedmultidict")
3900 (version "0.7.11")
3901 (source
3902 (origin
3903 (method url-fetch)
3904 (uri (pypi-uri "orderedmultidict" version))
3905 (sha256
3906 (base32
3907 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
3908 (build-system python-build-system)
3909 (arguments
3910 `(#:phases
3911 (modify-phases %standard-phases
3912 (add-after 'unpack 'fix-tests
3913 (lambda _
3914 ;; The package uses nosetest for running the tests.
3915 ;; Adding this initfile allows to run the test suite
3916 ;; without requiring nosetest.
3917 (zero? (system* "touch" "tests/__init__.py")))))))
3918 (propagated-inputs
3919 `(("python-six" ,python-six)))
3920 (native-inputs
3921 `(("python-pycodestyle" ,python-pycodestyle)))
3922 (home-page "https://github.com/gruns/orderedmultidict")
3923 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3924 (description "This package contains a library for ordered multivalue
3925 dictionaries. A multivalue dictionary is a dictionary that can store
3926 multiple values for the same key. An ordered multivalue dictionary is a
3927 multivalue dictionary that retains the order of insertions and deletions.")
3928 (license license:unlicense)))
3929
3930 (define-public python2-orderedmultidict
3931 (package-with-python2 python-orderedmultidict))
3932
3933 (define-public python-autopep8
3934 (package
3935 (name "python-autopep8")
3936 (version "1.3.5")
3937 (source
3938 (origin
3939 (method url-fetch)
3940 (uri (pypi-uri "autopep8" version))
3941 (sha256
3942 (base32
3943 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
3944 (build-system python-build-system)
3945 (propagated-inputs
3946 `(("python-pycodestyle" ,python-pycodestyle)))
3947 (home-page "https://github.com/hhatto/autopep8")
3948 (synopsis "Format Python code according to the PEP 8 style guide")
3949 (description
3950 "@code{autopep8} automatically formats Python code to conform to
3951 the PEP 8 style guide. It uses the pycodestyle utility to determine
3952 what parts of the code needs to be formatted. @code{autopep8} is
3953 capable of fixing most of the formatting issues that can be reported
3954 by pycodestyle.")
3955 (license (license:non-copyleft
3956 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
3957
3958 (define-public python2-autopep8
3959 (package-with-python2 python-autopep8))
3960
3961 (define-public python-distutils-extra
3962 (package
3963 (name "python-distutils-extra")
3964 (version "2.38")
3965 (source
3966 (origin
3967 (method url-fetch)
3968 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3969 version "/+download/python-distutils-extra-"
3970 version ".tar.gz"))
3971 (sha256
3972 (base32
3973 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3974 (build-system python-build-system)
3975 (home-page "https://launchpad.net/python-distutils-extra/")
3976 (synopsis "Enhancements to Python's distutils")
3977 (description
3978 "The python-distutils-extra module enables you to easily integrate
3979 gettext support, themed icons, and scrollkeeper-based documentation into
3980 Python's distutils.")
3981 (license license:gpl2)))
3982
3983 (define-public python2-distutils-extra
3984 (package-with-python2 python-distutils-extra))
3985
3986 (define-public python2-elib.intl
3987 (package
3988 (name "python2-elib.intl")
3989 (version "0.0.3")
3990 (source
3991 (origin
3992 ;; This project doesn't tag releases or publish tarballs, so we take
3993 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3994 (method git-fetch)
3995 (uri (git-reference
3996 (url "https://github.com/dieterv/elib.intl.git")
3997 (commit "d09997cfef")))
3998 (file-name (string-append name "-" version "-checkout"))
3999 (sha256
4000 (base32
4001 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4002 (build-system python-build-system)
4003 (arguments
4004 ;; incompatible with Python 3 (exception syntax)
4005 `(#:python ,python-2
4006 #:tests? #f))
4007 (home-page "https://github.com/dieterv/elib.intl")
4008 (synopsis "Enhanced internationalization for Python")
4009 (description
4010 "The elib.intl module provides enhanced internationalization (I18N)
4011 services for your Python modules and applications.")
4012 (license license:lgpl3+)))
4013
4014 (define-public python-olefile
4015 (package
4016 (name "python-olefile")
4017 (version "0.44")
4018 (source
4019 (origin
4020 (method url-fetch)
4021 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
4022 version ".tar.gz"))
4023 (file-name (string-append name "-" version ".tar.gz"))
4024 (sha256
4025 (base32
4026 "1wmxbrhyqjry2000zx0zdhqdqxhgi06nz7sbzjlh222q2zjv1gpj"))))
4027 (build-system python-build-system)
4028 (home-page
4029 "https://www.decalage.info/python/olefileio")
4030 (synopsis "Read and write Microsoft OLE2 files.")
4031 (description
4032 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4033 Storage or Compound Document, Microsoft Office). It is an improved version of
4034 the OleFileIO module from PIL, the Python Image Library.")
4035 (license license:bsd-3)))
4036
4037 (define-public python2-olefile
4038 (package-with-python2 python-olefile))
4039
4040 (define-public python-pillow
4041 (package
4042 (name "python-pillow")
4043 (version "4.3.0")
4044 (source
4045 (origin
4046 (method url-fetch)
4047 (uri (pypi-uri "Pillow" version))
4048 (sha256
4049 (base32
4050 "09xmn7rl6840sli2iz1k3fgxfgmri2nqz6vkinmb9mgg8ifp2z59"))
4051 (patch-flags '("-p1" "--binary"))
4052 (patches (search-patches "python-pillow-fix-failing-tests.patch"))))
4053 (build-system python-build-system)
4054 (native-inputs
4055 `(("python-nose" ,python-nose)))
4056 (inputs
4057 `(("freetype" ,freetype)
4058 ("lcms" ,lcms)
4059 ("zlib" ,zlib)
4060 ("libjpeg" ,libjpeg)
4061 ("openjpeg" ,openjpeg)
4062 ("libtiff" ,libtiff)
4063 ("libwebp" ,libwebp)))
4064 (propagated-inputs
4065 `(("python-olefile" ,python-olefile)))
4066 (arguments
4067 `(#:phases (modify-phases %standard-phases
4068 (add-after
4069 'install 'check-installed
4070 (lambda* (#:key outputs inputs #:allow-other-keys)
4071 (begin
4072 (setenv "HOME" (getcwd))
4073 ;; Make installed package available for running the
4074 ;; tests
4075 (add-installed-pythonpath inputs outputs)
4076 (and (zero? (system* "python" "selftest.py"
4077 "--installed"))
4078 (zero? (system* "python" "test-installed.py"))))))
4079 (delete 'check))))
4080 (home-page "https://pypi.python.org/pypi/Pillow")
4081 (synopsis "Fork of the Python Imaging Library")
4082 (description
4083 "The Python Imaging Library adds image processing capabilities to your
4084 Python interpreter. This library provides extensive file format support, an
4085 efficient internal representation, and fairly powerful image processing
4086 capabilities. The core image library is designed for fast access to data
4087 stored in a few basic pixel formats. It should provide a solid foundation for
4088 a general image processing tool.")
4089 (license (license:x11-style
4090 "http://www.pythonware.com/products/pil/license.htm"
4091 "The PIL Software License"))))
4092
4093 (define-public python2-pillow
4094 (package-with-python2 python-pillow))
4095
4096 (define-public python-pycparser
4097 (package
4098 (name "python-pycparser")
4099 (version "2.17")
4100 (source
4101 (origin
4102 (method url-fetch)
4103 (uri (pypi-uri "pycparser" version))
4104 (sha256
4105 (base32
4106 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
4107 (outputs '("out" "doc"))
4108 (build-system python-build-system)
4109 (native-inputs
4110 `(("pkg-config" ,pkg-config)))
4111 (arguments
4112 `(#:phases
4113 (modify-phases %standard-phases
4114 (replace 'check
4115 (lambda _
4116 (with-directory-excursion "tests"
4117 (zero? (system* "python" "all_tests.py")))))
4118 (add-after 'install 'install-doc
4119 (lambda* (#:key outputs #:allow-other-keys)
4120 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4121 (doc (string-append data "/doc/" ,name "-" ,version))
4122 (examples (string-append doc "/examples")))
4123 (mkdir-p examples)
4124 (for-each (lambda (file)
4125 (copy-file (string-append "." file)
4126 (string-append doc file)))
4127 '("/README.rst" "/CHANGES" "/LICENSE"))
4128 (copy-recursively "examples" examples)))))))
4129 (home-page "https://github.com/eliben/pycparser")
4130 (synopsis "C parser in Python")
4131 (description
4132 "Pycparser is a complete parser of the C language, written in pure Python
4133 using the PLY parsing library. It parses C code into an AST and can serve as
4134 a front-end for C compilers or analysis tools.")
4135 (license license:bsd-3)))
4136
4137 (define-public python2-pycparser
4138 (package-with-python2 python-pycparser))
4139
4140 (define-public python-xcffib
4141 (package
4142 (name "python-xcffib")
4143 (version "0.5.1")
4144 (source
4145 (origin
4146 (method url-fetch)
4147 (uri (pypi-uri "xcffib" version))
4148 (sha256
4149 (base32
4150 "09gbnmr5vn58mm8xi3fmd7fz6743cks6c46dphnxzwax6zsxmy60"))))
4151 (build-system python-build-system)
4152 (inputs
4153 `(("libxcb" ,libxcb)))
4154 (propagated-inputs
4155 `(("python-cffi" ,python-cffi) ; used at run time
4156 ("python-six" ,python-six)))
4157 (arguments
4158 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4159 #:tests? #f
4160 #:phases
4161 (modify-phases %standard-phases
4162 (add-after 'unpack 'fix-libxcb-path
4163 (lambda* (#:key inputs #:allow-other-keys)
4164 (let ((libxcb (assoc-ref inputs "libxcb")))
4165 (substitute* '("xcffib/__init__.py")
4166 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4167 #t)))
4168 (add-after 'install 'install-doc
4169 (lambda* (#:key outputs #:allow-other-keys)
4170 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4171 "/doc/" ,name "-" ,version)))
4172 (mkdir-p doc)
4173 (copy-file "README.md"
4174 (string-append doc "/README.md"))
4175 #t))))))
4176 (home-page "https://github.com/tych0/xcffib")
4177 (synopsis "XCB Python bindings")
4178 (description
4179 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4180 support for Python 3 and PyPy. It is based on cffi.")
4181 (license license:expat)))
4182
4183 (define-public python2-xcffib
4184 (package-with-python2 python-xcffib))
4185
4186 (define-public python-cairocffi
4187 (package
4188 (name "python-cairocffi")
4189 (version "0.8.0")
4190 (source
4191 (origin
4192 (method url-fetch)
4193 ;; The archive on pypi is missing the 'utils' directory!
4194 (uri (string-append "https://github.com/Kozea/cairocffi/archive/v"
4195 version ".tar.gz"))
4196 (file-name (string-append name "-" version ".tar.gz"))
4197 (sha256
4198 (base32
4199 "1rk2dvy3fxrga6bvvxc2fi5lbaynm5h4a0w0aaxyn3bc77rszjg9"))))
4200 (build-system python-build-system)
4201 (outputs '("out" "doc"))
4202 (inputs
4203 `(("gdk-pixbuf" ,gdk-pixbuf)
4204 ("cairo" ,cairo)))
4205 (native-inputs
4206 `(("pkg-config" ,pkg-config)
4207 ("python-sphinx" ,python-sphinx)
4208 ("python-docutils" ,python-docutils)))
4209 (propagated-inputs
4210 `(("python-xcffib" ,python-xcffib))) ; used at run time
4211 (arguments
4212 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
4213 #:tests? #f
4214 #:phases
4215 (modify-phases %standard-phases
4216 (add-after 'install 'install-doc
4217 (lambda* (#:key inputs outputs #:allow-other-keys)
4218 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4219 (doc (string-append data "/doc/" ,name "-" ,version))
4220 (html (string-append doc "/html")))
4221 (setenv "LD_LIBRARY_PATH"
4222 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4223 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4224 (setenv "LANG" "en_US.UTF-8")
4225 (mkdir-p html)
4226 (for-each (lambda (file)
4227 (copy-file (string-append "." file)
4228 (string-append doc file)))
4229 '("/README.rst" "/CHANGES" "/LICENSE"))
4230 (system* "python" "setup.py" "build_sphinx")
4231 (copy-recursively "docs/_build/html" html)
4232 #t))))))
4233 (home-page "https://github.com/Kozea/cairocffi")
4234 (synopsis "Python bindings and object-oriented API for Cairo")
4235 (description
4236 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4237 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4238 graphics library with support for multiple backends including image buffers,
4239 PNG, PostScript, PDF, and SVG file output.")
4240 (license license:bsd-3)))
4241
4242 (define-public python2-cairocffi
4243 (package-with-python2 python-cairocffi))
4244
4245 (define-public python-decorator
4246 (package
4247 (name "python-decorator")
4248 (version "4.2.1")
4249 (source
4250 (origin
4251 (method url-fetch)
4252 (uri (pypi-uri "decorator" version))
4253 (sha256
4254 (base32 "03iaf116rm3w8b4agb8hzf6z9331mrvi4khfxq35zkx17sgxsikx"))))
4255 (build-system python-build-system)
4256 (arguments '(#:tests? #f)) ; no test target
4257 (home-page "https://pypi.python.org/pypi/decorator/")
4258 (synopsis "Python module to simplify usage of decorators")
4259 (description
4260 "The aim of the decorator module is to simplify the usage of decorators
4261 for the average programmer, and to popularize decorators usage giving examples
4262 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4263 etc. The core of this module is a decorator factory.")
4264 (license license:expat)))
4265
4266 (define-public python2-decorator
4267 (package-with-python2 python-decorator))
4268
4269 (define-public python-drmaa
4270 (package
4271 (name "python-drmaa")
4272 (version "0.7.7")
4273 (source
4274 (origin
4275 (method url-fetch)
4276 (uri (pypi-uri "drmaa" version))
4277 (sha256
4278 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4279 (build-system python-build-system)
4280 ;; The test suite requires libdrmaa which is provided by the cluster
4281 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4282 ;; should be set to the path of the libdrmaa library.
4283 (arguments '(#:tests? #f))
4284 (native-inputs
4285 `(("python-nose" ,python-nose)))
4286 (home-page "https://pypi.python.org/pypi/drmaa")
4287 (synopsis "Python bindings for the DRMAA library")
4288 (description
4289 "A Python package for Distributed Resource Management (DRM) job
4290 submission and control. This package is an implementation of the DRMAA 1.0
4291 Python language binding specification.")
4292 (license license:bsd-3)))
4293
4294 (define-public python2-drmaa
4295 (package-with-python2 python-drmaa))
4296
4297 (define-public python-grako
4298 (package
4299 (name "python-grako")
4300 (version "3.99.9")
4301 (source
4302 (origin
4303 (method url-fetch)
4304 (uri
4305 (pypi-uri "grako" version ".zip"))
4306 (sha256
4307 (base32
4308 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4309 (build-system python-build-system)
4310 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4311 (native-inputs
4312 `(("unzip" ,unzip)
4313 ("python-pytest" ,python-pytest)
4314 ("python-pytest-runner" ,python-pytest-runner)))
4315 (home-page "https://bitbucket.org/neogeny/grako")
4316 (synopsis "EBNF parser generator")
4317 (description
4318 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4319 memoizing PEG/Packrat parser in Python.")
4320 (license license:bsd-3)))
4321
4322 (define-public python2-grako
4323 (package-with-python2 python-grako))
4324
4325 (define-public python-gridmap
4326 (package
4327 (name "python-gridmap")
4328 (version "0.13.0")
4329 (source
4330 (origin
4331 (method url-fetch)
4332 (uri (string-append
4333 "https://github.com/pygridtools/gridmap/archive/v"
4334 version ".tar.gz"))
4335 (file-name (string-append name "-" version ".tar.gz"))
4336 (sha256
4337 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4338 (build-system python-build-system)
4339 (arguments
4340 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4341 (propagated-inputs
4342 `(("python-psutil" ,python-psutil)
4343 ("python-drmaa" ,python-drmaa)
4344 ("python-pyzmq" ,python-pyzmq)))
4345 (home-page "https://github.com/pygridtools/gridmap")
4346 (synopsis "Create jobs on a cluster directly from Python")
4347 (description
4348 "Gridmap is a Python package to allow you to easily create jobs on the
4349 cluster directly from Python. You can directly map Python functions onto the
4350 cluster without needing to write any wrapper code yourself.")
4351 (license license:gpl3+)))
4352
4353 (define-public python2-gridmap
4354 (package-with-python2 python-gridmap))
4355
4356 (define-public python-honcho
4357 (package
4358 (name "python-honcho")
4359 (version "1.0.1")
4360 (source
4361 (origin
4362 (method url-fetch)
4363 (uri (string-append
4364 "https://github.com/nickstenning/honcho/archive/v"
4365 version ".tar.gz"))
4366 (file-name (string-append name "-" version ".tar.gz"))
4367 (sha256
4368 (base32 "0zizn61n5z5hq421hkypk9pw8s6fpxw30f4hsg7k4ivwzy3gjw9j"))))
4369 (build-system python-build-system)
4370 (native-inputs
4371 `(("python-pytest" ,python-pytest)
4372 ("python-mock" ,python-mock)
4373 ("python-tox" ,python-tox)
4374 ("which" ,which))) ;for tests
4375 (propagated-inputs
4376 `(("python-jinja2" ,python-jinja2)))
4377 (arguments
4378 `(#:phases
4379 (modify-phases %standard-phases
4380 (delete 'check)
4381 (add-after 'install 'check
4382 (lambda* (#:key outputs inputs #:allow-other-keys)
4383 ;; fix honcho path in testsuite
4384 (substitute* "tests/conftest.py"
4385 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4386 "/bin/honcho" "'")))
4387 ;; It's easier to run tests after install.
4388 ;; Make installed package available for running the tests
4389 (add-installed-pythonpath inputs outputs)
4390 (zero? (system* "py.test" "-v")))))))
4391 (home-page "https://github.com/nickstenning/honcho")
4392 (synopsis "Manage Procfile-based applications")
4393 (description
4394 "A Procfile is a file which describes how to run an application
4395 consisting of serveral processes. honcho starts all listed processes.
4396 The output of all running processes is collected by honcho and
4397 displayed.")
4398 (license license:expat)))
4399
4400 (define-public python2-honcho
4401 (package-with-python2 python-honcho))
4402
4403 (define-public python-pexpect
4404 (package
4405 (name "python-pexpect")
4406 (version "4.2.1")
4407 (source
4408 (origin
4409 (method url-fetch)
4410 (uri (pypi-uri "pexpect" version))
4411 (sha256
4412 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
4413 (build-system python-build-system)
4414 (arguments
4415 `(#:phases
4416 (modify-phases %standard-phases
4417 (add-before 'check 'prepare-tests
4418 (lambda _
4419 (substitute* (find-files "tests")
4420 (("/bin/ls") (which "ls"))
4421 (("/bin/echo") (which "echo"))
4422 (("/bin/which") (which "which"))
4423 ;; Many tests try to use the /bin directory which
4424 ;; is not present in the build environment.
4425 ;; Use one that's non-empty and unlikely to change.
4426 (("/bin'") "/dev'"))
4427 ;; XXX: Socket connection test gets "Connection reset by peer".
4428 ;; Why does it not work? Delete for now.
4429 (delete-file "tests/test_socket.py")
4430 #t))
4431 (replace 'check (lambda _ (zero? (system* "nosetests" "-v")))))))
4432 (native-inputs
4433 `(("python-nose" ,python-nose)
4434 ("python-pytest" ,python-pytest)
4435 ("man-db" ,man-db)
4436 ("which" ,which)
4437 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4438 (propagated-inputs
4439 `(("python-ptyprocess" ,python-ptyprocess)))
4440 (home-page "http://pexpect.readthedocs.org/")
4441 (synopsis "Controlling interactive console applications")
4442 (description
4443 "Pexpect is a pure Python module for spawning child applications;
4444 controlling them; and responding to expected patterns in their output.
4445 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4446 child application and control it as if a human were typing commands.")
4447 (license license:isc)))
4448
4449 (define-public python2-pexpect
4450 (package-with-python2 python-pexpect))
4451
4452 (define-public python-setuptools-scm
4453 (package
4454 (name "python-setuptools-scm")
4455 (version "1.15.6")
4456 (source (origin
4457 (method url-fetch)
4458 (uri (pypi-uri "setuptools_scm" version))
4459 (sha256
4460 (base32
4461 "0pzvfmx8s20yrgkgwfbxaspz2x1g38qv61jpm0ns91lrb22ldas9"))))
4462 (build-system python-build-system)
4463 (home-page "https://github.com/pypa/setuptools_scm/")
4464 (synopsis "Manage Python package versions in SCM metadata")
4465 (description
4466 "Setuptools_scm handles managing your Python package versions in
4467 @dfn{software configuration management} (SCM) metadata instead of declaring
4468 them as the version argument or in a SCM managed file.")
4469 (license license:expat)))
4470
4471 (define-public python2-setuptools-scm
4472 (package-with-python2 python-setuptools-scm))
4473
4474 (define-public python-pathpy
4475 (package
4476 (name "python-pathpy")
4477 (version "11.0")
4478 (source
4479 (origin
4480 (method url-fetch)
4481 (uri (pypi-uri "path.py" version))
4482 (sha256
4483 (base32 "12s84maimiz61980q065rjgi8ang6xw2wwm64m0lmfks51dlw4qn"))))
4484 ;; (outputs '("out" "doc"))
4485 (build-system python-build-system)
4486 (propagated-inputs
4487 `(("python-appdirs" ,python-appdirs)))
4488 (native-inputs
4489 `(("python-setuptools-scm" ,python-setuptools-scm)
4490 ("python-sphinx" ,python-sphinx)
4491 ("python-rst.linker" ,python-rst.linker)
4492 ("python-pytest" ,python-pytest)
4493 ("python-pytest-runner" ,python-pytest-runner)))
4494 (arguments
4495 ;; FIXME: Documentation and tests require "jaraco.packaging".
4496 `(#:tests? #f))
4497 ;; #:phases
4498 ;; (modify-phases %standard-phases
4499 ;; (add-after 'build 'build-doc
4500 ;; (lambda _
4501 ;; (setenv "LANG" "en_US.UTF-8")
4502 ;; (zero? (system* "python" "setup.py" "build_sphinx"))))
4503 ;; (add-after 'install 'install-doc
4504 ;; (lambda* (#:key outputs #:allow-other-keys)
4505 ;; (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4506 ;; (doc (string-append data "/doc/" ,name "-" ,version))
4507 ;; (html (string-append doc "/html")))
4508 ;; (mkdir-p html)
4509 ;; (for-each (lambda (file)
4510 ;; (copy-file file (string-append doc "/" file)))
4511 ;; '("README.rst" "CHANGES.rst"))
4512 ;; (copy-recursively "build/sphinx/html" html)))))))
4513 (home-page "https://github.com/jaraco/path.py")
4514 (synopsis "Python module wrapper for built-in os.path")
4515 (description
4516 "@code{path.py} implements path objects as first-class entities, allowing
4517 common operations on files to be invoked on those path objects directly.")
4518 (license license:expat)))
4519
4520 (define-public python2-pathpy
4521 (package-with-python2 python-pathpy))
4522
4523 (define-public python-simplegeneric
4524 (package
4525 (name "python-simplegeneric")
4526 (version "0.8.1")
4527 (source
4528 (origin
4529 (method url-fetch)
4530 (uri (string-append "https://pypi.python.org/packages/source/s/"
4531 "simplegeneric/simplegeneric-" version ".zip"))
4532 (sha256
4533 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4534 (build-system python-build-system)
4535 (native-inputs
4536 `(("unzip" ,unzip)))
4537 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4538 (synopsis "Python module for simple generic functions")
4539 (description
4540 "The simplegeneric module lets you define simple single-dispatch generic
4541 functions, akin to Python’s built-in generic functions like @code{len()},
4542 @code{iter()} and so on. However, instead of using specially-named methods,
4543 these generic functions use simple lookup tables, akin to those used by
4544 e.g. @code{pickle.dump()} and other generic functions found in the Python
4545 standard library.")
4546 (license license:zpl2.1)))
4547
4548 (define-public python2-simplegeneric
4549 (package-with-python2 python-simplegeneric))
4550
4551 (define-public python-ipython-genutils
4552 ;; TODO: This package is retired, check if can be removed, see description.
4553 (package
4554 (name "python-ipython-genutils")
4555 (version "0.1.0")
4556 (source
4557 (origin
4558 (method url-fetch)
4559 (uri (string-append "https://pypi.python.org/packages/source/i/"
4560 "ipython_genutils/ipython_genutils-"
4561 version ".tar.gz"))
4562 (sha256
4563 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4564 (build-system python-build-system)
4565 (arguments `(#:tests? #f)) ; no tests
4566 (home-page "https://ipython.org")
4567 (synopsis "Vestigial utilities from IPython")
4568 (description
4569 "This package provides retired utilities from IPython. No packages
4570 outside IPython/Jupyter should depend on it.
4571
4572 This package shouldn't exist. It contains some common utilities shared by
4573 Jupyter and IPython projects during The Big Split. As soon as possible, those
4574 packages will remove their dependency on this, and this package will go
4575 away.")
4576 (license license:bsd-3)))
4577
4578 (define-public python2-ipython-genutils
4579 (package-with-python2 python-ipython-genutils))
4580
4581 (define-public python-traitlets
4582 (package
4583 (name "python-traitlets")
4584 (version "4.2.0")
4585 (source
4586 (origin
4587 (method url-fetch)
4588 (uri (pypi-uri "traitlets" version))
4589 (sha256
4590 (base32
4591 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
4592 (build-system python-build-system)
4593 (arguments
4594 `(#:phases
4595 (modify-phases %standard-phases
4596 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4597 (propagated-inputs
4598 `(("python-ipython-genutils" ,python-ipython-genutils)
4599 ("python-decorator" ,python-decorator)))
4600 (native-inputs
4601 `(("python-mock" ,python-mock)
4602 ("python-nose" ,python-nose)))
4603 (home-page "https://ipython.org")
4604 (synopsis "Configuration system for Python applications")
4605 (description
4606 "Traitlets is a framework that lets Python classes have attributes with
4607 type checking, dynamically calculated default values, and ‘on change’
4608 callbacks. The package also includes a mechanism to use traitlets for
4609 configuration, loading values from files or from command line arguments. This
4610 is a distinct layer on top of traitlets, so you can use traitlets in your code
4611 without using the configuration machinery.")
4612 (license license:bsd-3)))
4613
4614 (define-public python2-traitlets
4615 (package-with-python2 python-traitlets))
4616
4617 (define-public python-jupyter-core
4618 (package
4619 (name "python-jupyter-core")
4620 (version "4.4.0")
4621 (source
4622 (origin
4623 (method url-fetch)
4624 (uri (string-append (pypi-uri "jupyter_core" version)))
4625 (sha256
4626 (base32
4627 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
4628 (build-system python-build-system)
4629 ;; FIXME: not sure how to run the tests
4630 (arguments `(#:tests? #f))
4631 (propagated-inputs
4632 `(("python-traitlets" ,python-traitlets)))
4633 (home-page "http://jupyter.org/")
4634 (synopsis "Jupyter base package")
4635 (description
4636 "Jupyter core is the base package on which Jupyter projects rely.")
4637 (license license:bsd-3)))
4638
4639 (define-public python2-jupyter-core
4640 (package-with-python2 python-jupyter-core))
4641
4642 (define-public python-jupyter-client
4643 (package
4644 (name "python-jupyter-client")
4645 (version "4.4.0")
4646 (source
4647 (origin
4648 (method url-fetch)
4649 (uri (pypi-uri "jupyter_client" version))
4650 (sha256
4651 (base32
4652 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4653 (build-system python-build-system)
4654 ;; Tests fail because of missing native python kernel which I assume is
4655 ;; provided by the ipython package, which we cannot use because it would
4656 ;; cause a dependency cycle.
4657 (arguments `(#:tests? #f))
4658 (propagated-inputs
4659 `(("python-pyzmq" ,python-pyzmq)
4660 ("python-traitlets" ,python-traitlets)
4661 ("python-jupyter-core" ,python-jupyter-core)))
4662 (home-page "http://jupyter.org/")
4663 (synopsis "Jupyter protocol implementation and client libraries")
4664 (description
4665 "The @code{jupyter_client} package contains the reference implementation
4666 of the Jupyter protocol. It also provides client and kernel management APIs
4667 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4668 installing @code{kernelspec}s for use with Jupyter frontends.")
4669 (license license:bsd-3)))
4670
4671 (define-public python2-jupyter-client
4672 (package-with-python2 python-jupyter-client))
4673
4674 (define-public python-ipykernel
4675 (package
4676 (name "python-ipykernel")
4677 (version "4.5.2")
4678 (source
4679 (origin
4680 (method url-fetch)
4681 (uri (pypi-uri "ipykernel" version))
4682 (sha256
4683 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
4684 (build-system python-build-system)
4685 ;; The tests load a submodule of IPython. However, IPython itself depends
4686 ;; on ipykernel.
4687 (arguments `(#:tests? #f))
4688 (propagated-inputs
4689 ;; imported at runtime during connect
4690 `(("python-jupyter-client" ,python-jupyter-client)))
4691 (home-page "https://ipython.org")
4692 (synopsis "IPython Kernel for Jupyter")
4693 (description
4694 "This package provides the IPython kernel for Jupyter.")
4695 (license license:bsd-3)))
4696
4697 (define-public python2-ipykernel
4698 (package-with-python2 python-ipykernel))
4699
4700 (define-public python-ipython
4701 (package
4702 (name "python-ipython")
4703 (version "5.5.0")
4704 (source
4705 (origin
4706 (method url-fetch)
4707 (uri (pypi-uri "ipython" version ".tar.gz"))
4708 (sha256
4709 (base32 "03qmzpfy00if10i9k8fjkam1s4xg22j73f933x5d228z9n4rwik6"))))
4710 (build-system python-build-system)
4711 (outputs '("out" "doc"))
4712 (propagated-inputs
4713 `(("python-pyzmq" ,python-pyzmq)
4714 ("python-prompt-toolkit" ,python-prompt-toolkit)
4715 ("python-terminado" ,python-terminado)
4716 ("python-matplotlib" ,python-matplotlib)
4717 ("python-numpy" ,python-numpy)
4718 ("python-numpydoc" ,python-numpydoc)
4719 ("python-jinja2" ,python-jinja2)
4720 ("python-jupyter-console"
4721 ;; The python-ipython and python-jupyter-console require each
4722 ;; other. To get the functionality in both packages working, strip
4723 ;; down the python-jupyter-console package when using it as an input
4724 ;; to python-ipython.
4725 ,python-jupyter-console-minimal)
4726 ("python-mistune" ,python-mistune)
4727 ("python-pexpect" ,python-pexpect)
4728 ("python-pickleshare" ,python-pickleshare)
4729 ("python-simplegeneric" ,python-simplegeneric)
4730 ("python-jsonschema" ,python-jsonschema)
4731 ("python-traitlets" ,python-traitlets)
4732 ("python-ipykernel" ,python-ipykernel)
4733 ("python-nbformat" ,python-nbformat)
4734 ("python-pygments" ,python-pygments)))
4735 (inputs
4736 `(("readline" ,readline)
4737 ("which" ,which)))
4738 (native-inputs
4739 `(("graphviz" ,graphviz)
4740 ("pkg-config" ,pkg-config)
4741 ("python-requests" ,python-requests) ;; for tests
4742 ("python-testpath" ,python-testpath)
4743 ("python-nose" ,python-nose)
4744 ("python-sphinx" ,python-sphinx)
4745 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
4746 ;; FIXME: It's possible that a smaller union would work just as well.
4747 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
4748 texlive-fonts-ec
4749 texlive-generic-ifxetex
4750 texlive-generic-pdftex
4751 texlive-latex-amsfonts
4752 texlive-latex-capt-of
4753 texlive-latex-cmap
4754 texlive-latex-environ
4755 texlive-latex-eqparbox
4756 texlive-latex-etoolbox
4757 texlive-latex-expdlist
4758 texlive-latex-fancyhdr
4759 texlive-latex-fancyvrb
4760 texlive-latex-fncychap
4761 texlive-latex-float
4762 texlive-latex-framed
4763 texlive-latex-geometry
4764 texlive-latex-graphics
4765 texlive-latex-hyperref
4766 texlive-latex-mdwtools
4767 texlive-latex-multirow
4768 texlive-latex-oberdiek
4769 texlive-latex-parskip
4770 texlive-latex-preview
4771 texlive-latex-tabulary
4772 texlive-latex-threeparttable
4773 texlive-latex-titlesec
4774 texlive-latex-trimspaces
4775 texlive-latex-ucs
4776 texlive-latex-upquote
4777 texlive-latex-url
4778 texlive-latex-varwidth
4779 texlive-latex-wrapfig)))
4780 ("texinfo" ,texinfo)))
4781 (arguments
4782 `(#:phases
4783 (modify-phases %standard-phases
4784 (add-after
4785 'install 'install-doc
4786 (lambda* (#:key inputs outputs #:allow-other-keys)
4787 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4788 (doc (string-append data "/doc/" ,name "-" ,version))
4789 (html (string-append doc "/html"))
4790 (man1 (string-append data "/man/man1"))
4791 (info (string-append data "/info"))
4792 (examples (string-append doc "/examples"))
4793 (python-arg (string-append "PYTHON=" (which "python"))))
4794 (setenv "LANG" "en_US.utf8")
4795 ;; Make installed package available for running the tests
4796 (add-installed-pythonpath inputs outputs)
4797 (with-directory-excursion "docs"
4798 ;; FIXME: pdf fails to build
4799 ;;(system* "make" "pdf" "PAPER=a4")
4800 (system* "make" python-arg "html")
4801 (system* "make" python-arg "info"))
4802 (copy-recursively "docs/man" man1)
4803 (copy-recursively "examples" examples)
4804 (copy-recursively "docs/build/html" html)
4805 ;; (copy-file "docs/build/latex/ipython.pdf"
4806 ;; (string-append doc "/ipython.pdf"))
4807 (mkdir-p info)
4808 (copy-file "docs/build/texinfo/ipython.info"
4809 (string-append info "/ipython.info"))
4810 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4811 ;; Tests can only be run after the library has been installed and not
4812 ;; within the source directory.
4813 (delete 'check)
4814 (add-after
4815 'install 'check
4816 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4817 (if tests?
4818 (with-directory-excursion "/tmp"
4819 ;; Make installed package available for running the tests
4820 (add-installed-pythonpath inputs outputs)
4821 (setenv "HOME" "/tmp/") ;; required by a test
4822 (zero? (system* (string-append (assoc-ref outputs "out")
4823 "/bin/iptest"))))
4824 #t)))
4825 (add-before
4826 'install 'fix-tests
4827 (lambda* (#:key inputs #:allow-other-keys)
4828 (substitute* "./IPython/utils/_process_posix.py"
4829 (("/usr/bin/env', 'which") (which "which")))
4830 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4831 (("#!/usr/bin/env python")
4832 (string-append "#!" (which "python"))))
4833 ;; Disable 1 failing test
4834 (substitute* "./IPython/core/tests/test_magic.py"
4835 (("def test_dirops\\(\\):" all)
4836 (string-append "@dec.skipif(True)\n" all))))))))
4837 (home-page "https://ipython.org")
4838 (synopsis "IPython is a tool for interactive computing in Python")
4839 (description
4840 "IPython provides a rich architecture for interactive computing with:
4841 Powerful interactive shells, a browser-based notebook, support for interactive
4842 data visualization, embeddable interpreters and tools for parallel
4843 computing.")
4844 (license license:bsd-3)
4845 (properties `((python2-variant . ,(delay python2-ipython))))))
4846
4847 (define-public python2-ipython
4848 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4849 (package
4850 (inherit ipython)
4851 ;; FIXME: add pyreadline once available.
4852 (propagated-inputs
4853 `(("python2-backports-shutil-get-terminal-size"
4854 ,python2-backports-shutil-get-terminal-size)
4855 ("python2-pathlib2" ,python2-pathlib2)
4856 ,@(package-propagated-inputs ipython)))
4857 (native-inputs
4858 `(("python2-mock" ,python2-mock)
4859 ,@(package-native-inputs ipython))))))
4860
4861 (define-public python-urwid
4862 (package
4863 (name "python-urwid")
4864 (version "1.3.1")
4865 (source
4866 (origin
4867 (method url-fetch)
4868 (uri (pypi-uri "urwid" version))
4869 (sha256
4870 (base32
4871 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
4872 (build-system python-build-system)
4873 (arguments
4874 `(#:phases
4875 (modify-phases %standard-phases
4876 ;; Disable failing test. Bug filed upstream:
4877 ;; https://github.com/wardi/urwid/issues/164
4878 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
4879 (add-after 'unpack 'disable-failing-test
4880 (lambda _
4881 (substitute* "urwid/tests/test_event_loops.py"
4882 (("test_remove_watch_file")
4883 "disable_remove_watch_file")))))))
4884 (home-page "http://urwid.org")
4885 (synopsis "Console user interface library for Python")
4886 (description
4887 "Urwid is a curses-based UI/widget library for Python. It includes many
4888 features useful for text console applications.")
4889 (license license:lgpl2.1+)))
4890
4891 (define-public python2-urwid
4892 (let ((python2-urwid (package-with-python2 python-urwid)))
4893 (package
4894 (inherit python2-urwid)
4895 (arguments
4896 (append
4897 `(;; Explicitly using Python 2 is necessary due the argument list being
4898 ;; built from only the 'delete-test_vterm.py' phase and python-urwid's
4899 ;; package arguments, which by default assumes the use of Python 3.
4900 #:python ,python-2
4901 #:phases
4902 (modify-phases %standard-phases
4903 ;; Disable the vterm tests because of non-deterministic failures
4904 ;; with Python 2. See https://github.com/urwid/urwid/issues/230.
4905 (add-after 'unpack 'delete-test_vterm.py
4906 (delete-file "urwid/tests/test_vterm.py"))))
4907 (package-arguments python-urwid))))))
4908
4909 (define-public python-urwidtrees
4910 (package
4911 (name "python-urwidtrees")
4912 (version "1.0.2")
4913 (source
4914 (origin
4915 (method url-fetch)
4916 ;; package author intends on distributing via github rather than pypi:
4917 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4918 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4919 version ".tar.gz"))
4920 (file-name (string-append name "-" version ".tar.gz"))
4921 (sha256
4922 (base32
4923 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
4924 (build-system python-build-system)
4925 (arguments
4926 '(#:tests? #f)) ; no tests
4927 (propagated-inputs `(("python-urwid" ,python-urwid)))
4928 (home-page "https://github.com/pazz/urwidtrees")
4929 (synopsis "Tree widgets for urwid")
4930 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4931 toolkit. Use it to build trees of widgets.")
4932 (license license:gpl3+)))
4933
4934 (define-public python2-urwidtrees
4935 (package-with-python2 python-urwidtrees))
4936
4937 (define-public python-dbus
4938 (package
4939 (name "python-dbus")
4940 (version "1.2.0")
4941 (source
4942 (origin
4943 (method url-fetch)
4944 (uri (string-append
4945 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
4946 version ".tar.gz"))
4947 (sha256
4948 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
4949 (build-system gnu-build-system)
4950 (arguments
4951 '(#:phases
4952 (modify-phases %standard-phases
4953 (add-before
4954 'check 'pre-check
4955 (lambda _
4956 ;; XXX: For the missing '/etc/machine-id'.
4957 (substitute* "test/run-test.sh"
4958 (("DBUS_FATAL_WARNINGS=1")
4959 "DBUS_FATAL_WARNINGS=0"))
4960 #t)))))
4961 (native-inputs
4962 `(("pkg-config" ,pkg-config)))
4963 (inputs
4964 `(("python" ,python)
4965 ("dbus-glib" ,dbus-glib)))
4966 (synopsis "Python bindings for D-bus")
4967 (description "python-dbus provides bindings for libdbus, the reference
4968 implementation of D-Bus.")
4969 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
4970 (license license:expat)))
4971
4972 (define-public python2-dbus
4973 (package (inherit python-dbus)
4974 (name "python2-dbus")
4975 (inputs `(("python" ,python-2)
4976 ,@(alist-delete "python"
4977 (package-inputs python-dbus)
4978 equal?)))
4979 ;; FIXME: on Python 2, the test_utf8 fails with:
4980 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4981 (arguments `(#:tests? #f))))
4982
4983 (define-public python-lxml
4984 (package
4985 (name "python-lxml")
4986 (version "3.8.0")
4987 (source
4988 (origin
4989 (method url-fetch)
4990 (uri (pypi-uri "lxml" version))
4991 (sha256
4992 (base32
4993 "15nvf6n285n282682qyw3wihsncb0x5amdhyi4b83bfa2nz74vvk"))))
4994 (build-system python-build-system)
4995 (inputs
4996 `(("libxml2" ,libxml2)
4997 ("libxslt" ,libxslt)))
4998 (home-page "http://lxml.de/")
4999 (synopsis
5000 "Python XML processing library")
5001 (description
5002 "The lxml XML toolkit is a Pythonic binding for the C libraries
5003 libxml2 and libxslt.")
5004 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5005
5006 (define-public python2-lxml
5007 (package-with-python2 python-lxml))
5008
5009 ;; beautifulsoup4 has a totally different namespace than 3.x,
5010 ;; and pypi seems to put it under its own name, so I guess we should too
5011 (define-public python-beautifulsoup4
5012 (package
5013 (name "python-beautifulsoup4")
5014 (version "4.5.3")
5015 (source
5016 (origin
5017 (method url-fetch)
5018 (uri (pypi-uri "beautifulsoup4" version))
5019 (sha256
5020 (base32
5021 "0glaw1vyxnbp03fni7h5496n6iib0n5iim4gax1n0ngscs9s075j"))))
5022 (build-system python-build-system)
5023 (arguments
5024 `(#:phases
5025 (modify-phases %standard-phases
5026 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5027 ;; must use this conversion script when building with Python 3. The
5028 ;; conversion script also runs the tests.
5029 ;; For more information, see the file 'convert-py3k' in the source
5030 ;; distribution.
5031 (replace 'check
5032 (lambda _ (zero? (system* "./convert-py3k")))))))
5033 (home-page
5034 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5035 (synopsis
5036 "Python screen-scraping library")
5037 (description
5038 "Beautiful Soup is a Python library designed for rapidly setting up
5039 screen-scraping projects. It offers Pythonic idioms for navigating,
5040 searching, and modifying a parse tree, providing a toolkit for
5041 dissecting a document and extracting what you need. It automatically
5042 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5043 (license license:expat)
5044 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5045
5046 (define-public python2-beautifulsoup4
5047 (package
5048 (inherit (package-with-python2
5049 (strip-python2-variant python-beautifulsoup4)))
5050 (arguments `(#:python ,python-2))))
5051
5052 (define-public python-netifaces
5053 (package
5054 (name "python-netifaces")
5055 (version "0.10.7")
5056 (source
5057 (origin
5058 (method url-fetch)
5059 (uri (pypi-uri "netifaces" version))
5060 (sha256
5061 (base32
5062 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5063 (build-system python-build-system)
5064 (home-page "https://github.com/al45tair/netifaces")
5065 (synopsis
5066 "Python module for portable network interface information")
5067 (description
5068 "Netifaces is a Python module providing information on network
5069 interfaces in an easy and portable manner.")
5070 (license license:expat)))
5071
5072 (define-public python2-netifaces
5073 (package-with-python2 python-netifaces))
5074
5075 (define-public python-networkx
5076 (package
5077 (name "python-networkx")
5078 (version "2.1")
5079 (source
5080 (origin
5081 (method url-fetch)
5082 (uri (pypi-uri "networkx" version ".zip"))
5083 (sha256
5084 (base32 "1ccb8mfz4m821k9y0cigkbq42q2sbb4dj5fbjshp0awp32j2q9v4"))))
5085 (build-system python-build-system)
5086 ;; python-decorator is needed at runtime
5087 (propagated-inputs
5088 `(("python-decorator" ,python-decorator)))
5089 (native-inputs
5090 `(("python-nose" ,python-nose)
5091 ("unzip" ,unzip)))
5092 (home-page "http://networkx.github.io/")
5093 (synopsis "Python module for creating and manipulating graphs and networks")
5094 (description
5095 "NetworkX is a Python package for the creation, manipulation, and study
5096 of the structure, dynamics, and functions of complex networks.")
5097 (license license:bsd-3)))
5098
5099 (define-public python2-networkx
5100 (package-with-python2 python-networkx))
5101
5102 ;; Define new package, because the current version of python-colormath does
5103 ;; not build against 2.0.
5104 (define-public python-networkx2
5105 (package (inherit python-networkx)
5106 (name "python-networkx2")
5107 (version "2.0")
5108 (source
5109 (origin
5110 (method url-fetch)
5111 (uri (pypi-uri "networkx" version ".zip"))
5112 (sha256
5113 (base32
5114 "1ajl2jp8qry9nyjzzkqpy0vmsr14d23z1qk7y0vr5iwjbpvzhpyd"))
5115 (patches
5116 (search-patches "python-networkx2-reproducible-build.patch"))))))
5117
5118 (define-public python2-networkx2
5119 (package-with-python2 python-networkx2))
5120
5121 (define-public snakemake
5122 (package
5123 (name "snakemake")
5124 (version "4.4.0")
5125 (source
5126 (origin
5127 (method url-fetch)
5128 (uri (pypi-uri "snakemake" version))
5129 (sha256
5130 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5131 (build-system python-build-system)
5132 (arguments
5133 ;; TODO: Package missing test dependencies.
5134 '(#:tests? #f
5135 #:phases
5136 (modify-phases %standard-phases
5137 ;; For cluster execution Snakemake will call Python. Since there is
5138 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5139 ;; this by calling the snakemake wrapper instead.
5140 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5141 (lambda* (#:key outputs #:allow-other-keys)
5142 (substitute* "snakemake/executors.py"
5143 (("\\{sys.executable\\} -m snakemake")
5144 (string-append (assoc-ref outputs "out")
5145 "/bin/snakemake")))
5146 #t)))))
5147 (propagated-inputs
5148 `(("python-wrapt" ,python-wrapt)
5149 ("python-requests" ,python-requests)
5150 ("python-appdirs" ,python-appdirs)
5151 ("python-configargparse" ,python-configargparse)
5152 ("python-pyyaml" ,python-pyyaml)
5153 ("python-ratelimiter" ,python-ratelimiter)))
5154 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
5155 (synopsis "Python-based execution environment for make-like workflows")
5156 (description
5157 "Snakemake aims to reduce the complexity of creating workflows by
5158 providing a clean and modern domain specific specification language (DSL) in
5159 Python style, together with a fast and comfortable execution environment.")
5160 (license license:expat)))
5161
5162 (define-public python-pyqrcode
5163 (package
5164 (name "python-pyqrcode")
5165 (version "1.2.1")
5166 (source
5167 (origin
5168 (method url-fetch)
5169 (uri (pypi-uri "PyQRCode" version))
5170 (sha256
5171 (base32
5172 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5173 (build-system python-build-system)
5174 (home-page
5175 "https://github.com/mnooner256/pyqrcode")
5176 (synopsis "QR code generator")
5177 (description
5178 "Pyqrcode is a QR code generator written purely in Python with
5179 SVG, EPS, PNG and terminal output.")
5180 (license license:bsd-3)))
5181
5182 (define-public python-seaborn
5183 (package
5184 (name "python-seaborn")
5185 (version "0.7.1")
5186 (source
5187 (origin
5188 (method url-fetch)
5189 (uri (pypi-uri "seaborn" version))
5190 (sha256
5191 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
5192 (build-system python-build-system)
5193 (arguments
5194 '(#:tests? #f)) ; Tests requires a running X11 server.
5195 (propagated-inputs
5196 `(("python-pandas" ,python-pandas)
5197 ("python-matplotlib" ,python-matplotlib)
5198 ("python-scipy" ,python-scipy)))
5199 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5200 (synopsis "Statistical data visualization")
5201 (description
5202 "Seaborn is a library for making attractive and informative statistical
5203 graphics in Python. It is built on top of matplotlib and tightly integrated
5204 with the PyData stack, including support for numpy and pandas data structures
5205 and statistical routines from scipy and statsmodels.")
5206 (license license:bsd-3)
5207 (properties `((python2-variant . ,(delay python2-seaborn))))))
5208
5209 (define-public python2-seaborn
5210 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5211 (package
5212 (inherit base)
5213 (propagated-inputs `(("python2-pytz" ,python2-pytz)
5214 ,@(package-propagated-inputs base))))))
5215
5216 (define-public python-mpmath
5217 (package
5218 (name "python-mpmath")
5219 (version "0.19")
5220 (source (origin
5221 (method url-fetch)
5222 (uri (string-append "http://mpmath.org/files/mpmath-"
5223 version ".tar.gz"))
5224 (sha256
5225 (base32
5226 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5227 (build-system python-build-system)
5228 (arguments
5229 '(#:phases
5230 (modify-phases %standard-phases
5231 (replace 'check
5232 (lambda _
5233 (zero?
5234 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
5235 (home-page "http://mpmath.org")
5236 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5237 (description
5238 "@code{mpmath} can be used as an arbitrary-precision substitute for
5239 Python's float/complex types and math/cmath modules, but also does much
5240 more advanced mathematics.")
5241 (license license:bsd-3)))
5242
5243 (define-public python2-mpmath
5244 (package-with-python2 python-mpmath))
5245
5246 (define-public python-bigfloat
5247 (package
5248 (name "python-bigfloat")
5249 (version "0.3.0")
5250 (source
5251 (origin
5252 (method url-fetch)
5253 (uri (pypi-uri "bigfloat" version))
5254 (sha256
5255 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
5256 (build-system python-build-system)
5257 (inputs
5258 `(("mpfr" ,mpfr)))
5259 (home-page "https://github.com/mdickinson/bigfloat")
5260 (synopsis "Arbitrary precision floating-point arithmetic for Python")
5261 (description
5262 "This packages provides a Python interface to the MPFR library for
5263 multiprecision arithmetic.")
5264 (license license:lgpl3+)))
5265
5266 (define-public python2-bigfloat
5267 (package-with-python2 python-bigfloat))
5268
5269 (define-public python-sympy
5270 (package
5271 (name "python-sympy")
5272 (version "1.1.1")
5273 (source
5274 (origin
5275 (method url-fetch)
5276 (uri (string-append
5277 "https://github.com/sympy/sympy/releases/download/sympy-"
5278 version "/sympy-" version ".tar.gz"))
5279 (sha256
5280 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
5281 (build-system python-build-system)
5282 (arguments
5283 `(#:phases
5284 (modify-phases %standard-phases
5285 ;; Run the core tests after installation. By default it would run
5286 ;; *all* tests, which take a very long time to complete and are known
5287 ;; to be flaky.
5288 (delete 'check)
5289 (add-after 'install 'check
5290 (lambda* (#:key outputs #:allow-other-keys)
5291 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
5292 #t)))))
5293 (propagated-inputs
5294 `(("python-mpmath" ,python-mpmath)))
5295 (home-page "http://www.sympy.org/")
5296 (synopsis "Python library for symbolic mathematics")
5297 (description
5298 "SymPy is a Python library for symbolic mathematics. It aims to become a
5299 full-featured computer algebra system (CAS) while keeping the code as simple
5300 as possible in order to be comprehensible and easily extensible.")
5301 (license license:bsd-3)))
5302
5303 (define-public python2-sympy
5304 (package
5305 (inherit (package-with-python2 python-sympy))
5306 (arguments
5307 `(#:phases
5308 (modify-phases %standard-phases
5309 ;; Run the core tests after installation. By default it would run
5310 ;; *all* tests, which take a very long time to complete and are known
5311 ;; to be flaky.
5312 (delete 'check)
5313 (add-after 'install 'check
5314 (lambda* (#:key outputs #:allow-other-keys)
5315 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
5316 #t)))))))
5317
5318 (define-public python-q
5319 (package
5320 (name "python-q")
5321 (version "2.6")
5322 (source
5323 (origin
5324 (method url-fetch)
5325 (uri (pypi-uri "q" version))
5326 (sha256
5327 (base32
5328 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5329 (build-system python-build-system)
5330 (home-page "https://github.com/zestyping/q")
5331 (synopsis "Quick-and-dirty debugging output for tired programmers")
5332 (description
5333 "q is a Python module for \"print\" style of debugging Python code. It
5334 provides convenient short API for print out of values, tracebacks, and
5335 falling into the Python interpreter.")
5336 (license license:asl2.0)))
5337
5338 (define-public python2-q
5339 (package-with-python2 python-q))
5340
5341 (define-public python2-xlib
5342 (package
5343 (name "python2-xlib")
5344 (version "0.14")
5345 (source (origin
5346 (method url-fetch)
5347 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5348 "/" version "/"
5349 "python-xlib-" version ".tar.gz"))
5350 (sha256
5351 (base32
5352 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5353 (build-system python-build-system)
5354 (arguments
5355 `(#:python ,python-2 ;Python 2 only
5356 #:tests? #f)) ;no tests
5357 (home-page "http://python-xlib.sourceforge.net/")
5358 (synopsis "Python X11 client library")
5359 (description
5360 "The Python X Library is intended to be a fully functional X client
5361 library for Python programs. It is useful to implement low-level X clients.
5362 It is written entirely in Python.")
5363 (license license:gpl2+)))
5364
5365 (define-public python-singledispatch
5366 (package
5367 (name "python-singledispatch")
5368 (version "3.4.0.3")
5369 (source
5370 (origin
5371 (method url-fetch)
5372 (uri (pypi-uri "singledispatch" version))
5373 (sha256
5374 (base32
5375 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5376 (build-system python-build-system)
5377 (native-inputs
5378 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5379 (home-page
5380 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5381 (synopsis "Backport of singledispatch feature from Python 3.4")
5382 (description
5383 "This library brings functools.singledispatch from Python 3.4 to Python
5384 2.6-3.3.")
5385 (license license:expat)))
5386
5387 (define-public python2-singledispatch
5388 (package-with-python2 python-singledispatch))
5389
5390 ;; the python- version can be removed with python-3.5
5391 (define-public python-backports-abc
5392 (package
5393 (name "python-backports-abc")
5394 (version "0.5")
5395 (source
5396 (origin
5397 (method url-fetch)
5398 (uri (pypi-uri "backports_abc" version))
5399 (sha256
5400 (base32
5401 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5402 (build-system python-build-system)
5403 (home-page "https://github.com/cython/backports_abc")
5404 (synopsis "Backport of additions to the 'collections.abc' module")
5405 (description
5406 "Python-backports-abc provides a backport of additions to the
5407 'collections.abc' module in Python-3.5.")
5408 (license license:psfl)))
5409
5410 (define-public python2-backports-abc
5411 (package-with-python2 python-backports-abc))
5412
5413 (define-public python-backports-csv
5414 (package
5415 (name "python-backports-csv")
5416 (version "1.0.5")
5417 (source
5418 (origin
5419 (method url-fetch)
5420 (uri (pypi-uri "backports.csv" version))
5421 (sha256
5422 (base32
5423 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
5424 (build-system python-build-system)
5425 (home-page "https://github.com/ryanhiebert/backports.csv")
5426 (synopsis "Backport of Python 3's csv module for Python 2")
5427 (description
5428 "Provides a backport of Python 3's @code{csv} module for parsing
5429 comma separated values. The API of the @code{csv} module in Python 2
5430 is drastically different from the @code{csv} module in Python 3.
5431 This is due, for the most part, to the difference between str in
5432 Python 2 and Python 3.")
5433 (license license:psfl)))
5434
5435 (define-public python2-backports-csv
5436 (package-with-python2 python-backports-csv))
5437
5438 (define-public python2-backports-shutil-get-terminal-size
5439 (package
5440 (name "python2-backports-shutil-get-terminal-size")
5441 (version "1.0.0")
5442 (source
5443 (origin
5444 (method url-fetch)
5445 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
5446 (sha256
5447 (base32
5448 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
5449 (build-system python-build-system)
5450 (arguments
5451 `(#:python ,python-2
5452 #:phases
5453 (modify-phases %standard-phases
5454 (replace 'check
5455 (lambda _
5456 (zero? (system* "py.test" "-v")))))))
5457 (native-inputs
5458 `(("python2-pytest" ,python2-pytest)))
5459 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
5460 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
5461 (description
5462 "This package provides a backport of the @code{get_terminal_size
5463 function} from Python 3.3's @code{shutil}.
5464 Unlike the original version it is written in pure Python rather than C,
5465 so it might be a tiny bit slower.")
5466 (license license:expat)))
5467
5468 (define-public python-waf
5469 (package
5470 (name "python-waf")
5471 (version "1.9.8")
5472 (source (origin
5473 (method url-fetch)
5474 (uri (string-append "https://waf.io/"
5475 "waf-" version ".tar.bz2"))
5476 (sha256
5477 (base32
5478 "0wl4cnmp06lfxqjxaan58bqxn27smhydz0sg5prrfbl3bsw4gv6q"))))
5479 (build-system python-build-system)
5480 (arguments
5481 '(#:phases
5482 (modify-phases %standard-phases
5483 (replace 'build
5484 (lambda _
5485 (invoke "python" "waf-light" "configure" "build")))
5486 (replace 'check
5487 (lambda _
5488 (invoke "python" "waf" "--version")))
5489 (replace 'install
5490 (lambda _
5491 (copy-file "waf" %output)
5492 #t)))))
5493 (home-page "https://waf.io/")
5494 (synopsis "Python-based build system")
5495 (description
5496 "Waf is a Python-based framework for configuring, compiling and installing
5497 applications.")
5498 (license license:bsd-3)))
5499
5500 (define-public python2-waf
5501 (package-with-python2 python-waf))
5502
5503 (define-public python-pyzmq
5504 (package
5505 (name "python-pyzmq")
5506 (version "15.1.0")
5507 (source
5508 (origin
5509 (method url-fetch)
5510 (uri (pypi-uri "pyzmq" version))
5511 (sha256
5512 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
5513 (build-system python-build-system)
5514 (arguments
5515 `(#:configure-flags
5516 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5517 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5518 ;; --inplace' for 'python setup.py test' to work.
5519 #:tests? #f))
5520 (inputs
5521 `(("zeromq" ,zeromq)))
5522 (native-inputs
5523 `(("pkg-config" ,pkg-config)
5524 ("python-nose" ,python-nose)))
5525 (home-page "https://github.com/zeromq/pyzmq")
5526 (synopsis "Python bindings for 0MQ")
5527 (description
5528 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5529 (license license:bsd-4)))
5530
5531 (define-public python2-pyzmq
5532 (package-with-python2 python-pyzmq))
5533
5534 (define-public python-pep8
5535 (package
5536 (name "python-pep8")
5537 (version "1.7.0")
5538 (source
5539 (origin
5540 (method url-fetch)
5541 (uri (pypi-uri "pep8" version))
5542 (sha256
5543 (base32
5544 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5545 (build-system python-build-system)
5546 (home-page "http://pep8.readthedocs.org/")
5547 (synopsis "Python style guide checker")
5548 (description
5549 "This tools checks Python code against some of the style conventions in
5550 PEP 8.")
5551 (license license:expat)))
5552
5553 (define-public python2-pep8
5554 (package-with-python2 python-pep8))
5555
5556 (define-public python-pyflakes
5557 (package
5558 (name "python-pyflakes")
5559 (version "1.5.0")
5560 (source
5561 (origin
5562 (method url-fetch)
5563 (uri (pypi-uri "pyflakes" version))
5564 (sha256
5565 (base32
5566 "1x1pcca4a24k4pw8x1c77sgi58cg1wl2k38mp8a25k608pzls3da"))))
5567 (build-system python-build-system)
5568 (home-page
5569 "https://github.com/pyflakes/pyflakes")
5570 (synopsis "Passive checker of Python programs")
5571 (description
5572 "Pyflakes statically checks Python source code for common errors.")
5573 (license license:expat)))
5574
5575 (define-public python2-pyflakes
5576 (package-with-python2 python-pyflakes))
5577
5578 (define-public python-mccabe
5579 (package
5580 (name "python-mccabe")
5581 (version "0.6.1")
5582 (source
5583 (origin
5584 (method url-fetch)
5585 (uri (pypi-uri "mccabe" version))
5586 (sha256
5587 (base32
5588 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
5589 (build-system python-build-system)
5590 (native-inputs
5591 `(("python-pytest" ,python-pytest-bootstrap)
5592 ("python-pytest-runner" ,python-pytest-runner)))
5593 (home-page "https://github.com/flintwork/mccabe")
5594 (synopsis "McCabe checker, plugin for flake8")
5595 (description
5596 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5597 complexity of Python source code.")
5598 (license license:expat)))
5599
5600 (define-public python2-mccabe
5601 (package-with-python2 python-mccabe))
5602
5603 (define-public python-mccabe-0.2.1
5604 (package (inherit python-mccabe)
5605 (version "0.2.1")
5606 (source
5607 (origin
5608 (method url-fetch)
5609 (uri (pypi-uri "mccabe" version))
5610 (sha256
5611 (base32
5612 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5613
5614 (define-public python2-mccabe-0.2.1
5615 (package-with-python2 python-mccabe-0.2.1))
5616
5617 ;; Flake8 2.4.1 requires an older version of pep8.
5618 ;; This should be removed ASAP.
5619 (define-public python-pep8-1.5.7
5620 (package (inherit python-pep8)
5621 (version "1.5.7")
5622 (source
5623 (origin
5624 (method url-fetch)
5625 (uri (string-append
5626 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5627 version
5628 ".tar.gz"))
5629 (sha256
5630 (base32
5631 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
5632 (arguments
5633 ;; XXX Tests not compatible with Python 3.5.
5634 '(#:tests? #f))))
5635
5636 (define-public python2-pep8-1.5.7
5637 (package-with-python2 python-pep8-1.5.7))
5638
5639 ;; Flake8 2.4.1 requires an older version of pyflakes.
5640 ;; This should be removed ASAP.
5641 (define-public python-pyflakes-0.8.1
5642 (package (inherit python-pyflakes)
5643 (version "0.8.1")
5644 (source
5645 (origin
5646 (method url-fetch)
5647 (uri (string-append
5648 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5649 version
5650 ".tar.gz"))
5651 (sha256
5652 (base32
5653 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
5654 (arguments
5655 ;; XXX Tests not compatible with Python 3.5.
5656 '(#:tests? #f))))
5657
5658 (define-public python2-pyflakes-0.8.1
5659 (package-with-python2 python-pyflakes-0.8.1))
5660
5661 (define-public python-flake8
5662 (package
5663 (name "python-flake8")
5664 (version "3.4.1")
5665 (source
5666 (origin
5667 (method url-fetch)
5668 (uri (pypi-uri "flake8" version))
5669 (sha256
5670 (base32
5671 "1n0i38592vy3q0x2a9bf8z6rhhn04i30wsn5i5zzcj7qkxvl8062"))))
5672 (build-system python-build-system)
5673 (arguments
5674 `(#:phases
5675 (modify-phases %standard-phases
5676 (delete 'check)
5677 (add-after 'install 'check
5678 (lambda* (#:key inputs outputs #:allow-other-keys)
5679 (add-installed-pythonpath inputs outputs)
5680 (zero? (system* "pytest" "-v")))))))
5681 (propagated-inputs
5682 `(("python-pycodestyle" ,python-pycodestyle)
5683 ("python-pyflakes" ,python-pyflakes)
5684 ;; flake8 depends on a newer setuptools than provided by python.
5685 ("python-setuptools" ,python-setuptools)
5686 ("python-mccabe" ,python-mccabe)))
5687 (native-inputs
5688 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
5689 ("python-pytest" ,python-pytest-bootstrap)
5690 ("python-pytest-runner" ,python-pytest-runner)))
5691 (home-page "https://gitlab.com/pycqa/flake8")
5692 (synopsis
5693 "The modular source code checker: pep8, pyflakes and co")
5694 (description
5695 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5696 (properties `((python2-variant . ,(delay python2-flake8))))
5697 (license license:expat)))
5698
5699 (define-public python2-flake8
5700 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
5701 (package (inherit base)
5702 (propagated-inputs
5703 `(("python2-configparser" ,python2-configparser)
5704 ("python2-enum34" ,python2-enum34)
5705 ,@(package-propagated-inputs base))))))
5706
5707 ;; python-hacking requires flake8 <2.6.0.
5708 (define-public python-flake8-2.5
5709 (package
5710 (inherit python-flake8)
5711 (version "2.5.5")
5712 (source (origin
5713 (method url-fetch)
5714 (uri (pypi-uri "flake8" version))
5715 (sha256
5716 (base32
5717 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
5718 (propagated-inputs
5719 `(("python-pep8" ,python-pep8)
5720 ,@(package-propagated-inputs python-flake8)))
5721 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
5722
5723 (define-public python2-flake8-2.5
5724 (package
5725 (inherit python2-flake8)
5726 (version (package-version python-flake8-2.5))
5727 (source (origin
5728 (inherit (package-source python-flake8-2.5))))
5729 (propagated-inputs
5730 `(("python2-pep8" ,python2-pep8)
5731 ,@(package-propagated-inputs python2-flake8)))))
5732
5733 (define-public python-flake8-polyfill
5734 (package
5735 (name "python-flake8-polyfill")
5736 (version "1.0.2")
5737 (source
5738 (origin
5739 (method url-fetch)
5740 (uri (pypi-uri "flake8-polyfill" version))
5741 (sha256
5742 (base32
5743 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
5744 (build-system python-build-system)
5745 (arguments
5746 '(#:phases
5747 (modify-phases %standard-phases
5748 (replace 'check
5749 (lambda _
5750 (setenv "PYTHONPATH"
5751 (string-append (getcwd) "/build/lib:"
5752 (getenv "PYTHONPATH")))
5753 (zero? (system* "py.test" "-v")))))))
5754 (native-inputs
5755 `(("python-flake8" ,python-flake8)
5756 ("python-mock" ,python-mock)
5757 ("python-pep8" ,python-pep8)
5758 ("python-pycodestyle" ,python-pycodestyle)
5759 ("python-pytest" ,python-pytest)))
5760 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
5761 (synopsis "Polyfill package for Flake8 plugins")
5762 (description
5763 "This package that provides some compatibility helpers for Flake8
5764 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
5765 (license license:expat)))
5766
5767 (define-public python2-flake8-polyfill
5768 (package-with-python2 python-flake8-polyfill))
5769
5770 (define-public python-mistune
5771 (package
5772 (name "python-mistune")
5773 (version "0.8.3")
5774 (source
5775 (origin
5776 (method url-fetch)
5777 (uri (pypi-uri "mistune" version))
5778 (sha256
5779 (base32
5780 "06b662p6kf46wh2jsabaqhaq4bz1srh2zxkrnx4yg96azlxw645w"))))
5781 (build-system python-build-system)
5782 (native-inputs
5783 `(("python-nose" ,python-nose)
5784 ("python-cython" ,python-cython)))
5785 (home-page "https://github.com/lepture/mistune")
5786 (synopsis "Markdown parser in pure Python")
5787 (description "This package provides a fast markdown parser in pure
5788 Python.")
5789 (license license:bsd-3)))
5790
5791 (define-public python2-mistune
5792 (package-with-python2 python-mistune))
5793
5794 (define-public python-markdown
5795 (package
5796 (name "python-markdown")
5797 (version "2.6.11")
5798 (source
5799 (origin
5800 (method url-fetch)
5801 (uri (pypi-uri "Markdown" version))
5802 (sha256
5803 (base32
5804 "108g80ryzykh8bj0i7jfp71510wrcixdi771lf2asyghgyf8cmm8"))))
5805 (build-system python-build-system)
5806 (arguments
5807 `(#:phases
5808 (modify-phases %standard-phases
5809 (replace 'check
5810 (lambda _
5811 (zero? (system* "python" "run-tests.py")))))))
5812 (native-inputs
5813 `(("python-nose" ,python-nose)
5814 ("python-pyyaml" ,python-pyyaml)))
5815 (home-page "https://pythonhosted.org/Markdown/")
5816 (synopsis "Python implementation of Markdown")
5817 (description
5818 "This package provides a Python implementation of John Gruber's
5819 Markdown. The library features international input, various Markdown
5820 extensions, and several HTML output formats. A command line wrapper
5821 markdown_py is also provided to convert Markdown files to HTML.")
5822 (license license:bsd-3)))
5823
5824 (define-public python2-markdown
5825 (package-with-python2 python-markdown))
5826
5827 (define-public python-ptyprocess
5828 (package
5829 (name "python-ptyprocess")
5830 (version "0.5.2")
5831 (source
5832 (origin
5833 (method url-fetch)
5834 (uri (pypi-uri "ptyprocess" version))
5835 (sha256
5836 (base32
5837 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
5838 (build-system python-build-system)
5839 (native-inputs
5840 `(("python-nose" ,python-nose)))
5841 (arguments
5842 `(#:phases
5843 (modify-phases %standard-phases
5844 (replace 'check
5845 (lambda _
5846 (zero? (system* "nosetests")))))))
5847 (home-page "https://github.com/pexpect/ptyprocess")
5848 (synopsis "Run a subprocess in a pseudo terminal")
5849 (description
5850 "This package provides a Python library used to launch a subprocess in a
5851 pseudo terminal (pty), and interact with both the process and its pty.")
5852 (license license:isc)))
5853
5854 (define-public python2-ptyprocess
5855 (package-with-python2 python-ptyprocess))
5856
5857 (define-public python-cram
5858 (package
5859 (name "python-cram")
5860 (version "0.7")
5861 (home-page "https://bitheap.org/cram/")
5862 (source (origin
5863 (method url-fetch)
5864 (uri (list (string-append home-page "cram-"
5865 version ".tar.gz")
5866 (pypi-uri "cram" version)))
5867 (sha256
5868 (base32
5869 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
5870 (arguments
5871 '(#:phases
5872 (modify-phases %standard-phases
5873 (add-after 'unpack 'patch-source
5874 (lambda _
5875 (substitute* (find-files "cram" ".*\\.py$")
5876 ;; Replace default shell path.
5877 (("/bin/sh") (which "sh")))
5878 (substitute* (find-files "tests" ".*\\.t$")
5879 (("md5") "md5sum")
5880 (("/bin/bash") (which "bash"))
5881 (("/bin/sh") (which "sh")))
5882 (substitute* "cram/_test.py"
5883 ;; This hack works around a bug triggered by substituting
5884 ;; the /bin/sh paths. "tests/usage.t" compares the output of
5885 ;; "cram -h", which breaks the output at 80 characters. This
5886 ;; causes the line showing the default shell to break into two
5887 ;; lines, but the test expects a single line...
5888 (("env\\['COLUMNS'\\] = '80'")
5889 "env['COLUMNS'] = '160'"))
5890 #t))
5891 (delete 'check)
5892 (add-after 'install 'check
5893 ;; The test phase uses the built library and executable.
5894 ;; It's easier to run it after install since the build
5895 ;; directory contains version-specific PATH.
5896 (lambda* (#:key inputs outputs #:allow-other-keys)
5897 (add-installed-pythonpath inputs outputs)
5898 (setenv "PATH" (string-append (getenv "PATH") ":"
5899 (assoc-ref outputs "out") "/bin"))
5900 (zero? (system* "make" "test")))))))
5901 (build-system python-build-system)
5902 (native-inputs
5903 `(("python-coverage" ,python-coverage)
5904 ("which" ,which)))
5905 (synopsis "Simple testing framework for command line applications")
5906 (description
5907 "Cram is a functional testing framework for command line applications.
5908 Cram tests look like snippets of interactive shell sessions. Cram runs each
5909 command and compares the command output in the test with the command’s actual
5910 output.")
5911 (license license:gpl2+)))
5912
5913 (define-public python2-cram
5914 (package-with-python2 python-cram))
5915
5916 (define-public python-straight-plugin
5917 (package
5918 (name "python-straight-plugin")
5919 (version "1.4.1")
5920 (source
5921 (origin
5922 (method url-fetch)
5923 (uri (pypi-uri "straight.plugin" version))
5924 (sha256
5925 (base32
5926 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
5927 (build-system python-build-system)
5928 (home-page "https://github.com/ironfroggy/straight.plugin")
5929 (synopsis "Simple namespaced plugin facility")
5930 (description "Straight Plugin provides a type of plugin you can create from
5931 almost any existing Python modules, and an easy way for outside developers to
5932 add functionality and customization to your projects with their own plugins.")
5933 (license license:expat)))
5934
5935 (define-public python2-straight-plugin
5936 (package-with-python2 python-straight-plugin))
5937
5938 (define-public python-fonttools
5939 (package
5940 (name "python-fonttools")
5941 (version "3.15.1")
5942 (source (origin
5943 (method url-fetch)
5944 (uri (pypi-uri "fonttools" version ".zip"))
5945 (sha256
5946 (base32
5947 "1hhj97izwliy0vybmza72d90l5d4mcn50y8akq7kyccfl82vdx4d"))))
5948 (build-system python-build-system)
5949 (arguments
5950 '(#:test-target "check"
5951 #:phases
5952 (modify-phases %standard-phases
5953 (add-after 'unpack 'patch-setuppy
5954 ;; Remove the undocumented "extra_path" argument, which adds an
5955 ;; intervening directories between site-packages and the package
5956 ;; directory.
5957 (lambda _
5958 (substitute* "setup.py"
5959 (("^[ \t]*extra_path *= *'FontTools',") ""))
5960 #t)))))
5961 (native-inputs
5962 `(("unzip" ,unzip)))
5963 (home-page "https://github.com/behdad/fonttools")
5964 (synopsis "Tools to manipulate font files")
5965 (description
5966 "FontTools/TTX is a library to manipulate font files from Python. It
5967 supports reading and writing of TrueType/OpenType fonts, reading and writing
5968 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5969 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5970 from an XML-based format.")
5971 (license (license:non-copyleft
5972 "file://LICENSE.txt"
5973 "See LICENSE.txt in the distribution."))))
5974
5975 (define-public python2-fonttools
5976 (package-with-python2 python-fonttools))
5977
5978 (define-public python-ly
5979 (package
5980 (name "python-ly")
5981 (version "0.9.5")
5982 (source
5983 (origin
5984 (method url-fetch)
5985 (uri (pypi-uri name version))
5986 (sha256
5987 (base32
5988 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
5989 (build-system python-build-system)
5990 (arguments
5991 ;; FIXME: Some tests need network access.
5992 '(#:tests? #f))
5993 (synopsis "Tool and library for manipulating LilyPond files")
5994 (description "This package provides a Python library to parse, manipulate
5995 or create documents in LilyPond format. A command line program ly is also
5996 provided that can be used to do various manipulations with LilyPond files.")
5997 (home-page "https://pypi.python.org/pypi/python-ly")
5998 (license license:gpl2+)))
5999
6000 (define-public python-appdirs
6001 (package
6002 (name "python-appdirs")
6003 (version "1.4.3")
6004 (source
6005 (origin
6006 (method url-fetch)
6007 (uri (pypi-uri "appdirs" version))
6008 (sha256
6009 (base32
6010 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6011 (build-system python-build-system)
6012 (home-page "https://github.com/ActiveState/appdirs")
6013 (synopsis
6014 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6015 (description
6016 "This module provides a portable way of finding out where user data
6017 should be stored on various operating systems.")
6018 (license license:expat)))
6019
6020 (define-public python2-appdirs
6021 (package-with-python2 python-appdirs))
6022
6023 (define-public python-llfuse
6024 (package
6025 (name "python-llfuse")
6026 (version "1.3.2")
6027 (source (origin
6028 (method url-fetch)
6029 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6030 (sha256
6031 (base32
6032 "0qxvnbz41bpvpc1vbi8qkhmpr9gj1qrrp5jdj085iqibd8l2l9cn"))))
6033 (build-system python-build-system)
6034 (inputs
6035 `(("fuse" ,fuse)
6036 ("attr" ,attr)))
6037 (native-inputs
6038 `(("pkg-config" ,pkg-config)))
6039 (synopsis "Python bindings for FUSE")
6040 (description
6041 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6042 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6043 (license license:lgpl2.0+)
6044 (properties `((python2-variant . ,(delay python2-llfuse))))))
6045
6046 (define-public python2-llfuse
6047 (package (inherit (package-with-python2
6048 (strip-python2-variant python-llfuse)))
6049 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6050
6051 ;; For attic-0.16
6052 (define-public python-llfuse-0.41
6053 (package (inherit python-llfuse)
6054 (version "0.41.1")
6055 (source (origin
6056 (method url-fetch)
6057 (uri (string-append
6058 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6059 "llfuse-" version ".tar.bz2"))
6060 (sha256
6061 (base32
6062 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6063 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6064 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6065 (license (list license:expat license:lgpl2.0+))))
6066
6067 (define-public python-msgpack
6068 (package
6069 (name "python-msgpack")
6070 (version "0.5.6")
6071 (source (origin
6072 (method url-fetch)
6073 (uri (pypi-uri "msgpack" version))
6074 (sha256
6075 (base32
6076 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6077 (build-system python-build-system)
6078 (arguments
6079 `(#:modules ((guix build utils)
6080 (guix build python-build-system)
6081 (ice-9 ftw)
6082 (srfi srfi-1)
6083 (srfi srfi-26))
6084 #:phases
6085 (modify-phases %standard-phases
6086 (replace 'check
6087 (lambda _
6088 (let ((cwd (getcwd)))
6089 (setenv "PYTHONPATH"
6090 (string-append cwd "/build/"
6091 (find (cut string-prefix? "lib" <>)
6092 (scandir (string-append cwd "/build")))
6093 ":"
6094 (getenv "PYTHONPATH")))
6095 (invoke "pytest" "-v" "test")))))))
6096 (native-inputs
6097 `(("python-pytest" ,python-pytest)))
6098 (synopsis "MessagePack (de)serializer")
6099 (description "MessagePack is a fast, compact binary serialization format,
6100 suitable for similar data to JSON. This package provides CPython bindings for
6101 reading and writing MessagePack data.")
6102 (home-page "https://pypi.python.org/pypi/msgpack/")
6103 (license license:asl2.0)))
6104
6105 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6106 ;; release 0.5. Some packages like borg still call it by the old name for now.
6107 ;; <https://bugs.gnu.org/30662>
6108 (define-public python-msgpack-transitional
6109 (package
6110 (inherit python-msgpack)
6111 (name "python-msgpack-transitional")
6112 (arguments
6113 (substitute-keyword-arguments (package-arguments python-msgpack)
6114 ((#:phases phases)
6115 `(modify-phases ,phases
6116 (add-after 'unpack 'configure-transitional
6117 (lambda _
6118 ;; Keep using the old name.
6119 (substitute* "setup.py"
6120 (("TRANSITIONAL = False")
6121 "TRANSITIONAL = 1"))
6122 #t))))))))
6123
6124 (define-public python2-msgpack
6125 (package-with-python2 python-msgpack))
6126
6127 (define-public python-netaddr
6128 (package
6129 (name "python-netaddr")
6130 (version "0.7.19")
6131 (source
6132 (origin
6133 (method url-fetch)
6134 (uri (pypi-uri "netaddr" version))
6135 (sha256
6136 (base32
6137 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6138 (build-system python-build-system)
6139 (arguments `(#:tests? #f)) ;; No tests.
6140 (home-page "https://github.com/drkjam/netaddr/")
6141 (synopsis "Pythonic manipulation of network addresses")
6142 (description
6143 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6144 and MAC network addresses.")
6145 (license license:bsd-3)))
6146
6147 (define-public python2-netaddr
6148 (package-with-python2 python-netaddr))
6149
6150 (define-public python-wrapt
6151 (package
6152 (name "python-wrapt")
6153 (version "1.10.11")
6154 (source
6155 (origin
6156 (method url-fetch)
6157 (uri (pypi-uri "wrapt" version))
6158 (sha256
6159 (base32
6160 "1ip3dwib39xhp79kblskgvz3fjzcwxgx3fs3ahdixhpjg7a61mfl"))))
6161 (build-system python-build-system)
6162 (arguments
6163 ;; Tests are not included in the tarball, they are only available in the
6164 ;; git repository.
6165 `(#:tests? #f))
6166 (home-page "https://github.com/GrahamDumpleton/wrapt")
6167 (synopsis "Module for decorators, wrappers and monkey patching")
6168 (description
6169 "The aim of the wrapt module is to provide a transparent object proxy for
6170 Python, which can be used as the basis for the construction of function
6171 wrappers and decorator functions.")
6172 (license license:bsd-2)))
6173
6174 (define-public python2-wrapt
6175 (package-with-python2 python-wrapt))
6176
6177 (define-public python-xlrd
6178 (package
6179 (name "python-xlrd")
6180 (version "1.0.0")
6181 (source (origin
6182 (method url-fetch)
6183 (uri (pypi-uri "xlrd" version))
6184 (sha256
6185 (base32
6186 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6187 (build-system python-build-system)
6188 (arguments
6189 `(#:phases
6190 (modify-phases %standard-phases
6191 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6192 ;; run tests instead for now.
6193 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
6194 (native-inputs `(("python-nose" ,python-nose)))
6195 (home-page "http://www.python-excel.org/")
6196 (synopsis "Library for extracting data from Excel files")
6197 (description "This packages provides a library to extract data from
6198 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6199 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6200 Unicode-aware. It is not intended as an end-user tool.")
6201 (license license:bsd-3)))
6202
6203 (define-public python2-xlrd
6204 (package-with-python2 python-xlrd))
6205
6206 (define-public python-prettytable
6207 (package
6208 (name "python-prettytable")
6209 (version "0.7.2")
6210 (source
6211 (origin
6212 (method url-fetch)
6213 (uri (string-append
6214 "https://pypi.python.org/packages/source/P/PrettyTable/"
6215 "prettytable-" version ".tar.bz2"))
6216 (sha256
6217 (base32
6218 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6219 (build-system python-build-system)
6220 (home-page "http://code.google.com/p/prettytable/")
6221 (synopsis "Display tabular data in an ASCII table format")
6222 (description
6223 "A library designed to represent tabular data in visually appealing ASCII
6224 tables. PrettyTable allows for selection of which columns are to be printed,
6225 independent alignment of columns (left or right justified or centred) and
6226 printing of sub-tables by specifying a row range.")
6227 (license license:bsd-3)))
6228
6229 (define-public python2-prettytable
6230 (package-with-python2 python-prettytable))
6231
6232 (define-public python-tables
6233 (package
6234 (name "python-tables")
6235 (version "3.2.2")
6236 (source
6237 (origin
6238 (method url-fetch)
6239 (uri (pypi-uri "tables" version))
6240 (sha256
6241 (base32
6242 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
6243 (modules '((guix build utils)))
6244 (snippet
6245 '(begin
6246 ;; Remove pre-compiled .pyc files from source.
6247 (for-each delete-file-recursively
6248 (find-files "." "__pycache__" #:directories? #t))
6249 (for-each delete-file (find-files "." "\\.pyc$"))
6250 #t))))
6251 (build-system python-build-system)
6252 (arguments
6253 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6254 ;; or "check", so we must override the build and check phases.
6255 #:phases
6256 (modify-phases %standard-phases
6257 (add-after 'unpack 'use-gcc
6258 (lambda _
6259 (substitute* "setup.py"
6260 (("compiler = new_compiler\\(\\)" line)
6261 (string-append line
6262 "\ncompiler.set_executables(compiler='gcc',"
6263 "compiler_so='gcc',"
6264 "linker_exe='gcc',"
6265 "linker_so='gcc -shared')")))
6266 #t))
6267 (replace 'build
6268 (lambda* (#:key inputs #:allow-other-keys)
6269 (zero? (system* "python" "setup.py" "build"
6270 (string-append "--hdf5="
6271 (assoc-ref inputs "hdf5"))))))
6272 (replace 'check
6273 (lambda* (#:key inputs #:allow-other-keys)
6274 (zero? (system* "python" "setup.py" "check"
6275 (string-append "--hdf5="
6276 (assoc-ref inputs "hdf5")))))))))
6277 (propagated-inputs
6278 `(("python-numexpr" ,python-numexpr)
6279 ("python-numpy" ,python-numpy)))
6280 (native-inputs
6281 `(("python-cython" ,python-cython)
6282 ("pkg-config" ,pkg-config)))
6283 (inputs
6284 `(("hdf5" ,hdf5)
6285 ("bzip2" ,bzip2)
6286 ("zlib" ,zlib)))
6287 (home-page "http://www.pytables.org/")
6288 (synopsis "Hierarchical datasets for Python")
6289 (description "PyTables is a package for managing hierarchical datasets and
6290 designed to efficiently cope with extremely large amounts of data.")
6291 (license license:bsd-3)))
6292
6293 (define-public python2-tables
6294 (package-with-python2 python-tables))
6295
6296 (define-public python-pyasn1
6297 (package
6298 (name "python-pyasn1")
6299 (version "0.4.2")
6300 (source
6301 (origin
6302 (method url-fetch)
6303 (uri (pypi-uri "pyasn1" version))
6304 (sha256
6305 (base32
6306 "05bxnr4wmrg62m4qr1pg1p3z7bhwrv74jll3k42pgxwl36kv0n6j"))))
6307 (build-system python-build-system)
6308 (home-page "http://pyasn1.sourceforge.net/")
6309 (synopsis "ASN.1 types and codecs")
6310 (description
6311 "This is an implementation of ASN.1 types and codecs in Python. It is
6312 suitable for a wide range of protocols based on the ASN.1 specification.")
6313 (license license:bsd-2)))
6314
6315 (define-public python2-pyasn1
6316 (package-with-python2 python-pyasn1))
6317
6318 (define-public python-pyasn1-modules
6319 (package
6320 (name "python-pyasn1-modules")
6321 (version "0.0.8")
6322 (source
6323 (origin
6324 (method url-fetch)
6325 (uri (pypi-uri "pyasn1-modules" version))
6326 (sha256
6327 (base32
6328 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6329 (build-system python-build-system)
6330 (propagated-inputs
6331 `(("python-pyasn1" ,python-pyasn1)))
6332 (home-page "https://sourceforge.net/projects/pyasn1/")
6333 (synopsis "ASN.1 codec implementations")
6334 (description
6335 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6336 implementations of ASN.1-based codecs and protocols.")
6337 (license license:bsd-3)))
6338
6339 (define-public python2-pyasn1-modules
6340 (package-with-python2 python-pyasn1-modules))
6341
6342 (define-public python-ipaddress
6343 (package
6344 (name "python-ipaddress")
6345 (version "1.0.19")
6346 (source (origin
6347 (method url-fetch)
6348 (uri (pypi-uri "ipaddress" version))
6349 (sha256
6350 (base32
6351 "10agaa1cys1bk1ycpl2w8lky9vjx8h1xh1z29mg0niqx0638c390"))))
6352 (build-system python-build-system)
6353 (home-page "https://github.com/phihag/ipaddress")
6354 (synopsis "IP address manipulation library")
6355 (description
6356 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6357 in Python. This library is used to create, poke at, and manipulate IPv4 and
6358 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6359 module to older versions of Python.")
6360 (license license:psfl)))
6361
6362 (define-public python2-ipaddress
6363 (package-with-python2 python-ipaddress))
6364
6365 (define-public python2-ipaddr
6366 (package
6367 (name "python2-ipaddr")
6368 (version "2.1.11")
6369 (source
6370 (origin
6371 (method url-fetch)
6372 (uri (pypi-uri "ipaddr" version))
6373 (sha256
6374 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6375 (build-system python-build-system)
6376 (arguments
6377 `(#:python ,python-2 ;version 2 only
6378 #:phases
6379 (modify-phases %standard-phases
6380 (replace 'check
6381 (lambda* _
6382 (zero? (system* "python" "ipaddr_test.py")))))))
6383 (home-page "https://github.com/google/ipaddr-py")
6384 (synopsis "IP address manipulation library")
6385 (description
6386 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6387 IPv6 addresses and networks.
6388
6389 For new implementations you may prefer to use the standard module
6390 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
6391 versions of Python.")
6392 (license license:asl2.0)))
6393
6394 (define-public python-idna
6395 (package
6396 (name "python-idna")
6397 (version "2.6")
6398 (source
6399 (origin
6400 (method url-fetch)
6401 (uri (pypi-uri "idna" version))
6402 (sha256
6403 (base32
6404 "13qaab6d0s15gknz8v3zbcfmbj6v86hn9pjxgkdf62ch13imssic"))))
6405 (build-system python-build-system)
6406 (home-page "https://github.com/kjd/idna")
6407 (synopsis "Internationalized domain names in applications")
6408 (description
6409 "This is a library to support the Internationalised Domain Names in
6410 Applications (IDNA) protocol as specified in RFC 5891. This version of the
6411 protocol is often referred to as “IDNA2008” and can produce different results
6412 from the earlier standard from 2003. The library is also intended to act as a
6413 suitable drop-in replacement for the “encodings.idna” module that comes with
6414 the Python standard library but currently only supports the older 2003
6415 specification.")
6416 (license license:bsd-4)))
6417
6418 (define-public python2-idna
6419 (package-with-python2 python-idna))
6420
6421 (define-public python-idna-ssl
6422 (package
6423 (name "python-idna-ssl")
6424 (version "1.0.1")
6425 (source
6426 (origin
6427 (method url-fetch)
6428 (uri (pypi-uri "idna-ssl" version))
6429 (sha256
6430 (base32
6431 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
6432 (build-system python-build-system)
6433 (arguments
6434 `(#:tests? #f)) ;circular dependency with python-aiohttp
6435 (home-page "https://github.com/aio-libs/idna-ssl")
6436 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
6437 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
6438 domains support.")
6439 (license license:expat)))
6440
6441 (define-public python-pretend
6442 (package
6443 (name "python-pretend")
6444 (version "1.0.9")
6445 (source
6446 (origin
6447 (method url-fetch)
6448 (uri (string-append "https://pypi.python.org/packages/source/p/"
6449 "pretend/pretend-" version ".tar.gz"))
6450 (sha256
6451 (base32
6452 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
6453 (build-system python-build-system)
6454 (home-page "https://github.com/alex/pretend")
6455 (synopsis "Library for stubbing in Python")
6456 (description
6457 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6458 technique for writing tests. You may hear the term mixed up with mocks,
6459 fakes, or doubles. Basically, a stub is an object that returns pre-canned
6460 responses, rather than doing any computation.")
6461 (license license:bsd-3)))
6462
6463 (define-public python2-pretend
6464 (package-with-python2 python-pretend))
6465
6466 (define-public python-pip
6467 (package
6468 (name "python-pip")
6469 (version "9.0.1")
6470 (source
6471 (origin
6472 (method url-fetch)
6473 (uri (pypi-uri "pip" version))
6474 (sha256
6475 (base32
6476 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
6477 (build-system python-build-system)
6478 (arguments
6479 '(#:tests? #f)) ; there are no tests in the pypi archive.
6480 (home-page "https://pip.pypa.io/")
6481 (synopsis "Package manager for Python software")
6482 (description
6483 "Pip is a package manager for Python software, that finds packages on the
6484 Python Package Index (PyPI).")
6485 (license license:expat)))
6486
6487 (define-public python2-pip
6488 (package-with-python2 python-pip))
6489
6490 (define-public python-tlsh
6491 (package
6492 (name "python-tlsh")
6493 (version "3.4.4")
6494 (home-page "https://github.com/trendmicro/tlsh")
6495 (source (origin
6496 (method url-fetch)
6497 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6498 version ".tar.gz"))
6499 (sha256
6500 (base32
6501 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6502 (file-name (string-append name "-" version ".tar.gz"))))
6503 (build-system cmake-build-system)
6504 (arguments
6505 '(#:out-of-source? #f
6506 #:phases (modify-phases %standard-phases
6507 (replace
6508 'install
6509 (lambda* (#:key outputs #:allow-other-keys)
6510 ;; Build and install the Python bindings. The underlying
6511 ;; C++ library is apparently not meant to be installed.
6512 (let ((out (assoc-ref outputs "out")))
6513 (with-directory-excursion "py_ext"
6514 (and (system* "python" "setup.py" "build")
6515 (system* "python" "setup.py" "install"
6516 (string-append "--prefix=" out))))))))))
6517 (inputs `(("python" ,python-wrapper))) ;for the bindings
6518 (synopsis "Fuzzy matching library for Python")
6519 (description
6520 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6521 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6522 value which can be used for similarity comparisons. Similar objects have
6523 similar hash values, which allows for the detection of similar objects by
6524 comparing their hash values. The byte stream should have a sufficient amount
6525 of complexity; for example, a byte stream of identical bytes will not generate
6526 a hash value.")
6527 (license license:asl2.0)))
6528
6529 (define-public python2-tlsh
6530 (package
6531 (inherit python-tlsh)
6532 (name "python2-tlsh")
6533 (inputs `(("python" ,python-2)))))
6534
6535 (define-public python-termcolor
6536 (package
6537 (name "python-termcolor")
6538 (version "1.1.0")
6539 (source
6540 (origin
6541 (method url-fetch)
6542 (uri (pypi-uri "termcolor" version))
6543 (sha256
6544 (base32
6545 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6546 (build-system python-build-system)
6547 (arguments
6548 ;; There are no tests.
6549 `(#:tests? #f))
6550 (home-page "https://pypi.python.org/pypi/termcolor")
6551 (synopsis "ANSII Color formatting for terminal output")
6552 (description
6553 "This package provides ANSII Color formatting for output in terminals.")
6554 (license license:expat)))
6555
6556 (define-public python2-termcolor
6557 (package-with-python2 python-termcolor))
6558
6559 (define-public python-libarchive-c
6560 (package
6561 (name "python-libarchive-c")
6562 (version "2.2")
6563 (source (origin
6564 (method url-fetch)
6565 (uri (pypi-uri "libarchive-c" version))
6566 (sha256
6567 (base32
6568 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
6569 (build-system python-build-system)
6570 (arguments
6571 '(#:phases (modify-phases %standard-phases
6572 (add-before
6573 'build 'reference-libarchive
6574 (lambda* (#:key inputs #:allow-other-keys)
6575 ;; Retain the absolute file name of libarchive.so.
6576 (let ((libarchive (assoc-ref inputs "libarchive")))
6577 (substitute* "libarchive/ffi.py"
6578 (("find_library\\('archive'\\)")
6579 (string-append "'" libarchive
6580 "/lib/libarchive.so'")))))))))
6581 (inputs
6582 `(("libarchive" ,libarchive)))
6583 (home-page "https://github.com/Changaco/python-libarchive-c")
6584 (synopsis "Python interface to libarchive")
6585 (description
6586 "This package provides Python bindings to libarchive, a C library to
6587 access possibly compressed archives in many different formats. It uses
6588 Python's @code{ctypes} foreign function interface (FFI).")
6589 (license license:lgpl2.0+)))
6590
6591 (define-public python2-libarchive-c
6592 (package-with-python2 python-libarchive-c))
6593
6594 (define-public python-file
6595 (package
6596 (inherit file)
6597 (name "python-file")
6598 (build-system python-build-system)
6599 (arguments
6600 '(#:tests? #f ;no tests
6601 #:configure-flags '("--single-version-externally-managed" "--root=/")
6602 #:phases (modify-phases %standard-phases
6603 (add-before 'build 'change-directory
6604 (lambda _
6605 (chdir "python")
6606 #t))
6607 (add-before 'build 'set-library-file-name
6608 (lambda* (#:key inputs #:allow-other-keys)
6609 (let ((file (assoc-ref inputs "file")))
6610 (substitute* "magic.py"
6611 (("find_library\\('magic'\\)")
6612 (string-append "'" file "/lib/libmagic.so'")))
6613 #t))))))
6614 (inputs `(("file" ,file)))
6615 (self-native-input? #f)
6616 (synopsis "Python bindings to the libmagic file type guesser. Note that
6617 this module and the python-magic module both provide a \"magic.py\" file;
6618 these two modules, which are different and were developed separately, both
6619 serve the same purpose: provide Python bindings for libmagic.")))
6620
6621 (define-public python2-file
6622 (package-with-python2 python-file))
6623
6624 (define-public python-debian
6625 (package
6626 (name "python-debian")
6627 (version "0.1.28")
6628 (source
6629 (origin
6630 (method url-fetch)
6631 (uri (pypi-uri name version))
6632 (sha256
6633 (base32
6634 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
6635 (build-system python-build-system)
6636 (propagated-inputs
6637 `(("python-six" ,python-six)))
6638 (home-page "http://packages.debian.org/sid/python-debian")
6639 (synopsis "Debian package related modules")
6640 (description
6641 ;; XXX: Use @enumerate instead of @itemize to work around
6642 ;; <http://bugs.gnu.org/21772>.
6643 "This package provides Python modules that abstract many formats of
6644 Debian-related files, such as:
6645
6646 @enumerate
6647 @item Debtags information;
6648 @item @file{debian/changelog} files;
6649 @item packages files, pdiffs;
6650 @item control files of single or multiple RFC822-style paragraphs---e.g.
6651 @file{debian/control}, @file{.changes}, @file{.dsc};
6652 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6653 contained files and meta-information.
6654 @end enumerate\n")
6655
6656 ;; Modules are either GPLv2+ or GPLv3+.
6657 (license license:gpl3+)))
6658
6659 (define-public python2-debian
6660 (package-with-python2 python-debian))
6661
6662 (define-public python-nbformat
6663 (package
6664 (name "python-nbformat")
6665 (version "4.4.0")
6666 (source
6667 (origin
6668 (method url-fetch)
6669 (uri (pypi-uri "nbformat" version))
6670 (sha256
6671 (base32
6672 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
6673 (build-system python-build-system)
6674 (arguments `(#:tests? #f)) ; no test target
6675 (propagated-inputs
6676 `(("python-ipython-genutils" ,python-ipython-genutils)
6677 ("python-jsonschema" ,python-jsonschema)
6678 ("python-jupyter-core" ,python-jupyter-core)
6679 ("python-traitlets" ,python-traitlets)))
6680 (home-page "http://jupyter.org")
6681 (synopsis "Jupyter Notebook format")
6682 (description "This package provides the reference implementation of the
6683 Jupyter Notebook format and Python APIs for working with notebooks.")
6684 (license license:bsd-3)))
6685
6686 (define-public python2-nbformat
6687 (package-with-python2 python-nbformat))
6688
6689 (define-public python-bleach
6690 (package
6691 (name "python-bleach")
6692 (version "1.4.3")
6693 (source
6694 (origin
6695 (method url-fetch)
6696 (uri (pypi-uri "bleach" version))
6697 (sha256
6698 (base32
6699 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6700 (build-system python-build-system)
6701 (propagated-inputs
6702 `(("python-html5lib" ,python-html5lib-0.9)
6703 ("python-six" ,python-six)))
6704 (native-inputs
6705 `(("python-nose" ,python-nose)))
6706 (home-page "https://github.com/jsocol/bleach")
6707 (synopsis "Whitelist-based HTML-sanitizing tool")
6708 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6709 (license license:asl2.0)))
6710
6711 (define-public python2-bleach
6712 (package-with-python2 python-bleach))
6713
6714 (define-public python-entrypoints
6715 (package
6716 (name "python-entrypoints")
6717 (version "0.2.3")
6718 (source
6719 (origin
6720 (method url-fetch)
6721 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
6722 version ".tar.gz"))
6723 (file-name (string-append name "-" version ".tar.gz"))
6724 (sha256
6725 (base32
6726 "1pdvgfr5bxyvnfvxbsd3zi0dh3il71pc4k6rinx6zpps91b84a56"))))
6727 (build-system python-build-system)
6728 ;; The package does not come with a setup.py file, so we have to generate
6729 ;; one ourselves.
6730 (arguments
6731 `(#:tests? #f
6732 #:phases
6733 (modify-phases %standard-phases
6734 (add-after 'unpack 'create-setup.py
6735 (lambda _
6736 (call-with-output-file "setup.py"
6737 (lambda (port)
6738 (format port "\
6739 from setuptools import setup
6740 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6741 " ,version))))))))
6742 (home-page "https://github.com/takluyver/entrypoints")
6743 (synopsis "Discover and load entry points from installed Python packages")
6744 (description "Entry points are a way for Python packages to advertise
6745 objects with some common interface. The most common examples are
6746 @code{console_scripts} entry points, which define shell commands by
6747 identifying a Python function to run. The @code{entrypoints} module contains
6748 functions to find and load entry points.")
6749 (license license:expat)))
6750
6751 (define-public python2-entrypoints
6752 (package-with-python2 python-entrypoints))
6753
6754 (define-public python-nbconvert
6755 (package
6756 (name "python-nbconvert")
6757 (version "5.0.0b1")
6758 (source
6759 (origin
6760 (method url-fetch)
6761 (uri (pypi-uri "nbconvert" version))
6762 (sha256
6763 (base32
6764 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6765 (build-system python-build-system)
6766 (arguments
6767 `(;; The "bdist_egg" target is disabled by default, causing the installation
6768 ;; to fail.
6769 #:configure-flags (list "bdist_egg")
6770 ;; FIXME: 5 failures, 40 errors.
6771 #:tests? #f))
6772 ;; #:phases
6773 ;; (modify-phases %standard-phases
6774 ;; (replace 'check
6775 ;; (lambda _
6776 ;; (zero? (system* "py.test" "-v")))))
6777 (native-inputs
6778 `(("python-pytest" ,python-pytest)))
6779 (propagated-inputs
6780 `(("python-bleach" ,python-bleach)
6781 ("python-entrypoints" ,python-entrypoints)
6782 ("python-jinja2" ,python-jinja2)
6783 ("python-jupyter-core" ,python-jupyter-core)
6784 ("python-mistune" ,python-mistune)
6785 ("python-nbformat" ,python-nbformat)
6786 ("python-pygments" ,python-pygments)
6787 ("python-traitlets" ,python-traitlets)))
6788 (home-page "http://jupyter.org")
6789 (synopsis "Converting Jupyter Notebooks")
6790 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6791 notebooks to various other formats via Jinja templates. It allows you to
6792 convert an @code{.ipynb} notebook file into various static formats including:
6793
6794 @enumerate
6795 @item HTML
6796 @item LaTeX
6797 @item PDF
6798 @item Reveal JS
6799 @item Markdown (md)
6800 @item ReStructured Text (rst)
6801 @item executable script
6802 @end enumerate\n")
6803 (license license:bsd-3)))
6804
6805 (define-public python2-nbconvert
6806 (package-with-python2 python-nbconvert))
6807
6808 (define-public python-notebook
6809 (package
6810 (name "python-notebook")
6811 (version "4.2.3")
6812 (source (origin
6813 (method url-fetch)
6814 (uri (pypi-uri "notebook" version))
6815 (sha256
6816 (base32
6817 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
6818 (build-system python-build-system)
6819 (arguments
6820 `(#:phases
6821 (modify-phases %standard-phases
6822 (replace 'check
6823 (lambda _
6824 ;; HOME must be set for tests
6825 (setenv "HOME" "/tmp")
6826 (zero? (system* "nosetests")))))))
6827 (propagated-inputs
6828 `(("python-jupyter-core" ,python-jupyter-core)
6829 ("python-nbformat" ,python-nbformat)
6830 ("python-nbconvert" ,python-nbconvert)
6831 ("python-ipython" ,python-ipython)))
6832 (native-inputs
6833 `(("python-nose" ,python-nose)
6834 ("python-sphinx" ,python-sphinx)
6835 ("python-requests" ,python-requests)))
6836 (home-page "http://jupyter.org/")
6837 (synopsis "Web-based notebook environment for interactive computing")
6838 (description
6839 "The Jupyter HTML notebook is a web-based notebook environment for
6840 interactive computing.")
6841 (properties `((python2-variant . ,(delay python2-notebook))))
6842 (license license:bsd-3)))
6843
6844 (define-public python2-notebook
6845 (let ((base (package-with-python2
6846 (strip-python2-variant python-notebook))))
6847 (package (inherit base)
6848 (native-inputs
6849 `(("python2-mock" ,python2-mock)
6850 ,@(package-native-inputs base)))
6851 (arguments
6852 (substitute-keyword-arguments (package-arguments base)
6853 ((#:phases phases)
6854 `(modify-phases ,phases
6855 (add-before 'check 'disable-test-case
6856 ;; The test requires network access to localhost. Curiously it
6857 ;; fails with Python 2 only. Simply make the test-case return
6858 ;; immediately.
6859 (lambda _
6860 (substitute*
6861 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
6862 (("formats = self.nbconvert_api") "return #")))))))))))
6863
6864 (define-public python-widgetsnbextension
6865 (package
6866 (name "python-widgetsnbextension")
6867 (version "1.2.6")
6868 (source
6869 (origin
6870 (method url-fetch)
6871 (uri (pypi-uri "widgetsnbextension" version))
6872 (sha256
6873 (base32
6874 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
6875 (build-system python-build-system)
6876 (propagated-inputs
6877 `(("python-notebook" ,python-notebook)))
6878 (native-inputs
6879 `(("python-certifi" ,python-certifi)
6880 ("python-nose" ,python-nose)))
6881 (home-page "https://ipython.org")
6882 (synopsis "IPython HTML widgets for Jupyter")
6883 (description "This package provides interactive HTML widgets for Jupyter
6884 notebooks.")
6885 (license license:bsd-3)))
6886
6887 (define-public python2-widgetsnbextension
6888 (package-with-python2 python-widgetsnbextension))
6889
6890 (define-public python-ipywidgets
6891 (package
6892 (name "python-ipywidgets")
6893 (version "5.2.2")
6894 (source
6895 (origin
6896 (method url-fetch)
6897 (uri (pypi-uri "ipywidgets" version))
6898 (sha256
6899 (base32
6900 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
6901 (build-system python-build-system)
6902 ;; FIXME: it's not clear how to run the tests.
6903 (arguments `(#:tests? #f))
6904 (propagated-inputs
6905 `(("python-ipykernel" ,python-ipykernel)
6906 ("python-ipython" ,python-ipython)
6907 ("python-traitlets" ,python-traitlets)
6908 ("python-widgetsnbextension" ,python-widgetsnbextension)))
6909 (home-page "https://ipython.org")
6910 (synopsis "IPython HTML widgets for Jupyter")
6911 (description "Ipywidgets are interactive HTML widgets for Jupyter
6912 notebooks and the IPython kernel. Notebooks come alive when interactive
6913 widgets are used. Users gain control of their data and can visualize changes
6914 in the data.")
6915 (license license:bsd-3)))
6916
6917 (define-public python2-ipywidgets
6918 (package-with-python2 python-ipywidgets))
6919
6920 (define-public python-jupyter-console
6921 (package
6922 (name "python-jupyter-console")
6923 (version "5.2.0")
6924 (source
6925 (origin
6926 (method url-fetch)
6927 (uri (pypi-uri "jupyter_console" version))
6928 (sha256
6929 (base32
6930 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
6931 (build-system python-build-system)
6932 ;; FIXME: it's not clear how to run the tests.
6933 (arguments `(#:tests? #f))
6934 (propagated-inputs
6935 `(("python-ipykernel" ,python-ipykernel)
6936 ("python-ipython" ,python-ipython)
6937 ("python-jupyter-client" ,python-jupyter-client)
6938 ("python-prompt-toolkit" ,python-prompt-toolkit)
6939 ("python-pygments" ,python-pygments)))
6940 (home-page "https://jupyter.org")
6941 (synopsis "Jupyter terminal console")
6942 (description "This package provides a terminal-based console frontend for
6943 Jupyter kernels. It also allows for console-based interaction with non-Python
6944 Jupyter kernels such as IJulia and IRKernel.")
6945 (license license:bsd-3)))
6946
6947 (define-public python2-jupyter-console
6948 (package-with-python2 python-jupyter-console))
6949
6950 ;; The python-ipython and python-jupyter-console require each other. To get
6951 ;; the functionality in both packages working, strip down the
6952 ;; python-jupyter-console package when using it as an input to python-ipython.
6953 (define python-jupyter-console-minimal
6954 (package
6955 (inherit python-jupyter-console)
6956 (name "python-jupyter-console-minimal")
6957 (arguments
6958 (substitute-keyword-arguments
6959 (package-arguments python-jupyter-console)
6960 ((#:phases phases)
6961 `(modify-phases ,phases
6962 (add-after 'install 'delete-bin
6963 (lambda* (#:key outputs #:allow-other-keys)
6964 ;; Delete the bin files, to avoid conflicts in profiles
6965 ;; where python-ipython and python-jupyter-console are
6966 ;; both present.
6967 (delete-file-recursively
6968 (string-append
6969 (assoc-ref outputs "out") "/bin"))))))))
6970 ;; Remove the python-ipython propagated input, to avoid the cycle
6971 (propagated-inputs
6972 (alist-delete
6973 "python-ipython"
6974 (package-propagated-inputs python-jupyter-console)))))
6975
6976 (define-public jupyter
6977 (package
6978 (name "jupyter")
6979 (version "1.0.0")
6980 (source
6981 (origin
6982 (method url-fetch)
6983 (uri (pypi-uri "jupyter" version))
6984 (sha256
6985 (base32
6986 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
6987 (build-system python-build-system)
6988 ;; FIXME: it's not clear how to run the tests.
6989 (arguments `(#:tests? #f))
6990 (propagated-inputs
6991 `(("python-ipykernel" ,python-ipykernel)
6992 ("python-ipywidgets" ,python-ipywidgets)
6993 ("python-jupyter-console" ,python-jupyter-console)
6994 ("python-nbconvert" ,python-nbconvert)
6995 ("python-notebook" ,python-notebook)))
6996
6997 (native-search-paths
6998 (list (search-path-specification
6999 (variable "JUPYTER_PATH")
7000 (files '("share/jupyter")))))
7001
7002 (home-page "http://jupyter.org")
7003 (synopsis "Web application for interactive documents")
7004 (description
7005 "The Jupyter Notebook is a web application that allows you to create and
7006 share documents that contain live code, equations, visualizations and
7007 explanatory text. Uses include: data cleaning and transformation, numerical
7008 simulation, statistical modeling, machine learning and much more.")
7009 (license license:bsd-3)))
7010
7011 (define-public python-chardet
7012 (package
7013 (name "python-chardet")
7014 (version "3.0.4")
7015 (source
7016 (origin
7017 (method url-fetch)
7018 (uri (pypi-uri "chardet" version))
7019 (sha256
7020 (base32
7021 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7022 (native-inputs
7023 `(("python-hypothesis" ,python-hypothesis)
7024 ("python-pytest" ,python-pytest)
7025 ("python-pytest-runner" ,python-pytest-runner)))
7026 (build-system python-build-system)
7027 (home-page "https://github.com/chardet/chardet")
7028 (synopsis "Universal encoding detector for Python 2 and 3")
7029 (description
7030 "This package provides @code{chardet}, a Python module that can
7031 automatically detect a wide range of file encodings.")
7032 (license license:lgpl2.1+)))
7033
7034 (define-public python2-chardet
7035 (package-with-python2 python-chardet))
7036
7037 (define-public python-docopt
7038 (package
7039 (name "python-docopt")
7040 (version "0.6.2")
7041 (source
7042 (origin
7043 (method url-fetch)
7044 ;; The release on PyPI does not include tests.
7045 (uri (string-append
7046 "https://github.com/docopt/docopt/archive/"
7047 version ".tar.gz"))
7048 (file-name (string-append name "-" version ".tar.gz"))
7049 (sha256
7050 (base32
7051 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7052 (build-system python-build-system)
7053 (native-inputs
7054 `(("python-pytest" ,python-pytest)))
7055 (arguments
7056 `(#:phases
7057 (modify-phases %standard-phases
7058 (replace 'check
7059 (lambda _ (zero? (system* "py.test")))))))
7060 (home-page "http://docopt.org")
7061 (synopsis "Command-line interface description language for Python")
7062 (description "This library allows the user to define a command-line
7063 interface from a program's help message rather than specifying it
7064 programatically with command-line parsers like @code{getopt} and
7065 @code{argparse}.")
7066 (license license:expat)))
7067
7068 (define-public python2-docopt
7069 (package-with-python2 python-docopt))
7070
7071 (define-public python-pythondialog
7072 (package
7073 (name "python-pythondialog")
7074 (version "3.4.0")
7075 (source
7076 (origin
7077 (method url-fetch)
7078 (uri (pypi-uri "pythondialog" version))
7079 (sha256
7080 (base32
7081 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7082 (build-system python-build-system)
7083 (arguments
7084 `(#:phases
7085 (modify-phases %standard-phases
7086 (add-after 'unpack 'patch-path
7087 (lambda* (#:key inputs #:allow-other-keys)
7088 (let* ((dialog (assoc-ref inputs "dialog")))
7089 ;; Since this library really wants to grovel the search path, we
7090 ;; must hardcode dialog's store path into it.
7091 (substitute* "dialog.py"
7092 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7093 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7094 #t))))
7095 #:tests? #f)) ; no test suite
7096 (propagated-inputs
7097 `(("dialog" ,dialog)))
7098 (home-page "http://pythondialog.sourceforge.net/")
7099 (synopsis "Python interface to the UNIX dialog utility")
7100 (description "A Python wrapper for the dialog utility. Its purpose is to
7101 provide an easy to use, pythonic and comprehensive Python interface to dialog.
7102 This allows one to make simple text-mode user interfaces on Unix-like systems")
7103 (license license:lgpl2.1)
7104 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7105
7106 (define-public python2-pythondialog
7107 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7108 (package
7109 (inherit base)
7110 (version (package-version python-pythondialog))
7111 (source (origin
7112 (method url-fetch)
7113 (uri (pypi-uri "python2-pythondialog" version))
7114 (sha256
7115 (base32
7116 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7117
7118 (define-public python-configobj
7119 (package
7120 (name "python-configobj")
7121 (version "5.0.6")
7122 (source (origin
7123 (method url-fetch)
7124 (uri (string-append
7125 "https://pypi.python.org/packages/source/c/configobj/"
7126 "configobj-" version ".tar.gz"))
7127 (sha256
7128 (base32
7129 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7130 ;; Patch setup.py so it looks for python-setuptools, which is
7131 ;; required to parse the keyword 'install_requires' in setup.py.
7132 (patches (search-patches "python-configobj-setuptools.patch"))))
7133 (build-system python-build-system)
7134 (propagated-inputs
7135 `(("python-six" ,python-six)))
7136 (synopsis "Config file reading, writing and validation")
7137 (description "ConfigObj is a simple but powerful config file reader and
7138 writer: an ini file round tripper. Its main feature is that it is very easy to
7139 use, with a straightforward programmer’s interface and a simple syntax for
7140 config files.")
7141 (home-page "https://github.com/DiffSK/configobj")
7142 (license license:bsd-3)))
7143
7144 (define-public python2-configobj
7145 (package-with-python2 python-configobj))
7146
7147 (define-public python-configargparse
7148 (package
7149 (name "python-configargparse")
7150 (version "0.12.0")
7151 (source (origin
7152 (method url-fetch)
7153 (uri (string-append
7154 "https://pypi.io/packages/source/C/ConfigArgParse/"
7155 "ConfigArgParse-" version ".tar.gz"))
7156 (sha256
7157 (base32
7158 "0fgkiqh6r3rbkdq3k8c48m85g52k96686rw3a6jg4lcncrkpvk98"))))
7159 (build-system python-build-system)
7160 (native-inputs
7161 `(("python-pyyaml" ,python-pyyaml)))
7162 (arguments
7163 `(#:phases
7164 (modify-phases %standard-phases
7165 (replace 'check
7166 (lambda _
7167 ;; Bypass setuptools-shim because one test relies on "setup.py"
7168 ;; being the first argument passed to the python call.
7169 ;;
7170 ;; NOTE: Many tests do not run because they rely on Python's
7171 ;; built-in test.test_argparse, but we remove the unit tests from
7172 ;; our Python installation.
7173 (zero? (system* "python" "setup.py" "test")))))))
7174 (synopsis "Replacement for argparse")
7175 (description "A drop-in replacement for argparse that allows options to also
7176 be set via config files and/or environment variables.")
7177 (home-page "https://github.com/bw2/ConfigArgParse")
7178 (license license:expat)))
7179
7180 (define-public python2-configargparse
7181 (package-with-python2 python-configargparse))
7182
7183 (define-public python-contextlib2
7184 (package
7185 (name "python-contextlib2")
7186 (version "0.4.0")
7187 (source
7188 (origin
7189 (method url-fetch)
7190 (uri (pypi-uri "contextlib2" version))
7191 (sha256
7192 (base32
7193 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7194 (build-system python-build-system)
7195 (arguments
7196 `(#:phases
7197 (modify-phases %standard-phases
7198 (replace 'check
7199 (lambda _ (zero?
7200 (system*
7201 "python" "test_contextlib2.py" "-v")))))))
7202 (home-page "http://contextlib2.readthedocs.org/")
7203 (synopsis "Tools for decorators and context managers")
7204 (description "This module is primarily a backport of the Python
7205 3.2 contextlib to earlier Python versions. Like contextlib, it
7206 provides utilities for common tasks involving decorators and context
7207 managers. It also contains additional features that are not part of
7208 the standard library.")
7209 (license license:psfl)))
7210
7211 (define-public python2-contextlib2
7212 (package-with-python2 python-contextlib2))
7213
7214 (define-public python-texttable
7215 (package
7216 (name "python-texttable")
7217 (version "0.8.7")
7218 (source
7219 (origin
7220 (method url-fetch)
7221 (uri (pypi-uri "texttable" version))
7222 (sha256
7223 (base32
7224 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
7225 (build-system python-build-system)
7226 (arguments '(#:tests? #f)) ; no tests
7227 (home-page "https://github.com/foutaise/texttable/")
7228 (synopsis "Python module for creating simple ASCII tables")
7229 (description "Texttable is a Python module for creating simple ASCII
7230 tables.")
7231 (license license:lgpl2.1+)))
7232
7233 (define-public python2-texttable
7234 (package-with-python2 python-texttable))
7235
7236 (define-public python-atomicwrites
7237 (package
7238 (name "python-atomicwrites")
7239 (version "1.1.5")
7240 (source (origin
7241 (method url-fetch)
7242 (uri (pypi-uri "atomicwrites" version))
7243 (sha256
7244 (base32
7245 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
7246 (build-system python-build-system)
7247 (synopsis "Atomic file writes in Python")
7248 (description "Library for atomic file writes using platform dependent tools
7249 for atomic file system operations.")
7250 (home-page "https://github.com/untitaker/python-atomicwrites")
7251 (license license:expat)))
7252
7253 (define-public python2-atomicwrites
7254 (package-with-python2 python-atomicwrites))
7255
7256 (define-public python-click-threading
7257 (package
7258 (name "python-click-threading")
7259 (version "0.4.4")
7260 (source (origin
7261 (method url-fetch)
7262 (uri (pypi-uri "click-threading" version))
7263 (sha256
7264 (base32
7265 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
7266 (build-system python-build-system)
7267 (propagated-inputs
7268 `(("python-click" ,python-click)))
7269 (synopsis "Utilities for multithreading in Click")
7270 (description "This package provides utilities for multithreading in Click
7271 applications.")
7272 (home-page "https://github.com/click-contrib/click-threading")
7273 (license license:expat)))
7274
7275 (define-public python-click-log
7276 (package
7277 (name "python-click-log")
7278 (version "0.2.1")
7279 (source (origin
7280 (method url-fetch)
7281 (uri (pypi-uri "click-log" version))
7282 (sha256
7283 (base32
7284 "1r1x85023cslb2pwldd089jjk573mk3w78cnashs77wrx7yz8fj9"))))
7285 (build-system python-build-system)
7286 (propagated-inputs
7287 `(("python-click" ,python-click)))
7288 (synopsis "Logging for click applications")
7289 (description "This package provides a Python library for logging Click
7290 applications.")
7291 (home-page "https://github.com/click-contrib/click-log")
7292 (license license:expat)))
7293
7294 (define-public python-apipkg
7295 (package
7296 (name "python-apipkg")
7297 (version "1.4")
7298 (source (origin
7299 (method url-fetch)
7300 (uri (pypi-uri "apipkg" version))
7301 (sha256
7302 (base32
7303 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7304 (build-system python-build-system)
7305 (native-inputs
7306 `(("python-pytest" ,python-pytest)))
7307 (synopsis "Namespace control and lazy-import mechanism")
7308 (description "With apipkg you can control the exported namespace of a Python
7309 package and greatly reduce the number of imports for your users. It is a small
7310 pure Python module that works on virtually all Python versions.")
7311 (home-page "https://bitbucket.org/hpk42/apipkg")
7312 (license license:expat)))
7313
7314 (define-public python2-apipkg
7315 (package-with-python2 python-apipkg))
7316
7317 (define-public python-execnet
7318 (package
7319 (name "python-execnet")
7320 (version "1.4.1")
7321 (source (origin
7322 (method url-fetch)
7323 (uri (pypi-uri "execnet" version))
7324 (sha256
7325 (base32
7326 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7327 (build-system python-build-system)
7328 (arguments
7329 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7330 ;; The two test failures are caused by the lack of an `ssh` executable.
7331 ;; The test suite can be run with pytest after the 'install' phase.
7332 #:tests? #f))
7333 (native-inputs
7334 `(("python-pytest" ,python-pytest)
7335 ("python-setuptools-scm" ,python-setuptools-scm)))
7336 (propagated-inputs
7337 `(("python-apipkg" ,python-apipkg)))
7338 (synopsis "Rapid multi-Python deployment")
7339 (description "Execnet provides a share-nothing model with
7340 channel-send/receive communication for distributing execution across many
7341 Python interpreters across version, platform and network barriers. It has a
7342 minimal and fast API targeting the following uses:
7343 @enumerate
7344 @item distribute tasks to (many) local or remote CPUs
7345 @item write and deploy hybrid multi-process applications
7346 @item write scripts to administer multiple environments
7347 @end enumerate")
7348 (home-page "http://codespeak.net/execnet/")
7349 (license license:expat)))
7350
7351 (define-public python2-execnet
7352 (package-with-python2 python-execnet))
7353
7354 (define-public python-icalendar
7355 (package
7356 (name "python-icalendar")
7357 (version "4.0.1")
7358 (source (origin
7359 (method url-fetch)
7360 (uri (pypi-uri "icalendar" version))
7361 (sha256
7362 (base32
7363 "139y79y6ijl39m5bj771r43vpah9s4ly7d1k76la6hrx7l144ak8"))))
7364 (build-system python-build-system)
7365 (propagated-inputs
7366 `(("python-dateutil" ,python-dateutil)
7367 ("python-pytz" ,python-pytz)))
7368 (synopsis "Python library for parsing iCalendar files")
7369 (description "The icalendar package is a parser/generator of iCalendar
7370 files for use with Python.")
7371 (home-page "https://github.com/collective/icalendar")
7372 (license license:bsd-2)))
7373
7374 (define-public python-sphinxcontrib-newsfeed
7375 (package
7376 (name "python-sphinxcontrib-newsfeed")
7377 (version "0.1.4")
7378 (source (origin
7379 (method url-fetch)
7380 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7381 (sha256
7382 (base32
7383 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7384 (arguments '(#:tests? #f)) ; No tests.
7385 (build-system python-build-system)
7386 (propagated-inputs
7387 `(("python-sphinx" ,python-sphinx)))
7388 (synopsis "News Feed extension for Sphinx")
7389 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7390 Blog, News or Announcements section to a Sphinx website.")
7391 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7392 (license license:bsd-2)))
7393
7394 (define-public python-args
7395 (package
7396 (name "python-args")
7397 (version "0.1.0")
7398 (source (origin
7399 (method url-fetch)
7400 (uri (pypi-uri "args" version))
7401 (sha256
7402 (base32
7403 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7404 (build-system python-build-system)
7405 (home-page "https://github.com/kennethreitz/args")
7406 (synopsis "Command-line argument parser")
7407 (description
7408 "This library provides a Python module to parse command-line arguments.")
7409 (license license:bsd-3)))
7410
7411 (define-public python2-args
7412 (package-with-python2 python-args))
7413
7414 (define-public python-clint
7415 (package
7416 (name "python-clint")
7417 (version "0.5.1")
7418 (source (origin
7419 (method url-fetch)
7420 (uri (pypi-uri "clint" version))
7421 (sha256
7422 (base32
7423 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7424 (build-system python-build-system)
7425 (arguments
7426 '(#:phases
7427 (modify-phases %standard-phases
7428 (replace 'check
7429 (lambda _
7430 (zero? (system* "py.test" "-v")))))))
7431 (native-inputs
7432 `(("python-pytest" ,python-pytest)))
7433 (propagated-inputs
7434 `(("python-args" ,python-args)))
7435 (home-page "https://github.com/kennethreitz/clint")
7436 (synopsis "Command-line interface tools")
7437 (description
7438 "Clint is a Python module filled with a set of tools for developing
7439 command-line applications, including tools for colored and indented
7440 output, progress bar display, and pipes.")
7441 (license license:isc)))
7442
7443 (define-public python2-clint
7444 (package-with-python2 python-clint))
7445
7446 (define-public python-astor
7447 (package
7448 (name "python-astor")
7449 (version "0.5")
7450 (source (origin
7451 (method url-fetch)
7452 (uri (pypi-uri "astor" version))
7453 (sha256
7454 (base32
7455 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7456 (build-system python-build-system)
7457 (home-page "https://github.com/berkerpeksag/astor")
7458 (synopsis "Read and write Python ASTs")
7459 (description
7460 "Astor is designed to allow easy manipulation of Python source via the
7461 Abstract Syntax Tree.")
7462 (license license:bsd-3)))
7463
7464 (define-public python2-astor
7465 (package-with-python2 python-astor))
7466
7467 (define-public python-rply
7468 (package
7469 (name "python-rply")
7470 (version "0.7.5")
7471 (source (origin
7472 (method url-fetch)
7473 (uri (pypi-uri "rply" version))
7474 (sha256
7475 (base32
7476 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
7477 (build-system python-build-system)
7478 (propagated-inputs
7479 `(("python-appdirs" ,python-appdirs)))
7480 (home-page "https://github.com/alex/rply")
7481 (synopsis "Parser generator for Python")
7482 (description
7483 "This package provides a pure Python based parser generator, that also
7484 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7485 with a new public API, and RPython support.")
7486 (license license:bsd-3)))
7487
7488 (define-public python2-rply
7489 (package-with-python2 python-rply))
7490
7491 (define-public python-hy
7492 (package
7493 (name "python-hy")
7494 (version "0.13.0")
7495 (source (origin
7496 (method url-fetch)
7497 (uri (pypi-uri "hy" version))
7498 (sha256
7499 (base32
7500 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
7501 (build-system python-build-system)
7502 (arguments
7503 '(#:phases
7504 (modify-phases %standard-phases
7505 (replace 'check
7506 (lambda _
7507 ;; Tests require write access to HOME.
7508 (setenv "HOME" "/tmp")
7509 (zero? (system* "nosetests")))))))
7510 (native-inputs
7511 `(("python-coverage" ,python-coverage)
7512 ("python-nose" ,python-nose)))
7513 (propagated-inputs
7514 `(("python-astor" ,python-astor)
7515 ("python-clint" ,python-clint)
7516 ("python-rply" ,python-rply)))
7517 (home-page "http://hylang.org/")
7518 (synopsis "Lisp frontend to Python")
7519 (description
7520 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7521 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7522 Python at your fingertips, in Lisp form.")
7523 (license license:expat)))
7524
7525 (define-public python2-hy
7526 (package-with-python2 python-hy))
7527
7528 (define-public python2-functools32
7529 (package
7530 (name "python2-functools32")
7531 (version "3.2.3-2")
7532 (source
7533 (origin
7534 (method url-fetch)
7535 (uri (pypi-uri "functools32" version))
7536 (sha256
7537 (base32
7538 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7539 (build-system python-build-system)
7540 (arguments
7541 `(#:python ,python-2
7542 #:tests? #f)) ; no test target
7543 (home-page "https://github.com/MiCHiLU/python-functools32")
7544 (synopsis
7545 "Backport of the functools module from Python 3.2.3")
7546 (description
7547 "This package is a backport of the @code{functools} module from Python
7548 3.2.3 for use with older versions of Python and PyPy.")
7549 (license license:expat)))
7550
7551 (define-public python2-subprocess32
7552 (package
7553 (name "python2-subprocess32")
7554 (version "3.2.7")
7555 (source (origin
7556 (method url-fetch)
7557 (uri (pypi-uri "subprocess32" version))
7558 (sha256
7559 (base32
7560 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
7561 (patches
7562 (search-patches "python2-subprocess32-disable-input-test.patch"))))
7563 (build-system python-build-system)
7564 (arguments
7565 `(#:python ,python-2
7566 ;; The test suite fails with Python > 2.7.13:
7567 ;; import test.support
7568 ;; ImportError: No module named support
7569 #:tests? #f
7570 #:phases
7571 (modify-phases %standard-phases
7572 (add-after 'unpack 'patch-/bin/sh
7573 (lambda _
7574 (substitute* '("subprocess32.py"
7575 "test_subprocess32.py")
7576 (("/bin/sh") (which "sh")))
7577 #t)))))
7578 (home-page "https://github.com/google/python-subprocess32")
7579 (synopsis "Backport of the subprocess module from Python 3.2")
7580 (description
7581 "This is a backport of the @code{subprocess} standard library module
7582 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
7583 new features. On POSIX systems it is guaranteed to be reliable when used
7584 in threaded applications. It includes timeout support from Python 3.3 but
7585 otherwise matches 3.2’s API.")
7586 (license license:psfl)))
7587
7588 (define-public python2-futures
7589 (package
7590 (name "python2-futures")
7591 (version "3.0.5")
7592 (source
7593 (origin
7594 (method url-fetch)
7595 (uri (pypi-uri "futures" version))
7596 (sha256
7597 (base32
7598 "1pw1z4329xvlabdpwqa6b7v2fxf7hl64m4cgr22ckbym8m8m4hh5"))))
7599 (build-system python-build-system)
7600 (arguments `(#:python ,python-2))
7601 (home-page "https://github.com/agronholm/pythonfutures")
7602 (synopsis
7603 "Backport of the concurrent.futures package from Python 3.2")
7604 (description
7605 "The concurrent.futures module provides a high-level interface for
7606 asynchronously executing callables. This package backports the
7607 concurrent.futures package from Python 3.2")
7608 (license license:bsd-3)))
7609
7610 (define-public python-promise
7611 (package
7612 (name "python-promise")
7613 (version "0.4.2")
7614 (source
7615 (origin
7616 (method url-fetch)
7617 (uri (pypi-uri "promise" version))
7618 (sha256
7619 (base32
7620 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7621 (build-system python-build-system)
7622 ;; Tests wants python-futures, which is a python2 only program, and
7623 ;; can't be found by python-promise at test time.
7624 (arguments `(#:tests? #f))
7625 (home-page "https://github.com/syrusakbary/promise")
7626 (synopsis "Promises/A+ implementation for Python")
7627 (description
7628 "Promises/A+ implementation for Python")
7629 (properties `((python2-variant . ,(delay python2-promise))))
7630 (license license:expat)))
7631
7632 (define-public python2-promise
7633 (let ((promise (package-with-python2
7634 (strip-python2-variant python-promise))))
7635 (package (inherit promise)
7636 (arguments (substitute-keyword-arguments (package-arguments promise)
7637 ((#:tests? _) #t)))
7638 (native-inputs
7639 `(("python2-futures" ,python2-futures)
7640 ("python2-pytest" ,python2-pytest)
7641 ,@(package-native-inputs promise))))))
7642
7643 (define-public python-colorama
7644 (package
7645 (name "python-colorama")
7646 (version "0.3.9")
7647 (source
7648 (origin
7649 (method url-fetch)
7650 (uri (pypi-uri "colorama" version))
7651 (sha256
7652 (base32
7653 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
7654 (build-system python-build-system)
7655 (synopsis "Colored terminal text rendering for Python")
7656 (description "Colorama is a Python library for rendering colored terminal
7657 text.")
7658 (home-page "https://pypi.python.org/pypi/colorama")
7659 (license license:bsd-3)))
7660
7661 (define-public python2-colorama
7662 (package-with-python2 python-colorama))
7663
7664 (define-public python-rsa
7665 (package
7666 (name "python-rsa")
7667 (version "3.4.2")
7668 (source
7669 (origin
7670 (method url-fetch)
7671 (uri (pypi-uri "rsa" version))
7672 (sha256
7673 (base32
7674 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
7675 (build-system python-build-system)
7676 (propagated-inputs
7677 `(("python-pyasn1" ,python-pyasn1)))
7678 (synopsis "Pure-Python RSA implementation")
7679 (description "Python-RSA is a pure-Python RSA implementation. It supports
7680 encryption and decryption, signing and verifying signatures, and key
7681 generation according to PKCS#1 version 1.5. It can be used as a Python
7682 library as well as on the command line.")
7683 (home-page "https://stuvel.eu/rsa")
7684 (license license:asl2.0)))
7685
7686 (define-public python2-rsa
7687 (package-with-python2 python-rsa))
7688
7689 (define-public python-pluggy
7690 (package
7691 (name "python-pluggy")
7692 (version "0.6.0")
7693 (source
7694 (origin
7695 (method url-fetch)
7696 (uri (pypi-uri "pluggy" version))
7697 (sha256
7698 (base32
7699 "1zqckndfn85l1cd8pndw212zg1bq9fkg1nnj32kp2mppppsyg2kz"))))
7700 (build-system python-build-system)
7701 (synopsis "Plugin and hook calling mechanism for Python")
7702 (description "Pluggy is an extraction of the plugin manager as used by
7703 Pytest but stripped of Pytest specific details.")
7704 (home-page "https://pypi.python.org/pypi/pluggy")
7705 (license license:expat)))
7706
7707 (define-public python2-pluggy
7708 (package-with-python2 python-pluggy))
7709
7710 (define-public python-tox
7711 (package
7712 (name "python-tox")
7713 (version "2.8.1")
7714 (source
7715 (origin
7716 (method url-fetch)
7717 (uri (pypi-uri "tox" version))
7718 (sha256
7719 (base32
7720 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
7721 (build-system python-build-system)
7722 (arguments
7723 ;; FIXME: Tests require pytest-timeout, which itself requires
7724 ;; pytest>=2.8.0 for installation.
7725 '(#:tests? #f))
7726 (propagated-inputs
7727 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
7728 ("python-py" ,python-py)
7729 ("python-virtualenv" ,python-virtualenv)))
7730 (native-inputs
7731 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
7732 ("python-pytest" ,python-pytest) ; >= 2.3.5
7733 ("python-setuptools-scm" ,python-setuptools-scm)))
7734 (home-page "http://tox.testrun.org/")
7735 (synopsis "Virtualenv-based automation of test activities")
7736 (description "Tox is a generic virtualenv management and test command line
7737 tool. It can be used to check that a package installs correctly with
7738 different Python versions and interpreters, or run tests in each type of
7739 supported environment, or act as a frontend to continuous integration
7740 servers.")
7741 (license license:expat)))
7742
7743 (define-public python2-tox
7744 (package-with-python2 python-tox))
7745
7746 (define-public python-jmespath
7747 (package
7748 (name "python-jmespath")
7749 (version "0.9.3")
7750 (source
7751 (origin
7752 (method url-fetch)
7753 (uri (pypi-uri "jmespath" version))
7754 (sha256
7755 (base32
7756 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
7757 (build-system python-build-system)
7758 (native-inputs
7759 `(("python-nose" ,python-nose)))
7760 (synopsis "JSON Matching Expressions")
7761 (description "JMESPath (pronounced “james path”) is a Python library that
7762 allows one to declaratively specify how to extract elements from a JSON
7763 document.")
7764 (home-page "https://github.com/jmespath/jmespath.py")
7765 (license license:expat)))
7766
7767 (define-public python2-jmespath
7768 (package-with-python2 python-jmespath))
7769
7770 (define-public python-botocore
7771 (package
7772 (name "python-botocore")
7773 (version "1.8.43")
7774 (source
7775 (origin
7776 (method url-fetch)
7777 (uri (pypi-uri "botocore" version))
7778 (sha256
7779 (base32
7780 "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg"))))
7781 (build-system python-build-system)
7782 (arguments
7783 ;; FIXME: Many tests are failing.
7784 '(#:tests? #f))
7785 (propagated-inputs
7786 `(("python-dateutil" ,python-dateutil)
7787 ("python-docutils" ,python-docutils)
7788 ("python-jmespath" ,python-jmespath)))
7789 (native-inputs
7790 `(("python-mock" ,python-mock)
7791 ("python-nose" ,python-nose)
7792 ("behave" ,behave)
7793 ("python-tox" ,python-tox)
7794 ("python-wheel" ,python-wheel)))
7795 (home-page "https://github.com/boto/botocore")
7796 (synopsis "Low-level interface to AWS")
7797 (description "Botocore is a Python library that provides a low-level
7798 interface to the Amazon Web Services (AWS) API.")
7799 (license license:asl2.0)))
7800
7801 (define-public python2-botocore
7802 (package-with-python2 python-botocore))
7803
7804 (define-public python-xdo
7805 (package
7806 (name "python-xdo")
7807 (version "0.3")
7808 (source (origin
7809 (method url-fetch)
7810 (uri (string-append
7811 "http://http.debian.net/debian/pool/main/p/python-xdo/"
7812 "python-xdo_" version ".orig.tar.gz"))
7813 (sha256
7814 (base32
7815 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
7816 (build-system python-build-system)
7817 (arguments
7818 '(#:phases
7819 (modify-phases %standard-phases
7820 (add-before 'install 'patch-libxdo-path
7821 ;; Hardcode the path of dynamically loaded libxdo library.
7822 (lambda* (#:key inputs #:allow-other-keys)
7823 (let ((libxdo (string-append
7824 (assoc-ref inputs "xdotool")
7825 "/lib/libxdo.so")))
7826 (substitute* "xdo/_xdo.py"
7827 (("find_library\\(\"xdo\"\\)")
7828 (simple-format #f "\"~a\"" libxdo)))
7829 #t))))
7830 #:tests? #f)) ; no tests provided
7831 (propagated-inputs
7832 `(("python-six" ,python-six)))
7833 (inputs
7834 `(("xdotool" ,xdotool)
7835 ("libX11" ,libx11)))
7836 (home-page "https://tracker.debian.org/pkg/python-xdo")
7837 (synopsis "Python library for simulating X11 keyboard/mouse input")
7838 (description "Provides bindings to libxdo for manipulating X11 via simulated
7839 input. (Note that this is mostly a legacy library; you may wish to look at
7840 python-xdo for newer bindings.)")
7841 (license license:bsd-3)))
7842
7843 (define-public python2-xdo
7844 (package-with-python2 python-xdo))
7845
7846 (define-public python-mako
7847 (package
7848 (name "python-mako")
7849 (version "1.0.6")
7850 (source
7851 (origin
7852 (method url-fetch)
7853 (uri (pypi-uri "Mako" version))
7854 (sha256
7855 (base32
7856 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
7857 (build-system python-build-system)
7858 (propagated-inputs
7859 `(("python-markupsafe" ,python-markupsafe)))
7860 (native-inputs
7861 `(("python-mock" ,python-mock)
7862 ("python-nose" ,python-nose)
7863 ("python-pytest" ,python-pytest)))
7864 (home-page "http://www.makotemplates.org/")
7865 (synopsis "Templating language for Python")
7866 (description "Mako is a templating language for Python that compiles
7867 templates into Python modules.")
7868 (license license:expat)))
7869
7870 (define-public python2-mako
7871 (package-with-python2 python-mako))
7872
7873 (define-public python-waitress
7874 (package
7875 (name "python-waitress")
7876 (version "1.1.0")
7877 (source
7878 (origin
7879 (method url-fetch)
7880 (uri (pypi-uri "waitress" version))
7881 (patches (search-patches "python-waitress-fix-tests.patch"))
7882 (sha256
7883 (base32
7884 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
7885 (build-system python-build-system)
7886 (home-page "https://github.com/Pylons/waitress")
7887 (synopsis "Waitress WSGI server")
7888 (description "Waitress is meant to be a production-quality pure-Python WSGI
7889 server with very acceptable performance.")
7890 (license license:zpl2.1)))
7891
7892 (define-public python2-waitress
7893 (package-with-python2 python-waitress))
7894
7895 (define-public python-pyquery
7896 (package
7897 (name "python-pyquery")
7898 (version "1.2.17")
7899 (source
7900 (origin
7901 (method url-fetch)
7902 (uri (pypi-uri "pyquery" version))
7903 (sha256
7904 (base32
7905 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
7906 (build-system python-build-system)
7907 (native-inputs
7908 `(("python-webob" ,python-webob)
7909 ("python-webtest" ,python-webtest)))
7910 (propagated-inputs
7911 `(("python-lxml" ,python-lxml)
7912 ("python-cssselect" ,python-cssselect)))
7913 (home-page "https://github.com/gawel/pyquery")
7914 (synopsis "Make jQuery-like queries on xml documents")
7915 (description "pyquery allows you to make jQuery queries on xml documents.
7916 The API is as much as possible the similar to jQuery. pyquery uses lxml for
7917 fast xml and html manipulation.")
7918 (license license:bsd-3)))
7919
7920 (define-public python2-pyquery
7921 (package-with-python2 python-pyquery))
7922
7923 (define-public python-anyjson
7924 (package
7925 (name "python-anyjson")
7926 (version "0.3.3")
7927 (source
7928 (origin
7929 (method url-fetch)
7930 (uri (pypi-uri "anyjson" version))
7931 (sha256
7932 (base32
7933 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
7934 (build-system python-build-system)
7935 (arguments
7936 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
7937 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
7938 ;; whatever) so this transformation needs to be done before the tests
7939 ;; can be run. Maybe we could add a build step to transform beforehand
7940 ;; but it could be annoying/difficult.
7941 ;; We can enable tests for the Python 2 version, though, and do below.
7942 #:tests? #f))
7943 (home-page "https://bitbucket.org/runeh/anyjson/")
7944 (synopsis
7945 "Wraps best available JSON implementation in a common interface")
7946 (description
7947 "Anyjson loads whichever is the fastest JSON module installed
7948 and provides a uniform API regardless of which JSON implementation is used.")
7949 (license license:bsd-3)
7950 (properties `((python2-variant . ,(delay python2-anyjson))))))
7951
7952 (define-public python2-anyjson
7953 (let ((anyjson (package-with-python2
7954 (strip-python2-variant python-anyjson))))
7955 (package
7956 (inherit anyjson)
7957 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
7958 #:tests? #t
7959 ,@(package-arguments anyjson)))
7960 (native-inputs `(("python2-nose" ,python2-nose))))))
7961
7962 (define-public python-amqp
7963 (package
7964 (name "python-amqp")
7965 (version "1.4.9")
7966 (source
7967 (origin
7968 (method url-fetch)
7969 (uri (pypi-uri "amqp" version))
7970 (sha256
7971 (base32
7972 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
7973 (build-system python-build-system)
7974 (native-inputs
7975 `(("python-nose" ,python-nose)
7976 ("python-mock" ,python-mock)))
7977 (home-page "https://github.com/celery/py-amqp")
7978 (synopsis
7979 "Low-level AMQP client for Python (fork of amqplib)")
7980 (description
7981 "This is a fork of amqplib which was originally written by Barry Pederson.
7982 It is maintained by the Celery project, and used by kombu as a pure python
7983 alternative when librabbitmq is not available.")
7984 (license license:lgpl2.1+)
7985 (properties `((python2-variant . ,(delay python2-amqp))))))
7986
7987 (define-public python2-amqp
7988 (let ((amqp (package-with-python2
7989 (strip-python2-variant python-amqp))))
7990 (package
7991 (inherit amqp)
7992 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
7993 ;; unmaintained. Weirdly, does not do this on the python 3
7994 ;; version?
7995 #:tests? #f
7996 ,@(package-arguments amqp))))))
7997
7998 (define-public python-txamqp
7999 (package
8000 (name "python-txamqp")
8001 (version "0.8.0")
8002 (source
8003 (origin
8004 (method url-fetch)
8005 (uri (pypi-uri "txAMQP" version))
8006 (sha256
8007 (base32
8008 "1r43a66dd547mz40ikymm8y3d480cidy560fj81qc0jk4lncgmmr"))))
8009 (build-system python-build-system)
8010 (propagated-inputs
8011 `(("python-six" ,python-six)
8012 ("python-twisted" ,python-twisted)))
8013 (home-page "https://github.com/txamqp/txamqp")
8014 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8015 (description
8016 "This package provides a Python library for communicating with AMQP peers
8017 and brokers using the asynchronous networking framework Twisted. It contains
8018 all the necessary code to connect, send and receive messages to/from an
8019 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8020 also includes support for using Thrift RPC over AMQP in Twisted
8021 applications.")
8022 (license license:asl2.0)))
8023
8024 (define-public python2-txamqp
8025 (package-with-python2 python-txamqp))
8026
8027 (define-public python-kombu
8028 (package
8029 (name "python-kombu")
8030 (version "3.0.37")
8031 (source
8032 (origin
8033 (method url-fetch)
8034 (uri (pypi-uri "kombu" version))
8035 (sha256
8036 (base32
8037 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
8038 (build-system python-build-system)
8039 (native-inputs
8040 `(("python-mock" ,python-mock)
8041 ("python-nose" ,python-nose)))
8042 (propagated-inputs
8043 `(("python-anyjson" ,python-anyjson)
8044 ("python-amqp" ,python-amqp)
8045 ("python-redis" ,python-redis)))
8046 (home-page "http://kombu.readthedocs.org")
8047 (synopsis "Message passing library for Python")
8048 (description "The aim of Kombu is to make messaging in Python as easy as
8049 possible by providing an idiomatic high-level interface for the AMQ protocol,
8050 and also provide proven and tested solutions to common messaging problems.
8051 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8052 message orientation, queuing, routing, reliability and security, for which the
8053 RabbitMQ messaging server is the most popular implementation.")
8054 (license license:bsd-3)
8055 (properties `((python2-variant . ,(delay python2-kombu))))))
8056
8057 (define-public python2-kombu
8058 (let ((kombu (package-with-python2
8059 (strip-python2-variant python-kombu))))
8060 (package
8061 (inherit kombu)
8062 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8063 ;; It works fine on the python3 variant.
8064 #:tests? #f
8065 ,@(package-arguments kombu)))
8066 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8067 ,@(package-native-inputs kombu))))))
8068
8069 (define-public python-billiard
8070 (package
8071 (name "python-billiard")
8072 (version "3.3.0.23")
8073 (source
8074 (origin
8075 (method url-fetch)
8076 (uri (pypi-uri "billiard" version))
8077 (sha256
8078 (base32
8079 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
8080 (build-system python-build-system)
8081 (native-inputs
8082 `(("python-nose" ,python-nose)))
8083 (home-page "https://github.com/celery/billiard")
8084 (synopsis
8085 "Python multiprocessing fork with improvements and bugfixes")
8086 (description
8087 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8088 multiprocessing package itself is a renamed and updated version of R Oudkerk's
8089 pyprocessing package. This standalone variant is intended to be compatible with
8090 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8091 (license license:bsd-3)
8092 (properties `((python2-variant . ,(delay python2-billiard))))))
8093
8094 (define-public python2-billiard
8095 (let ((billiard (package-with-python2
8096 (strip-python2-variant python-billiard))))
8097 (package
8098 (inherit billiard)
8099 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8100 ("python2-mock" ,python2-mock)
8101 ,@(package-native-inputs billiard))))))
8102
8103 (define-public python-celery
8104 (package
8105 (name "python-celery")
8106 (version "3.1.24")
8107 (source
8108 (origin
8109 (method url-fetch)
8110 (uri (pypi-uri "celery" version))
8111 (sha256
8112 (base32
8113 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
8114 (build-system python-build-system)
8115 (arguments
8116 `(#:phases
8117 (modify-phases %standard-phases
8118 ;; These tests break with Python 3.5:
8119 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
8120 (replace 'check
8121 (lambda _
8122 (zero?
8123 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
8124 (native-inputs
8125 `(("python-nose" ,python-nose)))
8126 (propagated-inputs
8127 `(("python-pytz" ,python-pytz)
8128 ("python-billiard" ,python-billiard)
8129 ("python-kombu" ,python-kombu)))
8130 (home-page "http://celeryproject.org")
8131 (synopsis "Distributed Task Queue")
8132 (description "Celery is an asynchronous task queue/job queue based on
8133 distributed message passing. It is focused on real-time operation, but
8134 supports scheduling as well. The execution units, called tasks, are executed
8135 concurrently on a single or more worker servers using multiprocessing,
8136 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8137 synchronously (wait until ready).")
8138 (license license:bsd-3)
8139 (properties `((python2-variant . ,(delay python2-celery))))))
8140
8141 (define-public python2-celery
8142 (let ((celery (package-with-python2
8143 (strip-python2-variant python-celery))))
8144 (package
8145 (inherit celery)
8146 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8147 ("python2-mock" ,python2-mock)
8148 ,@(package-native-inputs celery))))))
8149
8150 (define-public python-translitcodec
8151 (package
8152 (name "python-translitcodec")
8153 (version "0.4.0")
8154 (source
8155 (origin
8156 (method url-fetch)
8157 (uri (pypi-uri "translitcodec" version))
8158 (sha256
8159 (base32
8160 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8161 (build-system python-build-system)
8162 (arguments
8163 `(#:tests? #f)) ; no tests provided
8164 (home-page
8165 "https://github.com/claudep/translitcodec")
8166 (synopsis
8167 "Unicode to 8-bit charset transliteration codec")
8168 (description
8169 "This package contains codecs for transliterating ISO 10646 texts into
8170 best-effort representations using smaller coded character sets (ASCII,
8171 ISO 8859, etc.).")
8172 (license license:expat)))
8173
8174 (define-public python2-translitcodec
8175 (package-with-python2 python-translitcodec))
8176
8177 (define-public python-editor
8178 (package
8179 (name "python-editor")
8180 (version "0.5")
8181 (source
8182 (origin
8183 (method url-fetch)
8184 (uri (pypi-uri "python-editor" version))
8185 (sha256
8186 (base32
8187 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8188 (build-system python-build-system)
8189 (home-page
8190 "https://github.com/fmoo/python-editor")
8191 (synopsis
8192 "Programmatically open an editor, capture the result")
8193 (description
8194 "python-editor is a library that provides the editor module for
8195 programmatically interfacing with your system's $EDITOR.")
8196 (license license:asl2.0)))
8197
8198 (define-public python2-editor
8199 (package-with-python2 python-editor))
8200
8201 (define-public python-sphinxcontrib-programoutput
8202 (package
8203 (name "python-sphinxcontrib-programoutput")
8204 (version "0.10")
8205 (source (origin
8206 (method url-fetch)
8207 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8208 (sha256
8209 (base32
8210 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
8211 (build-system python-build-system)
8212 (arguments
8213 ;; FIXME: Many tests are failing and the upstream is gone.
8214 '(#:tests? #f))
8215 (propagated-inputs
8216 `(("python-sphinx" ,python-sphinx)))
8217 (synopsis "Sphinx extension to include program output")
8218 (description "A Sphinx extension to literally insert the output of arbitrary
8219 commands into documents, helping you to keep your command examples up to date.")
8220 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8221 (license license:bsd-2)))
8222
8223 (define-public python2-sphinxcontrib-programoutput
8224 (package-with-python2 python-sphinxcontrib-programoutput))
8225
8226 (define-public python-sphinx-repoze-autointerface
8227 (package
8228 (name "python-sphinx-repoze-autointerface")
8229 (version "0.8")
8230 (source (origin
8231 (method url-fetch)
8232 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8233 (sha256
8234 (base32
8235 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8236 (build-system python-build-system)
8237 (arguments '(#:tests? #f)) ; No tests.
8238 (propagated-inputs
8239 `(("python-sphinx" ,python-sphinx)
8240 ("python-zope-interface" ,python-zope-interface)))
8241 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8242 (description "This package defines an extension for the Sphinx documentation
8243 system. The extension allows generation of API documentation by
8244 introspection of @code{zope.interface} instances in code.")
8245 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8246 (license license:repoze)))
8247
8248 (define-public python2-sphinx-repoze-autointerface
8249 (package-with-python2 python-sphinx-repoze-autointerface))
8250
8251 (define-public python-vobject
8252 (package
8253 (name "python-vobject")
8254 (version "0.9.5")
8255 (source (origin
8256 (method url-fetch)
8257 (uri (pypi-uri "vobject" version))
8258 (sha256
8259 (base32
8260 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
8261 (build-system python-build-system)
8262 (arguments
8263 '(;; The test suite relies on some non-portable Windows interfaces.
8264 #:tests? #f))
8265 (propagated-inputs
8266 `(("python-dateutil" ,python-dateutil)
8267 ("python-pyicu" ,python-pyicu)))
8268 (synopsis "Parse and generate vCard and vCalendar files")
8269 (description "Vobject is intended to be a full featured Python package for
8270 parsing and generating vCard and vCalendar files. Currently, iCalendar files
8271 are supported and well tested. vCard 3.0 files are supported, and all data
8272 should be imported, but only a few components are understood in a sophisticated
8273 way.")
8274 (home-page "http://eventable.github.io/vobject/")
8275 (license license:asl2.0)))
8276
8277 (define-public python2-vobject
8278 (package-with-python2 python-vobject))
8279
8280 (define-public python-munkres
8281 (package
8282 (name "python-munkres")
8283 (version "1.0.8")
8284 (source (origin
8285 (method url-fetch)
8286 (uri (pypi-uri "munkres" version))
8287 (sha256
8288 (base32
8289 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
8290 (build-system python-build-system)
8291 (arguments
8292 '(#:tests? #f)) ; no test suite
8293 (home-page "http://software.clapper.org/munkres/")
8294 (synopsis "Implementation of the Munkres algorithm")
8295 (description "The Munkres module provides an implementation of the Munkres
8296 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8297 useful for solving the Assignment Problem.")
8298 (license license:bsd-3)))
8299
8300 (define-public python2-munkres
8301 (package-with-python2 python-munkres))
8302
8303 (define-public python-whoosh
8304 (package
8305 (name "python-whoosh")
8306 (version "2.7.4")
8307 (source
8308 (origin
8309 (method url-fetch)
8310 (uri (pypi-uri "Whoosh" version))
8311 (sha256
8312 (base32
8313 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8314 (build-system python-build-system)
8315 (native-inputs
8316 `(("python-pytest" ,python-pytest)))
8317 (home-page "https://bitbucket.org/mchaput/whoosh")
8318 (synopsis "Full text indexing, search, and spell checking library")
8319 (description
8320 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8321 checking library.")
8322 (license license:bsd-2)))
8323
8324 (define-public python2-whoosh
8325 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8326 (package (inherit whoosh)
8327 (propagated-inputs
8328 `(("python2-backport-ssl-match-hostname"
8329 ,python2-backport-ssl-match-hostname)
8330 ,@(package-propagated-inputs whoosh))))))
8331
8332 (define-public python-pathlib
8333 (package
8334 (name "python-pathlib")
8335 (version "1.0.1")
8336 (source (origin
8337 (method url-fetch)
8338 (uri (pypi-uri "pathlib" version))
8339 (sha256
8340 (base32
8341 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8342 (build-system python-build-system)
8343 ;; The tests depend on the internal "test" module, which does not provide
8344 ;; a stable interface.
8345 (arguments `(#:tests? #f))
8346 (home-page "https://pathlib.readthedocs.org/")
8347 (synopsis "Object-oriented file system paths")
8348 (description "Pathlib offers a set of classes to handle file system paths.
8349 It offers the following advantages over using string objects:
8350
8351 @enumerate
8352 @item No more cumbersome use of os and os.path functions. Everything can
8353 be done easily through operators, attribute accesses, and method calls.
8354 @item Embodies the semantics of different path types. For example,
8355 comparing Windows paths ignores casing.
8356 @item Well-defined semantics, eliminating any inconsistencies or
8357 ambiguities (forward vs. backward slashes, etc.).
8358 @end enumerate
8359
8360 Note: In Python 3.4, pathlib is now part of the standard library. For other
8361 Python versions please consider python-pathlib2 instead, which tracks the
8362 standard library module. This module (python-pathlib) isn't maintained
8363 anymore.")
8364 (license license:expat)))
8365
8366 (define-public python2-pathlib
8367 (package-with-python2 python-pathlib))
8368
8369 (define-public python2-pathlib2
8370 (package
8371 (name "python2-pathlib2")
8372 (version "2.3.2")
8373 (source (origin
8374 (method url-fetch)
8375 (uri (pypi-uri "pathlib2" version))
8376 (sha256
8377 (base32
8378 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
8379 (build-system python-build-system)
8380 ;; We only need the the Python 2 variant, since for Python 3 our minimum
8381 ;; version is 3.4 which already includes this package as part of the
8382 ;; standard library.
8383 (arguments
8384 `(#:python ,python-2))
8385 (propagated-inputs
8386 `(("python2-scandir" ,python2-scandir)
8387 ("python2-six" ,python2-six)))
8388 (home-page "https://pypi.python.org/pypi/pathlib2/")
8389 (synopsis "Object-oriented file system paths - backport of standard
8390 pathlib module")
8391 (description "The goal of pathlib2 is to provide a backport of standard
8392 pathlib module which tracks the standard library module, so all the newest
8393 features of the standard pathlib can be used also on older Python versions.
8394
8395 Pathlib offers a set of classes to handle file system paths. It offers the
8396 following advantages over using string objects:
8397
8398 @enumerate
8399 @item No more cumbersome use of os and os.path functions. Everything can
8400 be done easily through operators, attribute accesses, and method calls.
8401 @item Embodies the semantics of different path types. For example,
8402 comparing Windows paths ignores casing.
8403 @item Well-defined semantics, eliminating any inconsistencies or
8404 ambiguities (forward vs. backward slashes, etc.).
8405 @end enumerate")
8406 (license license:expat)))
8407
8408 (define-public python-jellyfish
8409 (package
8410 (name "python-jellyfish")
8411 (version "0.5.6")
8412 (source (origin
8413 (method url-fetch)
8414 (uri (pypi-uri "jellyfish" version))
8415 (sha256
8416 (base32
8417 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
8418 (build-system python-build-system)
8419 (native-inputs
8420 `(("python-pytest" ,python-pytest)))
8421 (home-page "https://github.com/jamesturk/jellyfish")
8422 (synopsis "Approximate and phonetic matching of strings")
8423 (description "Jellyfish uses a variety of string comparison and phonetic
8424 encoding algorithms to do fuzzy string matching.")
8425 (license license:bsd-2)
8426 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8427
8428 (define-public python2-jellyfish
8429 (let ((jellyfish (package-with-python2
8430 (strip-python2-variant python-jellyfish))))
8431 (package (inherit jellyfish)
8432 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
8433 ,@(package-native-inputs jellyfish))))))
8434
8435 (define-public python2-unicodecsv
8436 (package
8437 (name "python2-unicodecsv")
8438 (version "0.14.1")
8439 (source (origin
8440 (method url-fetch)
8441 ;; The test suite is not included in the PyPi release.
8442 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8443 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8444 "archive/" version ".tar.gz"))
8445 (file-name (string-append name "-" version ".tar.gz"))
8446 (sha256
8447 (base32
8448 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8449 (build-system python-build-system)
8450 (arguments
8451 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8452 #:python ,python-2))
8453 (native-inputs
8454 `(("python2-unittest2" ,python2-unittest2)))
8455 (home-page "https://github.com/jdunck/python-unicodecsv")
8456 (synopsis "Unicode CSV module for Python 2")
8457 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8458 module, adding support for Unicode strings.")
8459 (license license:bsd-2)))
8460
8461 (define-public python-rarfile
8462 (package
8463 (name "python-rarfile")
8464 (version "2.8")
8465 (source (origin
8466 (method url-fetch)
8467 (uri (pypi-uri "rarfile" version))
8468 (sha256
8469 (base32
8470 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
8471 (build-system python-build-system)
8472 (arguments
8473 '(#:phases
8474 (modify-phases %standard-phases
8475 (replace 'check
8476 ;; Many tests fail, but the installation proceeds.
8477 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
8478 (native-inputs
8479 `(("which" ,which))) ; required for tests
8480 (propagated-inputs
8481 `(("libarchive" ,libarchive)))
8482 (home-page "https://github.com/markokr/rarfile")
8483 (synopsis "RAR archive reader for Python")
8484 (description "This is Python module for RAR archive reading. The interface
8485 is made as zipfile like as possible.")
8486 (license license:isc)))
8487
8488 (define-public python2-rarfile
8489 (package-with-python2 python-rarfile))
8490
8491 (define-public python-magic
8492 (package
8493 (name "python-magic")
8494 (version "0.4.15")
8495 (source
8496 (origin
8497 (method url-fetch)
8498 (uri (pypi-uri "python-magic" version))
8499 (sha256
8500 (base32
8501 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
8502 (file-name (string-append name "-" version "-checkout"))))
8503 (build-system python-build-system)
8504 (arguments
8505 ;; The tests are unreliable, so don't run them. The tests fail
8506 ;; under Python3 because they were written for Python2 and
8507 ;; contain import statements that do not work in Python3. One of
8508 ;; the tests fails under Python2 because its assertions are
8509 ;; overly stringent; it relies on comparing output strings which
8510 ;; are brittle and can change depending on the version of
8511 ;; libmagic being used and the system on which the test is
8512 ;; running. In my case, under GuixSD 0.10.0, only one test
8513 ;; failed, and it seems to have failed only because the version
8514 ;; of libmagic that is packaged in Guix outputs a slightly
8515 ;; different (but not wrong) string than the one that the test
8516 ;; expected.
8517 '(#:tests? #f
8518 #:phases (modify-phases %standard-phases
8519 ;; Replace a specific method call with a hard-coded
8520 ;; path to the necessary libmagic.so file in the
8521 ;; store. If we don't do this, then the method call
8522 ;; will fail to find the libmagic.so file, which in
8523 ;; turn will cause any application using
8524 ;; python-magic to fail.
8525 (add-before 'build 'hard-code-path-to-libmagic
8526 (lambda* (#:key inputs #:allow-other-keys)
8527 (let ((file (assoc-ref inputs "file")))
8528 (substitute* "magic.py"
8529 (("ctypes.util.find_library\\('magic'\\)")
8530 (string-append "'" file "/lib/libmagic.so'")))
8531 #t)))
8532 (add-before 'install 'disable-egg-compression
8533 (lambda _
8534 (let ((port (open-file "setup.cfg" "a")))
8535 (display "\n[easy_install]\nzip_ok = 0\n"
8536 port)
8537 (close-port port)
8538 #t))))))
8539 (inputs
8540 ;; python-magic needs to be able to find libmagic.so.
8541 `(("file" ,file)))
8542 (home-page
8543 "https://github.com/ahupp/python-magic")
8544 (synopsis
8545 "File type identification using libmagic")
8546 (description
8547 "This module uses ctypes to access the libmagic file type
8548 identification library. It makes use of the local magic database and
8549 supports both textual and MIME-type output. Note that this module and
8550 the python-file module both provide a \"magic.py\" file; these two
8551 modules, which are different and were developed separately, both serve
8552 the same purpose: to provide Python bindings for libmagic.")
8553 (license license:expat)))
8554
8555 (define-public python2-magic
8556 (package-with-python2 python-magic))
8557
8558 (define-public python2-s3cmd
8559 (package
8560 (name "python2-s3cmd")
8561 (version "1.6.1")
8562 (source
8563 (origin
8564 (method url-fetch)
8565 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
8566 "s3cmd-" version ".tar.gz"))
8567 (sha256
8568 (base32
8569 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8570 (build-system python-build-system)
8571 (arguments
8572 ;; s3cmd is written for python2 only and contains no tests.
8573 `(#:python ,python-2
8574 #:tests? #f))
8575 (propagated-inputs
8576 `(("python2-dateutil" ,python2-dateutil)
8577 ;; The python-file package also provides a magic.py module.
8578 ;; This is an unfortunate state of affairs; however, s3cmd
8579 ;; fails to install if it cannot find specifically the
8580 ;; python-magic package. Thus we include it, instead of using
8581 ;; python-file. Ironically, s3cmd sometimes works better
8582 ;; without libmagic bindings at all:
8583 ;; https://github.com/s3tools/s3cmd/issues/198
8584 ("python2-magic" ,python2-magic)))
8585 (home-page "http://s3tools.org/s3cmd")
8586 (synopsis "Command line tool for S3-compatible storage services")
8587 (description
8588 "S3cmd is a command line tool for uploading, retrieving and managing data
8589 in storage services that are compatible with the Amazon Simple Storage
8590 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
8591 GnuPG encryption, and more. It also supports management of Amazon's
8592 CloudFront content delivery network.")
8593 (license license:gpl2+)))
8594
8595 (define-public python-pkgconfig
8596 (package
8597 (name "python-pkgconfig")
8598 (version "1.1.0")
8599 (source
8600 (origin
8601 (method url-fetch)
8602 (uri (pypi-uri "pkgconfig" version))
8603 (sha256
8604 (base32
8605 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
8606 (build-system python-build-system)
8607 (native-inputs
8608 `(("python-nose" ,python-nose)))
8609 (inputs
8610 `(("pkg-config" ,pkg-config)))
8611 (arguments
8612 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
8613 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
8614 #:tests? #f
8615 ;; Hard-code the path to pkg-config.
8616 #:phases
8617 (modify-phases %standard-phases
8618 (add-before
8619 'build 'patch
8620 (lambda _
8621 (substitute* "pkgconfig/pkgconfig.py"
8622 (("cmd = 'pkg-config")
8623 (string-append "cmd = '" (which "pkg-config"))))
8624 #t)))))
8625 (home-page "https://github.com/matze/pkgconfig")
8626 (synopsis "Python interface for pkg-config")
8627 (description "This module provides a Python interface to pkg-config. It
8628 can be used to find all pkg-config packages, check if a package exists,
8629 check if a package meets certain version requirements, query CFLAGS and
8630 LDFLAGS and parse the output to build extensions with setup.py.")
8631 (license license:expat)))
8632
8633 (define-public python2-pkgconfig
8634 (package-with-python2 python-pkgconfig))
8635
8636 (define-public python-bz2file
8637 (package
8638 (name "python-bz2file")
8639 (version "0.98")
8640 (source
8641 (origin
8642 (method url-fetch)
8643 (uri (pypi-uri "bz2file" version))
8644 (sha256
8645 (base32
8646 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
8647 (build-system python-build-system)
8648 (arguments
8649 `(#:tests? #f)) ; Tests use deprecated python modules.
8650 (home-page "https://github.com/nvawda/bz2file")
8651 (synopsis "Read and write bzip2-compressed files")
8652 (description
8653 "Bz2file is a Python library for reading and writing bzip2-compressed
8654 files. It contains a drop-in replacement for the I/O interface in the
8655 standard library's @code{bz2} module, including features from the latest
8656 development version of CPython that are not available in older releases.")
8657 (license license:asl2.0)
8658 (properties `((python2-variant . ,(delay python2-bz2file))))))
8659
8660 (define-public python2-bz2file
8661 (let ((base (package-with-python2
8662 (strip-python2-variant python-bz2file))))
8663 (package
8664 (inherit base)
8665 (arguments
8666 `(#:python ,python-2
8667 #:phases
8668 (modify-phases %standard-phases
8669 ;; 'python setup.py test' does not work as of 0.98.
8670 ;; There is only the one test file, so we run it directly.
8671 (replace 'check
8672 (lambda _ (zero? (system* "python"
8673 "test_bz2file.py"))))))))))
8674
8675 (define-public python-future
8676 (package
8677 (name "python-future")
8678 (version "0.16.0")
8679 (source
8680 (origin
8681 (method url-fetch)
8682 (uri (pypi-uri "future" version))
8683 (sha256
8684 (base32
8685 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
8686 (build-system python-build-system)
8687 ;; Many tests connect to the network or are otherwise flawed.
8688 ;; https://github.com/PythonCharmers/python-future/issues/210
8689 (arguments
8690 `(#:tests? #f))
8691 (home-page "http://python-future.org")
8692 (synopsis "Single-source support for Python 3 and 2")
8693 (description
8694 "@code{python-future} is the missing compatibility layer between Python 2 and
8695 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
8696 to support both Python 2 and Python 3 with minimal overhead.")
8697 (license license:expat)))
8698
8699 (define-public python2-future
8700 (package-with-python2 python-future))
8701
8702 (define-public python-cysignals
8703 (package
8704 (name "python-cysignals")
8705 (version "1.1.0")
8706 (source
8707 (origin
8708 (method url-fetch)
8709 (uri (pypi-uri "cysignals" version ".tar.bz2"))
8710 (sha256
8711 (base32
8712 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
8713 (build-system python-build-system)
8714 (native-inputs
8715 `(("python-cython" ,python-cython)
8716 ("python-sphinx" ,python-sphinx)))
8717 (inputs
8718 `(("pari-gp" ,pari-gp)))
8719 (arguments
8720 `(#:modules ((guix build python-build-system)
8721 ((guix build gnu-build-system) #:prefix gnu:)
8722 (guix build utils))
8723 ;; FIXME: Tests are executed after installation and currently fail
8724 ;; when not installing into standard locations; the author is working
8725 ;; on a fix.
8726 #:tests? #f
8727 #:phases
8728 (modify-phases %standard-phases
8729 (add-before
8730 'build 'configure
8731 (assoc-ref gnu:%standard-phases 'configure)))))
8732 (home-page
8733 "https://github.com/sagemath/cysignals")
8734 (synopsis
8735 "Handling of interrupts and signals for Cython")
8736 (description
8737 "The cysignals package provides mechanisms to handle interrupts (and
8738 other signals and errors) in Cython code, using two related approaches,
8739 for mixed Cython/Python code or external C libraries and pure Cython code,
8740 respectively.")
8741 (license license:lgpl3+)))
8742
8743 (define-public python2-cysignals
8744 (package-with-python2 python-cysignals))
8745
8746 (define-public python2-shedskin
8747 (package
8748 (name "python2-shedskin")
8749 (version "0.9.4")
8750 (source
8751 (origin
8752 (method url-fetch)
8753 (uri (string-append "https://github.com/shedskin/shedskin/"
8754 "releases/download/v" version
8755 "/shedskin-" version ".tgz"))
8756 (sha256
8757 (base32
8758 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
8759 (build-system python-build-system)
8760 (arguments
8761 `(#:python ,python-2
8762 #:phases (modify-phases %standard-phases
8763 (add-after 'unpack 'fix-resulting-include-libs
8764 (lambda* (#:key inputs #:allow-other-keys)
8765 (let ((libgc (assoc-ref inputs "libgc"))
8766 (pcre (assoc-ref inputs "pcre")))
8767 (substitute* "shedskin/makefile.py"
8768 (("variable == 'CCFLAGS':[ ]*")
8769 (string-append "variable == 'CCFLAGS':\n"
8770 " line += ' -I " pcre "/include"
8771 " -I " libgc "/include'"))
8772 (("variable == 'LFLAGS':[ ]*")
8773 (string-append "variable == 'LFLAGS':\n"
8774 " line += ' -L" pcre "/lib"
8775 " -L " libgc "/lib'")))
8776 #t))))))
8777 (inputs `(("pcre" ,pcre)
8778 ("libgc" ,libgc)))
8779 (home-page "https://shedskin.github.io/")
8780 (synopsis "Experimental Python-2 to C++ Compiler")
8781 (description (string-append "This is an experimental compiler for a subset of
8782 Python. It generates C++ code and a Makefile."))
8783 (license (list license:gpl3 license:bsd-3 license:expat))))
8784
8785 (define-public python2-rope
8786 (package
8787 (name "python2-rope")
8788 (version "0.10.3")
8789 (source
8790 (origin
8791 (method url-fetch)
8792 (uri (pypi-uri "rope" version))
8793 (sha256
8794 (base32
8795 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
8796 (arguments
8797 ;; Rope is currently python-2 only.
8798 ;; https://github.com/python-rope/rope/issues/57
8799 `(#:python ,python-2))
8800 (build-system python-build-system)
8801 (native-inputs
8802 `(("python2-unittest2" ,python2-unittest2)))
8803 (home-page "https://github.com/python-rope/rope")
8804 (synopsis "Refactoring library for Python")
8805 (description "Rope is a refactoring library for Python. It facilitates
8806 the renaming, moving and extracting of attributes, functions, modules, fields
8807 and parameters in Python 2 source code. These refactorings can also be applied
8808 to occurrences in strings and comments.")
8809 (license license:gpl2)))
8810
8811 (define-public python-py3status
8812 (package
8813 (name "python-py3status")
8814 (version "3.7")
8815 (source
8816 (origin
8817 (method url-fetch)
8818 (uri (pypi-uri "py3status" version))
8819 (sha256
8820 (base32
8821 "0shxcfz4wcczj0mhwp4w0dvwd2fdd9bgprq8slim1519iiqzgwhq"))))
8822 (build-system python-build-system)
8823 (inputs
8824 `(("file" ,file)))
8825 (arguments
8826 '(#:phases
8827 (modify-phases %standard-phases
8828 ;; 'file' is used for detection of configuration file encoding
8829 ;; let's make link the dependency to particular input
8830 (add-before 'build 'patch-file-path
8831 (lambda* (#:key inputs #:allow-other-keys)
8832 (let ((file-path (assoc-ref inputs "file")))
8833 (substitute* "py3status/parse_config.py"
8834 (("\\['file', '-b'")
8835 (string-append "['" file-path "/bin/file', '-b'")))
8836 #t))))
8837 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
8838 (home-page "https://github.com/ultrabug/py3status")
8839 (synopsis "Extensible i3status wrapper written in Python")
8840 (description "py3status is an i3status wrapper which extends i3status
8841 functionality in a modular way, allowing you to extend your panel with your
8842 own code, responding to click events and updating clock every second.")
8843 (license license:bsd-3)))
8844
8845 (define-public python-tblib
8846 (package
8847 (name "python-tblib")
8848 (version "1.3.2")
8849 (source (origin
8850 (method url-fetch)
8851 (uri (pypi-uri "tblib" version))
8852 (sha256 (base32
8853 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
8854 (build-system python-build-system)
8855 (arguments
8856 `(#:phases
8857 (modify-phases %standard-phases
8858 (replace 'check
8859 (lambda _
8860 ;; Upstream runs tests after installation and the package itself
8861 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
8862 ;; found.
8863 (setenv "PYTHONPATH"
8864 (string-append (getcwd) "/build/lib:"
8865 (getenv "PYTHONPATH")))
8866 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
8867 (native-inputs
8868 `(("python-pytest" ,python-pytest)
8869 ("python-six" ,python-six)))
8870 (home-page "https://github.com/ionelmc/python-tblib")
8871 (synopsis "Traceback serialization library")
8872 (description
8873 "Traceback serialization allows you to:
8874
8875 @enumerate
8876 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
8877 different processes. This allows better error handling when running code over
8878 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
8879
8880 @item Parse traceback strings and raise with the parsed tracebacks.
8881 @end enumerate\n")
8882 (license license:bsd-3)))
8883
8884 (define-public python2-tblib
8885 (package-with-python2 python-tblib))
8886
8887 (define-public python-greenlet
8888 (package
8889 (name "python-greenlet")
8890 (version "0.4.11")
8891 (source (origin
8892 (method url-fetch)
8893 (uri (pypi-uri "greenlet" version))
8894 (sha256
8895 (base32
8896 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
8897 (build-system python-build-system)
8898 (home-page "https://greenlet.readthedocs.io/")
8899 (synopsis "Lightweight in-process concurrent programming")
8900 (description
8901 "Greenlet package is a spin-off of Stackless, a version of CPython
8902 that supports micro-threads called \"tasklets\". Tasklets run
8903 pseudo-concurrently (typically in a single or a few OS-level threads) and
8904 are synchronized with data exchanges on \"channels\".")
8905 (license (list license:psfl license:expat))))
8906
8907 (define-public python2-greenlet
8908 (package-with-python2 python-greenlet))
8909
8910 (define-public python-gevent
8911 (package
8912 (name "python-gevent")
8913 (version "1.2.2")
8914 (source (origin
8915 (method url-fetch)
8916 (uri (pypi-uri "gevent" version))
8917 (sha256
8918 (base32
8919 "0bbbjvi423y9k9xagrcsimnayaqymg6f2dj76m9z3mjpkjpci4a7"))
8920 (modules '((guix build utils)))
8921 (snippet
8922 '(begin
8923 ;; unbunding libev and c-ares
8924 (delete-file-recursively "deps")
8925 #t))))
8926 (build-system python-build-system)
8927 (arguments
8928 `(#:modules ((ice-9 ftw)
8929 (srfi srfi-26)
8930 (guix build utils)
8931 (guix build python-build-system))
8932 #:phases (modify-phases %standard-phases
8933 (add-after 'unpack 'unpack-libev
8934 (lambda* (#:key inputs #:allow-other-keys)
8935 (mkdir-p "deps/libev")
8936 ;; FIXME: gevent requires building libev, even though
8937 ;; it only links against the proper one.
8938 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
8939 "--strip-components=1" "-C" "deps/libev")))
8940 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
8941 (lambda _
8942 (substitute* "src/gevent/subprocess.py"
8943 (("/bin/sh") (which "sh")))
8944 (for-each (lambda (file)
8945 (substitute* file
8946 (("/bin/sh") (which "sh"))
8947 (("/bin/true") (which "true"))))
8948 (find-files "src/greentest" "\\.py$"))
8949 #t))
8950 (add-before 'build 'do-not-use-bundled-sources
8951 (lambda _
8952 (setenv "CONFIG_SHELL" (which "bash"))
8953 (setenv "LIBEV_EMBED" "false")
8954 (setenv "CARES_EMBED" "false")
8955 (setenv "EMBED" "false")
8956 #t))
8957 (replace 'check
8958 (lambda _
8959 ;; Make sure the build directory is on PYTHONPATH.
8960 (setenv "PYTHONPATH"
8961 (string-append
8962 (getenv "PYTHONPATH") ":"
8963 (getcwd) "/build/"
8964 (car (scandir "build" (cut string-prefix? "lib." <>)))))
8965 (with-directory-excursion "src/greentest"
8966 ;; XXX: Many tests require network access. Instead we only
8967 ;; run known-good tests. Unfortunately we cannot use
8968 ;; recursion here since this directory also contains
8969 ;; Python-version-specific subfolders.
8970 (apply invoke "python" "testrunner.py" "--config"
8971 "known_failures.py"
8972 (scandir "." (cut regexp-exec
8973 (make-regexp "test_+(subprocess|core)")
8974 <>)))))))))
8975 (propagated-inputs
8976 `(("python-greenlet" ,python-greenlet)))
8977 (native-inputs
8978 `(("libev-source" ,(package-source libev))
8979 ("python-six" ,python-six)))
8980 (inputs
8981 `(("c-ares" ,c-ares)
8982 ("libev" ,libev)))
8983 (home-page "http://www.gevent.org/")
8984 (synopsis "Coroutine-based network library")
8985 (description
8986 "gevent is a coroutine-based Python networking library that uses greenlet
8987 to provide a high-level synchronous API on top of the libev event loop.")
8988 (license license:expat)))
8989
8990 (define-public python2-gevent
8991 (package-with-python2 python-gevent))
8992
8993 (define-public python-fastimport
8994 (package
8995 (name "python-fastimport")
8996 (version "0.9.6")
8997 (source
8998 (origin
8999 (method url-fetch)
9000 (uri (pypi-uri "fastimport" version))
9001 (sha256
9002 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9003 (build-system python-build-system)
9004 (home-page "https://github.com/jelmer/python-fastimport")
9005 (synopsis "VCS fastimport parser and generator in Python")
9006 (description "This package provides a parser for and generator of the Git
9007 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9008 format.")
9009 (license license:gpl2+)))
9010
9011 (define-public python2-fastimport
9012 (package-with-python2 python-fastimport))
9013
9014 (define-public python-twisted
9015 (package
9016 (name "python-twisted")
9017 (version "17.1.0")
9018 (source (origin
9019 (method url-fetch)
9020 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9021 (sha256
9022 (base32
9023 "1p245mg15hkxp7hy5cyq2fgvlgjkb4cg0gwkwd148nzy1bbi3wnv"))))
9024 (build-system python-build-system)
9025 (arguments
9026 '(#:tests? #f)) ; FIXME: Some tests are failing.
9027 ;; #:phases
9028 ;; (modify-phases %standard-phases
9029 ;; (replace 'check
9030 ;; (lambda _
9031 ;; (zero? (system* "./bin/trial" "twisted")))))
9032 (propagated-inputs
9033 `(("python-zope-interface" ,python-zope-interface)
9034 ("python-incremental" ,python-incremental)
9035 ("python-constantly" ,python-constantly)
9036 ("python-automat" ,python-automat)))
9037 (home-page "https://twistedmatrix.com/")
9038 (synopsis "Asynchronous networking framework written in Python")
9039 (description
9040 "Twisted is an extensible framework for Python programming, with special
9041 focus on event-based network programming and multiprotocol integration.")
9042 (license license:expat)))
9043
9044 (define-public python2-twisted
9045 (package-with-python2 python-twisted))
9046
9047 (define-public python-pika
9048 (package
9049 (name "python-pika")
9050 (version "0.10.0")
9051 (source
9052 (origin
9053 (method url-fetch)
9054 (uri (pypi-uri "pika" version))
9055 (sha256
9056 (base32
9057 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
9058 (build-system python-build-system)
9059 (native-inputs
9060 `(("python-pyev" ,python-pyev)
9061 ("python-tornado" ,python-tornado)
9062 ("python-twisted" ,python-twisted)))
9063 (home-page "https://pika.readthedocs.org")
9064 (synopsis "Pure Python AMQP Client Library")
9065 (description
9066 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9067 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9068 network support library.")
9069 (license license:bsd-3)))
9070
9071 (define-public python2-pika
9072 (package-with-python2 python-pika))
9073
9074 (define-public python-ply
9075 (package
9076 (name "python-ply")
9077 (version "3.10")
9078 (source
9079 (origin
9080 (method url-fetch)
9081 (uri (pypi-uri "ply" version))
9082 (sha256
9083 (base32
9084 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9085 (build-system python-build-system)
9086 (home-page "http://www.dabeaz.com/ply/")
9087 (synopsis "Python Lex & Yacc")
9088 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9089 It uses LR parsing and does extensive error checking.")
9090 (license license:bsd-3)))
9091
9092 (define-public python2-ply
9093 (package-with-python2 python-ply))
9094
9095 (define-public python-tabulate
9096 (package
9097 (name "python-tabulate")
9098 (version "0.7.7")
9099 (source (origin
9100 (method url-fetch)
9101 (uri (pypi-uri "tabulate" version))
9102 (sha256
9103 (base32
9104 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
9105 (build-system python-build-system)
9106 (arguments
9107 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
9108 ;; and the latest release is not tagged in the upstream repository.
9109 '(#:tests? #f))
9110 (home-page "https://bitbucket.org/astanin/python-tabulate")
9111 (synopsis "Pretty-print tabular data")
9112 (description
9113 "Tabulate is a library and command-line utility to pretty-print tabular
9114 data in Python.")
9115 (license license:expat)))
9116
9117 (define-public python2-tabulate
9118 (package-with-python2 python-tabulate))
9119
9120 (define-public python-kazoo
9121 (package
9122 (name "python-kazoo")
9123 (version "2.4.0")
9124 (source
9125 (origin
9126 (method url-fetch)
9127 (uri (pypi-uri "kazoo" version))
9128 (sha256
9129 (base32
9130 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
9131 (build-system python-build-system)
9132 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9133 (propagated-inputs
9134 `(("python-six" ,python-six)))
9135 (home-page "https://kazoo.readthedocs.org")
9136 (synopsis "High-level Zookeeper client library")
9137 (description
9138 "Kazoo is a Python client library for the Apache Zookeeper distributed
9139 application service. It is designed to be easy to use and to avoid common
9140 programming errors.")
9141 (license license:asl2.0)))
9142
9143 (define-public python2-kazoo
9144 (package-with-python2 python-kazoo))
9145
9146 (define-public python-pykafka
9147 (package
9148 (name "python-pykafka")
9149 (version "2.4.0")
9150 (source (origin
9151 (method url-fetch)
9152 (uri (string-append
9153 "https://pypi.python.org/packages/8b/3e/"
9154 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
9155 "pykafka-" version ".tar.gz"))
9156 (sha256
9157 (base32
9158 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9159 (build-system python-build-system)
9160 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9161 (propagated-inputs
9162 `(("python-gevent" ,python-gevent)
9163 ("python-kazoo" ,python-kazoo)
9164 ("python-tabulate" ,python-tabulate)))
9165 (inputs
9166 `(("librdkafka" ,librdkafka)))
9167 (home-page "https://pykafka.readthedocs.io/")
9168 (synopsis "Apache Kafka client for Python")
9169 (description
9170 "PyKafka is a client for the Apache Kafka distributed messaging system.
9171 It includes Python implementations of Kafka producers and consumers, which
9172 are optionally backed by a C extension built on librdkafka.")
9173 (license license:asl2.0)))
9174
9175 (define-public python2-pykafka
9176 (package-with-python2 python-pykafka))
9177
9178 (define-public python-wcwidth
9179 (package
9180 (name "python-wcwidth")
9181 (version "0.1.7")
9182 (source
9183 (origin
9184 (method url-fetch)
9185 (uri (pypi-uri "wcwidth" version))
9186 (sha256
9187 (base32
9188 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
9189 (build-system python-build-system)
9190 (home-page "https://github.com/jquast/wcwidth")
9191 (synopsis "Measure number of terminal column cells of wide-character codes")
9192 (description "Wcwidth measures the number of terminal column cells of
9193 wide-character codes. It is useful for those implementing a terminal emulator,
9194 or programs that carefully produce output to be interpreted by one. It is a
9195 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9196 specified in POSIX.1-2001 and POSIX.1-2008.")
9197 (license license:expat)))
9198
9199 (define-public python2-wcwidth
9200 (package-with-python2 python-wcwidth))
9201
9202 (define-public python2-jsonrpclib
9203 (package
9204 (name "python2-jsonrpclib")
9205 (version "0.1.7")
9206 (source (origin
9207 (method url-fetch)
9208 (uri (string-append
9209 "https://pypi.python.org/packages/source/j/jsonrpclib/"
9210 "jsonrpclib-" version ".tar.gz"))
9211 (sha256
9212 (base32
9213 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9214 (build-system python-build-system)
9215 (arguments
9216 `(#:tests? #f
9217 #:python ,python-2))
9218 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9219 (synopsis "Implementation of JSON-RPC specification for Python")
9220 (description
9221 "This library is an implementation of the JSON-RPC specification.
9222 It supports both the original 1.0 specification, as well as the
9223 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9224 etc.")
9225 (license license:asl2.0)))
9226
9227 (define-public python-chai
9228 (package
9229 (name "python-chai")
9230 (version "1.1.2")
9231 (source (origin
9232 (method url-fetch)
9233 (uri (pypi-uri "chai" version))
9234 (sha256
9235 (base32
9236 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
9237 (build-system python-build-system)
9238 (home-page "https://github.com/agoragames/chai")
9239 (synopsis "Mocking framework for Python")
9240 (description
9241 "Chai provides an api for mocking, stubbing and spying your python
9242 objects, patterned after the Mocha library for Ruby.")
9243 (license license:bsd-3)))
9244
9245 (define-public python2-chai
9246 (package-with-python2 python-chai))
9247
9248 (define-public python-inflection
9249 (package
9250 (name "python-inflection")
9251 (version "0.3.1")
9252 (source
9253 (origin (method url-fetch)
9254 (uri (pypi-uri "inflection" version))
9255 (sha256
9256 (base32
9257 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9258 (build-system python-build-system)
9259 (native-inputs
9260 `(("python-pytest" ,python-pytest)))
9261 (home-page "https://github.com/jpvanhal/inflection")
9262 (synopsis "Python string transformation library")
9263 (description
9264 "Inflection is a string transformation library. It singularizes
9265 and pluralizes English words, and transforms strings from CamelCase to
9266 underscored string.")
9267 (license license:expat)))
9268
9269 (define-public python2-inflection
9270 (package-with-python2 python-inflection))
9271
9272 (define-public python-pylev
9273 (package
9274 (name "python-pylev")
9275 (version "1.3.0")
9276 (source (origin
9277 (method url-fetch)
9278 (uri (pypi-uri "pylev" version))
9279 (sha256
9280 (base32
9281 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9282 (build-system python-build-system)
9283 (home-page "https://github.com/toastdriven/pylev")
9284 (synopsis "Levenshtein distance implementation in Python")
9285 (description "Pure Python Levenshtein implementation, based off the
9286 Wikipedia code samples at
9287 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9288 (license license:bsd-3)))
9289
9290 (define-public python2-pylev
9291 (package-with-python2 python-pylev))
9292
9293 (define-public python-cleo
9294 (package
9295 (name "python-cleo")
9296 (version "0.6.1")
9297 (source (origin
9298 (method url-fetch)
9299 (uri (pypi-uri "cleo" version))
9300 (sha256
9301 (base32
9302 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
9303 (build-system python-build-system)
9304 (native-inputs
9305 `(;; For testing
9306 ("python-mock" ,python-mock)
9307 ("python-pytest-mock" ,python-pytest-mock)
9308 ("python-pytest" ,python-pytest)))
9309 (propagated-inputs
9310 `(("python-backpack" ,python-backpack)
9311 ("python-pastel" ,python-pastel)
9312 ("python-pylev" ,python-pylev)))
9313 (home-page "https://github.com/sdispater/cleo")
9314 (synopsis "Command-line arguments library for Python")
9315 (description
9316 "Cleo allows you to create command-line commands with signature in
9317 docstring and colored output.")
9318 (license license:expat)))
9319
9320 (define-public python2-cleo
9321 (package-with-python2 python-cleo))
9322
9323 (define-public python-lazy-object-proxy
9324 (package
9325 (name "python-lazy-object-proxy")
9326 (version "1.2.2")
9327 (source (origin
9328 (method url-fetch)
9329 (uri (pypi-uri "lazy-object-proxy" version))
9330 (sha256
9331 (base32
9332 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
9333 (build-system python-build-system)
9334 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9335 (synopsis "Lazy object proxy for python")
9336 (description
9337 "Lazy object proxy is an object that wraps a callable but defers the call
9338 until the object is actually required, and caches the result of said call.")
9339 (license license:bsd-2)))
9340
9341 (define-public python2-lazy-object-proxy
9342 (package-with-python2 python-lazy-object-proxy))
9343
9344 (define-public python-dnspython
9345 (package
9346 (name "python-dnspython")
9347 (version "1.15.0")
9348 (source (origin
9349 (method url-fetch)
9350 (uri (string-append "http://www.dnspython.org/kits/"
9351 version "/dnspython-" version ".tar.gz"))
9352 (sha256
9353 (base32
9354 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
9355 (build-system python-build-system)
9356 (arguments '(#:tests? #f)) ; XXX: requires internet access
9357 (home-page "http://www.dnspython.org")
9358 (synopsis "DNS toolkit for Python")
9359 (description
9360 "dnspython is a DNS toolkit for Python. It supports almost all record
9361 types. It can be used for queries, zone transfers, and dynamic updates.
9362 It supports TSIG authenticated messages and EDNS0.")
9363 (license license:expat)))
9364
9365 (define-public python2-dnspython
9366 (package-with-python2 python-dnspython))
9367
9368 (define-public python-email-validator
9369 (package
9370 (name "python-email-validator")
9371 (version "1.0.2")
9372 (source
9373 (origin (method url-fetch)
9374 (uri (pypi-uri "email_validator" version))
9375 (sha256
9376 (base32
9377 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
9378 (build-system python-build-system)
9379 (arguments
9380 '(#:phases
9381 (modify-phases %standard-phases
9382 (add-before 'build 'use-dnspython
9383 (lambda _
9384 (substitute* "setup.py"
9385 (("dnspython3") "dnspython"))
9386 #t)))))
9387 (propagated-inputs
9388 `(("python-dnspython" ,python-dnspython)
9389 ("python-idna" ,python-idna)))
9390 (home-page "https://github.com/JoshData/python-email-validator")
9391 (synopsis "Email address validation library for Python")
9392 (description
9393 "This library validates email address syntax and deliverability.")
9394 (license license:cc0)))
9395
9396 (define-public python2-email-validator
9397 (package-with-python2 python-email-validator))
9398
9399 (define-public python-ukpostcodeparser
9400 (package
9401 (name "python-ukpostcodeparser")
9402 (version "1.0.3")
9403 (source (origin
9404 (method url-fetch)
9405 (uri (pypi-uri "UkPostcodeParser" version))
9406 (sha256
9407 (base32
9408 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9409 (build-system python-build-system)
9410 (home-page "https://github.com/hamstah/ukpostcodeparser")
9411 (synopsis "UK Postcode parser for Python")
9412 (description
9413 "This library provides the @code{parse_uk_postcode} function for
9414 parsing UK postcodes.")
9415 (license license:expat)))
9416
9417 (define-public python2-ukpostcodeparser
9418 (package-with-python2 python-ukpostcodeparser))
9419
9420 (define-public python-faker
9421 (package
9422 (name "python-faker")
9423 (version "0.7.9")
9424 (source (origin
9425 (method url-fetch)
9426 (uri (pypi-uri "Faker" version))
9427 (sha256
9428 (base32
9429 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
9430 (patches
9431 (search-patches "python-faker-fix-build-32bit.patch"))
9432 (modules '((guix build utils)))
9433 (snippet
9434 '(begin
9435 (for-each delete-file (find-files "." "\\.pyc$"))
9436 #t))))
9437 (build-system python-build-system)
9438 (arguments
9439 '(#:phases
9440 (modify-phases %standard-phases
9441 (replace 'check
9442 (lambda _
9443 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
9444 (native-inputs
9445 `(;; For testing
9446 ("python-email-validator" ,python-email-validator)
9447 ("python-mock" ,python-mock)
9448 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
9449 (propagated-inputs
9450 `(("python-dateutil" ,python-dateutil)
9451 ("python-six" ,python-six)))
9452 (home-page "https://github.com/joke2k/faker")
9453 (synopsis "Python package that generates fake data")
9454 (description
9455 "Faker is a Python package that generates fake data such as names,
9456 addresses, and phone numbers.")
9457 (license license:expat)
9458 (properties `((python2-variant . ,(delay python2-faker))))))
9459
9460 (define-public python2-faker
9461 (let ((base (package-with-python2 (strip-python2-variant
9462 python-faker))))
9463 (package
9464 (inherit base)
9465 (propagated-inputs
9466 `(("python2-ipaddress" ,python2-ipaddress)
9467 ,@(package-propagated-inputs base))))))
9468
9469 (define-public python-pyaml
9470 (package
9471 (name "python-pyaml")
9472 (version "17.7.2")
9473 (source (origin
9474 (method url-fetch)
9475 (uri (pypi-uri "pyaml" version))
9476 (sha256
9477 (base32
9478 "132grrw0ajq4nrappi3ldbkb952k7yn9b6c7csi2rmvzm1g6ppp2"))))
9479 (build-system python-build-system)
9480 (native-inputs
9481 `(("python-unidecode" ,python-unidecode)))
9482 (propagated-inputs
9483 `(("python-pyyaml" ,python-pyyaml)))
9484 (home-page "https://github.com/mk-fg/pretty-yaml")
9485 (synopsis "YAML pretty-print library for Python")
9486 (description
9487 "pyaml is a PyYAML based python module to produce pretty and readable
9488 YAML-serialized data.")
9489 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
9490
9491 (define-public python2-pyaml
9492 (package-with-python2 python-pyaml))
9493
9494 (define-public python-backpack
9495 (package
9496 (name "python-backpack")
9497 (version "0.1")
9498 (source
9499 (origin
9500 (method url-fetch)
9501 (uri (pypi-uri "backpack" version))
9502 (sha256
9503 (base32
9504 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
9505 (build-system python-build-system)
9506 (native-inputs
9507 `(("python-pytest" ,python-pytest)
9508 ("python-nose" ,python-nose)))
9509 (propagated-inputs
9510 `(("python-simplejson" ,python-simplejson)))
9511 (home-page "https://github.com/sdispater/backpack")
9512 (synopsis "Utilities for working with Python collections")
9513 (description "Backpack provides some useful utilities for working with
9514 collections of data.")
9515 (license license:expat)))
9516
9517 (define-public python2-backpack
9518 (package-with-python2 python-backpack))
9519
9520 (define-public python-prompt-toolkit
9521 (package
9522 (name "python-prompt-toolkit")
9523 (version "1.0.15")
9524 (source
9525 (origin
9526 (method url-fetch)
9527 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9528 (sha256
9529 (base32
9530 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))
9531 (build-system python-build-system)
9532 (arguments
9533 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
9534 (propagated-inputs
9535 `(("python-wcwidth" ,python-wcwidth)
9536 ("python-six" ,python-six)
9537 ("python-pygments" ,python-pygments)))
9538 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
9539 (synopsis "Library for building command line interfaces in Python")
9540 (description
9541 "Prompt-Toolkit is a library for building interactive command line
9542 interfaces in Python. It's like GNU Readline but it also features syntax
9543 highlighting while typing, out-of-the-box multi-line input editing, advanced
9544 code completion, incremental search, support for Chinese double-width
9545 characters, mouse support, and auto suggestions.")
9546 (license license:bsd-3)))
9547
9548 (define-public python2-prompt-toolkit
9549 (package-with-python2 python-prompt-toolkit))
9550
9551 (define-public python-jedi
9552 (package
9553 (name "python-jedi")
9554 (version "0.12.0")
9555 (source
9556 (origin
9557 (method url-fetch)
9558 (uri (pypi-uri "jedi" version))
9559 (sha256
9560 (base32
9561 "1bcr7csx4xil1iwmk03d79jis0bkmgi9k0kir3xa4rmwqsagcwhr"))))
9562 (build-system python-build-system)
9563 (arguments
9564 `(#:phases
9565 (modify-phases %standard-phases
9566 (replace 'check (lambda _
9567 (invoke "py.test" "-vv"))))))
9568 (native-inputs
9569 `(("python-pytest" ,python-pytest)
9570 ("python-parso" ,python-parso)
9571 ("python-docopt" ,python-docopt)))
9572 (home-page "https://github.com/davidhalter/jedi")
9573 (synopsis
9574 "Autocompletion for Python that can be used for text editors")
9575 (description
9576 "Jedi is an autocompletion tool for Python that can be used for text
9577 editors.")
9578 (license license:expat)))
9579
9580 (define-public python2-jedi
9581 (package-with-python2 python-jedi))
9582
9583 (define-public ptpython
9584 (package
9585 (name "ptpython")
9586 (version "0.34")
9587 (source (origin
9588 (method url-fetch)
9589 (uri (pypi-uri "ptpython" version))
9590 (sha256
9591 (base32
9592 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
9593 (build-system python-build-system)
9594 (arguments
9595 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
9596 (propagated-inputs
9597 `(("python-docopt" ,python-docopt)
9598 ("python-jedi" ,python-jedi)
9599 ("python-prompt-toolkit" ,python-prompt-toolkit)
9600 ("python-pygments" ,python-pygments)))
9601 (home-page "https://github.com/jonathanslenders/ptpython")
9602 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
9603 (description
9604 "ptpython is a Python read-eval-print loop with IDE-like features.
9605 It supports syntax highlighting, multiline editing, autocompletion, mouse,
9606 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
9607 etc.")
9608 (license license:bsd-3)
9609 (properties `((python2-variant . ,(delay ptpython-2))))))
9610
9611 (define-public ptpython-2
9612 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
9613 (package
9614 (inherit base)
9615 (name "ptpython2"))))
9616
9617 (define-public python-stem
9618 (package
9619 (name "python-stem")
9620 (version "1.6.0")
9621 (source
9622 (origin
9623 (method url-fetch)
9624 (uri (pypi-uri "stem" version))
9625 (sha256
9626 (base32
9627 "1va9p3ij7lxg6ixfsvaql06dn11l3fgpxmss1dhlvafm7sqizznp"))))
9628 (build-system python-build-system)
9629 (arguments
9630 `(#:phases
9631 (modify-phases %standard-phases
9632 (add-before 'check 'fix-test-environment
9633 (lambda _
9634 ;; Fixes: FileNotFoundError: [Errno 2] No such file or directory:
9635 ;; '/tmp/guix-build-python-stem-1.6.0.drv-0/stem-1.6.0/.gitignore'.
9636 (with-output-to-file ".gitignore"
9637 (lambda _ (format #t "%")))
9638 #t))
9639 (replace 'check
9640 (lambda _
9641 (invoke "./run_tests.py" "--unit")
9642 #t)))))
9643 (native-inputs
9644 `(("python-mock" ,python-mock)
9645 ("python-pep8" ,python-pep8)
9646 ("python-pyflakes" ,python-pyflakes)))
9647 (home-page "https://stem.torproject.org/")
9648 (synopsis
9649 "Python controller library that allows applications to interact with Tor")
9650 (description
9651 "Stem is a Python controller library for Tor. With it you can use Tor's
9652 control protocol to script against the Tor process and read descriptor data
9653 relays publish about themselves.")
9654 (license license:lgpl3)))
9655
9656 (define-public python2-stem
9657 (package-with-python2 python-stem))
9658
9659 (define-public python-pyserial
9660 (package
9661 (name "python-pyserial")
9662 (version "3.1.1")
9663 (source
9664 (origin
9665 (method url-fetch)
9666 (uri (pypi-uri "pyserial" version))
9667 (sha256
9668 (base32
9669 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
9670 (build-system python-build-system)
9671 (arguments
9672 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
9673 ;; #:phases
9674 ;; (modify-phases %standard-phases
9675 ;; (replace 'check
9676 ;; (lambda _
9677 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
9678 (home-page
9679 "https://github.com/pyserial/pyserial")
9680 (synopsis "Python Serial Port Bindings")
9681 (description "@code{pyserial} provide serial port bindings for Python. It
9682 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
9683 and/or Xon/Xoff. The port is accessed in RAW mode.")
9684 (license license:bsd-3)))
9685
9686 (define-public python2-pyserial
9687 (package-with-python2 python-pyserial))
9688
9689 (define-public python-kivy
9690 (package
9691 (name "python-kivy")
9692 (version "1.10.0")
9693 (source
9694 (origin
9695 (method url-fetch)
9696 (uri (pypi-uri "Kivy" version))
9697 (file-name (string-append name "-" version ".tar.gz"))
9698 (sha256
9699 (base32
9700 "1394zh6kvf7k5d8vlzxcsfcailr3q59xwg9b1n7qaf25bvyq1h98"))))
9701 (build-system python-build-system)
9702 (arguments
9703 `(#:tests? #f ; Tests require many optional packages
9704 #:phases
9705 (modify-phases %standard-phases
9706 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
9707 (lambda* (#:key inputs #:allow-other-keys)
9708 (setenv "KIVY_SDL2_PATH"
9709 (string-append (assoc-ref inputs "sdl-union")
9710 "/include/SDL2"))
9711 #t)))))
9712 (native-inputs
9713 `(("git" ,git)
9714 ("pkg-config" ,pkg-config)
9715 ("python-cython" ,python-cython)))
9716 (inputs
9717 `(("gstreamer" ,gstreamer)
9718 ("mesa" ,mesa)
9719 ("sdl-union"
9720 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
9721 (home-page "http://kivy.org")
9722 (synopsis
9723 "Multitouch application framework")
9724 (description
9725 "A software library for rapid development of
9726 hardware-accelerated multitouch applications.")
9727 (license license:expat)))
9728
9729 (define-public python2-kivy
9730 (package-with-python2 python-kivy))
9731
9732 (define-public python-kivy-next
9733 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
9734 (revision "1"))
9735 (package (inherit python-kivy)
9736 (name "python-kivy-next")
9737 (version (string-append "1.9.1-" revision "."
9738 (string-take commit 7)))
9739 (source
9740 (origin
9741 (method git-fetch)
9742 (uri (git-reference
9743 (url "https://github.com/kivy/kivy")
9744 (commit commit)))
9745 (file-name (string-append name "-" version "-checkout"))
9746 (sha256
9747 (base32
9748 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
9749
9750 (define-public python2-kivy-next
9751 (package-with-python2 python-kivy-next))
9752
9753 (define-public python-binaryornot
9754 (package
9755 (name "python-binaryornot")
9756 (version "0.4.0")
9757 (source (origin
9758 (method url-fetch)
9759 (uri (pypi-uri "binaryornot" version))
9760 (sha256
9761 (base32
9762 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
9763 (build-system python-build-system)
9764 (propagated-inputs
9765 `(("python-chardet" ,python-chardet)
9766 ("python-hypothesis" ,python-hypothesis)))
9767 (home-page "https://github.com/audreyr/binaryornot")
9768 (synopsis "Package to check if a file is binary or text")
9769 (description "Ultra-lightweight pure Python package to check if a file is
9770 binary or text.")
9771 (license license:bsd-3)
9772 (properties `((python2-variant . ,(delay python2-binaryornot))))))
9773
9774 (define-public python2-binaryornot
9775 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
9776 (package (inherit base)
9777 (propagated-inputs
9778 `(("python2-enum34" ,python2-enum34)
9779 ,@(package-propagated-inputs base))))))
9780
9781 (define-public python-nltk
9782 (package
9783 (name "python-nltk")
9784 (version "3.2.1")
9785 (source (origin
9786 (method url-fetch)
9787 (uri (pypi-uri "nltk" version))
9788 (sha256
9789 (base32
9790 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
9791 (build-system python-build-system)
9792 (arguments
9793 '(;; The tests require some extra resources to be downloaded.
9794 ;; TODO Try packaging these resources.
9795 #:tests? #f))
9796 (home-page "http://nltk.org/")
9797 (synopsis "Natural Language Toolkit")
9798 (description "It provides interfaces to over 50 corpora and lexical
9799 resources such as WordNet, along with a suite of text processing libraries
9800 for classification, tokenization, stemming, tagging, parsing, and semantic
9801 reasoning, wrappers for natural language processing libraries.")
9802 (license license:asl2.0)))
9803
9804 (define-public python2-nltk
9805 (package-with-python2 python-nltk))
9806
9807 (define-public python-pymongo
9808 (package
9809 (name "python-pymongo")
9810 (version "3.3.0")
9811 (source (origin
9812 (method url-fetch)
9813 (uri (pypi-uri "pymongo" version))
9814 (sha256
9815 (base32
9816 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
9817 (build-system python-build-system)
9818 (propagated-inputs
9819 `(("python-certifi" ,python-certifi)))
9820 (home-page "https://github.com/mongodb/mongo-python-driver")
9821 (synopsis "Python driver for MongoDB")
9822 (description "Python driver for MongoDB.")
9823 (license license:asl2.0)))
9824
9825 (define-public python2-pymongo
9826 (package-with-python2 python-pymongo))
9827
9828 (define-public python-sh
9829 (package
9830 (name "python-sh")
9831 (version "1.11")
9832 (source (origin
9833 (method url-fetch)
9834 (uri (pypi-uri "sh" version))
9835 (sha256
9836 (base32
9837 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
9838 (build-system python-build-system)
9839 (arguments
9840 `(#:tests? #f)) ; no tests
9841 (home-page "https://github.com/amoffat/sh")
9842 (synopsis "Python subprocess interface")
9843 (description "Abstracts process invocation by providing a function
9844 interface for programs.")
9845 (license license:expat)))
9846
9847 (define-public python2-sh
9848 (package-with-python2 python-sh))
9849
9850 (define-public python-consul
9851 (package
9852 (name "python-consul")
9853 (version "0.6.1")
9854 (source
9855 (origin
9856 (method url-fetch)
9857 (uri (pypi-uri "python-consul" version))
9858 (sha256
9859 (base32
9860 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
9861 (build-system python-build-system)
9862 (arguments
9863 '(#:tests? #f)) ; The tests are not distributed
9864 (propagated-inputs
9865 `(("python-requests" ,python-requests)
9866 ("python-six" ,python-six)))
9867 (home-page "https://github.com/cablehead/python-consul")
9868 (synopsis "Python client for Consul")
9869 (description
9870 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
9871 discovery, monitoring and configuration.")
9872 (license license:expat)))
9873
9874 (define-public python2-consul
9875 (package-with-python2 python-consul))
9876
9877 (define-public python-schematics
9878 (package
9879 (name "python-schematics")
9880 (version "1.1.1")
9881 (source
9882 (origin
9883 (method url-fetch)
9884 (uri (string-append
9885 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
9886 (file-name (string-append name "-" version ".tar.gz"))
9887 (sha256
9888 (base32
9889 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
9890 (build-system python-build-system)
9891 (propagated-inputs
9892 `(("python-six" ,python-six)))
9893 (arguments
9894 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
9895 ; version requirements (eg python-coveralls)
9896 (home-page "https://github.com/schematics/schematics")
9897 (synopsis "Python Data Structures for Humans")
9898 (description "Python Data Structures for Humans.")
9899 (license license:bsd-3)))
9900
9901 (define-public python2-schematics
9902 (package-with-python2 python-schematics))
9903
9904 (define-public python-odfpy
9905 (package
9906 (name "python-odfpy")
9907 (version "1.3.3")
9908 (source (origin
9909 (method url-fetch)
9910 (uri (pypi-uri "odfpy" version))
9911 (sha256
9912 (base32
9913 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
9914 (arguments
9915 `(#:modules ((srfi srfi-1)
9916 (guix build python-build-system)
9917 (guix build utils))
9918 #:phases
9919 (modify-phases %standard-phases
9920 (replace 'check
9921 ;; The test runner invokes python2 and python3 for test*.py.
9922 ;; To avoid having both in inputs, we replicate it here.
9923 (lambda _
9924 (every (lambda (test-file)
9925 (zero? (system* "python" test-file)))
9926 (find-files "tests" "^test.*\\.py$")))))))
9927 (build-system python-build-system)
9928 (home-page "https://github.com/eea/odfpy")
9929 (synopsis "Python API and tools to manipulate OpenDocument files")
9930 (description "Collection of libraries and utility programs written in
9931 Python to manipulate OpenDocument 1.2 files.")
9932 (license
9933 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
9934 ;; number of files with other licenses.
9935 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
9936
9937 (define-public python2-odfpy
9938 (package-with-python2 python-odfpy))
9939
9940 (define-public python-natsort
9941 (package
9942 (name "python-natsort")
9943 (version "5.0.2")
9944 (source (origin
9945 (method url-fetch)
9946 (uri (pypi-uri "natsort" version))
9947 (sha256
9948 (base32
9949 "0bh6j0l8iapjnsgg3bs6q075cnzjl6zw1vlgqyv3qrygm2cxypkn"))))
9950 (build-system python-build-system)
9951 (arguments
9952 `(#:phases
9953 (modify-phases %standard-phases
9954 (add-before 'check 'set-cachedir
9955 ;; Tests require write access to $HOME by default
9956 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
9957 (native-inputs
9958 `(("python-hypothesis" ,python-hypothesis)
9959 ("python-pytest-cache" ,python-pytest-cache)
9960 ("python-pytest-cov" ,python-pytest-cov)
9961 ("python-pytest-flakes" ,python-pytest-flakes)
9962 ("python-pytest-pep8" ,python-pytest-pep8)))
9963 (propagated-inputs ; TODO: Add python-fastnumbers.
9964 `(("python-pyicu" ,python-pyicu)))
9965 (home-page "https://github.com/SethMMorton/natsort")
9966 (synopsis "Natural sorting for python and shell")
9967 (description
9968 "Natsort lets you apply natural sorting on lists instead of
9969 lexicographical. If you use the built-in @code{sorted} method in python
9970 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
9971 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
9972 function @code{natsorted} that identifies numbers and sorts them separately
9973 from strings. It can also sort version numbers, real numbers, mixed types
9974 and more, and comes with a shell command @command{natsort} that exposes this
9975 functionality in the command line.")
9976 (license license:expat)
9977 (properties `((python2-variant . ,(delay python2-natsort))))))
9978
9979 (define-public python2-natsort
9980 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
9981 (package (inherit base)
9982 (native-inputs
9983 `(("python2-pathlib" ,python2-pathlib)
9984 ("python2-mock" ,python2-mock)
9985 ("python2-enum34" ,python2-enum34)
9986 ,@(package-native-inputs base))))))
9987
9988 (define-public python-glances
9989 (package
9990 (name "python-glances")
9991 (version "2.7.1")
9992 (source
9993 (origin
9994 (method url-fetch)
9995 (uri (pypi-uri "Glances" version))
9996 (sha256
9997 (base32
9998 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
9999 (build-system python-build-system)
10000 (propagated-inputs
10001 `(("python-psutil" ,python-psutil)))
10002 (home-page
10003 "https://github.com/nicolargo/glances")
10004 (synopsis
10005 "A cross-platform curses-based monitoring tool")
10006 (description
10007 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10008 Glances uses the PsUtil library to get information from your system. It monitors
10009 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10010 (license license:lgpl3+)))
10011
10012 (define-public python2-glances
10013 (package-with-python2 python-glances))
10014
10015 (define-public python-graphql-core
10016 (package
10017 (name "python-graphql-core")
10018 (version "0.5.3")
10019 (source
10020 (origin
10021 (method url-fetch)
10022 (uri (pypi-uri "graphql-core" version))
10023 (sha256
10024 (base32
10025 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10026 (build-system python-build-system)
10027 (arguments
10028 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10029 #:phases
10030 (modify-phases %standard-phases
10031 (add-after 'unpack 'patch-hardcoded-version
10032 (lambda _ (substitute*
10033 "setup.py"
10034 (("'gevent==1.1rc1'") "'gevent'"))
10035 #t)))))
10036 (native-inputs
10037 `(("python-gevent" ,python-gevent)
10038 ("python-mock" ,python-mock)
10039 ("python-pytest-mock" ,python-pytest-mock)))
10040 (propagated-inputs
10041 `(("python-promise" ,python-promise)
10042 ("python-six" ,python-six)))
10043 (home-page "https://github.com/graphql-python/graphql-core")
10044 (synopsis "GraphQL implementation for Python")
10045 (description
10046 "GraphQL implementation for Python. GraphQL is a data query language and
10047 runtime designed and used to request and deliver data to mobile and web apps.
10048 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10049 to Python.")
10050 (license license:expat)))
10051
10052 (define-public python2-graphql-core
10053 (package-with-python2 python-graphql-core))
10054
10055 (define-public python-graphql-relay
10056 (package
10057 (name "python-graphql-relay")
10058 (version "0.4.5")
10059 (source
10060 (origin
10061 (method url-fetch)
10062 (uri (pypi-uri "graphql-relay" version))
10063 (sha256
10064 (base32
10065 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10066 (build-system python-build-system)
10067 (arguments
10068 '(#:tests? #f)) ; The tests are not distributed
10069 (propagated-inputs
10070 `(("python-graphql-core" ,python-graphql-core)
10071 ("python-promise" ,python-promise)
10072 ("python-six" ,python-six)))
10073 (home-page "https://github.com/graphql-python/graphql-relay-py")
10074 (synopsis "Relay implementation for Python")
10075 (description
10076 "This is a library to allow the easy creation of Relay-compliant servers
10077 using the GraphQL Python reference implementation of a GraphQL server. It
10078 should be noted that the code is a exact port of the original
10079 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10080 from Facebook.")
10081 (license license:expat)))
10082
10083 (define-public python2-graphql-relay
10084 (package-with-python2 python-graphql-relay))
10085
10086 (define-public python-graphene
10087 (package
10088 (name "python-graphene")
10089 (version "0.10.2")
10090 (source
10091 (origin
10092 (method url-fetch)
10093 (uri (pypi-uri "graphene" version))
10094 (sha256
10095 (base32
10096 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10097 (build-system python-build-system)
10098 (propagated-inputs
10099 `(("python-graphql-core" ,python-graphql-core)
10100 ("python-graphql-relay" ,python-graphql-relay)
10101 ("python-iso8601" ,python-iso8601)
10102 ("python-promise" ,python-promise)
10103 ("python-six" ,python-six)))
10104 (arguments
10105 `(#:tests? #f)) ; no tests/ in the PyPI tarball
10106 (home-page "http://graphene-python.org/")
10107 (synopsis "GraphQL Framework for Python")
10108 (description
10109 "Graphene is a Python library for building GraphQL schemas/types.
10110 A GraphQL schema describes your data model, and provides a GraphQL server
10111 with an associated set of resolve methods that know how to fetch data.")
10112 (properties `((python2-variant . ,(delay python2-graphene))))
10113 (license license:expat)))
10114
10115 (define-public python2-graphene
10116 (let ((base (package-with-python2
10117 (strip-python2-variant python-graphene))))
10118 (package (inherit base)
10119 (native-inputs
10120 `(("python2-sqlalchemy" ,python2-sqlalchemy)
10121 ,@(package-native-inputs base))))))
10122
10123 (define-public python-nautilus
10124 (package
10125 (name "python-nautilus")
10126 (version "0.4.9")
10127 (source
10128 (origin
10129 (method url-fetch)
10130 (uri (pypi-uri "nautilus" version))
10131 (sha256
10132 (base32
10133 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
10134 (build-system python-build-system)
10135 (arguments `(#:tests? #f)) ; fails to import test modules
10136 (propagated-inputs
10137 `(("python-bcrypt" ,python-bcrypt)
10138 ("python-click" ,python-click)
10139 ("python-consul" ,python-consul)
10140 ("python-graphene" ,python-graphene)
10141 ("python-jinja2" ,python-jinja2)
10142 ("python-peewee" ,python-peewee)
10143 ("python-pika" ,python-pika)
10144 ("python-tornado" ,python-tornado)
10145 ("python-wtforms" ,python-wtforms)))
10146 (native-inputs
10147 `(("python-nose2" ,python-nose2)))
10148 (home-page "https://github.com/AlecAivazis/nautilus")
10149 (synopsis "Library for creating microservice applications")
10150 (description
10151 "Nautilus is a framework for flux based microservices that looks to
10152 provide extendible implementations of common aspects of a cloud so that you can
10153 focus on building massively scalable web applications.")
10154 (license license:expat)))
10155
10156 (define-public python-snowballstemmer
10157 (package
10158 (name "python-snowballstemmer")
10159 (version "1.2.1")
10160 (source (origin
10161 (method url-fetch)
10162 (uri (pypi-uri "snowballstemmer" version))
10163 (sha256
10164 (base32
10165 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
10166 (build-system python-build-system)
10167 (arguments
10168 `(;; No tests exist
10169 #:tests? #f))
10170 (home-page "https://github.com/shibukawa/snowball_py")
10171 (synopsis "Snowball stemming library collection for Python")
10172 (description "This package provides 16 word stemmer algorithms generated
10173 from Snowball algorithms. It includes the 15 original ones plus the Poerter
10174 English stemmer.")
10175 (license license:bsd-3)))
10176
10177 (define-public python2-snowballstemmer
10178 (package-with-python2 python-snowballstemmer))
10179
10180 (define-public python-sphinx-cloud-sptheme
10181 (package
10182 (name "python-sphinx-cloud-sptheme")
10183 (version "1.8.0")
10184 (source (origin
10185 (method url-fetch)
10186 (uri (pypi-uri "cloud_sptheme" version))
10187 (sha256
10188 (base32
10189 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
10190 (build-system python-build-system)
10191 ;; FIXME: The 'pypi' release archive does not contain tests.
10192 (arguments '(#:tests? #f))
10193 (native-inputs
10194 `(("python-sphinx" ,python-sphinx)))
10195 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
10196 (synopsis "'Cloud' theme for Sphinx documenter")
10197 (description "This package contains the \"Cloud\" theme for Sphinx and some
10198 related extensions.")
10199 (license license:bsd-3)))
10200
10201 (define-public python2-sphinx-cloud-sptheme
10202 (package-with-python2 python-sphinx-cloud-sptheme))
10203
10204 (define-public python-sphinx-alabaster-theme
10205 (package
10206 (name "python-sphinx-alabaster-theme")
10207 (version "0.7.9")
10208 (source (origin
10209 (method url-fetch)
10210 (uri (pypi-uri "alabaster" version))
10211 (sha256
10212 (base32
10213 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
10214 (build-system python-build-system)
10215 (propagated-inputs
10216 `(("python-pygments" ,python-pygments)))
10217 (home-page "https://alabaster.readthedocs.io/")
10218 (synopsis "Configurable sidebar-enabled Sphinx theme")
10219 (description "Alabaster is a visually (c)lean, responsive, configurable
10220 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
10221 (license license:bsd-3)))
10222
10223 (define-public python2-sphinx-alabaster-theme
10224 (package-with-python2 python-sphinx-alabaster-theme))
10225
10226 (define-public python-setproctitle
10227 (package
10228 (name "python-setproctitle")
10229 (version "1.1.10")
10230 (source
10231 (origin
10232 (method url-fetch)
10233 (uri (pypi-uri "setproctitle" version))
10234 (sha256
10235 (base32
10236 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
10237 (build-system python-build-system)
10238 (arguments
10239 '(#:phases
10240 (modify-phases %standard-phases
10241 (add-before 'check 'patch-Makefile
10242 ;; Stricly this is only required for the python2 variant.
10243 ;; But adding a phase in an inherited package seems to be
10244 ;; cumbersum. So we patch even for python3.
10245 (lambda _
10246 (let ((nose (assoc-ref %build-inputs "python2-nose")))
10247 (when nose
10248 (substitute* "Makefile"
10249 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
10250 (string-append nose "/bin/nosetests "))))
10251 #t)))
10252 (replace 'check
10253 (lambda _
10254 (setenv "PYTHON" (or (which "python3") (which "python")))
10255 (setenv "PYCONFIG" (or (which "python3-config")
10256 (which "python-config")))
10257 (setenv "CC" "gcc")
10258 ;; No need to extend PYTHONPATH to find the built package, since
10259 ;; the Makefile will build anyway
10260 (zero? (system* "make" "check")))))))
10261 (native-inputs
10262 `(("procps" ,procps))) ; required for tests
10263 (home-page
10264 "https://github.com/dvarrazzo/py-setproctitle")
10265 (synopsis
10266 "Setproctitle implementation for Python to customize the process title")
10267 (description "The library allows a process to change its title (as displayed
10268 by system tools such as ps and top).
10269
10270 Changing the title is mostly useful in multi-process systems, for
10271 example when a master process is forked: changing the children's title
10272 allows to identify the task each process is busy with. The technique
10273 is used by PostgreSQL and the OpenSSH Server for example.")
10274 (license license:bsd-3)
10275 (properties `((python2-variant . ,(delay python2-setproctitle))))))
10276
10277 (define-public python2-setproctitle
10278 (let ((base (package-with-python2
10279 (strip-python2-variant python-setproctitle))))
10280 (package
10281 (inherit base)
10282 (native-inputs `(("python2-nose" ,python2-nose)
10283 ,@(package-native-inputs base))))))
10284
10285 (define-public python-validictory
10286 (package
10287 (name "python-validictory")
10288 (version "1.0.1")
10289 (source
10290 (origin
10291 (method url-fetch)
10292 (uri (pypi-uri "validictory" version))
10293 (sha256
10294 (base32
10295 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
10296 (build-system python-build-system)
10297 (arguments
10298 '(#:phases
10299 (modify-phases %standard-phases
10300 (add-after 'unpack 'bootstrap
10301 ;; Move the tests out of the package directory to avoid
10302 ;; packaging them.
10303 (lambda* _
10304 (rename-file "validictory/tests" "tests")
10305 (delete-file "tests/__init__.py")))
10306 (replace 'check
10307 (lambda _
10308 ;; Extend PYTHONPATH so the built package will be found.
10309 (setenv "PYTHONPATH"
10310 (string-append (getcwd) "/build/lib:"
10311 (getenv "PYTHONPATH")))
10312 (zero? (system* "py.test" "-vv" )))))))
10313 (native-inputs
10314 `(("python-pytest" ,python-pytest)))
10315 (home-page
10316 "https://github.com/jamesturk/validictory")
10317 (synopsis "General purpose Python data validator")
10318 (description "It allows validation of arbitrary Python data structures.
10319
10320 The schema format is based on the JSON Schema
10321 proposal (http://json-schema.org), so combined with json the library is also
10322 useful as a validator for JSON data.")
10323 (license license:expat)))
10324
10325 (define-public python2-validictory
10326 (package-with-python2 python-validictory))
10327
10328 (define-public python-pyev
10329 (package
10330 (name "python-pyev")
10331 (version "0.9.0")
10332 (source
10333 (origin
10334 (method url-fetch)
10335 (uri (pypi-uri "pyev" version))
10336 (sha256
10337 (base32
10338 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
10339 (build-system python-build-system)
10340 (arguments
10341 `(#:tests? #f ; no test suite
10342 #:phases
10343 (modify-phases %standard-phases
10344 (add-after 'unpack 'patch
10345 (lambda* (#:key inputs #:allow-other-keys)
10346 (let ((libev (string-append (assoc-ref inputs "libev")
10347 "/lib/libev.so.4")))
10348 (substitute* "setup.py"
10349 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
10350 (string-append "libev_dll_name = \"" libev "\"")))))))))
10351 (inputs
10352 `(("libev" ,libev)))
10353 (home-page "http://pythonhosted.org/pyev/")
10354 (synopsis "Python libev interface")
10355 (description "Pyev provides a Python interface to libev.")
10356 (license license:gpl3)))
10357
10358 (define-public python2-pyev
10359 (package-with-python2 python-pyev))
10360
10361 (define-public python-imagesize
10362 (package
10363 (name "python-imagesize")
10364 (version "0.7.1")
10365 (source
10366 (origin
10367 (method url-fetch)
10368 (uri (pypi-uri "imagesize" version))
10369 (sha256
10370 (base32
10371 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
10372 (build-system python-build-system)
10373 (arguments
10374 '(;; Test files are not distributed on PyPi:
10375 ;; https://github.com/shibukawa/imagesize_py/issues/7
10376 #:tests? #f))
10377 (home-page "https://github.com/shibukawa/imagesize_py")
10378 (synopsis "Gets image size of files in variaous formats in Python")
10379 (description
10380 "This package allows determination of image size from
10381 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
10382 (license license:expat)))
10383
10384 (define-public python2-imagesize
10385 (package-with-python2 python-imagesize))
10386
10387 (define-public python-termstyle
10388 (package
10389 (name "python-termstyle")
10390 (version "0.1.11")
10391 (source
10392 (origin
10393 (method url-fetch)
10394 (uri (pypi-uri "termstyle" version))
10395 (sha256
10396 (base32
10397 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
10398 (build-system python-build-system)
10399 (arguments
10400 '(#:phases
10401 (modify-phases %standard-phases
10402 (replace 'check
10403 (lambda _
10404 (zero? (system* "python" "test3.py")))))))
10405 (home-page "https://github.com/gfxmonk/termstyle")
10406 (synopsis "Console text coloring for Python")
10407 (description "This package provides console text coloring for Python.")
10408 (license license:bsd-3)))
10409
10410 (define-public python-argcomplete
10411 (package
10412 (name "python-argcomplete")
10413 (version "1.7.0")
10414 (source
10415 (origin
10416 (method url-fetch)
10417 (uri (pypi-uri "argcomplete" version))
10418 (sha256
10419 (base32
10420 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
10421 (build-system python-build-system)
10422 (native-inputs
10423 `(("python-pexpect" ,python-pexpect)
10424 ("tcsh" ,tcsh)
10425 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
10426 (home-page "https://github.com/kislyuk/argcomplete")
10427 (synopsis "Shell tab completion for Python argparse")
10428 (description "argcomplete provides extensible command line tab completion
10429 of arguments and options for Python scripts using @code{argparse}. It's
10430 particularly useful for programs with many options or sub-parsers that can
10431 dynamically suggest completions; for example, when browsing resources over the
10432 network.")
10433 (license license:asl2.0)))
10434
10435 (define-public python2-argcomplete
10436 (package-with-python2 python-argcomplete))
10437
10438 (define-public python-xopen
10439 (package
10440 (name "python-xopen")
10441 (version "0.3.2")
10442 (source
10443 (origin
10444 (method url-fetch)
10445 (uri (pypi-uri "xopen" version))
10446 (sha256
10447 (base32
10448 "0bzjmn3rl1cd3d2q39cjwnkhaspk2b0hfj3rl64pclm44ihg5fb6"))
10449 (file-name (string-append name "-" version ".tar.gz"))))
10450 (build-system python-build-system)
10451 (home-page "https://github.com/marcelm/xopen/")
10452 (synopsis "Open compressed files transparently")
10453 (description "This module provides an @code{xopen} function that works like
10454 Python's built-in @code{open} function, but can also deal with compressed files.
10455 Supported compression formats are gzip, bzip2 and, xz, and are automatically
10456 recognized by their file extensions. The focus is on being as efficient as
10457 possible on all supported Python versions.")
10458 (license license:expat)))
10459
10460 (define-public python2-xopen
10461 (package-with-python2 python-xopen))
10462
10463 (define-public python2-cheetah
10464 (package
10465 (name "python2-cheetah")
10466 (version "2.4.4")
10467 (source
10468 (origin
10469 (method url-fetch)
10470 (uri (pypi-uri "Cheetah" version))
10471 (sha256
10472 (base32
10473 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
10474 (build-system python-build-system)
10475 (arguments
10476 `(#:python ,python-2))
10477 (propagated-inputs
10478 `(("python2-markdown" ,python2-markdown)))
10479 (home-page "https://pythonhosted.org/Cheetah/")
10480 (synopsis "Template engine")
10481 (description "Cheetah is a text-based template engine and Python code
10482 generator.
10483
10484 Cheetah can be used as a standalone templating utility or referenced as
10485 a library from other Python applications. It has many potential uses,
10486 but web developers looking for a viable alternative to ASP, JSP, PHP and
10487 PSP are expected to be its principle user group.
10488
10489 Features:
10490 @enumerate
10491 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
10492 text-based format.
10493 @item Cleanly separates content, graphic design, and program code.
10494 @item Blends the power and flexibility of Python with a simple template language
10495 that non-programmers can understand.
10496 @item Gives template writers full access to any Python data structure, module,
10497 function, object, or method in their templates.
10498 @item Makes code reuse easy by providing an object-orientated interface to
10499 templates that is accessible from Python code or other Cheetah templates.
10500 One template can subclass another and selectively reimplement sections of it.
10501 @item Provides a simple, yet powerful, caching mechanism that can dramatically
10502 improve the performance of a dynamic website.
10503 @item Compiles templates into optimized, yet readable, Python code.
10504 @end enumerate")
10505 (license (license:x11-style "file://LICENSE"))))
10506
10507 (define-public python-dulwich
10508 (package
10509 (name "python-dulwich")
10510 (version "0.18.6")
10511 (source
10512 (origin
10513 (method url-fetch)
10514 (uri (list (string-append "https://www.dulwich.io/releases/"
10515 "dulwich-" version ".tar.gz")
10516 (pypi-uri "dulwich" version)))
10517 (sha256
10518 (base32
10519 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
10520 (build-system python-build-system)
10521 (arguments
10522 `(#:phases
10523 (modify-phases %standard-phases
10524 (add-before 'check 'fix-tests
10525 (lambda* (#:key inputs #:allow-other-keys)
10526 ;; The tests use Popen with a custom environment which doesn't
10527 ;; include PATH.
10528 (substitute* "dulwich/tests/compat/utils.py"
10529 (("'git'") (string-append "'"
10530 (which "git")
10531 "'")))
10532 (substitute* '("dulwich/tests/test_repository.py"
10533 "dulwich/tests/test_hooks.py")
10534 (("#!/bin/sh") (string-append "#!" (which "sh"))))
10535 (setenv "TEST_RUNNER" "unittest")
10536 (setenv "PYTHONHASHSEED" "random")
10537 #t)))))
10538 (propagated-inputs
10539 `(("python-fastimport" ,python-fastimport)))
10540 (native-inputs
10541 `(("python-mock" ,python-mock)
10542 ("python-geventhttpclient" ,python-geventhttpclient)
10543 ("git" ,git)))
10544 (home-page "https://www.dulwich.io/")
10545 (synopsis "Git implementation in Python")
10546 (description "Dulwich is an implementation of the Git file formats and
10547 protocols written in pure Python.")
10548 ;; Can be used with either license.
10549 (license (list license:asl2.0 license:gpl2+))))
10550
10551 (define-public python2-dulwich
10552 (package-with-python2 python-dulwich))
10553
10554 (define-public python-pbkdf2
10555 (package
10556 (name "python-pbkdf2")
10557 (version "1.3")
10558 (source
10559 (origin
10560 (method url-fetch)
10561 (uri (pypi-uri "pbkdf2" version))
10562 (sha256
10563 (base32
10564 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
10565 (build-system python-build-system)
10566 (arguments
10567 '(#:phases
10568 (modify-phases %standard-phases
10569 (replace 'check
10570 (lambda _
10571 (setenv "PYTHONPATH"
10572 (string-append (getcwd) "/build/lib:"
10573 (getenv "PYTHONPATH")))
10574 (zero? (system* "python" "test/test_pbkdf2.py")))))))
10575 (propagated-inputs
10576 `(("python-pycrypto" ,python-pycrypto))) ; optional
10577 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
10578 (synopsis "Password-based key derivation")
10579 (description "This module implements the password-based key derivation
10580 function, PBKDF2, specified in RSA PKCS#5 v2.0.
10581
10582 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
10583 is part of the RSA Public Key Cryptography Standards series. The provided
10584 implementation takes a password or a passphrase and a salt value (and
10585 optionally a iteration count, a digest module, and a MAC module) and provides
10586 a file-like object from which an arbitrarly-sized key can be read.")
10587 (license license:expat)))
10588
10589 (define-public python2-pbkdf2
10590 (package-with-python2 python-pbkdf2))
10591
10592 (define-public python-qrcode
10593 (package
10594 (name "python-qrcode")
10595 (version "6.0")
10596 (source
10597 (origin
10598 (method url-fetch)
10599 (uri (pypi-uri "qrcode" version))
10600 (sha256
10601 (base32
10602 "1gz1g2n9kqwqkak78aavr354z1v3yyiksk7q6xp5hi1zr6s0syq3"))))
10603 (build-system python-build-system)
10604 (arguments
10605 ;; FIXME: Tests require packaging 'pymaging'.
10606 '(#:tests? #f))
10607 (propagated-inputs
10608 `(("python-lxml" ,python-lxml) ; for SVG output
10609 ("python-pillow" ,python-pillow) ; for PNG output
10610 ("python-six" ,python-six)))
10611 (inputs
10612 `(;; The setup.cfg file needs to be used, and support for this requires
10613 ;; at least version 30.3.0 of setuptools
10614 ("python-setuptools" ,python-setuptools)))
10615 (home-page "https://github.com/lincolnloop/python-qrcode")
10616 (synopsis "QR Code image generator")
10617 (description "This package provides a pure Python QR Code generator
10618 module. It uses the Python Imaging Library (PIL) to allow for the generation
10619 of QR Codes.
10620
10621 In addition this package provides a command line tool to generate QR codes and
10622 either write these QR codes to a file or do the output as ascii art at the
10623 console.")
10624 (license license:bsd-3)))
10625
10626 (define-public python2-qrcode
10627 (package-with-python2 python-qrcode))
10628
10629 (define-public python-rst2ansi
10630 (package
10631 (name "python-rst2ansi")
10632 (version "0.1.5")
10633 (source
10634 (origin
10635 (method url-fetch)
10636 (uri (pypi-uri "rst2ansi" version))
10637 (sha256
10638 (base32
10639 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
10640 (build-system python-build-system)
10641 (propagated-inputs
10642 `(("python-docutils" ,python-docutils)))
10643 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
10644 (synopsis "Convert RST to ANSI-decorated console output")
10645 (description
10646 "Python module dedicated to rendering RST (reStructuredText) documents
10647 to ansi-escaped strings suitable for display in a terminal.")
10648 (license license:expat)))
10649
10650 (define-public python-ansi2html
10651 (package
10652 (name "python-ansi2html")
10653 (version "1.2.0")
10654 (source
10655 (origin
10656 (method url-fetch)
10657 (uri (pypi-uri "ansi2html" version))
10658 (sha256
10659 (base32
10660 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
10661 (build-system python-build-system)
10662 (native-inputs
10663 `(("python-mock" ,python-mock)
10664 ("python-nose" ,python-nose)))
10665 (propagated-inputs
10666 `(("python-six" ,python-six)))
10667 (home-page "https://github.com/ralphbean/ansi2html")
10668 (synopsis "Convert ANSI-decorated console output to HTML")
10669 (description
10670 "@command{ansi2html} is a Python library and command line utility for
10671 convering text with ANSI color codes to HTML or LaTeX.")
10672 (license license:gpl3+)))
10673
10674 (define-public python2-ansi2html
10675 (package-with-python2 python-ansi2html))
10676
10677 (define-public python-ddt
10678 (package
10679 (name "python-ddt")
10680 (version "1.1.3")
10681 (source
10682 (origin
10683 (method url-fetch)
10684 (uri (pypi-uri "ddt" version))
10685 (sha256
10686 (base32
10687 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
10688 (build-system python-build-system)
10689 (native-inputs
10690 `(("python-mock" ,python-mock)
10691 ("python-nose" ,python-nose)))
10692 (propagated-inputs
10693 `(("python-six" ,python-six)
10694 ("python-pyyaml" ,python-pyyaml)))
10695 (home-page "https://github.com/txels/ddt")
10696 (synopsis "Data-Driven Tests")
10697 (description
10698 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
10699 running it with different test data, and make it appear as multiple test
10700 cases.")
10701 (license license:expat)))
10702
10703 (define-public python2-ddt
10704 (package-with-python2 python-ddt))
10705
10706 (define-public python-pycosat
10707 (package
10708 (name "python-pycosat")
10709 (version "0.6.1")
10710 (source
10711 (origin
10712 (method url-fetch)
10713 (uri (pypi-uri "pycosat" version))
10714 (sha256
10715 (base32
10716 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
10717 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
10718 (build-system python-build-system)
10719 (home-page "https://github.com/ContinuumIO/pycosat")
10720 (synopsis "Bindings to picosat (a SAT solver)")
10721 (description
10722 "This package provides efficient Python bindings to @code{picosat} on
10723 the C level. When importing pycosat, the @code{picosat} solver becomes part
10724 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
10725 Problem} (SAT) solver.")
10726 (license license:expat)))
10727
10728 (define-public python2-pycosat
10729 (package-with-python2 python-pycosat))
10730
10731 (define-public python2-ruamel.ordereddict
10732 (package
10733 (name "python2-ruamel.ordereddict")
10734 (version "0.4.9")
10735 (source
10736 (origin
10737 (method url-fetch)
10738 (uri (pypi-uri "ruamel.ordereddict" version))
10739 (sha256
10740 (base32
10741 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
10742 (build-system python-build-system)
10743 (arguments
10744 `(#:python ,python-2
10745 #:phases
10746 (modify-phases %standard-phases
10747 (delete 'check)
10748 (add-after 'install 'check
10749 (lambda* (#:key inputs outputs #:allow-other-keys)
10750 (add-installed-pythonpath inputs outputs)
10751 (zero? (system* "python" "test/testordereddict.py")))))))
10752 (home-page "https://bitbucket.org/ruamel/ordereddict")
10753 (synopsis "Version of dict that keeps keys in insertion order")
10754 (description
10755 "This is an implementation of an ordered dictionary with @dfn{Key
10756 Insertion Order} (KIO: updates of values do not affect the position of the
10757 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
10758 removed and put at the back). The standard library module @code{OrderedDict},
10759 implemented later, implements a subset of @code{ordereddict} functionality.
10760 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
10761 Order} (KSO, no sorting function can be specified, but a transform can be
10762 specified to apply on the key before comparison (e.g. @code{string.lower})).")
10763 (license license:expat)))
10764
10765 (define-public python-pypeg2
10766 (package
10767 (name "python-pypeg2")
10768 (version "2.15.2")
10769 (source
10770 (origin
10771 (method url-fetch)
10772 (uri (pypi-uri "pyPEG2" version))
10773 (sha256
10774 (base32
10775 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
10776 (build-system python-build-system)
10777 (propagated-inputs `(("python-lxml" ,python-lxml)))
10778 (arguments
10779 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
10780 '(#:tests? #f))
10781 (home-page "https://fdik.org/pyPEG/")
10782 (synopsis "Parsering Expression Grammars in Python")
10783 (description "PyPEG is an intrinsic parser interpreter framework for
10784 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
10785 parse many formal languages.")
10786 (license license:gpl2)))
10787
10788 (define-public python-incremental
10789 (package
10790 (name "python-incremental")
10791 (version "17.5.0")
10792 (source
10793 (origin
10794 (method url-fetch)
10795 (uri (pypi-uri "incremental" version))
10796 (sha256
10797 (base32
10798 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
10799 (build-system python-build-system)
10800 (home-page "https://github.com/hawkowl/incremental")
10801 (synopsis "Library for versioning Python projects")
10802 (description "Incremental is a small library that versions your Python
10803 projects.")
10804 (license license:expat)))
10805
10806 (define-public python2-incremental
10807 (package-with-python2 python-incremental))
10808
10809 (define-public python-automat
10810 (package
10811 (name "python-automat")
10812 (version "0.6.0")
10813 (source (origin
10814 (method url-fetch)
10815 (uri (pypi-uri "Automat" version))
10816 (sha256
10817 (base32
10818 "1a7nsrljysfmdqmpn2apfa1gg6rfah4y9sizvns8gb08rx7d07rw"))))
10819 (build-system python-build-system)
10820 ;; We disable the tests because they require python-twisted, while
10821 ;; python-twisted depends on python-automat. Twisted is optional, but the
10822 ;; tests fail if it is not available. Also see
10823 ;; <https://github.com/glyph/automat/issues/71>.
10824 (arguments '(#:tests? #f))
10825 (native-inputs
10826 `(("python-m2r" ,python-m2r)
10827 ("python-setuptools-scm" ,python-setuptools-scm)
10828 ("python-graphviz" ,python-graphviz)))
10829 (propagated-inputs
10830 `(("python-six" ,python-six)
10831 ("python-attrs" ,python-attrs)))
10832 (home-page "https://github.com/glyph/Automat")
10833 (synopsis "Self-service finite-state machines")
10834 (description "Automat is a library for concise, idiomatic Python
10835 expression of finite-state automata (particularly deterministic finite-state
10836 transducers).")
10837 (license license:expat)))
10838
10839 (define-public python2-automat
10840 (package-with-python2 python-automat))
10841
10842 (define-public python-m2r
10843 (package
10844 (name "python-m2r")
10845 (version "0.1.12")
10846 (source (origin
10847 (method url-fetch)
10848 (uri (pypi-uri "m2r" version))
10849 (sha256
10850 (base32
10851 "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd"))))
10852 (build-system python-build-system)
10853 (propagated-inputs
10854 `(("python-docutils" ,python-docutils)
10855 ("python-mistune" ,python-mistune)))
10856 (native-inputs
10857 `(("python-pygments" ,python-pygments)
10858 ("python-mock" ,python-mock)))
10859 (home-page "https://github.com/miyakogi/m2r")
10860 (synopsis "Markdown to reStructuredText converter")
10861 (description "M2R converts a markdown file including reST markups to valid
10862 reST format.")
10863 (license license:expat)))
10864
10865 (define-public python2-m2r
10866 (package-with-python2 python-m2r))
10867
10868 (define-public python-constantly
10869 (package
10870 (name "python-constantly")
10871 (version "15.1.0")
10872 (source (origin
10873 (method url-fetch)
10874 (uri (pypi-uri "constantly" version))
10875 (sha256
10876 (base32
10877 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
10878 (build-system python-build-system)
10879 (home-page "https://github.com/twisted/constantly")
10880 (synopsis "Symbolic constants in Python")
10881 (description "Constantly is a Python library that provides symbolic
10882 constant support. It includes collections and constants with text, numeric,
10883 and bit flag values.")
10884 (license license:expat)))
10885
10886 (define-public python2-constantly
10887 (package-with-python2 python-constantly))
10888
10889 (define-public python-attrs
10890 (package
10891 (name "python-attrs")
10892 (version "17.4.0")
10893 (source (origin
10894 (method url-fetch)
10895 (uri (pypi-uri "attrs" version))
10896 (sha256
10897 (base32
10898 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
10899 (build-system python-build-system)
10900 (native-inputs
10901 `(("python-coverage" ,python-coverage)
10902 ("python-hypothesis" ,python-hypothesis)
10903 ("python-pytest" ,python-pytest)
10904 ("python-six" ,python-six)
10905 ("python-sphinx" ,python-sphinx)
10906 ("python-zope-interface" ,python-zope-interface)))
10907 (home-page "https://github.com/python-attrs/attrs/")
10908 (synopsis "Attributes without boilerplate")
10909 (description "@code{attrs} is a Python package with class decorators that
10910 ease the chores of implementing the most common attribute-related object
10911 protocols.")
10912 (license license:expat)))
10913
10914 (define-public python2-attrs
10915 (package-with-python2 python-attrs))
10916
10917 (define-public python-attrs-bootstrap
10918 (package
10919 (inherit python-attrs)
10920 (name "python-attrs-bootstrap")
10921 (native-inputs `())
10922 (arguments `(#:tests? #f))))
10923
10924 (define-public python2-attrs-bootstrap
10925 (package-with-python2 python-attrs-bootstrap))
10926
10927 (define-public python2-cliapp
10928 (package
10929 (name "python2-cliapp")
10930 (version "1.20170823")
10931 (source
10932 (origin
10933 (method url-fetch)
10934 (uri (string-append
10935 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
10936 version ".tar.gz"))
10937 (sha256
10938 (base32
10939 "1i9gik0xrj6jmi95s5w988jl1y265baz5xm5pbqdyvsh8h9ln6yq"))))
10940 (build-system python-build-system)
10941 (arguments
10942 `(#:python ,python-2
10943 #:phases
10944 (modify-phases %standard-phases
10945 ;; check phase needs to be run before the build phase. If not,
10946 ;; coverage-test-runner looks for tests for the built source files,
10947 ;; and fails.
10948 (delete 'check)
10949 (add-before 'build 'check
10950 (lambda _
10951 ;; Disable python3 tests
10952 (substitute* "check"
10953 (("python3") "# python3"))
10954 (zero? (system* "./check")))))))
10955 (native-inputs
10956 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
10957 ("python2-pep8" ,python2-pep8)))
10958 (propagated-inputs
10959 `(("python2-pyaml" ,python2-pyaml)))
10960 (home-page "https://liw.fi/cliapp/")
10961 (synopsis "Python framework for command line programs")
10962 (description "@code{python2-cliapp} is a python framework for
10963 command line programs. It contains the typical stuff such programs
10964 need to do, such as parsing the command line for options, and
10965 iterating over input files.")
10966 (license license:gpl2+)))
10967
10968 (define-public python2-ttystatus
10969 (package
10970 (name "python2-ttystatus")
10971 (version "0.35")
10972 (source
10973 (origin
10974 (method url-fetch)
10975 (uri (string-append
10976 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
10977 version ".tar.gz"))
10978 (sha256
10979 (base32
10980 "0vivqbw7ddhsq1zj3g9cvvv4f0phl0pis2smsnwcr2szz2fk3hl6"))))
10981 (build-system python-build-system)
10982 (native-inputs
10983 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
10984 ("python2-pep8" ,python2-pep8)))
10985 (arguments
10986 `(#:python ,python-2
10987 #:phases
10988 (modify-phases %standard-phases
10989 ;; check phase needs to be run before the build phase. If not,
10990 ;; coverage-test-runner looks for tests for the built source files,
10991 ;; and fails.
10992 (delete 'check)
10993 (add-before 'build 'check
10994 (lambda _
10995 (zero? (system* "make" "check")))))))
10996 (home-page "https://liw.fi/ttystatus/")
10997 (synopsis "Python library for showing progress reporting and
10998 status updates on terminals")
10999 (description "@code{python2-ttystatus} is a python library for
11000 showing progress reporting and status updates on terminals, for
11001 command line programs. Output is automatically adapted to the width
11002 of the terminal: truncated if it does not fit, and resized if the
11003 terminal size changes.")
11004 (license license:gpl3+)))
11005
11006 (define-public python2-tracing
11007 (package
11008 (name "python2-tracing")
11009 (version "0.10")
11010 (source
11011 (origin
11012 (method url-fetch)
11013 (uri (string-append
11014 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
11015 version ".tar.gz"))
11016 (sha256
11017 (base32
11018 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
11019 (build-system python-build-system)
11020 (arguments
11021 `(#:python ,python-2))
11022 (home-page "https://liw.fi/tracing/")
11023 (synopsis "Python debug logging helper")
11024 (description "@code{python2-tracing} is a python library for
11025 logging debug messages. It provides a way to turn debugging messages
11026 on and off, based on the filename they occur in. It is much faster
11027 than using @code{logging.Filter} to accomplish the same thing, which
11028 matters when code is run in production mode. The actual logging still
11029 happens using the @code{logging} library.")
11030 (license license:gpl3+)))
11031
11032 (define-public python2-larch
11033 (package
11034 (name "python2-larch")
11035 (version "1.20151025")
11036 (source
11037 (origin
11038 (method url-fetch)
11039 (uri (string-append
11040 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
11041 version ".tar.gz"))
11042 (patches (search-patches
11043 "python2-larch-coverage-4.0a6-compatibility.patch"))
11044 (sha256
11045 (base32
11046 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
11047 (build-system python-build-system)
11048 (arguments
11049 `(#:python ,python-2
11050 #:phases
11051 (modify-phases %standard-phases
11052 ;; check phase needs to be run before the build phase. If not,
11053 ;; coverage-test-runner looks for tests for the built source files,
11054 ;; and fails.
11055 (delete 'check)
11056 (add-before 'build 'check
11057 (lambda _
11058 (zero? (system* "make" "check")))))))
11059 (native-inputs
11060 `(("cmdtest" ,cmdtest)
11061 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
11062 (propagated-inputs
11063 `(("python2-tracing" ,python2-tracing)))
11064 (home-page "https://liw.fi/larch/")
11065 (synopsis "Python copy-on-write B-tree library")
11066 (description "@code{python2-larch} is an implementation of
11067 particular kind of B-tree, based on research by Ohad Rodeh. See
11068 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
11069 on the data structure.
11070
11071 The distinctive feature of this B-tree is that a node is never
11072 (conceptually) modified. Instead, all updates are done by
11073 copy-on-write. This makes it easy to clone a tree, and modify only the
11074 clone, while other processes access the original tree.")
11075 (license license:gpl3+)))
11076
11077 (define-public python-astroid
11078 (package
11079 (name "python-astroid")
11080 (version "1.5.3")
11081 (source
11082 (origin
11083 (method url-fetch)
11084 (uri (string-append
11085 "https://github.com/PyCQA/astroid/archive/astroid-"
11086 version ".tar.gz"))
11087 (sha256
11088 (base32
11089 "0isn5p7f9n48hmksgbrj7dkm9dyglnayzn5jngk37qywg8a74ngn"))))
11090 (build-system python-build-system)
11091 (propagated-inputs
11092 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
11093 ("python-six" ,python-six)
11094 ("python-wrapt" ,python-wrapt)))
11095 (arguments
11096 `(#:phases
11097 (modify-phases %standard-phases
11098 (replace 'check
11099 (lambda _
11100 (zero? (system* "python" "-m" "unittest" "discover"
11101 "-p" "unittest*.py")))))))
11102 (home-page "https://github.com/PyCQA/astroid")
11103 (synopsis "Common base representation of python source code for pylint and
11104 other projects")
11105 (description "@code{python-astroid} provides a common base representation
11106 of python source code for projects such as pychecker, pyreverse, pylint, etc.
11107
11108 It provides a compatible representation which comes from the _ast module. It
11109 rebuilds the tree generated by the builtin _ast module by recursively walking
11110 down the AST and building an extended ast. The new node classes have
11111 additional methods and attributes for different usages. They include some
11112 support for static inference and local name scopes. Furthermore, astroid
11113 builds partial trees by inspecting living objects.")
11114 (license license:lgpl2.1+)
11115 (properties `((python2-variant . ,(delay python2-astroid))))))
11116
11117 (define-public python2-astroid
11118 (let ((base (package-with-python2
11119 (strip-python2-variant python-astroid))))
11120 (package (inherit base)
11121 (propagated-inputs
11122 `(("python2-backports-functools-lru-cache"
11123 ,python2-backports-functools-lru-cache)
11124 ("python2-enum34" ,python2-enum34)
11125 ("python2-singledispatch" ,python2-singledispatch)
11126 ,@(package-propagated-inputs base))))))
11127
11128 (define-public python-isort
11129 (package
11130 (name "python-isort")
11131 (version "4.2.5")
11132 (source
11133 (origin
11134 (method url-fetch)
11135 (uri (string-append
11136 "https://github.com/timothycrosley/isort/archive/"
11137 version ".tar.gz"))
11138 (file-name (string-append name "-" version ".tar.gz"))
11139 (sha256
11140 (base32
11141 "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh"))))
11142 (build-system python-build-system)
11143 (native-inputs
11144 `(("python-mock" ,python-mock)
11145 ("python-pytest" ,python-pytest)))
11146 (home-page "https://github.com/timothycrosley/isort")
11147 (synopsis "Python utility/library to sort python imports")
11148 (description "@code{python-isort} is a python utility/library to sort
11149 imports alphabetically, and automatically separated into sections. It
11150 provides a command line utility, a python library and plugins for various
11151 editors.")
11152 (license license:expat)))
11153
11154 (define-public python2-isort
11155 (package-with-python2 python-isort))
11156
11157 (define-public python2-backports-functools-lru-cache
11158 (package
11159 (name "python2-backports-functools-lru-cache")
11160 (version "1.3")
11161 (source
11162 (origin
11163 (method url-fetch)
11164 ;; only the pypi tarballs contain the necessary metadata
11165 (uri (pypi-uri "backports.functools_lru_cache" version))
11166 (sha256
11167 (base32
11168 "158ysf2hb0q4p4695abfiym9x1ywg0dgh8a3apd7gqaaxjy22jj4"))))
11169 (build-system python-build-system)
11170 (native-inputs
11171 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
11172 (arguments
11173 `(#:python ,python-2))
11174 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
11175 (synopsis "Backport of functools.lru_cache from Python 3.3")
11176 (description "@code{python2-backports-functools-lru-cache} is a backport
11177 of @code{functools.lru_cache} from python 3.3.")
11178 (license license:expat)))
11179
11180 (define-public python-configparser
11181 (package
11182 (name "python-configparser")
11183 (version "3.5.0")
11184 (source
11185 (origin
11186 (method url-fetch)
11187 (uri (string-append
11188 "https://bitbucket.org/ambv/configparser/get/"
11189 version ".tar.bz2"))
11190 (file-name (string-append name "-" version ".tar.gz"))
11191 (sha256
11192 (base32
11193 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
11194 (build-system python-build-system)
11195 (home-page "http://docs.python.org/py3k/library/configparser.html")
11196 (synopsis "Backport of configparser from python 3.5")
11197 (description "@code{python-configparser} is a backport of
11198 @code{configparser} from Python 3.5 so that it can be used directly
11199 in other versions.")
11200 (license license:expat)))
11201
11202 (define-public python2-configparser
11203 (package-with-python2 python-configparser))
11204
11205 (define-public python-mando
11206 (package
11207 (name "python-mando")
11208 (version "0.6.4")
11209 (source (origin
11210 (method url-fetch)
11211 (uri (pypi-uri "mando" version))
11212 (sha256
11213 (base32
11214 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
11215 (build-system python-build-system)
11216 (propagated-inputs
11217 `(("python-rst2ansi" ,python-rst2ansi)
11218 ("python-six" ,python-six)))
11219 (native-inputs
11220 `(("python-pytest" ,python-pytest)))
11221 (home-page "https://mando.readthedocs.org/")
11222 (synopsis
11223 "Wrapper around argparse, allowing creation of complete CLI applications")
11224 (description
11225 "This package is a wrapper around argparse, allowing you to write complete CLI
11226 applications in seconds while maintaining all the flexibility.")
11227 (license license:expat)))
11228
11229 (define-public python2-mando
11230 (package-with-python2 python-mando))
11231
11232 (define-public python-fudge
11233 (package
11234 (name "python-fudge")
11235 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
11236 ;; package, which is currently the only use of this package.
11237 (version "0.9.6")
11238 (source
11239 (origin
11240 (method url-fetch)
11241 (uri (pypi-uri "fudge" version))
11242 (sha256
11243 (base32
11244 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
11245 (build-system python-build-system)
11246 (arguments
11247 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
11248 (home-page "https://github.com/fudge-py/fudge")
11249 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
11250 (description
11251 "Fudge is a Python module for using fake objects (mocks and stubs) to
11252 test real ones.
11253
11254 In readable Python code, you declare the methods available on your fake object
11255 and how they should be called. Then you inject that into your application and
11256 start testing. This declarative approach means you don’t have to record and
11257 playback actions and you don’t have to inspect your fakes after running code.
11258 If the fake object was used incorrectly then you’ll see an informative
11259 exception message with a traceback that points to the culprit.")
11260 (license license:expat)))
11261
11262 (define-public python2-fudge
11263 (package-with-python2 python-fudge))
11264
11265 (define-public python-mwclient
11266 (package
11267 (name "python-mwclient")
11268 (version "0.8.4")
11269 (source
11270 (origin
11271 (method url-fetch)
11272 ;; The PyPI version wouldn't contain tests.
11273 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
11274 "v" version ".tar.gz"))
11275 (file-name (string-append name "-" version ".tar.gz"))
11276 (sha256
11277 (base32
11278 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
11279 (build-system python-build-system)
11280 (propagated-inputs
11281 `(("python-requests" ,python-requests)
11282 ("python-requests-oauthlib"
11283 ,python-requests-oauthlib)
11284 ("python-six" ,python-six)))
11285 (native-inputs
11286 `(("python-mock" ,python-mock)
11287 ("python-pytest" ,python-pytest)
11288 ("python-pytest-pep8" ,python-pytest-pep8)
11289 ("python-pytest-cache" ,python-pytest-cache)
11290 ("python-pytest-cov" ,python-pytest-cov)
11291 ("python-responses" ,python-responses)))
11292 (home-page "https://github.com/btongminh/mwclient")
11293 (synopsis "MediaWiki API client")
11294 (description "This package provides a MediaWiki API client.")
11295 (license license:expat)))
11296
11297 (define-public python2-mwclient
11298 (package-with-python2 python-mwclient))
11299
11300 (define-public python-utils
11301 (package
11302 (name "python-utils")
11303 (version "2.1.0")
11304 (source (origin
11305 (method url-fetch)
11306 (uri (pypi-uri "python-utils" version))
11307 (sha256
11308 (base32
11309 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
11310 (build-system python-build-system)
11311 (native-inputs
11312 `(("pytest-runner" ,python-pytest-runner)
11313 ("pytest" ,python-pytest)
11314 ("six" ,python-six)))
11315 (home-page "https://github.com/WoLpH/python-utils")
11316 (synopsis "Convenient utilities not included with the standard Python install")
11317 (description
11318 "Python Utils is a collection of small Python functions and classes which
11319 make common patterns shorter and easier.")
11320 (license license:bsd-2)))
11321
11322 (define-public python2-utils
11323 (package-with-python2 python-utils))
11324
11325 (define-public python-sphinx-me
11326 (package
11327 (name "python-sphinx-me")
11328 (version "0.3")
11329 (source
11330 (origin
11331 (method url-fetch)
11332 (uri (pypi-uri "sphinx-me" version))
11333 (sha256
11334 (base32
11335 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
11336 (build-system python-build-system)
11337 (home-page "https://github.com/stephenmcd/sphinx-me")
11338 (synopsis "Create a Sphinx documentation shell")
11339 (description
11340 "Create a Sphinx documentation shell for your project and include the
11341 README file as the documentation index. It handles extracting the required
11342 meta data such as the project name, author and version from your project for
11343 use in your Sphinx docs.")
11344 (license license:bsd-2)))
11345
11346 (define-public python2-sphinx-me
11347 (package-with-python2 python-sphinx-me))
11348
11349 (define-public python-diff-match-patch
11350 (package
11351 (name "python-diff-match-patch")
11352 (version "20121119")
11353 (source
11354 (origin
11355 (method url-fetch)
11356 (uri (pypi-uri "diff-match-patch" version))
11357 (sha256
11358 (base32
11359 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
11360 (build-system python-build-system)
11361 (home-page "https://code.google.com/p/google-diff-match-patch")
11362 (synopsis "Synchronize plain text")
11363 (description "Diff Match and Patch libraries offer robust algorithms to
11364 perform the operations required for synchronizing plain text.")
11365 (license license:asl2.0)))
11366
11367 (define-public python2-diff-match-patch
11368 (package-with-python2 python-diff-match-patch))
11369
11370 (define-public python-dirsync
11371 (package
11372 (name "python-dirsync")
11373 (version "2.2.2")
11374 (source
11375 (origin
11376 (method url-fetch)
11377 (uri (pypi-uri "dirsync" version ".zip"))
11378 (sha256
11379 (base32
11380 "1hcdvmkwd5512zbxpin0k7bx5bkgzy3swjx7d0kj1y45af6r75v2"))))
11381 (build-system python-build-system)
11382 (native-inputs
11383 `(("unzip" ,unzip)))
11384 (propagated-inputs
11385 `(("six" ,python-six)))
11386 (home-page "https://bitbucket.org/tkhyn/dirsync")
11387 (synopsis "Advanced directory tree synchronisation tool")
11388 (description "Advanced directory tree synchronisation tool.")
11389 (license license:expat)))
11390
11391 (define-public python2-dirsync
11392 (package-with-python2 python-dirsync))
11393
11394 (define-public python-levenshtein
11395 (package
11396 (name "python-levenshtein")
11397 (version "0.12.0")
11398 (source
11399 (origin
11400 (method url-fetch)
11401 (uri (pypi-uri "python-Levenshtein" version))
11402 (sha256
11403 (base32
11404 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
11405 (build-system python-build-system)
11406 (home-page "https://github.com/ztane/python-Levenshtein")
11407 (synopsis "Fast computation of Levenshtein distance and string similarity")
11408 (description
11409 "The Levenshtein Python C extension module contains functions for fast computation of
11410 @enumerate
11411 @item Levenshtein (edit) distance, and edit operations
11412 @item string similarity
11413 @item approximate median strings, and generally string averaging
11414 @item string sequence and set similarity
11415 @end enumerate
11416 It supports both normal and Unicode strings.")
11417 (license license:gpl2+)))
11418
11419 (define-public python2-levenshtein
11420 (package-with-python2 python-levenshtein))
11421
11422 (define-public python-scandir
11423 (package
11424 (name "python-scandir")
11425 (version "1.7")
11426 (source
11427 (origin
11428 (method url-fetch)
11429 (uri (pypi-uri "scandir" version))
11430 (sha256
11431 (base32 "0gbnhjzg42rj87ljv9kb648rfxph69ly3c8r9841dxy4d7l5pmdj"))))
11432 (build-system python-build-system)
11433 (arguments
11434 `(#:phases (modify-phases %standard-phases
11435 (replace 'check
11436 (lambda _
11437 (invoke "python" "test/run_tests.py"))))))
11438 (home-page "https://github.com/benhoyt/scandir")
11439 (synopsis "Directory iteration function")
11440 (description
11441 "Directory iteration function like os.listdir(), except that instead of
11442 returning a list of bare filenames, it yields DirEntry objects that include
11443 file type and stat information along with the name. Using scandir() increases
11444 the speed of os.walk() by 2-20 times (depending on the platform and file
11445 system) by avoiding unnecessary calls to os.stat() in most cases.
11446
11447 This package is part of the Python standard library since version 3.5.")
11448 (license license:bsd-3)))
11449
11450 (define-public python2-scandir
11451 (package-with-python2 python-scandir))
11452
11453 (define-public python2-stemming
11454 (package
11455 (name "python2-stemming")
11456 (version "1.0.1")
11457 (source
11458 (origin
11459 (method url-fetch)
11460 (uri (pypi-uri "stemming" version))
11461 (sha256
11462 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
11463 (build-system python-build-system)
11464 (arguments
11465 `(#:python ,python-2))
11466 (home-page "https://bitbucket.org/mchaput/stemming/overview")
11467 (synopsis "Python implementations of various stemming algorithms")
11468 (description
11469 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
11470 stemming algorithms for English. These implementations are straightforward and
11471 efficient, unlike some Python versions of the same algorithms available on the
11472 Web. This package is an extraction of the stemming code included in the Whoosh
11473 search engine.")
11474 (license license:public-domain)))
11475
11476 (define-public python-factory-boy
11477 (package
11478 (name "python-factory-boy")
11479 (version "2.8.1")
11480 (source
11481 (origin
11482 (method url-fetch)
11483 (uri (pypi-uri "factory_boy" version))
11484 (sha256
11485 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
11486 (build-system python-build-system)
11487 (arguments
11488 ;; Tests are not included in the tarball.
11489 `(#:tests? #f))
11490 (propagated-inputs
11491 `(("faker" ,python-faker)))
11492 (home-page "https://github.com/benhoyt/scandir")
11493 (synopsis "Versatile test fixtures replacement")
11494 (description
11495 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
11496
11497 As a fixtures replacement tool, it aims to replace static, hard to maintain
11498 fixtures with easy-to-use factories for complex object.
11499
11500 Instead of building an exhaustive test setup with every possible combination
11501 of corner cases, factory_boy allows you to use objects customized for the
11502 current test, while only declaring the test-specific fields")
11503 (license license:expat)))
11504
11505 (define-public python2-factory-boy
11506 (package-with-python2 python-factory-boy))
11507
11508 (define-public python-translate-toolkit
11509 (package
11510 (name "python-translate-toolkit")
11511 (version "2.1.0")
11512 (source
11513 (origin
11514 (method url-fetch)
11515 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
11516 (sha256
11517 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
11518 (build-system python-build-system)
11519 (native-inputs
11520 `(("python-pytest" ,python-pytest)
11521 ("python-sphinx" ,python-sphinx)))
11522 (propagated-inputs
11523 `(("python-babel" ,python-babel)
11524 ("python-beautifulsoup4" ,python-beautifulsoup4)
11525 ("python-chardet" ,python-chardet)
11526 ("python-diff-match-patch" ,python-diff-match-patch)
11527 ("python-levenshtein" ,python-levenshtein)
11528 ("python-lxml" ,python-lxml)
11529 ("python-six" ,python-six)
11530 ("python-vobject" ,python-vobject)
11531 ("python-pyyaml" ,python-pyyaml)))
11532 (arguments
11533 ;; TODO: tests are not run, because they end with
11534 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
11535 ;; 'parse_funcs'
11536 ;; during test setup.
11537 `(#:tests? #f))
11538 (home-page "http://toolkit.translatehouse.org")
11539 (synopsis "Tools and API for translation and localization engineering")
11540 (description
11541 "Tools and API for translation and localization engineering. It contains
11542 several utilities, as well as an API for building localization tools.")
11543 (license license:gpl2+)))
11544
11545 (define-public python2-translate-toolkit
11546 (package-with-python2 python-translate-toolkit))
11547
11548 (define-public python-packaging
11549 (package
11550 (name "python-packaging")
11551 (version "16.8")
11552 (source
11553 (origin
11554 (method url-fetch)
11555 (uri (pypi-uri "packaging" version))
11556 (sha256
11557 (base32
11558 "17k1xbjshackwvbsnxqixbph8rbqhz4bf4g3al5xyzhavxgq6l2x"))))
11559 (build-system python-build-system)
11560 (native-inputs
11561 `(("python-pretend" ,python-pretend)
11562 ("python-pytest" ,python-pytest)))
11563 (propagated-inputs
11564 `(("python-pyparsing" ,python-pyparsing)
11565 ("python-six" ,python-six)))
11566 (home-page "https://github.com/pypa/packaging")
11567 (synopsis "Core utilities for Python packages")
11568 (description "Packaging is a Python module for dealing with Python packages.
11569 It offers an interface for working with package versions, names, and dependency
11570 information.")
11571 ;; From 'LICENSE': This software is made available under the terms of
11572 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
11573 ;; Contributions to this software is made under the terms of *both* these
11574 ;; licenses.
11575 (license (list license:asl2.0 license:bsd-2))))
11576
11577 (define-public python2-packaging
11578 (package-with-python2 python-packaging))
11579
11580 (define-public python-relatorio
11581 (package
11582 (name "python-relatorio")
11583 (version "0.8.0")
11584 (source
11585 (origin
11586 (method url-fetch)
11587 (uri (pypi-uri "relatorio" version))
11588 (sha256
11589 (base32
11590 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
11591 (build-system python-build-system)
11592 (propagated-inputs
11593 `(("python-lxml" ,python-lxml)
11594 ("python-genshi" ,python-genshi)))
11595 (native-inputs
11596 `(("python-magic" ,python-magic)))
11597 (home-page "https://relatorio.tryton.org/")
11598 (synopsis "Templating library able to output ODT and PDF files")
11599 (description "Relatorio is a templating library which provides a way to
11600 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
11601 for more filetypes can be easily added by creating plugins for them.")
11602 (license license:gpl3+)))
11603
11604 (define-public python2-relatorio
11605 (package-with-python2 python-relatorio))
11606
11607 (define-public python-radon
11608 (package
11609 (name "python-radon")
11610 (version "2.2.0")
11611 (source
11612 (origin
11613 (method url-fetch)
11614 (uri (pypi-uri "radon" version))
11615 (sha256
11616 (base32
11617 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
11618 (build-system python-build-system)
11619 (arguments
11620 `(#:phases (modify-phases %standard-phases
11621 (replace 'check
11622 (lambda _
11623 (invoke "python" "radon/tests/run.py"))))))
11624 (propagated-inputs
11625 `(("python-colorama" ,python-colorama)
11626 ("python-flake8-polyfill" ,python-flake8-polyfill)
11627 ("python-mando" ,python-mando)))
11628 (native-inputs
11629 `(("python-pytest" ,python-pytest)
11630 ("python-pytest-mock" ,python-pytest-mock)))
11631 (home-page "https://radon.readthedocs.org/")
11632 (synopsis "Code Metrics in Python")
11633 (description "Radon is a Python tool which computes various code metrics.
11634 Supported metrics are:
11635 @itemize @bullet
11636 @item raw metrics: SLOC, comment lines, blank lines, &c.
11637 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
11638 @item Halstead metrics (all of them)
11639 @item the Maintainability Index (a Visual Studio metric)
11640 @end itemize")
11641 (license license:expat)))
11642
11643 (define-public python2-radon
11644 (package-with-python2 python-radon))
11645
11646 (define-public python-sure
11647 (package
11648 (name "python-sure")
11649 (version "1.4.6")
11650 (source
11651 (origin
11652 (method url-fetch)
11653 (uri (pypi-uri "sure" version))
11654 (sha256
11655 (base32
11656 "1iyqsy2d6radi88g1qf0lziy5b39h5cpb3g5jiqyb4xi46ig3x1z"))))
11657 (build-system python-build-system)
11658 (propagated-inputs
11659 `(("python-mock" ,python-mock)
11660 ("python-six" ,python-six)))
11661 (native-inputs
11662 `(("python-nose" ,python-nose)))
11663 (home-page "https://github.com/gabrielfalcao/sure")
11664 (synopsis "Automated testing library in python for python")
11665 (description
11666 "Sure is a python library that leverages a DSL for writing assertions.
11667 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
11668 (license license:gpl3+)))
11669
11670 (define-public python2-sure
11671 (package-with-python2 python-sure))
11672
11673 (define-public python2-couleur
11674 ;; This package does not seem to support python3 at all, hence,
11675 ;; only the python2 variant definition is provided.
11676 (package
11677 (name "python2-couleur")
11678 (version "0.6.2")
11679 (source
11680 (origin
11681 (method url-fetch)
11682 (uri (pypi-uri "couleur" version))
11683 (sha256
11684 (base32
11685 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
11686 (build-system python-build-system)
11687 (arguments
11688 `(#:python ,python-2))
11689 (home-page "https://github.com/gabrielfalcao/couleur")
11690 (synopsis
11691 "ANSI terminal tool for python, colored shell and other handy fancy features")
11692 (description
11693 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
11694 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
11695 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
11696 ;; https://github.com/gabrielfalcao/couleur/issues/11
11697 (license license:lgpl3+)))
11698
11699 (define-public python-misaka
11700 (package
11701 (name "python-misaka")
11702 (version "2.1.0")
11703 (source
11704 (origin
11705 (method url-fetch)
11706 (uri (pypi-uri "misaka" version))
11707 (sha256
11708 (base32
11709 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
11710 (build-system python-build-system)
11711 (arguments
11712 `(;; Line 37 of setup.py calls self.run_command('develop')
11713 ;; in the 'check' phase. This command seems to be trying
11714 ;; to write to
11715 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
11716 ;; for which it does not have the permission to write.
11717 #:tests? #f))
11718 (propagated-inputs
11719 `(("python-cffi" ,python-cffi)))
11720 (home-page "https://github.com/FSX/misaka")
11721 (synopsis "Python binding for Hoedown")
11722 (description
11723 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
11724 library written in C. It features a fast HTML renderer and functionality to make custom
11725 renderers (e.g. man pages or LaTeX).")
11726 (license license:expat)))
11727
11728 (define-public python2-misaka
11729 (package-with-python2 python-misaka))
11730
11731 (define-public python2-steadymark
11732 ;; This is forced into being a python2 only variant
11733 ;; due to its dependence on couleur that has no support
11734 ;; for python3
11735 (package
11736 (name "python2-steadymark")
11737 (version "0.7.3")
11738 (source
11739 (origin
11740 (method url-fetch)
11741 (uri (pypi-uri "steadymark" version))
11742 (sha256
11743 (base32
11744 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
11745 (build-system python-build-system)
11746 (native-inputs
11747 `(("python-couleur" ,python2-couleur)
11748 ("python-sure" ,python2-sure)
11749 ("python-misaka" ,python2-misaka)))
11750 (arguments
11751 `(#:python ,python-2
11752 #:phases
11753 (modify-phases %standard-phases
11754 (add-before 'build 'patch-setup-py
11755 (lambda _
11756 ;; Update requirements from dependency==version
11757 ;; to dependency>=version
11758 (substitute* "setup.py"
11759 (("==") ">="))
11760 #t)))))
11761 (home-page "https://github.com/gabrielfalcao/steadymark")
11762 (synopsis "Markdown-based test runner for python")
11763 (description
11764 "@code{Steadymark} allows documentation to be written in github-flavoured
11765 markdown. The documentation may contain snippets of code surrounded by python
11766 code blocks and @code{Steadymark} will find these snippets and run them, making
11767 sure that there are no old malfunctional examples in the documentation examples.")
11768 (license license:expat)))
11769
11770 (define-public python-jsonpointer
11771 (package
11772 (name "python-jsonpointer")
11773 (version "1.10")
11774 (source
11775 (origin
11776 (method url-fetch)
11777 (uri (pypi-uri "jsonpointer" version))
11778 (sha256
11779 (base32
11780 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
11781 (build-system python-build-system)
11782 (home-page "https://github.com/stefankoegl/python-json-pointer")
11783 (synopsis "Identify specific nodes in a JSON document")
11784 (description "@code{jsonpointer} allows you to access specific nodes
11785 by path in a JSON document (see RFC 6901).")
11786 (license license:bsd-3)))
11787
11788 (define-public python2-jsonpointer
11789 (package-with-python2 python-jsonpointer))
11790
11791 (define-public python-jsonpatch
11792 (package
11793 (name "python-jsonpatch")
11794 (version "1.16")
11795 (source
11796 (origin
11797 (method url-fetch)
11798 ;; pypi version lacks tests.js
11799 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
11800 "archive/v" version ".tar.gz"))
11801 (file-name (string-append name "-" version ".tar.gz"))
11802 (sha256
11803 (base32
11804 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
11805 (build-system python-build-system)
11806 (native-inputs
11807 `(("python-jsonpointer" ,python-jsonpointer)))
11808 (home-page "https://github.com/stefankoegl/python-json-patch")
11809 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
11810 (description "@code{jsonpatch} is a library and program that allows
11811 applying JSON Patches according to RFC 6902.")
11812 (license license:bsd-3)))
11813
11814 (define-public python2-jsonpatch
11815 (package-with-python2 python-jsonpatch))
11816
11817 (define-public python-jsonpatch-0.4
11818 (package (inherit python-jsonpatch)
11819 (name "python-jsonpatch")
11820 (version "0.4")
11821 (source
11822 (origin
11823 (method url-fetch)
11824 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
11825 "archive/v" version ".tar.gz"))
11826 (file-name (string-append name "-" version ".tar.gz"))
11827 (sha256
11828 (base32
11829 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
11830
11831 (define-public python2-jsonpatch-0.4
11832 (package-with-python2 python-jsonpatch-0.4))
11833
11834 (define-public python-rfc3986
11835 (package
11836 (name "python-rfc3986")
11837 (version "1.1.0")
11838 (source (origin
11839 (method url-fetch)
11840 (uri (pypi-uri "rfc3986" version))
11841 (sha256
11842 (base32
11843 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
11844 (build-system python-build-system)
11845 (arguments
11846 `(#:modules ((guix build utils)
11847 (guix build python-build-system)
11848 (ice-9 ftw)
11849 (srfi srfi-1)
11850 (srfi srfi-26))
11851 #:phases
11852 (modify-phases %standard-phases
11853 (replace 'check
11854 (lambda _
11855 (let ((cwd (getcwd)))
11856 (setenv "PYTHONPATH"
11857 (string-append cwd "/build/"
11858 (find (cut string-prefix? "lib" <>)
11859 (scandir (string-append cwd "/build")))
11860 ":"
11861 (getenv "PYTHONPATH")))
11862 (invoke "pytest" "-v")))))))
11863 (native-inputs
11864 `(("python-pytest" ,python-pytest)))
11865 (home-page "https://rfc3986.readthedocs.io/")
11866 (synopsis "Parse and validate URI references")
11867 (description
11868 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
11869 validation and authority parsing. This module also supports RFC@tie{}6874
11870 which adds support for zone identifiers to IPv6 addresses.")
11871 (license license:asl2.0)))
11872
11873 (define-public python2-rfc3986
11874 (package-with-python2 python-rfc3986))
11875
11876 (define-public python-rfc3987
11877 (package
11878 (name "python-rfc3987")
11879 (version "1.3.7")
11880 (source
11881 (origin
11882 (method url-fetch)
11883 (uri (pypi-uri "rfc3987" version))
11884 (sha256
11885 (base32
11886 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
11887 (build-system python-build-system)
11888 (home-page "https://pypi.python.org/pypi/rfc3987")
11889 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
11890 (description "@code{rfc3987} provides routines for parsing and
11891 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
11892 (license license:gpl3+)))
11893
11894 (define-public python2-rfc3987
11895 (package-with-python2 python-rfc3987))
11896
11897 (define-public python-validate-email
11898 (package
11899 (name "python-validate-email")
11900 (version "1.3")
11901 (source
11902 (origin
11903 (method url-fetch)
11904 (uri (pypi-uri "validate_email" version))
11905 (sha256
11906 (base32
11907 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
11908 (build-system python-build-system)
11909 (home-page "https://github.com/syrusakbary/validate_email")
11910 (synopsis "Verifies if an email address is valid and really exists")
11911 (description "@code{validate_email} can be used to verify if an email
11912 address is valid and really exists.")
11913 (license license:lgpl3+)))
11914
11915 (define-public python2-validate-email
11916 (package-with-python2 python-validate-email))
11917
11918 (define-public python-flex
11919 (package
11920 (name "python-flex")
11921 (version "6.10.0")
11922 (source
11923 (origin
11924 (method url-fetch)
11925 (uri (pypi-uri "flex" version))
11926 (sha256
11927 (base32
11928 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
11929 (build-system python-build-system)
11930 (propagated-inputs
11931 `(("python-click" ,python-click)
11932 ("python-iso8601" ,python-iso8601)
11933 ("python-jsonpointer" ,python-jsonpointer)
11934 ("python-pyyaml" ,python-pyyaml)
11935 ("python-requests" ,python-requests)
11936 ("python-rfc3987" ,python-rfc3987)
11937 ("python-six" ,python-six)
11938 ("python-validate-email" ,python-validate-email)))
11939 (home-page "https://github.com/pipermerriam/flex")
11940 (synopsis "Validates Swagger schemata")
11941 (description "@code{flex} can be used to validate Swagger schemata.")
11942 (license license:bsd-3)))
11943
11944 (define-public python2-flex
11945 (package-with-python2 python-flex))
11946
11947 (define-public python-marshmallow
11948 (package
11949 (name "python-marshmallow")
11950 (version "3.0.0b3")
11951 (source
11952 (origin
11953 (method url-fetch)
11954 (uri (pypi-uri "marshmallow" version))
11955 (sha256
11956 (base32
11957 "07mcrij1yvk85lvgx44wwr9pc80xryghvlgayb057g1cazcypysd"))))
11958 (build-system python-build-system)
11959 (propagated-inputs
11960 `(("python-dateutil" ,python-dateutil)
11961 ("python-simplejson" ,python-simplejson)))
11962 (native-inputs
11963 `(("python-pytest" ,python-pytest)
11964 ("python-pytz" ,python-pytz)))
11965 (home-page "https://github.com/marshmallow-code/marshmallow")
11966 (synopsis "Convert complex datatypes to and from native
11967 Python datatypes.")
11968 (description "@code{marshmallow} provides a library for converting
11969 complex datatypes to and from native Python datatypes.")
11970 (license license:expat)))
11971
11972 (define-public python2-marshmallow
11973 (package-with-python2 python-marshmallow))
11974
11975 (define-public python-apispec
11976 (package
11977 (name "python-apispec")
11978 (version "0.25.3")
11979 (source
11980 (origin
11981 (method url-fetch)
11982 (uri (pypi-uri "apispec" version))
11983 (sha256
11984 (base32
11985 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
11986 (build-system python-build-system)
11987 (propagated-inputs
11988 `(("python-pyyaml" ,python-pyyaml)))
11989 (native-inputs
11990 `(("python-pytest" ,python-pytest)
11991 ("python-flask" ,python-flask)
11992 ("python-marshmallow" ,python-marshmallow)
11993 ("python-tornado" ,python-tornado)
11994 ("python-bottle" ,python-bottle)
11995 ("python-mock" ,python-mock)))
11996 (home-page "https://github.com/marshmallow-code/apispec")
11997 (synopsis "Swagger 2.0 API specification generator")
11998 (description "@code{python-apispec} is a pluggable API specification
11999 generator. Currently supports the OpenAPI specification (f.k.a.
12000 Swagger 2.0).")
12001 (license license:expat)))
12002
12003 (define-public python2-apispec
12004 (package-with-python2 python-apispec))
12005
12006 (define-public python-flasgger
12007 (package
12008 (name "python-flasgger")
12009 (version "0.6.3")
12010 (source
12011 (origin
12012 (method url-fetch)
12013 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
12014 version ".tar.gz"))
12015 (file-name (string-append name "-" version ".tar.gz"))
12016 (sha256
12017 (base32
12018 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
12019 (build-system python-build-system)
12020 (arguments
12021 `(#:phases
12022 (modify-phases %standard-phases
12023 (replace 'check
12024 (lambda* (#:key inputs outputs #:allow-other-keys)
12025 (substitute* "Makefile"
12026 (("flake8 flasgger --ignore=F403")
12027 "flake8 flasgger --ignore=E731,F403"))
12028 (setenv "PYTHONPATH" (string-append (getcwd)
12029 ":"
12030 (getenv "PYTHONPATH")))
12031 (zero? (system* "py.test")))))))
12032 (propagated-inputs
12033 `(("python-flask" ,python-flask)
12034 ("python-pyyaml" ,python-pyyaml)
12035 ("python-jsonschema" ,python-jsonschema)
12036 ("python-mistune" ,python-mistune)
12037 ("python-six" ,python-six)))
12038 (native-inputs
12039 `(("python-decorator" ,python-decorator)
12040 ("python-flake8" ,python-flake8)
12041 ("python-flask-restful" ,python-flask-restful)
12042 ("python-flex" ,python-flex)
12043 ("python-pytest" ,python-pytest)
12044 ("python-pytest-cov" ,python-pytest-cov)
12045 ("python-marshmallow" ,python-marshmallow)
12046 ("python-apispec" ,python-apispec)))
12047 (home-page "https://github.com/rochacbruno/flasgger/")
12048 (synopsis "Extract Swagger specs from your Flask project")
12049 (description "@code{python-flasgger} allows extracting Swagger specs
12050 from your Flask project. It is a fork of Flask-Swagger.")
12051 (license license:expat)))
12052
12053 (define-public python2-flasgger
12054 (package-with-python2 python-flasgger))
12055
12056 (define-public python-swagger-spec-validator
12057 (package
12058 (name "python-swagger-spec-validator")
12059 (version "2.1.0")
12060 (source
12061 (origin
12062 (method url-fetch)
12063 (uri (pypi-uri "swagger-spec-validator" version))
12064 (sha256
12065 (base32
12066 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
12067 (build-system python-build-system)
12068 (propagated-inputs
12069 `(("python-jsonschema" ,python-jsonschema)
12070 ("python-six" ,python-six)))
12071 (home-page
12072 "https://github.com/Yelp/swagger_spec_validator")
12073 (synopsis "Validation of Swagger specifications")
12074 (description "@code{swagger_spec_validator} provides a library for
12075 validating Swagger API specifications.")
12076 (license license:asl2.0)))
12077
12078 (define-public python2-swagger-spec-validator
12079 (package-with-python2 python-swagger-spec-validator))
12080
12081 (define-public python-apache-libcloud
12082 (package
12083 (name "python-apache-libcloud")
12084 (version "2.0.0")
12085 (source
12086 (origin
12087 (method url-fetch)
12088 (uri (pypi-uri "apache-libcloud" version))
12089 (sha256
12090 (base32
12091 "1a71z02ckcxld72k4qgmdnkjan52c4wczncs3p2mp5yafh7dsan7"))))
12092 (build-system python-build-system)
12093 (arguments
12094 `(#:phases
12095 (modify-phases %standard-phases
12096 (add-after 'unpack 'patch-ssh
12097 (lambda* (#:key inputs #:allow-other-keys)
12098 (substitute* "libcloud/compute/ssh.py"
12099 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
12100 "/bin/ssh" "'")))
12101 #t))
12102 (add-after 'unpack 'patch-tests
12103 (lambda _
12104 (substitute* "./libcloud/test/test_file_fixtures.py"
12105 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
12106 (("def _ascii") "def _raw_data(self, method, url, body, headers):
12107 return (httplib.OK,
12108 \"1234abcd\",
12109 {\"test\": \"value\"},
12110 httplib.responses[httplib.OK])
12111 def _ascii"))
12112 (substitute* "libcloud/test/compute/test_ssh_client.py"
12113 (("class ShellOutSSHClientTests")
12114 "@unittest.skip(\"Guix container doesn't have ssh service\")
12115 class ShellOutSSHClientTests")
12116 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
12117 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
12118 (("'.xF0', '.x90', '.x8D', '.x88'")
12119 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
12120 #t)))))
12121 (inputs
12122 `(("openssh" ,openssh)))
12123 (propagated-inputs
12124 `(("python-paramiko" ,python-paramiko)
12125 ("python-requests" ,python-requests)))
12126 (native-inputs
12127 `(("python-lockfile" ,python-lockfile)
12128 ("python-mock" ,python-mock)
12129 ("python-requests-mock" ,python-requests-mock)))
12130 (home-page "https://libcloud.apache.org/")
12131 (synopsis "Unified Cloud API")
12132 (description "@code{libcloud} is a Python library for interacting with
12133 many of the popular cloud service providers using a unified API.")
12134 (license license:asl2.0)))
12135
12136 (define-public python2-apache-libcloud
12137 (package-with-python2 python-apache-libcloud))
12138
12139 (define-public python-smmap2
12140 (package
12141 (name "python-smmap2")
12142 (version "2.0.3")
12143 (source
12144 (origin
12145 (method url-fetch)
12146 (uri (pypi-uri "smmap2" version))
12147 (sha256
12148 (base32
12149 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
12150 (build-system python-build-system)
12151 (native-inputs
12152 `(("python-nosexcover" ,python-nosexcover)))
12153 (home-page "https://github.com/Byron/smmap")
12154 (synopsis "Python sliding window memory map manager")
12155 (description "@code{smmap2} is a pure Python implementation of a sliding
12156 window memory map manager.")
12157 (license license:bsd-3)))
12158
12159 (define-public python2-smmap2
12160 (package-with-python2 python-smmap2))
12161
12162 (define-public python-regex
12163 (package
12164 (name "python-regex")
12165 (version "2017.06.07")
12166 (source (origin
12167 (method url-fetch)
12168 (uri (pypi-uri "regex" version))
12169 (sha256
12170 (base32
12171 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
12172 (build-system python-build-system)
12173 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
12174 (synopsis "Alternative regular expression module")
12175 (description "This regular expression implementation is backwards-
12176 compatible with the standard @code{re} module, but offers additional
12177 functionality like full case-folding for case-insensitive matches in Unicode.")
12178 (license license:psfl)))
12179
12180 (define-public python2-regex
12181 (package-with-python2 python-regex))
12182
12183 (define-public python2-pyopengl
12184 (package
12185 (name "python2-pyopengl")
12186 (version "3.1.0")
12187 (source
12188 (origin
12189 (method url-fetch)
12190 (uri (pypi-uri "PyOpenGL" version))
12191 (sha256
12192 (base32
12193 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
12194 (arguments
12195 `(#:python ,python-2))
12196 (build-system python-build-system)
12197 (home-page "http://pyopengl.sourceforge.net")
12198 (synopsis "Standard OpenGL bindings for Python")
12199 (description
12200 "PyOpenGL is the most common cross platform Python binding to OpenGL and
12201 related APIs. The binding is created using the standard @code{ctypes}
12202 library.")
12203 (license license:bsd-3)))
12204
12205 (define-public python2-pyopengl-accelerate
12206 (package
12207 (inherit python2-pyopengl)
12208 (name "python2-pyopengl-accelerate")
12209 (version "3.1.0")
12210 (source
12211 (origin
12212 (method url-fetch)
12213 (uri (pypi-uri "PyOpenGL-accelerate" version))
12214 (sha256
12215 (base32
12216 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
12217 (synopsis "Acceleration code for PyOpenGL")
12218 (description
12219 "This is the Cython-coded accelerator module for PyOpenGL.")))
12220
12221 (define-public python-rencode
12222 (package
12223 (name "python-rencode")
12224 (version "1.0.3")
12225 (source
12226 (origin
12227 (method url-fetch)
12228 (uri (pypi-uri "rencode" version))
12229 (sha256
12230 (base32
12231 "08if5yax1xn5yfp8p3765ccjmfcv9di7i4m5jckgnwvdsgznwkbj"))))
12232 (build-system python-build-system)
12233 (native-inputs `(("pkg-config" ,pkg-config)
12234 ("python-cython" ,python-cython)))
12235 (home-page "https://github.com/aresch/rencode")
12236 (synopsis "Serialization of heterogeneous data structures")
12237 (description
12238 "The @code{rencode} module is a data structure serialization library,
12239 similar to @code{bencode} from the BitTorrent project. For complex,
12240 heterogeneous data structures with many small elements, r-encoding stake up
12241 significantly less space than b-encodings. This version of rencode is a
12242 complete rewrite in Cython to attempt to increase the performance over the
12243 pure Python module.")
12244 (license license:bsd-3)))
12245
12246 (define-public python2-rencode
12247 (package-with-python2 python-rencode))
12248
12249 (define-public python-xenon
12250 (package
12251 (name "python-xenon")
12252 (version "0.5.1")
12253 (source
12254 (origin
12255 (method url-fetch)
12256 (uri (pypi-uri "xenon" version))
12257 (sha256
12258 (base32
12259 "14kby2y48vp3sgwxqlm5d5789yibqwb1qli5fwcmdqg3iayrbklc"))))
12260 (build-system python-build-system)
12261 (native-inputs
12262 `(("python-pyyaml" ,python-pyyaml)
12263 ("python-radon" ,python-radon)
12264 ("python-requests" ,python-requests)
12265 ("python-flake8" ,python-flake8)
12266 ("python-tox" ,python-tox)))
12267 (arguments
12268 `(#:phases
12269 (modify-phases %standard-phases
12270 (add-before 'build 'patch-test-requirements
12271 (lambda* (#:key inputs #:allow-other-keys)
12272 ;; Update requirements from dependency==version to
12273 ;; dependency>=version.
12274 (substitute* "requirements.txt"
12275 (("==") ">=")
12276 ((",<1.5.0") ""))
12277 ;; Remove httpretty dependency for tests.
12278 (substitute* "setup.py"
12279 (("httpretty") ""))
12280 #t)))))
12281 (home-page "https://xenon.readthedocs.org/")
12282 (synopsis "Monitor code metrics for Python on your CI server")
12283 (description
12284 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
12285 Ideally, @code{xenon} is run every time code is committed. Through command
12286 line options, various thresholds can be set for the complexity of code. It
12287 will fail (i.e. it will exit with a non-zero exit code) when any of these
12288 requirements is not met.")
12289 (license license:expat)))
12290
12291 (define-public python2-xenon
12292 (package-with-python2 python-xenon))
12293
12294 (define-public python-pysocks
12295 (package
12296 (name "python-pysocks")
12297 (version "1.6.7")
12298 (source
12299 (origin
12300 (method url-fetch)
12301 (uri (pypi-uri "PySocks" version))
12302 (sha256
12303 (base32
12304 "1krkiss578zqwcg4c8iqz1hwscwhsvy2djp3xyvps5gsgvr2j0yh"))))
12305 (build-system python-build-system)
12306 (arguments `(#:tests? #f))
12307 (home-page "https://github.com/Anorov/PySocks")
12308 (synopsis "SOCKS client module")
12309 (description "@code{pysocks} is an updated and semi-actively maintained
12310 version of @code{SocksiPy} with bug fixes and extra features.")
12311 (license license:bsd-3)))
12312
12313 (define-public python2-pysocks
12314 (package-with-python2 python-pysocks))
12315
12316 (define-public python-pydiff
12317 (package
12318 (name "python-pydiff")
12319 (version "0.2")
12320 (source
12321 (origin
12322 (method url-fetch)
12323 (uri (pypi-uri "pydiff" version))
12324 (sha256
12325 (base32
12326 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
12327 (build-system python-build-system)
12328 (home-page "https://github.com/myint/pydiff")
12329 (synopsis "Library to diff two Python files at the bytecode level")
12330 (description
12331 "@code{pydiff} makes it easy to look for actual code changes while
12332 ignoring formatting changes.")
12333 (license license:expat)))
12334
12335 (define-public python2-pydiff
12336 (package-with-python2 python-pydiff))
12337
12338 (define-public python-tqdm
12339 (package
12340 (name "python-tqdm")
12341 (version "4.19.6")
12342 (source
12343 (origin
12344 (method url-fetch)
12345 (uri (pypi-uri "tqdm" version))
12346 (sha256
12347 (base32
12348 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
12349 (build-system python-build-system)
12350 (native-inputs
12351 `(("python-flake8" ,python-flake8)
12352 ("python-nose" ,python-nose)
12353 ("python-coverage" ,python-coverage)))
12354 (home-page "https://github.com/tqdm/tqdm")
12355 (synopsis "Fast, extensible progress meter")
12356 (description
12357 "Make loops show a progress bar on the console by just wrapping any
12358 iterable with @code{|tqdm(iterable)|}. Offers many options to define
12359 design and layout.")
12360 (license (list license:mpl2.0 license:expat))))
12361
12362 (define-public python2-tqdm
12363 (package-with-python2 python-tqdm))
12364
12365 (define-public python-pkginfo
12366 (package
12367 (name "python-pkginfo")
12368 (version "1.4.2")
12369 (source
12370 (origin
12371 (method url-fetch)
12372 (uri (pypi-uri "pkginfo" version))
12373 (sha256
12374 (base32
12375 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
12376 (build-system python-build-system)
12377 (arguments
12378 ;; The tests are broken upstream.
12379 '(#:tests? #f))
12380 (home-page
12381 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
12382 (synopsis
12383 "Query metadatdata from sdists, bdists, and installed packages")
12384 (description
12385 "API to query the distutils metadata written in @file{PKG-INFO} inside a
12386 source distriubtion (an sdist) or a binary distribution (e.g., created by
12387 running bdist_egg). It can also query the EGG-INFO directory of an installed
12388 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
12389 created by running @code{python setup.py develop}).")
12390 (license license:expat)))
12391
12392 (define-public python2-pkginfo
12393 (package-with-python2 python-pkginfo))
12394
12395 (define-public python-twine
12396 (package
12397 (name "python-twine")
12398 (version "1.9.1")
12399 (source
12400 (origin
12401 (method url-fetch)
12402 (uri (pypi-uri "twine" version))
12403 (sha256
12404 (base32
12405 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
12406 (build-system python-build-system)
12407 (propagated-inputs
12408 `(("python-tqdm" ,python-tqdm)
12409 ("python-pkginfo" ,python-pkginfo)
12410 ("python-requests" ,python-requests)
12411 ("python-requests-toolbelt" ,python-requests-toolbelt)))
12412 (home-page "https://github.com/pypa/twine")
12413 (synopsis "Collection of utilities for interacting with PyPI")
12414 (description
12415 "@code{twine} currently supports registering projects and uploading
12416 distributions. It authenticates the user over HTTPS, allows them to pre-sign
12417 their files and supports any packaging format (including wheels).")
12418 (license license:asl2.0)))
12419
12420 (define-public python2-twine
12421 (package-with-python2 python-twine))
12422
12423 (define-public python-linecache2
12424 (package
12425 (name "python-linecache2")
12426 (version "1.0.0")
12427 (source
12428 (origin
12429 (method url-fetch)
12430 (uri (pypi-uri "linecache2" version))
12431 (sha256
12432 (base32
12433 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
12434 (build-system python-build-system)
12435 (arguments
12436 `(;; The tests depend on unittest2, and our version is a bit too old.
12437 #:tests? #f))
12438 (native-inputs
12439 `(("python-pbr" ,python-pbr-minimal)))
12440 (home-page
12441 "https://github.com/testing-cabal/linecache2")
12442 (synopsis "Backports of the linecache module")
12443 (description
12444 "The linecache module allows one to get any line from any file, while
12445 attempting to optimize internally, using a cache, the common case where many
12446 lines are read from a single file.")
12447 (license license:psfl)))
12448
12449 (define-public python2-linecache2
12450 (package-with-python2 python-linecache2))
12451
12452 (define-public python-traceback2
12453 (package
12454 (name "python-traceback2")
12455 (version "1.4.0")
12456 (source
12457 (origin
12458 (method url-fetch)
12459 (uri (pypi-uri "traceback2" version))
12460 (sha256
12461 (base32
12462 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
12463 (build-system python-build-system)
12464 (arguments
12465 `(;; python-traceback2 and python-unittest2 depend on one another.
12466 #:tests? #f))
12467 (native-inputs
12468 `(("python-pbr" ,python-pbr-minimal)))
12469 (propagated-inputs
12470 `(("python-linecache2" ,python-linecache2)))
12471 (home-page
12472 "https://github.com/testing-cabal/traceback2")
12473 (synopsis "Backports of the traceback module")
12474 (description
12475 "This module provides a standard interface to extract, format and print
12476 stack traces of Python programs. It exactly mimics the behavior of the Python
12477 interpreter when it prints a stack trace.")
12478 (license license:psfl)))
12479
12480 (define-public python2-traceback2
12481 (package-with-python2 python-traceback2))
12482
12483 (define-public python-ratelimiter
12484 (package
12485 (name "python-ratelimiter")
12486 (version "1.2.0")
12487 (source
12488 (origin
12489 (method url-fetch)
12490 (uri (pypi-uri "ratelimiter" version))
12491 (sha256
12492 (base32
12493 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
12494 (build-system python-build-system)
12495 (arguments
12496 '(#:tests? #f)) ; There are no tests in the pypi archive.
12497 (home-page "https://github.com/RazerM/ratelimiter")
12498 (synopsis "Simple rate limiting object")
12499 (description
12500 "The @code{ratelimiter} module ensures that an operation will not be
12501 executed more than a given number of times during a given period.")
12502 (license license:asl2.0)))
12503
12504 (define-public python2-ratelimiter
12505 (package-with-python2 python-ratelimiter))
12506
12507 (define-public python-dukpy
12508 (package
12509 (name "python-dukpy")
12510 (version "0.3")
12511 (source
12512 (origin
12513 (method url-fetch)
12514 (uri (string-append "https://github.com/kovidgoyal/dukpy/archive/v"
12515 version ".tar.gz"))
12516 (file-name (string-append name "-" version ".tar.gz"))
12517 (sha256
12518 (base32
12519 "0pj39rfwlzivqm5hkrsza7gssg6ggpxlq5ivc8f3h7x5pfgc6y6c"))))
12520 (build-system python-build-system)
12521 (home-page "https://github.com/kovidgoyal/dukpy")
12522 (synopsis "Run JavaScript in python")
12523 (description
12524 "dukpy is a JavaScript runtime environment for Python using the duktape
12525 embeddable JavaScript engine.")
12526 ;; Dukpy is licensed under MIT like the embedded duktape library,
12527 ;; with 'errors.c' as GPL3.
12528 (license (list license:expat license:gpl3))))
12529
12530 (define-public python2-dukpy
12531 (package-with-python2 python-dukpy))
12532
12533 (define-public python-jsonrpclib-pelix
12534 (package
12535 (name "python-jsonrpclib-pelix")
12536 (version "0.3.1")
12537 (source
12538 (origin
12539 (method url-fetch)
12540 (uri (pypi-uri "jsonrpclib-pelix" version))
12541 (sha256
12542 (base32
12543 "1qs95vxplxwspbrqy8bvc195s58iy43qkf75yrjfql2sim8b25sl"))))
12544 (build-system python-build-system)
12545 (home-page "https://github.com/tcalmant/jsonrpclib/")
12546 (synopsis "JSON-RPC 2.0 client library for Python")
12547 (description
12548 "This library implements the JSON-RPC v2.0
12549 specification (backwards-compatible) as a client library for Python. This
12550 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
12551 services.")
12552 (license license:asl2.0)))
12553
12554 (define-public python2-jsonrpclib-pelix
12555 (package-with-python2 python-jsonrpclib-pelix))
12556
12557 (define-public python-setuptools-scm-git-archive
12558 (package
12559 (name "python-setuptools-scm-git-archive")
12560 (version "1.0")
12561 (source
12562 (origin
12563 (method url-fetch)
12564 (uri (pypi-uri "setuptools_scm_git_archive" version))
12565 (sha256
12566 (base32
12567 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
12568 (build-system python-build-system)
12569 (native-inputs
12570 `(("python-pytest" ,python-pytest)))
12571 (propagated-inputs
12572 `(("python-setuptools-scm" ,python-setuptools-scm)))
12573 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
12574 (synopsis "Setuptools_scm plugin for git archives")
12575 (description
12576 "The setuptools_scm_git_archive package is a plugin to
12577 setuptools_scm, which supports obtaining versions from git archives that
12578 belong to tagged versions.")
12579 (license license:expat)))
12580
12581 (define-public python2-setuptools-scm-git-archive
12582 (package-with-python2 python-setuptools-scm-git-archive))
12583
12584 (define-public python-pyclipper
12585 (package
12586 (name "python-pyclipper")
12587 (version "1.0.6")
12588 (source
12589 (origin
12590 (method url-fetch)
12591 (uri (pypi-uri "pyclipper" version ".zip"))
12592 (sha256
12593 (base32
12594 "1zpmwv3bya3j984y5cf9x9d5108kf6mxldcba68wiq0frv5qrssw"))))
12595 (build-system python-build-system)
12596 (arguments
12597 `(#:tests? #f)); 8 Tests fail, 37 succeed
12598 (propagated-inputs
12599 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
12600 (native-inputs
12601 `(("unzip" ,unzip)))
12602 (home-page "https://github.com/greginvm/pyclipper")
12603 (synopsis "Wrapper for Angus Johnson's Clipper library")
12604 (description
12605 "Pyclipper is a Cython wrapper for the C++ translation of the
12606 Angus Johnson's polygon clipping Clipper library (ver. 6.2.1).")
12607 (license license:expat)))
12608
12609 (define-public python2-pyclipper
12610 (package-with-python2 python-pyclipper))
12611
12612 (define-public python2-booleanoperations
12613 (package
12614 (name "python2-booleanoperations")
12615 (version "0.7.1")
12616 (source
12617 (origin
12618 (method url-fetch)
12619 (uri (pypi-uri "booleanOperations" version ".zip"))
12620 (sha256
12621 (base32
12622 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
12623 (build-system python-build-system)
12624 (arguments
12625 `(#:python ,python-2))
12626 (native-inputs
12627 `(("unzip" ,unzip)
12628 ("python2-pytest" ,python2-pytest)
12629 ("python2-pytest-runner" ,python2-pytest-runner)))
12630 (propagated-inputs
12631 `(("python-fonttools" ,python2-fonttools)
12632 ("python-pyclipper" ,python2-pyclipper)
12633 ("python-ufolib" ,python2-ufolib)))
12634 (home-page "https://github.com/typemytype/booleanOperations")
12635 (synopsis "Boolean operations on paths")
12636 (description
12637 "BooleanOperations provides a Python library that enables
12638 boolean operations on paths.")
12639 (license license:expat)))
12640
12641 (define-public python-tempdir
12642 (package
12643 (name "python-tempdir")
12644 (version "0.7.1")
12645 (source
12646 (origin
12647 (method url-fetch)
12648 (uri (pypi-uri "tempdir" version))
12649 (sha256
12650 (base32
12651 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
12652 (build-system python-build-system)
12653 (home-page "https://pypi.org/project/tempdir/")
12654 (arguments
12655 ;; the package has no tests
12656 '(#:tests? #f))
12657 (synopsis "Python library for managing temporary directories")
12658 (description
12659 "This library manages temporary directories that are automatically
12660 deleted with all their contents when they are no longer needed. It is
12661 particularly convenient for use in tests.")
12662 (license license:expat)))
12663
12664 (define-public python2-tempdir
12665 (package-with-python2 python-tempdir))
12666
12667 (define-public python-activepapers
12668 (package
12669 (name "python-activepapers")
12670 (version "0.2.2")
12671 (source
12672 (origin
12673 (method url-fetch)
12674 (uri (pypi-uri "ActivePapers.Py" version))
12675 (sha256
12676 (base32
12677 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
12678 (build-system python-build-system)
12679 (arguments
12680 `(#:modules ((ice-9 ftw)
12681 (srfi srfi-1)
12682 (guix build utils)
12683 (guix build python-build-system))
12684
12685 #:phases
12686 (modify-phases %standard-phases
12687 (add-after 'unpack 'delete-python2-code
12688 (lambda _
12689 (for-each delete-file
12690 '("lib/activepapers/builtins2.py"
12691 "lib/activepapers/standardlib2.py"
12692 "lib/activepapers/utility2.py"))))
12693 (replace 'check
12694 (lambda _
12695 ;; Deactivate the test cases that download files
12696 (setenv "NO_NETWORK_ACCESS" "1")
12697 ;; For some strange reason, some tests fail if nosetests runs all
12698 ;; test modules in a single execution. They pass if each test
12699 ;; module is run individually.
12700 (for-each (lambda (filename)
12701 (invoke "nosetests"
12702 (string-append "tests/" filename)))
12703 (scandir "tests"
12704 (lambda (filename)
12705 (string-suffix? ".py" filename)))))))))
12706 (native-inputs
12707 `(("python-tempdir" ,python-tempdir)
12708 ("python-nose" ,python-nose)))
12709 (propagated-inputs
12710 `(("python-h5py" ,python-h5py)))
12711 (home-page "http://www.activepapers.org/")
12712 (synopsis "Executable papers for scientific computing")
12713 (description
12714 "ActivePapers is a tool for working with executable papers, which
12715 combine data, code, and documentation in single-file packages,
12716 suitable for publication as supplementary material or on repositories
12717 such as figshare or Zenodo.")
12718 (properties `((python2-variant . ,(delay python2-activepapers))))
12719 (license license:bsd-3)))
12720
12721 (define-public python2-activepapers
12722 (let ((base (package-with-python2
12723 (strip-python2-variant python-activepapers))))
12724 (package
12725 (inherit base)
12726 (arguments
12727 (substitute-keyword-arguments (package-arguments base)
12728 ((#:phases phases)
12729 `(modify-phases ,phases
12730 (delete 'delete-python2-code)
12731 (add-after 'unpack 'delete-python3-code
12732 (lambda _
12733 (for-each delete-file
12734 '("lib/activepapers/builtins3.py"
12735 "lib/activepapers/standardlib3.py"
12736 "lib/activepapers/utility3.py")))))))))))
12737
12738 (define-public python-semver
12739 (package
12740 (name "python-semver")
12741 (version "2.7.9")
12742 (source
12743 (origin
12744 (method url-fetch)
12745 (uri (pypi-uri "semver" version))
12746 (sha256
12747 (base32
12748 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
12749 (build-system python-build-system)
12750 (arguments
12751 `(#:phases
12752 (modify-phases %standard-phases
12753 (add-after 'unpack 'patch-test-requirements
12754 (lambda _
12755 (substitute* "setup.py"
12756 ;; Our Python is new enough.
12757 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
12758 #t)))))
12759 (native-inputs
12760 `(("python-tox" ,python-tox)
12761 ("python-virtualenv" ,python-virtualenv)))
12762 (home-page "https://github.com/k-bx/python-semver")
12763 (synopsis "Python helper for Semantic Versioning")
12764 (description "This package provides a Python library for
12765 @url{Semantic Versioning, http://semver.org/}.")
12766 (license license:bsd-3)))
12767
12768 (define-public python2-semver
12769 (package-with-python2 python-semver))
12770
12771 (define-public python2-pyro
12772 (package
12773 (name "python2-pyro")
12774 (version "3.16")
12775 (source
12776 (origin
12777 (method url-fetch)
12778 (uri (pypi-uri "Pyro" version))
12779 (file-name (string-append "Pyro-" version ".tar.gz"))
12780 (sha256
12781 (base32
12782 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
12783 (build-system python-build-system)
12784 (arguments
12785 ;; Pyro is not compatible with Python 3
12786 `(#:python ,python-2
12787 ;; Pyro has no test cases for automatic execution
12788 #:tests? #f))
12789 (home-page "http://pythonhosted.org/Pyro/")
12790 (synopsis "Distributed object manager for Python")
12791 (description "Pyro is a Distributed Object Technology system
12792 written in Python that is designed to be easy to use. It resembles
12793 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
12794 which is a system and language independent Distributed Object Technology
12795 and has much more to offer than Pyro or RMI. Pyro 3.x is no
12796 longer maintained. New projects should use Pyro4 instead, which
12797 is the new Pyro version that is actively developed.")
12798 (license license:expat)))
12799
12800 (define-public python2-scientific
12801 (package
12802 (name "python2-scientific")
12803 (version "2.9.4")
12804 (source
12805 (origin
12806 (method url-fetch)
12807 (uri (string-append "https://bitbucket.org/khinsen/"
12808 "scientificpython/downloads/ScientificPython-"
12809 version ".tar.gz"))
12810 (file-name (string-append "ScientificPython-" version ".tar.gz"))
12811 (sha256
12812 (base32
12813 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
12814 (build-system python-build-system)
12815 (inputs
12816 `(("netcdf" ,netcdf)))
12817 (propagated-inputs
12818 `(("python-numpy" ,python2-numpy-1.8)
12819 ("python-pyro" ,python2-pyro)))
12820 (arguments
12821 ;; ScientificPython is not compatible with Python 3
12822 `(#:python ,python-2
12823 #:tests? #f ; No test suite
12824 #:phases
12825 (modify-phases %standard-phases
12826 (replace 'build
12827 (lambda* (#:key inputs #:allow-other-keys)
12828 (zero? (system* "python" "setup.py" "build"
12829 (string-append "--netcdf_prefix="
12830 (assoc-ref inputs "netcdf")))))))))
12831 (home-page "https://bitbucket.org/khinsen/scientificpython")
12832 (synopsis "Python modules for scientific computing")
12833 (description "ScientificPython is a collection of Python modules that are
12834 useful for scientific computing. Most modules are rather general (Geometry,
12835 physical units, automatic derivatives, ...) whereas others are more
12836 domain-specific (e.g. netCDF and PDB support). The library is currently
12837 not actively maintained and works only with Python 2 and NumPy < 1.9.")
12838 (license license:cecill-c)))
12839
12840 (define-public python2-mmtk
12841 (package
12842 (name "python2-mmtk")
12843 (version "2.7.11")
12844 (source
12845 (origin
12846 (method url-fetch)
12847 (uri (string-append "https://bitbucket.org/khinsen/"
12848 "mmtk/downloads/MMTK-" version ".tar.gz"))
12849 (file-name (string-append "MMTK-" version ".tar.gz"))
12850 (sha256
12851 (base32
12852 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
12853 (build-system python-build-system)
12854 (native-inputs
12855 `(("netcdf" ,netcdf)))
12856 (propagated-inputs
12857 `(("python-scientific" ,python2-scientific)
12858 ("python-tkinter" ,python-2 "tk")))
12859 (arguments
12860 `(#:python ,python-2
12861 #:tests? #f
12862 #:phases
12863 (modify-phases %standard-phases
12864 (add-before 'build 'includes-from-scientific
12865 (lambda* (#:key inputs #:allow-other-keys)
12866 (mkdir-p "Include/Scientific")
12867 (copy-recursively
12868 (string-append
12869 (assoc-ref inputs "python-scientific")
12870 "/include/python2.7/Scientific")
12871 "Include/Scientific"))))))
12872 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
12873 (synopsis "Python library for molecular simulation")
12874 (description "MMTK is a library for molecular simulations with an emphasis
12875 on biomolecules. It provides widely used methods such as Molecular Dynamics
12876 and normal mode analysis, but also basic routines for implementing new methods
12877 for simulation and analysis. The library is currently not actively maintained
12878 and works only with Python 2 and NumPy < 1.9.")
12879 (license license:cecill-c)))
12880
12881 (define-public python-phonenumbers
12882 (package
12883 (name "python-phonenumbers")
12884 (version "8.9.1")
12885 (source
12886 (origin
12887 (method url-fetch)
12888 (uri (pypi-uri "phonenumbers" version))
12889 (sha256
12890 (base32
12891 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
12892 (build-system python-build-system)
12893 (home-page
12894 "https://github.com/daviddrysdale/python-phonenumbers")
12895 (synopsis
12896 "Python library for dealing with international phone numbers")
12897 (description
12898 "This package provides a Python port of Google's libphonenumber library.")
12899 (license license:asl2.0)))
12900
12901 (define-public python2-phonenumbers
12902 (package-with-python2 python-phonenumbers))
12903
12904 (define-public python-yapf
12905 (package
12906 (name "python-yapf")
12907 (version "0.21.0")
12908 (source
12909 (origin
12910 (method url-fetch)
12911 (uri (pypi-uri "yapf" version))
12912 (sha256
12913 (base32
12914 "144gc7d6b1415vh02409rnb8qd5kxi6mxlr7y64d5cizgxbf72kx"))))
12915 (build-system python-build-system)
12916 (home-page "https://github.com/google/yapf")
12917 (synopsis "Formatter for Python code")
12918 (description "YAPF is a formatter for Python code. It's based off of
12919 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
12920 takes the code and reformats it to the best formatting that conforms to the
12921 style guide, even if the original code didn't violate the style guide.")
12922 (license license:asl2.0)))
12923
12924 (define-public python2-yapf
12925 (package-with-python2 python-yapf))
12926
12927 (define-public python-gyp
12928 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
12929 (revision "0"))
12930 (package
12931 (name "python-gyp")
12932 ;; Google does not release versions,
12933 ;; based on second most recent commit date.
12934 (version (git-version "0.0.0" revision commit))
12935 (source
12936 (origin
12937 ;; Google does not release tarballs,
12938 ;; git checkout is needed.
12939 (method git-fetch)
12940 (uri (git-reference
12941 (url "https://chromium.googlesource.com/external/gyp")
12942 (commit commit)))
12943 (file-name (git-file-name name version))
12944 (sha256
12945 (base32
12946 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
12947 (build-system python-build-system)
12948 (home-page "https://gyp.gsrc.io/")
12949 (synopsis "GYP is a Meta-Build system")
12950 (description
12951 "GYP builds build systems for large, cross platform applications.
12952 It can be used to generate XCode projects, Visual Studio projects, Ninja build
12953 files, and Makefiles.")
12954 (license license:bsd-3))))
12955
12956 (define-public python2-gyp
12957 (package-with-python2 python-gyp))
12958
12959 (define-public python-whatever
12960 (package
12961 (name "python-whatever")
12962 (version "0.5")
12963 (source
12964 (origin
12965 (method url-fetch)
12966 (uri (string-append "https://github.com/Suor/whatever/archive/" version
12967 ".tar.gz"))
12968 (sha256
12969 (base32
12970 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
12971 (file-name (string-append name "-" version ".tar.gz"))))
12972 (build-system python-build-system)
12973 (arguments
12974 `(#:phases
12975 (modify-phases %standard-phases
12976 (replace 'check
12977 (lambda _
12978 (invoke "py.test"))))))
12979 (native-inputs
12980 `(("python-pytest" ,python-pytest)))
12981 (home-page "http://github.com/Suor/whatever")
12982 (synopsis "Make anonymous functions by partial application of operators")
12983 (description "@code{whatever} provides an easy way to make anonymous
12984 functions by partial application of operators.")
12985 (license license:bsd-3)))
12986
12987 (define-public python2-whatever
12988 (package-with-python2 python-whatever))
12989
12990 (define-public python-funcy
12991 (package
12992 (name "python-funcy")
12993 (version "1.10")
12994 (source
12995 (origin
12996 (method url-fetch)
12997 (uri (string-append "https://github.com/Suor/funcy/archive/" version
12998 ".tar.gz"))
12999 (sha256
13000 (base32
13001 "1fanxivsip29vgarw6dn39xym3q4pbxcpa11plpp548lvxajpahz"))
13002 (file-name (string-append name "-" version ".tar.gz"))))
13003 (build-system python-build-system)
13004 (arguments
13005 `(#:phases
13006 (modify-phases %standard-phases
13007 (replace 'check
13008 (lambda _
13009 (invoke "py.test"))))))
13010 (native-inputs
13011 `(("python-pytest" ,python-pytest)
13012 ("python-whatever" ,python-whatever)))
13013 (home-page "http://github.com/Suor/funcy")
13014 (synopsis "Functional tools")
13015 (description "@code{funcy} is a library that provides functional tools.
13016 Examples are:
13017 @enumerate
13018 @item merge - Merges collections of the same type
13019 @item walk - Type-preserving map
13020 @item select - Selects a part of a collection
13021 @item take - Takes the first n items of a collection
13022 @item first - Takes the first item of a collection
13023 @item remove - Predicated-removes items of a collection
13024 @item concat - Concatenates two collections
13025 @item flatten - Flattens a collection with subcollections
13026 @item distinct - Returns only distinct items
13027 @item split - Predicated-splits a collection
13028 @item split_at - Splits a collection at a given item
13029 @item group_by - Groups items by group
13030 @item pairwise - Pairs off adjacent items
13031 @item partial - Partially-applies a function
13032 @item curry - Curries a function
13033 @item compose - Composes functions
13034 @item complement - Complements a predicate
13035 @item all_fn - \"all\" with predicate
13036 @end enumerate")
13037 (license license:bsd-3)))
13038
13039 (define-public python2-funcy
13040 (package-with-python2 python-funcy))
13041
13042 (define-public python-isoweek
13043 (package
13044 (name "python-isoweek")
13045 (version "1.3.3")
13046 (source
13047 (origin
13048 (method url-fetch)
13049 (uri (pypi-uri "isoweek" version))
13050 (sha256
13051 (base32
13052 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
13053 (build-system python-build-system)
13054 (home-page "https://github.com/gisle/isoweek")
13055 (synopsis "Objects representing a week")
13056 (description "The @code{isoweek} module provide the class Week that
13057 implements the week definition of ISO 8601. This standard also defines
13058 a notation for identifying weeks; yyyyWww (where the W is a literal).
13059 Week instances stringify to this form.")
13060 (license license:bsd-3)))
13061
13062 (define-public python2-isoweek
13063 (package-with-python2 python-isoweek))
13064
13065 (define-public python-tokenize-rt
13066 (package
13067 (name "python-tokenize-rt")
13068 (version "2.0.1")
13069 (source
13070 (origin
13071 (method url-fetch)
13072 (uri (pypi-uri "tokenize-rt" version))
13073 (sha256
13074 (base32
13075 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
13076 (build-system python-build-system)
13077 (home-page "https://github.com/asottile/tokenize-rt")
13078 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
13079 (description
13080 "This Python library is a wrapper around @code{tokenize} from the Python
13081 standard library. It provides two additional tokens @code{ESCAPED_NL} and
13082 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
13083 and @code{tokens_to_src} to roundtrip.")
13084 (license license:expat)))
13085
13086 (define-public python-future-fstrings
13087 (package
13088 (name "python-future-fstrings")
13089 (version "0.4.1")
13090 (source
13091 (origin
13092 (method url-fetch)
13093 (uri (pypi-uri "future_fstrings" version))
13094 (sha256
13095 (base32
13096 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
13097 (build-system python-build-system)
13098 (propagated-inputs
13099 `(("python-tokenize-rt" ,python-tokenize-rt)))
13100 (home-page "https://github.com/asottile/future-fstrings")
13101 (synopsis "Backport of fstrings to Python < 3.6")
13102 (description
13103 "This package provides a UTF-8 compatible encoding
13104 @code{future_fstrings}, which performs source manipulation. It decodes the
13105 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
13106 @code{f} strings.")
13107 (license license:expat)))
13108
13109 (define-public python-typing
13110 (package
13111 (name "python-typing")
13112 (version "3.6.4")
13113 (source
13114 (origin
13115 (method url-fetch)
13116 (uri (pypi-uri "typing" version))
13117 (sha256
13118 (base32
13119 "1wmk9nkh30n37cbrqwkbggmj2390lhrlagjkd0ikm02l88saj06l"))))
13120 (build-system python-build-system)
13121 (home-page "https://docs.python.org/3/library/typing.html")
13122 (synopsis "Type hints for Python")
13123 (description "This is a backport of the standard library @code{typing}
13124 module to Python versions older than 3.5. Typing defines a standard notation
13125 for Python function and variable type annotations. The notation can be used
13126 for documenting code in a concise, standard format, and it has been designed
13127 to also be used by static and runtime type checkers, static analyzers, IDEs
13128 and other tools.")
13129 (license license:psfl)))
13130
13131 (define-public python2-typing
13132 (package-with-python2 python-typing))
13133
13134 (define-public bpython
13135 (package
13136 (name "bpython")
13137 (version "0.17.1")
13138 (source
13139 (origin
13140 (method url-fetch)
13141 (uri (pypi-uri "bpython" version))
13142 (sha256
13143 (base32
13144 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
13145 (build-system python-build-system)
13146 (arguments
13147 `(#:phases
13148 (modify-phases %standard-phases
13149 (add-after 'unpack 'remove-failing-test
13150 (lambda _
13151 ;; Remove failing test. FIXME: make it pass
13152 (delete-file "bpython/test/test_args.py")
13153 #t))
13154 (add-after 'wrap 'add-aliases
13155 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
13156 (lambda* (#:key outputs #:allow-other-keys)
13157 (let ((out (assoc-ref outputs "out")))
13158 (for-each
13159 (lambda (old new)
13160 (symlink old (string-append out "/bin/" new)))
13161 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
13162 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
13163 #t)))))
13164 (propagated-inputs
13165 `(("python-pygments" ,python-pygments)
13166 ("python-requests" ,python-requests)
13167 ("python-babel" ,python-babel) ; optional, for internationalization
13168 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
13169 ("python-greenlet" ,python-greenlet)
13170 ("python-urwid" ,python-urwid) ; for bpython-urwid only
13171 ("python-six" ,python-six)))
13172 (native-inputs
13173 `(("python-sphinx" ,python-sphinx)
13174 ("python-mock" ,python-mock)))
13175 (home-page "https://bpython-interpreter.org/")
13176 (synopsis "Fancy interface to the Python interpreter")
13177 (description "Bpython is a fancy interface to the Python
13178 interpreter. bpython's main features are
13179
13180 @enumerate
13181 @item in-line syntax highlighting,
13182 @item readline-like autocomplete with suggestions displayed as you type,
13183 @item expected parameter list for any Python function,
13184 @item \"rewind\" function to pop the last line of code from memory and
13185 re-evaluate,
13186 @item send the code you've entered off to a pastebin,
13187 @item save the code you've entered to a file, and
13188 @item auto-indentation.
13189 @end enumerate")
13190 (license license:expat)))
13191
13192 (define-public bpython2
13193 (let ((base (package-with-python2
13194 (strip-python2-variant bpython))))
13195 (package (inherit base)
13196 (name "bpython2")
13197 (arguments
13198 `(#:python ,python-2
13199 #:phases
13200 (modify-phases %standard-phases
13201 (add-after 'unpack 'remove-failing-test
13202 (lambda _
13203 ;; Remove failing test. FIXME: make it pass
13204 (delete-file "bpython/test/test_args.py")
13205 ;; Disable failing test-cases (renaming inhibits they are
13206 ;; discovered)
13207 (substitute* "bpython/test/test_curtsies_repl.py"
13208 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
13209 (string-append a "xxx_off_" b))
13210 (("^(\\s*def )(test_complex\\W)" _ a b)
13211 (string-append a "xxx_off_" b)))
13212 #t))
13213 (add-before 'build 'rename-scripts
13214 ;; rename the scripts to bypthon2, bpdb2, etc.
13215 (lambda _
13216 (substitute* "setup.py"
13217 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
13218 (string-append name "2" rest "\n"))
13219 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
13220 (string-append name "2" (or sub "") rest "\n")))
13221 #t))))))))
13222
13223 (define-public python-pyinotify
13224 (package
13225 (name "python-pyinotify")
13226 (version "0.9.6")
13227 (source (origin
13228 (method url-fetch)
13229 (uri (pypi-uri "pyinotify" version))
13230 (sha256
13231 (base32
13232 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
13233 (build-system python-build-system)
13234 (arguments `(#:tests? #f)) ;no tests
13235 (home-page "https://github.com/seb-m/pyinotify")
13236 (synopsis "Python library for monitoring inotify events")
13237 (description
13238 "@code{pyinotify} provides a Python interface for monitoring
13239 file system events on Linux.")
13240 (license license:expat)))
13241
13242 (define-public python2-pyinotify
13243 (package-with-python2 python-pyinotify))
13244
13245 ;; Ada parser uses this version.
13246 (define-public python2-quex-0.67.3
13247 (package
13248 (name "python2-quex")
13249 (version "0.67.3")
13250 (source
13251 (origin
13252 (method url-fetch)
13253 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
13254 (version-major+minor version)
13255 "/quex-" version ".zip"))
13256 (sha256
13257 (base32
13258 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
13259 (build-system python-build-system)
13260 (native-inputs
13261 `(("unzip" ,unzip)))
13262 (arguments
13263 `(#:python ,python-2
13264 #:tests? #f
13265 #:phases
13266 (modify-phases %standard-phases
13267 (delete 'configure)
13268 (delete 'build)
13269 (replace 'install
13270 (lambda* (#:key outputs #:allow-other-keys)
13271 (let* ((out (assoc-ref outputs "out"))
13272 (share/quex (string-append out "/share/quex"))
13273 (bin (string-append out "/bin")))
13274 (copy-recursively "." share/quex)
13275 (mkdir-p bin)
13276 (symlink (string-append share/quex "/quex-exe.py")
13277 (string-append bin "/quex"))
13278 #t))))))
13279 (native-search-paths
13280 (list (search-path-specification
13281 (variable "QUEX_PATH")
13282 (files '("share/quex")))))
13283 (home-page "http://quex.sourceforge.net/")
13284 (synopsis "Lexical analyzer generator in Python")
13285 (description "@code{quex} is a lexical analyzer generator in Python.")
13286 (license license:lgpl2.1+))) ; Non-military
13287
13288 (define-public python2-quex
13289 (package (inherit python2-quex-0.67.3)
13290 (name "python2-quex")
13291 (version "0.68.1")
13292 (source
13293 (origin
13294 (method url-fetch)
13295 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
13296 (sha256
13297 (base32
13298 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
13299 (file-name (string-append name "-" version ".tar.gz"))))))
13300
13301 (define-public python-more-itertools
13302 (package
13303 (name "python-more-itertools")
13304 (version "4.1.0")
13305 (source
13306 (origin
13307 (method url-fetch)
13308 (uri (pypi-uri "more-itertools" version))
13309 (sha256
13310 (base32
13311 "0i3ch700g5fyjp692gprlnzbysl8w0sa2vijbp3s40drvk67xkn9"))))
13312 (build-system python-build-system)
13313 (propagated-inputs
13314 `(("python-six" ,python-six-bootstrap)))
13315 (home-page "https://github.com/erikrose/more-itertools")
13316 (synopsis "More routines for operating on iterables, beyond itertools")
13317 (description "Python's built-in @code{itertools} module implements a
13318 number of iterator building blocks inspired by constructs from APL, Haskell,
13319 and SML. @code{more-itertools} includes additional building blocks for
13320 working with iterables.")
13321 (license license:expat)))
13322
13323 (define-public python2-more-itertools
13324 (package-with-python2 python-more-itertools))
13325
13326 (define-public python-latexcodec
13327 (package
13328 (name "python-latexcodec")
13329 (version "1.0.5")
13330 (source
13331 (origin
13332 (method url-fetch)
13333 (uri (pypi-uri "latexcodec" version))
13334 (sha256
13335 (base32
13336 "0zdd1gf24i83ykadx0y30n3001j43scqr2saql3vckk5c39dj1wn"))))
13337 (build-system python-build-system)
13338 (inputs
13339 `(("python-six" ,python-six)))
13340 (home-page "https://readthedocs.org/projects/latexcodec/")
13341 (synopsis "Work with LaTeX code in Python")
13342 (description "Lexer and codec to work with LaTeX code in Python.")
13343 (license license:expat)))
13344
13345 (define-public python-pybtex
13346 (package
13347 (name "python-pybtex")
13348 (version "0.21")
13349 (source
13350 (origin
13351 (method url-fetch)
13352 (uri (pypi-uri "pybtex" version))
13353 (sha256
13354 (base32
13355 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
13356 (build-system python-build-system)
13357 (native-inputs
13358 `(("python-nose" ,python-nose)))
13359 (inputs
13360 `(("python-latexcodec" ,python-latexcodec)
13361 ("python-pyyaml" ,python-pyyaml)
13362 ("python-six" ,python-six)))
13363 (arguments
13364 `(#:test-target "nosetests"))
13365 (home-page "https://pybtex.org/")
13366 (synopsis "BibTeX-compatible bibliography processor")
13367 (description "Pybtex is a BibTeX-compatible bibliography processor written
13368 in Python. You can simply type pybtex instead of bibtex.")
13369 (license license:expat)))
13370
13371 (define-public python-onetimepass
13372 (package
13373 (name "python-onetimepass")
13374 (version "1.0.1")
13375 (source
13376 (origin
13377 (method url-fetch)
13378 (uri (pypi-uri "onetimepass" version))
13379 (sha256
13380 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
13381 (build-system python-build-system)
13382 (propagated-inputs `(("python-six" ,python-six)))
13383 (home-page "https://github.com/tadeck/onetimepass/")
13384 (synopsis "One-time password library")
13385 (description "Python one-time password library for HMAC-based (HOTP) and
13386 time-based (TOTP) passwords.")
13387 (license license:expat)))
13388
13389 (define-public python-parso
13390 (package
13391 (name "python-parso")
13392 (version "0.2.0")
13393 (source
13394 (origin
13395 (method url-fetch)
13396 (uri (pypi-uri "parso" version))
13397 (sha256
13398 (base32
13399 "0lamywk6dm5xshlkdvxxf5j6fa2k2zpi7xagf0bwidaay3vnpgb2"))))
13400 (native-inputs
13401 `(("python-pytest" ,python-pytest)))
13402 (build-system python-build-system)
13403 (home-page "https://github.com/davidhalter/parso")
13404 (synopsis "Python Parser")
13405 (description "Parso is a Python parser that supports error recovery and
13406 round-trip parsing for different Python versions (in multiple Python versions).
13407 Parso is also able to list multiple syntax errors in your Python file.")
13408 (license license:expat)))
13409
13410 (define-public python2-parso
13411 (package-with-python2 python-parso))
13412
13413 (define-public python-async-generator
13414 (package
13415 (name "python-async-generator")
13416 (version "1.9")
13417 (source
13418 (origin
13419 (method url-fetch)
13420 (uri (pypi-uri "async_generator" version))
13421 (sha256
13422 (base32
13423 "0wc3hidz1q85cja93k5pzybn0fprfnqyrv4qlkdqdzklc5f4dmdp"))))
13424 (build-system python-build-system)
13425 (native-inputs
13426 `(("python-pytest" ,python-pytest)))
13427 (home-page "https://github.com/python-trio/async_generator")
13428 (synopsis "Async generators and context managers for Python 3.5+")
13429 (description "@code{async_generator} back-ports Python 3.6's native async
13430 generators and Python 3.7's context managers into Python 3.5.")
13431 ;; Dual licensed.
13432 (license (list license:expat license:asl2.0))))
13433
13434 (define-public python-async-timeout
13435 (package
13436 (name "python-async-timeout")
13437 (version "2.0.1")
13438 (source
13439 (origin
13440 (method url-fetch)
13441 (uri (pypi-uri "async-timeout" version))
13442 (sha256
13443 (base32
13444 "1l3kg062m02mph6rf9rdv8r5c5n356clxa6b6mrn0i77vk9g9kq0"))))
13445 (build-system python-build-system)
13446 (home-page "https://github.com/aio-libs/async_timeout/")
13447 (synopsis "Timeout context manager for asyncio programs")
13448 (description "@code{async-timeout} provides a timeout timeout context
13449 manager compatible with @code{asyncio}.")
13450 (license license:asl2.0)))
13451
13452 (define-public python-glob2
13453 (package
13454 (name "python-glob2")
13455 (version "0.6")
13456 (source (origin
13457 (method url-fetch)
13458 (uri (string-append
13459 "https://github.com/miracle2k/python-glob2/archive/"
13460 version
13461 ".tar.gz"))
13462 (sha256
13463 (base32
13464 "0ja168f0dz4kbz4m06dm0rd3acaypk6hjx2km541pw22y9s40mag"))
13465 (file-name (string-append name "-" version ".tar.gz"))))
13466 (build-system python-build-system)
13467 (home-page "https://github.com/miracle2k/python-glob2/")
13468 (synopsis "Extended Version of the python buildin glob module")
13469 (description "This is an extended version of the Python
13470 @url{http://docs.python.org/library/glob.html, built-in glob module} which
13471 adds:
13472
13473 @itemize
13474 @item The ability to capture the text matched by glob patterns, and return
13475 those matches alongside the file names.
13476 @item A recursive @code{**} globbing syntax, akin for example to the
13477 @code{globstar} option of Bash.
13478 @item The ability to replace the file system functions used, in order to glob
13479 on virtual file systems.
13480 @item Compatible with Python 2 and Python 3 (tested with 3.3).
13481 @end itemize
13482
13483 Glob2 currently based on the glob code from Python 3.3.1.")
13484 (license license:bsd-2)))
13485
13486 (define-public python2-glob2
13487 (package-with-python2 python-glob2))
13488
13489 (define-public python-gipc
13490 (package
13491 (name "python-gipc")
13492 (version "0.6.0")
13493 (source
13494 (origin
13495 (method url-fetch)
13496 (uri (pypi-uri "gipc" version ".zip"))
13497 (sha256
13498 (base32
13499 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
13500 (build-system python-build-system)
13501 (native-inputs
13502 `(("unzip" ,unzip)))
13503 (propagated-inputs
13504 `(("python-gevent" ,python-gevent)))
13505 (home-page "http://gehrcke.de/gipc")
13506 (synopsis "Child process management in the context of gevent")
13507 (description "Usage of Python's multiprocessing package in a
13508 gevent-powered application may raise problems. With @code{gipc},
13509 process-based child processes can safely be created anywhere within a
13510 gevent-powered application.")
13511 (license license:expat)))
13512
13513 (define-public python2-gipc
13514 (package-with-python2 python-gipc))
13515
13516 (define-public python-fusepy
13517 (package
13518 (name "python-fusepy")
13519 (version "2.0.4")
13520 (source
13521 (origin
13522 (method url-fetch)
13523 (uri (pypi-uri "fusepy" version))
13524 (sha256
13525 (base32
13526 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
13527 (build-system python-build-system)
13528 (arguments
13529 `(#:phases
13530 (modify-phases %standard-phases
13531 (add-before 'build 'set-library-file-name
13532 (lambda* (#:key inputs #:allow-other-keys)
13533 (let ((fuse (assoc-ref inputs "fuse")))
13534 (substitute* "fuse.py"
13535 (("find_library\\('fuse'\\)")
13536 (string-append "'" fuse "/lib/libfuse.so'")))
13537 #t))))))
13538 (propagated-inputs
13539 `(("fuse" ,fuse)))
13540 (home-page "https://github.com/fusepy/fusepy")
13541 (synopsis "Simple ctypes bindings for FUSE")
13542 (description "Python module that provides a simple interface to FUSE and
13543 MacFUSE. The binding is created using the standard @code{ctypes} library.")
13544 (license license:isc)))
13545
13546 (define-public python2-fusepy
13547 (package-with-python2 python-fusepy))
13548
13549 (define-public python2-gdrivefs
13550 (package
13551 (name "python2-gdrivefs")
13552 (version "0.14.9")
13553 (source
13554 (origin
13555 (method url-fetch)
13556 (uri (pypi-uri "gdrivefs" version))
13557 (sha256
13558 (base32
13559 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
13560 (build-system python-build-system)
13561 (arguments
13562 `(#:python ,python-2
13563 #:phases
13564 (modify-phases %standard-phases
13565 (add-before 'build 'patch-setup-py
13566 (lambda _
13567 ;; Update requirements from dependency==version
13568 ;; to dependency>=version
13569 (substitute* "gdrivefs/resources/requirements.txt"
13570 (("==") ">="))
13571 #t)))))
13572 (native-inputs
13573 `(("python2-gipc" ,python2-gipc)
13574 ("python2-gevent" ,python2-gevent)
13575 ("python2-greenlet" ,python2-greenlet)
13576 ("python2-httplib2" ,python2-httplib2)
13577 ("python2-uritemplate" ,python2-uritemplate)
13578 ("python2-oauth2client" ,python2-oauth2client)
13579 ("python2-six" ,python2-six)))
13580 (propagated-inputs
13581 `(("python2-dateutil" ,python2-dateutil)
13582 ("python2-fusepy" ,python2-fusepy)
13583 ("python2-google-api-client" ,python2-google-api-client)))
13584 (home-page "https://github.com/dsoprea/GDriveFS")
13585 (synopsis "Mount Google Drive as a local file system")
13586 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
13587 under Python 2.7.")
13588 (license license:gpl2)))
13589
13590 (define-public pybind11
13591 (package
13592 (name "pybind11")
13593 (version "2.2.3")
13594 (source (origin
13595 (method url-fetch)
13596 (uri (string-append
13597 "https://github.com/pybind/pybind11/archive/v"
13598 version ".tar.gz"))
13599 (sha256
13600 (base32
13601 "1sj0x4fwsbnwdai5sxpw1l1vh8m5hpbkfk3zanxcbcgs39jpnfrs"))
13602 (file-name (string-append name "-" version ".tar.gz"))))
13603 (build-system cmake-build-system)
13604 (native-inputs
13605 `(("python" ,python)
13606 ("python-pytest" ,python-pytest)))
13607 (arguments
13608 `(#:test-target "check"))
13609 (home-page "https://github.com/pybind/pybind11/")
13610 (synopsis "Seamless operability between C++11 and Python")
13611 (description "pybind11 is a lightweight header-only library that exposes
13612 C++ types in Python and vice versa, mainly to create Python bindings of
13613 existing C++ code. Its goals and syntax are similar to the excellent
13614 Boost.Python library by David Abrahams: to minimize boilerplate code in
13615 traditional extension modules by inferring type information using compile-time
13616 introspection.")
13617 (license license:expat)))