gnu: All snippets report errors using exceptions, else return #t.
[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 ng0 <ng0@infotropique.org>
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 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 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 ;;;
51 ;;; This file is part of GNU Guix.
52 ;;;
53 ;;; GNU Guix is free software; you can redistribute it and/or modify it
54 ;;; under the terms of the GNU General Public License as published by
55 ;;; the Free Software Foundation; either version 3 of the License, or (at
56 ;;; your option) any later version.
57 ;;;
58 ;;; GNU Guix is distributed in the hope that it will be useful, but
59 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
60 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
61 ;;; GNU General Public License for more details.
62 ;;;
63 ;;; You should have received a copy of the GNU General Public License
64 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
65
66 (define-module (gnu packages python)
67 #:use-module ((guix licenses) #:prefix license:)
68 #:use-module (gnu packages)
69 #:use-module (gnu packages algebra)
70 #:use-module (gnu packages adns)
71 #:use-module (gnu packages attr)
72 #:use-module (gnu packages backup)
73 #:use-module (gnu packages bash)
74 #:use-module (gnu packages check)
75 #:use-module (gnu packages compression)
76 #:use-module (gnu packages crypto)
77 #:use-module (gnu packages databases)
78 #:use-module (gnu packages file)
79 #:use-module (gnu packages fontutils)
80 #:use-module (gnu packages gcc)
81 #:use-module (gnu packages geo)
82 #:use-module (gnu packages ghostscript)
83 #:use-module (gnu packages gl)
84 #:use-module (gnu packages glib)
85 #:use-module (gnu packages graphviz)
86 #:use-module (gnu packages graphics)
87 #:use-module (gnu packages gstreamer)
88 #:use-module (gnu packages gtk)
89 #:use-module (gnu packages icu4c)
90 #:use-module (gnu packages image)
91 #:use-module (gnu packages imagemagick)
92 #:use-module (gnu packages libevent)
93 #:use-module (gnu packages libffi)
94 #:use-module (gnu packages linux)
95 #:use-module (gnu packages machine-learning)
96 #:use-module (gnu packages man)
97 #:use-module (gnu packages maths)
98 #:use-module (gnu packages multiprecision)
99 #:use-module (gnu packages networking)
100 #:use-module (gnu packages ncurses)
101 #:use-module (gnu packages openstack)
102 #:use-module (gnu packages password-utils)
103 #:use-module (gnu packages pcre)
104 #:use-module (gnu packages perl)
105 #:use-module (gnu packages pkg-config)
106 #:use-module (gnu packages python-crypto)
107 #:use-module (gnu packages python-web)
108 #:use-module (gnu packages qt)
109 #:use-module (gnu packages readline)
110 #:use-module (gnu packages sdl)
111 #:use-module (gnu packages search)
112 #:use-module (gnu packages shells)
113 #:use-module (gnu packages ssh)
114 #:use-module (gnu packages statistics)
115 #:use-module (gnu packages terminals)
116 #:use-module (gnu packages tex)
117 #:use-module (gnu packages texinfo)
118 #:use-module (gnu packages time)
119 #:use-module (gnu packages tls)
120 #:use-module (gnu packages version-control)
121 #:use-module (gnu packages video)
122 #:use-module (gnu packages web)
123 #:use-module (gnu packages base)
124 #:use-module (gnu packages xml)
125 #:use-module (gnu packages xorg)
126 #:use-module (gnu packages xdisorg)
127 #:use-module (gnu packages tcl)
128 #:use-module (gnu packages bdw-gc)
129 #:use-module (guix packages)
130 #:use-module (guix download)
131 #:use-module (guix git-download)
132 #:use-module (guix utils)
133 #:use-module (guix build-system gnu)
134 #:use-module (guix build-system cmake)
135 #:use-module (guix build-system python)
136 #:use-module (guix build-system trivial)
137 #:use-module (srfi srfi-1))
138
139 (define-public python-2.7
140 (package
141 (name "python")
142 (version "2.7.14")
143 (source
144 (origin
145 (method url-fetch)
146 (uri (string-append "https://www.python.org/ftp/python/"
147 version "/Python-" version ".tar.xz"))
148 (sha256
149 (base32
150 "0rka541ys16jwzcnnvjp2v12m4cwgd2jp6wj4kj511p715pb5zvi"))
151 (patches (search-patches "python-2.7-search-paths.patch"
152 "python-2-deterministic-build-info.patch"
153 "python-2.7-site-prefixes.patch"
154 "python-2.7-source-date-epoch.patch"
155 "python-2.7-adjust-tests.patch"))
156 (modules '((guix build utils)))
157 ;; suboptimal to delete failing tests here, but if we delete them in the
158 ;; arguments then we need to make sure to strip out that phase when it
159 ;; gets inherited by python and python-minimal.
160 (snippet
161 '(begin
162 (for-each delete-file
163 '("Lib/test/test_compileall.py"
164 "Lib/test/test_ctypes.py" ; fails on mips64el
165 "Lib/test/test_distutils.py"
166 "Lib/test/test_import.py"
167 "Lib/test/test_shutil.py"
168 "Lib/test/test_socket.py"
169 "Lib/test/test_subprocess.py"))
170 #t))))
171 (outputs '("out"
172 "tk")) ;tkinter; adds 50 MiB to the closure
173 (build-system gnu-build-system)
174 (arguments
175 `(;; 356 tests OK.
176 ;; 6 tests failed:
177 ;; test_compileall test_distutils test_import test_shutil test_socket
178 ;; test_subprocess
179 ;; 39 tests skipped:
180 ;; test_aepack test_al test_applesingle test_bsddb test_bsddb185
181 ;; test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
182 ;; test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
183 ;; test_dl test_gdb test_gl test_imageop test_imgfile test_ioctl
184 ;; test_kqueue test_linuxaudiodev test_macos test_macostools
185 ;; test_msilib test_ossaudiodev test_scriptpackages test_smtpnet
186 ;; test_socketserver test_startfile test_sunaudiodev test_timeout
187 ;; test_tk test_ttk_guionly test_urllib2net test_urllibnet
188 ;; test_winreg test_winsound test_zipfile64
189 ;; 4 skips unexpected on linux2:
190 ;; test_bsddb test_bsddb3 test_gdb test_ioctl
191 #:test-target "test"
192 #:configure-flags
193 (list "--enable-shared" ;allow embedding
194 "--with-system-ffi" ;build ctypes
195 "--with-ensurepip=install" ;install pip and setuptools
196 "--enable-unicode=ucs4"
197 (string-append "LDFLAGS=-Wl,-rpath="
198 (assoc-ref %outputs "out") "/lib"))
199
200 #:modules ((ice-9 ftw) (ice-9 match)
201 (guix build utils) (guix build gnu-build-system))
202 #:phases
203 (modify-phases %standard-phases
204 (add-before
205 'configure 'patch-lib-shells
206 (lambda _
207 ;; Filter for existing files, since some may not exist in all
208 ;; versions of python that are built with this recipe.
209 (substitute* (filter file-exists?
210 '("Lib/subprocess.py"
211 "Lib/popen2.py"
212 "Lib/distutils/tests/test_spawn.py"
213 "Lib/test/support/__init__.py"
214 "Lib/test/test_subprocess.py"))
215 (("/bin/sh") (which "sh")))
216
217 ;; Use zero as the timestamp in .pyc files so that builds are
218 ;; deterministic. TODO: Remove it when this variable is set in
219 ;; gnu-build-system.scm.
220 (setenv "SOURCE_DATE_EPOCH" "1")
221 #t))
222 (add-before 'configure 'do-not-record-configure-flags
223 (lambda* (#:key configure-flags #:allow-other-keys)
224 ;; Remove configure flags from the installed '_sysconfigdata.py'
225 ;; and 'Makefile' so we don't end up keeping references to the
226 ;; build tools.
227 ;;
228 ;; Preserve at least '--with-system-ffi' since otherwise the
229 ;; thing tries to build libffi, fails, and we end up with a
230 ;; Python that lacks ctypes.
231 (substitute* "configure"
232 (("^CONFIG_ARGS=.*$")
233 (format #f "CONFIG_ARGS='~a'\n"
234 (if (member "--with-system-ffi" configure-flags)
235 "--with-system-ffi"
236 ""))))
237 #t))
238 (add-before
239 'check 'pre-check
240 (lambda _
241 ;; 'Lib/test/test_site.py' needs a valid $HOME
242 (setenv "HOME" (getcwd))
243 #t))
244 (add-after
245 'unpack 'set-source-file-times-to-1980
246 ;; XXX One of the tests uses a ZIP library to pack up some of the
247 ;; source tree, and fails with "ZIP does not support timestamps
248 ;; before 1980". Work around this by setting the file times in the
249 ;; source tree to sometime in early 1980.
250 (lambda _
251 (let ((circa-1980 (* 10 366 24 60 60)))
252 (ftw "." (lambda (file stat flag)
253 (utime file circa-1980 circa-1980)
254 #t))
255 #t)))
256 (add-after 'install 'remove-tests
257 ;; Remove 25 MiB of unneeded unit tests. Keep test_support.*
258 ;; because these files are used by some libraries out there.
259 (lambda* (#:key outputs #:allow-other-keys)
260 (let ((out (assoc-ref outputs "out")))
261 (match (scandir (string-append out "/lib")
262 (lambda (name)
263 (string-prefix? "python" name)))
264 ((pythonX.Y)
265 (let ((testdir (string-append out "/lib/" pythonX.Y
266 "/test")))
267 (with-directory-excursion testdir
268 (for-each delete-file-recursively
269 (scandir testdir
270 (match-lambda
271 ((or "." "..") #f)
272 (file
273 (not
274 (string-prefix? "test_support."
275 file))))))
276 (call-with-output-file "__init__.py" (const #t))
277 #t)))))))
278 (add-before 'strip 'make-libraries-writable
279 (lambda* (#:key outputs #:allow-other-keys)
280 ;; Make .so files writable so they can be stripped.
281 (let ((out (assoc-ref outputs "out")))
282 (for-each (lambda (file)
283 (chmod file #o755))
284 (find-files (string-append out "/lib")
285 "\\.so"))
286 #t)))
287 (add-after 'install 'move-tk-inter
288 (lambda* (#:key outputs #:allow-other-keys)
289 ;; When Tkinter support is built move it to a separate output so
290 ;; that the main output doesn't contain a reference to Tcl/Tk.
291 (let ((out (assoc-ref outputs "out"))
292 (tk (assoc-ref outputs "tk")))
293 (when tk
294 (match (find-files out "tkinter.*\\.so")
295 ((tkinter.so)
296 ;; The .so is in OUT/lib/pythonX.Y/lib-dynload, but we
297 ;; want it under TK/lib/pythonX.Y/site-packages.
298 (let* ((len (string-length out))
299 (target (string-append
300 tk "/"
301 (string-drop
302 (dirname (dirname tkinter.so))
303 len)
304 "/site-packages")))
305 (install-file tkinter.so target)
306 (delete-file tkinter.so)))))
307 #t))))))
308 (inputs
309 `(("bzip2" ,bzip2)
310 ("gdbm" ,gdbm)
311 ("libffi" ,libffi) ; for ctypes
312 ("sqlite" ,sqlite) ; for sqlite extension
313 ("openssl" ,openssl)
314 ("readline" ,readline)
315 ("zlib" ,zlib)
316 ("tcl" ,tcl)
317 ("tk" ,tk))) ; for tkinter
318 (native-inputs
319 `(("pkg-config" ,pkg-config)))
320 (native-search-paths
321 (list (search-path-specification
322 (variable "PYTHONPATH")
323 (files '("lib/python2.7/site-packages")))))
324 (home-page "https://www.python.org")
325 (synopsis "High-level, dynamically-typed programming language")
326 (description
327 "Python is a remarkably powerful dynamic programming language that
328 is used in a wide variety of application domains. Some of its key
329 distinguishing features include: clear, readable syntax; strong
330 introspection capabilities; intuitive object orientation; natural
331 expression of procedural code; full modularity, supporting hierarchical
332 packages; exception-based error handling; and very high level dynamic
333 data types.")
334 (license license:psfl)))
335
336 ;; Current 2.x version.
337 (define-public python-2 python-2.7)
338
339 (define-public python-3.6
340 (package (inherit python-2)
341 (version "3.6.4")
342 (source (origin
343 (method url-fetch)
344 (uri (string-append "https://www.python.org/ftp/python/"
345 version "/Python-" version ".tar.xz"))
346 (patches (search-patches
347 "python-fix-tests.patch"
348 "python-3-fix-tests.patch"
349 "python-3-deterministic-build-info.patch"
350 "python-3-search-paths.patch"))
351 (patch-flags '("-p0"))
352 (sha256
353 (base32
354 "1fna7g8jxzl4kd2pqmmqhva5724c5m920x3fsrpsgskaylmr76qm"))
355 (snippet
356 '(begin
357 (for-each delete-file
358 '("Lib/ctypes/test/test_structures.py" ; fails on aarch64
359 "Lib/ctypes/test/test_win32.py" ; fails on aarch64
360 "Lib/test/test_fcntl.py")) ; fails on aarch64
361 #t))))
362 (arguments
363 (substitute-keyword-arguments (package-arguments python-2)
364 ((#:tests? _) #t)
365 ((#:phases phases)
366 `(modify-phases ,phases
367 (add-after 'unpack 'patch-timestamp-for-pyc-files
368 (lambda _
369 ;; We set DETERMINISTIC_BUILD to only override the mtime when
370 ;; building with Guix, lest we break auto-compilation in
371 ;; environments.
372 (setenv "DETERMINISTIC_BUILD" "1")
373 (substitute* "Lib/py_compile.py"
374 (("source_stats\\['mtime'\\]")
375 "(1 if 'DETERMINISTIC_BUILD' in os.environ else source_stats['mtime'])"))
376
377 ;; Use deterministic hashes for strings, bytes, and datetime
378 ;; objects.
379 (setenv "PYTHONHASHSEED" "0")
380
381 ;; Reset mtime when validating bytecode header.
382 (substitute* "Lib/importlib/_bootstrap_external.py"
383 (("source_mtime = int\\(source_stats\\['mtime'\\]\\)")
384 "source_mtime = 1"))
385 #t))
386 ;; These tests fail because of our change to the bytecode
387 ;; validation. They fail because expected exceptions do not get
388 ;; thrown. This seems to be no problem.
389 (add-after 'unpack 'disable-broken-bytecode-tests
390 (lambda _
391 (substitute* "Lib/test/test_importlib/source/test_file_loader.py"
392 (("test_bad_marshal")
393 "disable_test_bad_marshal")
394 (("test_no_marshal")
395 "disable_test_no_marshal")
396 (("test_non_code_marshal")
397 "disable_test_non_code_marshal"))
398 #t))
399 ;; Unset DETERMINISTIC_BUILD to allow for tests that check that
400 ;; stale pyc files are rebuilt.
401 (add-before 'check 'allow-non-deterministic-compilation
402 (lambda _ (unsetenv "DETERMINISTIC_BUILD") #t))
403 ;; We need to rebuild all pyc files for three different
404 ;; optimization levels to replace all files that were not built
405 ;; deterministically.
406
407 ;; FIXME: Without this phase we have close to 2000 files that
408 ;; differ across different builds of this package. With this phase
409 ;; there are about 500 files left that differ.
410 (add-after 'install 'rebuild-bytecode
411 (lambda* (#:key outputs #:allow-other-keys)
412 (setenv "DETERMINISTIC_BUILD" "1")
413 (let ((out (assoc-ref outputs "out")))
414 (for-each
415 (lambda (opt)
416 (format #t "Compiling with optimization level: ~a\n"
417 (if (null? opt) "none" (car opt)))
418 (for-each (lambda (file)
419 (apply invoke
420 `(,(string-append out "/bin/python3")
421 ,@opt
422 "-m" "compileall"
423 "-f" ; force rebuild
424 ;; Don't build lib2to3, because it's Python 2 code.
425 ;; Also don't build obviously broken test code.
426 "-x" "(lib2to3|test/bad.*)"
427 ,file)))
428 (find-files out "\\.py$")))
429 (list '() '("-O") '("-OO"))))))))))
430 (native-search-paths
431 (list (search-path-specification
432 (variable "PYTHONPATH")
433 (files (list (string-append "lib/python"
434 (version-major+minor version)
435 "/site-packages"))))))))
436
437 ;; Current 3.x version.
438 (define-public python-3 python-3.6)
439
440 ;; Current major version.
441 (define-public python python-3)
442
443 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
444 ;; Python (Tk -> libxcb -> Python.)
445
446 (define-public python2-minimal
447 (package (inherit python-2)
448 (name "python-minimal")
449 (outputs '("out"))
450
451 ;; Keep zlib, which is used by 'pip' (via the 'zipimport' module), which
452 ;; is invoked upon 'make install'. 'pip' also expects 'ctypes' and thus
453 ;; libffi.
454 (inputs `(("libffi" ,libffi)
455 ("zlib" ,zlib)))))
456
457 (define-public python-minimal
458 (package (inherit python)
459 (name "python-minimal")
460 (outputs '("out"))
461
462 ;; Build fails due to missing ctypes without libffi.
463 ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
464 ;; zlib is required by 'zipimport', used by pip.
465 (inputs `(("libffi" ,libffi)
466 ("openssl" ,openssl)
467 ("zlib" ,zlib)))))
468
469 (define* (wrap-python3 python
470 #:optional
471 (name (string-append (package-name python) "-wrapper")))
472 (package (inherit python)
473 (name name)
474 (source #f)
475 (build-system trivial-build-system)
476 (outputs '("out"))
477 (inputs `(("bash" ,bash)))
478 (propagated-inputs `(("python" ,python)))
479 (arguments
480 `(#:modules ((guix build utils))
481 #:builder
482 (begin
483 (use-modules (guix build utils))
484 (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))
485 (python (string-append (assoc-ref %build-inputs "python") "/bin/")))
486 (mkdir-p bin)
487 (for-each
488 (lambda (old new)
489 (symlink (string-append python old)
490 (string-append bin "/" new)))
491 `("python3" ,"pydoc3" ,"idle3" ,"pip3")
492 `("python" ,"pydoc" ,"idle" ,"pip"))
493 ;; python-config outputs search paths based upon its location,
494 ;; use a bash wrapper to avoid changing its outputs.
495 (let ((bash (string-append (assoc-ref %build-inputs "bash")
496 "/bin/bash"))
497 (old (string-append python "python3-config"))
498 (new (string-append bin "/python-config")))
499 (with-output-to-file new
500 (lambda ()
501 (format #t "#!~a~%" bash)
502 (format #t "exec \"~a\" \"$@\"~%" old)
503 (chmod new #o755)
504 #t)))))))
505 (synopsis "Wrapper for the Python 3 commands")
506 (description
507 "This package provides wrappers for the commands of Python@tie{}3.x such
508 that they can be invoked under their usual name---e.g., @command{python}
509 instead of @command{python3}.")))
510
511 (define-public python-wrapper (wrap-python3 python))
512 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
513
514 (define-public python-psutil
515 (package
516 (name "python-psutil")
517 (version "5.4.3")
518 (source
519 (origin
520 (method url-fetch)
521 (uri (pypi-uri "psutil" version))
522 (sha256
523 (base32
524 "063v69x7spyclyaxrd3gmzj3p16q5ayg97xqhwb1kyn22a9pwip2"))))
525 (build-system python-build-system)
526 (arguments
527 ;; FIXME: some tests does not return and times out.
528 '(#:tests? #f))
529 (home-page "https://www.github.com/giampaolo/psutil")
530 (synopsis "Library for retrieving information on running processes")
531 (description
532 "psutil (Python system and process utilities) is a library for retrieving
533 information on running processes and system utilization (CPU, memory, disks,
534 network) in Python. It is useful mainly for system monitoring, profiling and
535 limiting process resources and management of running processes. It implements
536 many functionalities offered by command line tools such as: ps, top, lsof,
537 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
538 pidof, tty, taskset, pmap.")
539 (properties `((python2-variant . ,(delay python2-psutil))))
540 (license license:bsd-3)))
541
542 (define-public python2-psutil
543 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
544 (package
545 (inherit base)
546 (propagated-inputs
547 `(("python2-enum34" ,python2-enum34) ;optional
548 ,@(package-propagated-inputs base))))))
549
550 (define-public python-shapely
551 (package
552 (name "python-shapely")
553 (version "1.6.3")
554 (source
555 (origin
556 (method url-fetch)
557 (uri (pypi-uri "Shapely" version))
558 (sha256
559 (base32
560 "0svc58dzcw9gj92b4sgq35sdxkf85z0qwlzxarkzq4bp3h8jy58l"))))
561 (build-system python-build-system)
562 (native-inputs
563 `(("python-cython" ,python-cython)
564 ("python-matplotlib" ,python-matplotlib)
565 ("python-pytest" ,python-pytest)
566 ("python-pytest-cov" ,python-pytest-cov)))
567 (inputs
568 `(("geos" ,geos)))
569 (propagated-inputs
570 `(("python-numpy" ,python-numpy)))
571 (arguments
572 `(#:phases
573 (modify-phases %standard-phases
574 (add-after 'unpack 'patch-geos-path
575 (lambda* (#:key inputs #:allow-other-keys)
576 (let ((geos (assoc-ref inputs "geos"))
577 (glibc (assoc-ref inputs ,(if (%current-target-system)
578 "cross-libc" "libc"))))
579 (substitute* "shapely/geos.py"
580 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
581 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
582 geos "/lib/libgeos_c.so'])"))
583 (("free = load_dll\\('c'\\)\\.free")
584 (string-append "free = load_dll('c', fallbacks=['"
585 glibc "/lib/libc.so.6']).free"))))
586 #t)))))
587 (home-page "https://github.com/Toblerity/Shapely")
588 (synopsis "Library for the manipulation and analysis of geometric objects")
589 (description "Shapely is a Python package for manipulation and analysis of
590 planar geometric objects. It is based on the @code{GEOS} library.")
591 (license license:bsd-3)))
592
593 (define-public python2-shapely
594 (package-with-python2 python-shapely))
595
596 (define-public python-clyent
597 (package
598 (name "python-clyent")
599 (version "1.2.1")
600 (source
601 (origin
602 (method url-fetch)
603 (uri (pypi-uri "clyent" version))
604 (sha256
605 (base32
606 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
607 (build-system python-build-system)
608 (native-inputs
609 `(("python-mock" ,python-mock)))
610 (home-page "https://github.com/binstar/clyent")
611 (synopsis "Command line client library")
612 (description "Clyent is a Python command line utiliy library. It is used
613 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
614 (license license:bsd-3)))
615
616 (define-public python2-clyent
617 (package-with-python2 python-clyent))
618
619 (define-public python-babel
620 (package
621 (name "python-babel")
622 (version "2.3.4")
623 (source
624 (origin
625 (method url-fetch)
626 (uri (pypi-uri "Babel" version))
627 (sha256
628 (base32
629 "0x98qqqw35xllpcama013a9788ly84z8dm1w2wwfpxh2710c8df5"))))
630 (build-system python-build-system)
631 (propagated-inputs
632 `(("python-pytz" ,python-pytz)))
633 (arguments `(#:tests? #f)) ; no test target
634 (home-page "http://babel.pocoo.org/")
635 (synopsis
636 "Tools for internationalizing Python applications")
637 (description
638 "Babel is composed of two major parts:
639 - tools to build and work with gettext message catalogs
640 - a Python interface to the CLDR (Common Locale Data Repository), providing
641 access to various locale display names, localized number and date formatting,
642 etc. ")
643 (license license:bsd-3)))
644
645 (define-public python2-babel
646 (package-with-python2 python-babel))
647
648 (define-public python2-backport-ssl-match-hostname
649 (package
650 (name "python2-backport-ssl-match-hostname")
651 (version "3.5.0.1")
652 (source
653 (origin
654 (method url-fetch)
655 (uri (string-append
656 "https://pypi.python.org/packages/source/b/"
657 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
658 version ".tar.gz"))
659 (sha256
660 (base32
661 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
662 (build-system python-build-system)
663 (arguments
664 `(#:python ,python-2
665 #:tests? #f)) ; no test target
666 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
667 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
668 (description
669 "This backport brings the ssl.match_hostname() function to users of
670 earlier versions of Python. The function checks the hostname in the
671 certificate returned by the server to which a connection has been established,
672 and verifies that it matches the intended target hostname.")
673 (license license:psfl)))
674
675 (define-public python-hdf4
676 (package
677 (name "python-hdf4")
678 (version "0.9")
679 (source
680 (origin
681 (method url-fetch)
682 (uri (pypi-uri name version))
683 (sha256
684 (base32
685 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
686 (build-system python-build-system)
687 (native-inputs `(("nose" ,python-nose)))
688 (propagated-inputs `(("numpy" ,python-numpy)))
689 (inputs
690 `(("hdf4" ,hdf4)
691 ("libjpeg" ,libjpeg)
692 ("zlib" ,zlib)))
693 (arguments
694 `(#:phases
695 (modify-phases %standard-phases
696 (replace 'check
697 (lambda _
698 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
699 ;; on to import numpy. Somehow this works on their CI system.
700 ;; Let's just manage PYTHONPATH here instead.
701 (substitute* "runexamples.sh"
702 (("export PYTHONPATH=.*") ""))
703 (setenv "PYTHONPATH"
704 (string-append (getcwd) ":"
705 (getenv "PYTHONPATH")))
706 (and (zero? (system* "./runexamples.sh"))
707 (zero? (system* "nosetests" "-v"))))))))
708 (home-page "https://github.com/fhs/python-hdf4")
709 (synopsis "Python interface to the NCSA HDF4 library")
710 (description
711 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
712 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
713 NetCDF files can also be read and modified. Python-HDF4 is a fork of
714 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
715 (license license:expat)))
716
717 (define-public python2-hdf4
718 (package-with-python2 python-hdf4))
719
720 (define-public python-h5py
721 (package
722 (name "python-h5py")
723 (version "2.7.0")
724 (source
725 (origin
726 (method url-fetch)
727 (uri (pypi-uri "h5py" version))
728 (sha256
729 (base32
730 "0433sdv6xc9p7v1xs1gvbxp7p152ywi3nplgjb258q9fvw9469br"))))
731 (build-system python-build-system)
732 (arguments
733 `(#:tests? #f ; no test target
734 #:phases
735 (modify-phases %standard-phases
736 (add-after 'unpack 'fix-hdf5-paths
737 (lambda* (#:key inputs #:allow-other-keys)
738 (let ((prefix (assoc-ref inputs "hdf5")))
739 (substitute* "setup_build.py"
740 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
741 (string-append "['" prefix "/lib" "']"))
742 (("'/opt/local/include', '/usr/local/include'")
743 (string-append "'" prefix "/include" "'")))
744 (substitute* "setup_configure.py"
745 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
746 (string-append "['" prefix "/lib" "']")))
747 #t))))))
748 (propagated-inputs
749 `(("python-six" ,python-six)
750 ("python-numpy" ,python-numpy)))
751 (inputs
752 `(("hdf5" ,hdf5)))
753 (native-inputs
754 `(("python-cython" ,python-cython)
755 ("python-pkgconfig" ,python-pkgconfig)))
756 (home-page "http://www.h5py.org/")
757 (synopsis "Read and write HDF5 files from Python")
758 (description
759 "The h5py package provides both a high- and low-level interface to the
760 HDF5 library from Python. The low-level interface is intended to be a
761 complete wrapping of the HDF5 API, while the high-level component supports
762 access to HDF5 files, datasets and groups using established Python and NumPy
763 concepts.")
764 (license license:bsd-3)))
765
766 (define-public python2-h5py
767 (package-with-python2 python-h5py))
768
769 (define-public python-netcdf4
770 (package
771 (name "python-netcdf4")
772 (version "1.2.9")
773 (source
774 (origin
775 (method url-fetch)
776 (uri (pypi-uri "netCDF4" version))
777 (sha256
778 (base32
779 "1h6jq338amlbk0ilzvjyl7cck80i0bah9a5spn9in71vy2qxm7i5"))))
780 (build-system python-build-system)
781 (native-inputs
782 `(("python-cython" ,python-cython)))
783 (propagated-inputs
784 `(("python-numpy" ,python-numpy)))
785 (inputs
786 `(("netcdf" ,netcdf)
787 ("hdf4" ,hdf4)
788 ("hdf5" ,hdf5)))
789 (arguments
790 '(#:phases
791 (modify-phases %standard-phases
792 (replace 'check
793 (lambda _
794 (setenv "NO_NET" "1") ; disable opendap tests
795 (with-directory-excursion "test"
796 (setenv "PYTHONPATH" ; find and add the library we just built
797 (string-append
798 (car (find-files "../build" "lib.*"
799 #:directories? #:t
800 #:fail-on-error? #:t))
801 ":" (getenv "PYTHONPATH")))
802 (zero? (system* "python" "run_all.py"))))))))
803 (home-page
804 "https://github.com/Unidata/netcdf4-python")
805 (synopsis "Python/numpy interface to the netCDF library")
806 (description "Netcdf4-python is a Python interface to the netCDF C
807 library. netCDF version 4 has many features not found in earlier
808 versions of the library and is implemented on top of HDF5. This module
809 can read and write files in both the new netCDF 4 and the old netCDF 3
810 format, and can create files that are readable by HDF5 clients. The
811 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
812 to users of that module.")
813 ;; The software is mainly ISC, but includes some files covered
814 ;; by the Expat license.
815 (license (list license:isc license:expat))))
816
817 (define-public python2-netcdf4
818 (package-with-python2 python-netcdf4))
819
820 (define-public python-lockfile
821 (package
822 (name "python-lockfile")
823 (version "0.12.2")
824 (source
825 (origin
826 (method url-fetch)
827 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
828 "lockfile-" version ".tar.gz"))
829 (sha256
830 (base32
831 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
832 (build-system python-build-system)
833 (arguments '(#:test-target "check"))
834 (native-inputs
835 `(("python-pbr" ,python-pbr)))
836 (home-page "https://launchpad.net/pylockfile")
837 (synopsis "Platform-independent file locking module")
838 (description
839 "The lockfile package exports a LockFile class which provides a simple
840 API for locking files.")
841 (license license:expat)))
842
843 (define-public python2-lockfile
844 (package-with-python2 python-lockfile))
845
846 (define-public python-setuptools
847 (package
848 (name "python-setuptools")
849 (version "31.0.0")
850 (source
851 (origin
852 (method url-fetch)
853 (uri (pypi-uri "setuptools" version))
854 (sha256
855 (base32
856 "0ypybh4hx3bv4vhg2dc74xpj1g56ggnaffm87k4abhwjwq6wq608"))
857 (modules '((guix build utils)))
858 (snippet
859 '(begin
860 ;; Remove included binaries which are used to build self-extracting
861 ;; installers for Windows.
862 ;; TODO: Find some way to build them ourself so we can include them.
863 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
864 #t))))
865 (build-system python-build-system)
866 ;; FIXME: Tests require pytest, which itself relies on setuptools.
867 ;; One could bootstrap with an internal untested setuptools.
868 (arguments
869 `(#:tests? #f))
870 (home-page "https://pypi.python.org/pypi/setuptools")
871 (synopsis
872 "Library designed to facilitate packaging Python projects")
873 (description
874 "Setuptools is a fully-featured, stable library designed to facilitate
875 packaging Python projects, where packaging includes:
876 Python package and module definitions,
877 distribution package metadata,
878 test hooks,
879 project installation,
880 platform-specific details,
881 Python 3 support.")
882 ;; TODO: setuptools now bundles the following libraries:
883 ;; packaging, pyparsing, six and appdirs. How to unbundle?
884 (license (list license:psfl ; setuptools itself
885 license:expat ; six, appdirs, pyparsing
886 license:asl2.0 ; packaging is dual ASL2/BSD-2
887 license:bsd-2))))
888
889 (define-public python2-setuptools
890 (package-with-python2 python-setuptools))
891
892 (define-public python-uniseg
893 (package
894 (name "python-uniseg")
895 (version "0.7.1")
896 (source
897 (origin
898 (method url-fetch)
899 (uri (pypi-uri "uniseg" version ".zip"))
900 (sha256
901 (base32
902 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
903 (build-system python-build-system)
904 (arguments
905 '(#:tests? #f)) ; The test suite requires network access.
906 (native-inputs
907 `(("unzip" ,unzip)))
908 (home-page
909 "https://bitbucket.org/emptypage/uniseg-python")
910 (synopsis
911 "Python library to determine Unicode text segmentations")
912 (description
913 "Uniseg is a Python package used to determine Unicode text segmentations.
914 Supported segmentations include:
915 @enumerate
916 @item @dfn{Code point} (any value in the Unicode codespace)
917 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
918 multiple Unicode code points, e.g. \"G\" + acute-accent)
919 @item Word break
920 @item Sentence break
921 @item Line break
922 @end enumerate")
923 (license license:expat)))
924
925 (define-public python2-uniseg
926 (package-with-python2 python-uniseg))
927
928 (define-public python-humanfriendly
929 (package
930 (name "python-humanfriendly")
931 (version "4.4.1")
932 (source
933 (origin
934 (method url-fetch)
935 (uri (pypi-uri "humanfriendly" version))
936 (sha256
937 (base32
938 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
939 (build-system python-build-system)
940 (arguments
941 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
942 #:tests? #f))
943 (propagated-inputs
944 `(("python-monotonic" ,python-monotonic)))
945 (home-page "https://humanfriendly.readthedocs.io")
946 (synopsis "Human-friendly input and output in Python")
947 (description
948 "The functions and classes in @code{humanfriendly} can be used to make
949 text interfaces more user-friendly. It includes tools to parse and format
950 numbers, file sizes, and timespans, timers for long-running operations, menus
951 to allow the user to choose from a list of options, and terminal interaction
952 helpers.")
953 (license license:expat)))
954
955 (define-public python2-humanfriendly
956 (package-with-python2 python-humanfriendly))
957
958 (define-public python-capturer
959 (package
960 (name "python-capturer")
961 (version "2.4")
962 (source
963 (origin
964 (method url-fetch)
965 (uri (pypi-uri "capturer" version))
966 (sha256
967 (base32
968 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
969 (build-system python-build-system)
970 (arguments
971 `(#:tests? #f))
972 (propagated-inputs
973 `(("python-humanfriendly" ,python-humanfriendly)))
974 (home-page "https://capturer.readthedocs.io")
975 (synopsis "Capture stdout and stderr streams of the current process")
976 (description
977 "The capturer package makes it easy to capture the stdout and stderr
978 streams of the current process and subprocesses. Output can be relayed
979 to the terminal in real time but is also available to the Python program
980 for additional processing.")
981 (license license:expat)))
982
983 (define-public python2-capturer
984 (package-with-python2 python-capturer))
985
986 (define-public python-verboselogs
987 (package
988 (name "python-verboselogs")
989 (version "1.7")
990 (source
991 (origin
992 (method url-fetch)
993 (uri (pypi-uri "verboselogs" version))
994 (sha256
995 (base32
996 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
997 (build-system python-build-system)
998 (native-inputs
999 `(("python-mock" ,python-mock)
1000 ("python-astroid" ,python-astroid)
1001 ("python-pylint" ,python-pylint)))
1002 (home-page "https://verboselogs.readthedocs.io")
1003 (synopsis "Verbose logging level for Python's logging module")
1004 (description
1005 "The @code{verboselogs} package extends Python's @code{logging} module to
1006 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1007 (license license:expat)))
1008
1009 (define-public python2-verboselogs
1010 (package-with-python2 python-verboselogs))
1011
1012 (define-public python-coloredlogs
1013 (package
1014 (name "python-coloredlogs")
1015 (version "7.3")
1016 (source
1017 (origin
1018 (method url-fetch)
1019 (uri (pypi-uri "coloredlogs" version))
1020 (sha256
1021 (base32
1022 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
1023 (build-system python-build-system)
1024 (arguments
1025 `(;Tests require some updated modules
1026 #:tests? #f))
1027 (propagated-inputs
1028 `(("python-capturer" ,python-capturer)))
1029 (home-page "https://coloredlogs.readthedocs.io")
1030 (synopsis "Colored stream handler for Python's logging module")
1031 (description
1032 "The @code{coloredlogs} package enables colored terminal output for
1033 Python's logging module. The @code{ColoredFormatter} class inherits from
1034 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
1035 messages in color.")
1036 (license license:expat)))
1037
1038 (define-public python2-coloredlogs
1039 (package-with-python2 python-coloredlogs))
1040
1041 (define-public python-eventlet
1042 (package
1043 (name "python-eventlet")
1044 (version "0.20.1")
1045 (source
1046 (origin
1047 (method url-fetch)
1048 (uri (pypi-uri "eventlet" version))
1049 (sha256
1050 (base32
1051 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1052 (build-system python-build-system)
1053 (propagated-inputs
1054 `(("python-greenlet" ,python-greenlet)))
1055 (arguments
1056 ;; TODO: Requires unpackaged 'enum-compat'.
1057 '(#:tests? #f))
1058 (home-page "http://eventlet.net")
1059 (synopsis "Concurrent networking library for Python")
1060 (description
1061 "Eventlet is a concurrent networking library for Python that
1062 allows you to change how you run your code, not how you write it.
1063 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1064 Coroutines ensure that the developer uses a blocking style of programming
1065 that is similar to threading, but provide the benefits of non-blocking I/O.
1066 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1067 from the Python interpreter, or as a small part of a larger application.")
1068 (license license:expat)))
1069
1070 (define-public python2-eventlet
1071 (let ((base (package-with-python2
1072 (strip-python2-variant python-eventlet))))
1073 (package (inherit base)
1074 (propagated-inputs
1075 `(("python2-enum34" ,python2-enum34)
1076 ,@(package-propagated-inputs base))))))
1077
1078 (define-public python-six
1079 (package
1080 (name "python-six")
1081 (version "1.11.0")
1082 (source
1083 (origin
1084 (method url-fetch)
1085 (uri (pypi-uri "six" version))
1086 (sha256
1087 (base32
1088 "1scqzwc51c875z23phj48gircqjgnn3af8zy2izjwmnlxrxsgs3h"))))
1089 (build-system python-build-system)
1090 (arguments
1091 `(#:phases
1092 (modify-phases %standard-phases
1093 (replace 'check
1094 (lambda _
1095 (invoke "py.test" "-v"))))))
1096 (native-inputs
1097 `(("python-py" ,python-py)
1098 ("python-pytest" ,python-pytest-bootstrap)))
1099 (home-page "https://pypi.python.org/pypi/six/")
1100 (synopsis "Python 2 and 3 compatibility utilities")
1101 (description
1102 "Six is a Python 2 and 3 compatibility library. It provides utility
1103 functions for smoothing over the differences between the Python versions with
1104 the goal of writing Python code that is compatible on both Python versions.
1105 Six supports every Python version since 2.5. It is contained in only one
1106 Python file, so it can be easily copied into your project.")
1107 (license license:x11)))
1108
1109 (define-public python2-six
1110 (package-with-python2 python-six))
1111
1112 (define-public python-schedule
1113 (package
1114 (name "python-schedule")
1115 (version "0.4.3")
1116 (source
1117 (origin
1118 (method url-fetch)
1119 (uri (pypi-uri "schedule" version))
1120 (sha256
1121 (base32
1122 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1123 (build-system python-build-system)
1124 (native-inputs
1125 `(("python-pytest" ,python-pytest)
1126 ("python-mock" ,python-mock)))
1127 (home-page "https://github.com/dbader/schedule")
1128 (synopsis "Schedule periodic function calls in Python")
1129 (description
1130 "Schedule is an in-process scheduler for periodic jobs that uses the
1131 builder pattern for configuration. Schedule lets you run Python functions (or
1132 any other callable) periodically at pre-determined intervals using a simple,
1133 human-friendly syntax.")
1134 (license license:expat)))
1135
1136 (define-public python2-schedule
1137 (package-with-python2 python-schedule))
1138
1139 (define-public python-pandas
1140 (package
1141 (name "python-pandas")
1142 (version "0.22.0")
1143 (source
1144 (origin
1145 (method url-fetch)
1146 (uri (pypi-uri "pandas" version))
1147 (sha256
1148 (base32 "0v0fi2i10kwnmlpsl6f1fgajcpx3q6766qf6xqi5kw3ivn8l1aa4"))))
1149 (build-system python-build-system)
1150 (arguments
1151 `(#:modules ((guix build utils)
1152 (guix build python-build-system)
1153 (ice-9 ftw)
1154 (srfi srfi-26))
1155 #:phases (modify-phases %standard-phases
1156 (replace 'check
1157 (lambda _
1158 (let ((build-directory
1159 (string-append
1160 (getcwd) "/build/"
1161 (car (scandir "build"
1162 (cut string-prefix? "lib." <>))))))
1163 (with-directory-excursion build-directory
1164 ;; Delete tests that require "moto" which is not yet in Guix.
1165 (for-each delete-file
1166 '("pandas/tests/io/conftest.py"
1167 "pandas/tests/io/json/test_compression.py"
1168 "pandas/tests/io/test_excel.py"))
1169 (invoke "pytest" "-v" "pandas" "-k"
1170 (string-append
1171 "not network and not disabled"
1172 ;; XXX: Due to the deleted tests above.
1173 " and not test_read_s3_jsonl")))))))))
1174 (propagated-inputs
1175 `(("python-numpy" ,python-numpy)
1176 ("python-pytz" ,python-pytz)
1177 ("python-dateutil" ,python-dateutil)))
1178 (native-inputs
1179 `(("python-cython" ,python-cython)
1180 ("python-lxml" ,python-lxml)
1181 ("python-nose" ,python-nose)
1182 ("python-pytest" ,python-pytest)))
1183 (home-page "https://pandas.pydata.org")
1184 (synopsis "Data structures for data analysis, time series, and statistics")
1185 (description
1186 "Pandas is a Python package providing fast, flexible, and expressive data
1187 structures designed to make working with structured (tabular,
1188 multidimensional, potentially heterogeneous) and time series data both easy
1189 and intuitive. It aims to be the fundamental high-level building block for
1190 doing practical, real world data analysis in Python.")
1191 (license license:bsd-3)))
1192
1193 (define-public python2-pandas
1194 (package-with-python2 python-pandas))
1195
1196 (define-public python2-mechanize
1197 (package
1198 (name "python2-mechanize")
1199 (version "0.2.5")
1200 (source
1201 (origin
1202 (method url-fetch)
1203 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1204 version ".tar.gz"))
1205 (sha256
1206 (base32
1207 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1208 (build-system python-build-system)
1209 (arguments
1210 `(#:python ,python-2 ; apparently incompatible with Python 3
1211 #:tests? #f))
1212 ;; test fails with message
1213 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1214 ;; (python-3.3.2) or
1215 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1216 ;; (python-2.7.5).
1217 ;; The source code is from March 2011 and probably not up-to-date
1218 ;; with respect to python unit tests.
1219 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1220 (synopsis
1221 "Stateful programmatic web browsing in Python")
1222 (description
1223 "Mechanize implements stateful programmatic web browsing in Python,
1224 after Andy Lester’s Perl module WWW::Mechanize.")
1225 (license (license:non-copyleft
1226 "file://COPYING"
1227 "See COPYING in the distribution."))))
1228
1229
1230 (define-public python-simplejson
1231 (package
1232 (name "python-simplejson")
1233 (version "3.10.0")
1234 (source
1235 (origin
1236 (method url-fetch)
1237 (uri (pypi-uri "simplejson" version))
1238 (sha256
1239 (base32
1240 "1qhwsykjlb85igb4cfl6v6gkprzbbg8gyqdd7zscc8w3x0ifcfwm"))))
1241 (build-system python-build-system)
1242 (home-page "http://simplejson.readthedocs.org/en/latest/")
1243 (synopsis
1244 "Json library for Python")
1245 (description
1246 "JSON (JavaScript Object Notation) is a subset of JavaScript
1247 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1248 format.
1249
1250 Simplejson exposes an API familiar to users of the standard library marshal
1251 and pickle modules. It is the externally maintained version of the json
1252 library contained in Python 2.6, but maintains compatibility with Python 2.5
1253 and (currently) has significant performance advantages, even without using
1254 the optional C extension for speedups. Simplejson is also supported on
1255 Python 3.3+.")
1256 (license license:x11)))
1257
1258 (define-public python2-simplejson
1259 (package-with-python2 python-simplejson))
1260
1261
1262 (define-public python-pyicu
1263 (package
1264 (name "python-pyicu")
1265 (version "1.9.8")
1266 (source
1267 (origin
1268 (method url-fetch)
1269 (uri (pypi-uri "PyICU" version))
1270 (sha256
1271 (base32
1272 "05nz4p2dpkhwj6y9kik24xbvmfxji39nl0xw0sc0nvp9fgzf6xnd"))))
1273 (build-system python-build-system)
1274 (inputs
1275 `(("icu4c" ,icu4c)))
1276 (native-inputs
1277 `(("python-pytest" ,python-pytest)
1278 ("python-six" ,python-six)))
1279 (home-page "https://github.com/ovalhub/pyicu")
1280 (synopsis "Python extension wrapping the ICU C++ API")
1281 (description
1282 "PyICU is a python extension wrapping the ICU C++ API.")
1283 (properties `((python2-variant . ,(delay python2-pyicu))))
1284 (license license:x11)))
1285
1286 (define-public python2-pyicu
1287 (let ((base (package-with-python2
1288 (strip-python2-variant python-pyicu))))
1289 (package
1290 (inherit base)
1291 (arguments
1292 `(,@(package-arguments base)
1293 #:phases
1294 (modify-phases %standard-phases
1295 (add-before 'check 'delete-failing-test
1296 (λ _
1297 ;; XXX: This fails due to Unicode issues unique to Python 2,
1298 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1299 (delete-file "test/test_Script.py")
1300 #t))))))))
1301
1302 (define-public python2-dogtail
1303 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1304 ;; spaces in indentation" with Python 3.
1305 (package
1306 (name "python2-dogtail")
1307 (version "0.9.9")
1308 (source (origin
1309 (method url-fetch)
1310 (uri (pypi-uri "dogtail" version))
1311 (sha256
1312 (base32
1313 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1314 (build-system python-build-system)
1315 (arguments `(#:python ,python-2
1316 #:tests? #f)) ; invalid command "test"
1317 ;; Currently no offical homepage.
1318 (home-page "https://pypi.python.org/pypi/dogtail/")
1319 (synopsis "GUI test tool and automation framework written in Python")
1320 (description
1321 "Dogtail is a GUI test tool and automation framework written in Python.
1322 It uses Accessibility (a11y) technologies to communicate with desktop
1323 applications. dogtail scripts are written in Python and executed like any
1324 other Python program.")
1325 (license license:gpl2+)))
1326
1327 (define-public python2-empy
1328 (package
1329 (name "python2-empy")
1330 (version "3.3")
1331 (source (origin
1332 (method url-fetch)
1333 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1334 version ".tar.gz"))
1335 (sha256
1336 (base32
1337 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1338 (build-system python-build-system)
1339 (arguments
1340 `(#:python ,python-2
1341 #:phases
1342 (modify-phases %standard-phases
1343 (replace 'check
1344 (lambda _
1345 (zero? (system* "./test.sh")))))))
1346 (home-page "http://www.alcyone.com/software/empy/")
1347 (synopsis "Templating system for Python")
1348 (description
1349 "EmPy is a system for embedding Python expressions and statements in
1350 template text; it takes an EmPy source file, processes it, and produces
1351 output. This is accomplished via expansions, which are special signals to the
1352 EmPy system and are set off by a special prefix (by default the at sign, @@).
1353 EmPy can expand arbitrary Python expressions and statements in this way, as
1354 well as a variety of special forms. Textual data not explicitly delimited in
1355 this way is sent unaffected to the output, allowing Python to be used in
1356 effect as a markup language. Also supported are callbacks via hooks,
1357 recording and playback via diversions, and dynamic, chainable filters. The
1358 system is highly configurable via command line options and embedded
1359 commands.")
1360 (license license:lgpl2.1+)))
1361
1362 (define-public python2-element-tree
1363 (package
1364 (name "python2-element-tree")
1365 (version "1.2.6")
1366 (source (origin
1367 (method url-fetch)
1368 (uri (string-append
1369 "http://effbot.org/media/downloads/elementtree-"
1370 version "-20050316.tar.gz"))
1371 (sha256
1372 (base32
1373 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1374 (build-system python-build-system)
1375 (arguments
1376 `(#:python ,python-2 ; seems to be part of Python 3
1377 #:tests? #f)) ; no 'test' sub-command
1378 (synopsis "Toolkit for XML processing in Python")
1379 (description
1380 "ElementTree is a Python library supporting lightweight XML processing.")
1381 (home-page "http://effbot.org/zone/element-index.htm")
1382 (license (license:x11-style
1383 "http://docs.python.org/2/license.html"
1384 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1385
1386 (define-public python2-pybugz
1387 (package
1388 (name "python2-pybugz")
1389 (version "0.6.11")
1390 (source (origin
1391 (method url-fetch)
1392 (uri (string-append
1393 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1394 version ".tar.gz"))
1395 (sha256
1396 (base32
1397 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1398 (patches (search-patches "pybugz-stty.patch"
1399 "pybugz-encode-error.patch"))))
1400 (build-system python-build-system)
1401 (arguments
1402 `(#:python ,python-2 ; SyntaxError with Python 3
1403 #:tests? #f)) ; no 'test' sub-command
1404 (propagated-inputs
1405 `(("element-tree" ,python2-element-tree)))
1406 (synopsis "Python and command-line interface to Bugzilla")
1407 (description
1408 "PyBugz is a Python library and command-line tool to query the Bugzilla
1409 bug tracking system. It is meant as an aid to speed up interaction with the
1410 bug tracker.")
1411 (home-page "http://www.liquidx.net/pybugz/")
1412 (license license:gpl2)))
1413
1414 (define-public python2-enum
1415 (package
1416 (name "python2-enum")
1417 (version "0.4.6")
1418 (source (origin
1419 (method url-fetch)
1420 (uri (pypi-uri "enum" version))
1421 (sha256
1422 (base32
1423 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1424 (build-system python-build-system)
1425 (arguments
1426 `(#:python ,python-2))
1427 (home-page "http://pypi.python.org/pypi/enum/")
1428 (synopsis "Robust enumerated type support in Python")
1429 (description
1430 "This provides a module for robust enumerations in Python. It has
1431 been superseded by the Python standard library and is provided only for
1432 compatibility.")
1433 ;; Choice of either license.
1434 (license (list license:gpl3+ license:psfl))))
1435
1436 (define-public python-enum34
1437 (package
1438 (name "python-enum34")
1439 (version "1.1.6")
1440 (source
1441 (origin
1442 (method url-fetch)
1443 (uri (pypi-uri "enum34" version))
1444 (sha256
1445 (base32
1446 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1447 (build-system python-build-system)
1448 (home-page "https://pypi.python.org/pypi/enum34")
1449 (synopsis "Backported Python 3.4 Enum")
1450 (description
1451 "Enum34 is the new Python stdlib enum module available in Python 3.4
1452 backported for previous versions of Python from 2.4 to 3.3.")
1453 (license license:bsd-3)))
1454
1455 (define-public python2-enum34
1456 (package-with-python2 python-enum34))
1457
1458 (define-public python-parse-type
1459 (package
1460 (name "python-parse-type")
1461 (version "0.4.2")
1462 (source
1463 (origin
1464 (method url-fetch)
1465 (uri (pypi-uri "parse_type" version))
1466 (sha256
1467 (base32
1468 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1469 (build-system python-build-system)
1470 (propagated-inputs
1471 `(("python-six" ,python-six)
1472 ("python-parse" ,python-parse)))
1473 (native-inputs
1474 `(("python-pytest" ,python-pytest)
1475 ("python-pytest-runner" ,python-pytest-runner)))
1476 (home-page "https://github.com/jenisys/parse_type")
1477 (synopsis "Extended parse module")
1478 (description
1479 "Parse_type extends the python parse module.")
1480 (properties
1481 `((python2-variant . ,(delay python2-parse-type))))
1482 (license license:bsd-3)))
1483
1484 (define-public python2-parse-type
1485 (let ((base (package-with-python2
1486 (strip-python2-variant python-parse-type))))
1487 (package (inherit base)
1488 (propagated-inputs
1489 `(("python2-enum34" ,python2-enum34)
1490 ,@(package-propagated-inputs base))))))
1491
1492 (define-public python-parse
1493 (package
1494 (name "python-parse")
1495 (version "1.8.2")
1496 (source
1497 (origin
1498 (method url-fetch)
1499 (uri (pypi-uri "parse" version))
1500 (sha256
1501 (base32
1502 "1lj9v1q4imszyhvipb6drsm3xdl35nan011mqxxas1yaypixsj40"))))
1503 (build-system python-build-system)
1504 (arguments
1505 `(#:phases
1506 (modify-phases %standard-phases
1507 (replace 'check
1508 (lambda _ (invoke "python" "test_parse.py"))))))
1509 (home-page "https://github.com/r1chardj0n3s/parse")
1510 (synopsis "Parse strings")
1511 (description
1512 "Parse strings using a specification based on the Python format()
1513 syntax.")
1514 (license license:x11)))
1515
1516 (define-public python-polib
1517 (package
1518 (name "python-polib")
1519 (version "1.0.8")
1520 (source (origin
1521 (method url-fetch)
1522 (uri (pypi-uri "polib" version))
1523 (sha256
1524 (base32
1525 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1526 (build-system python-build-system)
1527 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1528 (synopsis "Manipulate, create and modify gettext files")
1529 (description "Polib can manipulate any gettext format (po, pot and mo)
1530 files. It can be used to create po files from scratch or to modify
1531 existing ones.")
1532 (license license:expat)))
1533
1534 (define-public python2-polib
1535 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1536 (package
1537 (inherit base)
1538 (arguments `(,@(package-arguments base)
1539 ;; Tests don't work with python2.
1540 #:tests? #f)))))
1541
1542 (define-public scons
1543 (package
1544 (name "scons")
1545 (version "3.0.1")
1546 (source (origin
1547 (method url-fetch)
1548 (uri (string-append "mirror://sourceforge/scons/scons/" version
1549 "/scons-" version ".tar.gz"))
1550 (sha256
1551 (base32
1552 "0wzid419mlwqw9llrg8gsx4nkzhqy16m4m40r0xnh6cwscw5wir4"))))
1553 (build-system python-build-system)
1554 (arguments
1555 `(#:use-setuptools? #f ; still relies on distutils
1556 #:tests? #f)) ; no 'python setup.py test' command
1557 (home-page "http://scons.org/")
1558 (synopsis "Software construction tool written in Python")
1559 (description
1560 "SCons is a software construction tool. Think of SCons as an improved,
1561 cross-platform substitute for the classic Make utility with integrated
1562 functionality similar to autoconf/automake and compiler caches such as ccache.
1563 In short, SCons is an easier, more reliable and faster way to build
1564 software.")
1565 (license license:x11)))
1566
1567 (define-public scons-python2
1568 (package
1569 (inherit (package-with-python2 scons))
1570 (name "scons-python2")))
1571
1572 (define-public python-extras
1573 (package
1574 (name "python-extras")
1575 (version "1.0.0")
1576 (source
1577 (origin
1578 (method url-fetch)
1579 (uri (pypi-uri "extras" version))
1580 (sha256
1581 (base32
1582 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1583 (build-system python-build-system)
1584 (arguments
1585 ;; FIXME: Circular dependency on testtools.
1586 '(#:tests? #f))
1587 (home-page "https://github.com/testing-cabal/extras")
1588 (synopsis "Useful extensions to the Python standard library")
1589 (description
1590 "Extras is a set of extensions to the Python standard library.")
1591 (license license:expat)))
1592
1593 (define-public python2-extras
1594 (package-with-python2 python-extras))
1595
1596 (define-public python-mimeparse
1597 (package
1598 (name "python-mimeparse")
1599 (version "0.1.4")
1600 (source
1601 (origin
1602 (method url-fetch)
1603 (uri (string-append
1604 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1605 version ".tar.gz"))
1606 (sha256
1607 (base32
1608 "1hyxg09kaj02ri0rmwjqi86wk4nd1akvv7n0dx77azz76wga4s9w"))))
1609 (build-system python-build-system)
1610 (arguments
1611 '(#:tests? #f)) ; no setup.py test command
1612 (home-page
1613 "https://github.com/dbtsai/python-mimeparse")
1614 (synopsis "Python library for parsing MIME types")
1615 (description
1616 "Mimeparse provides basic functions for parsing MIME type names and
1617 matching them against a list of media-ranges.")
1618 (license license:expat)))
1619
1620 (define-public python2-mimeparse
1621 (package-with-python2 python-mimeparse))
1622
1623 (define-public python-pafy
1624 (package
1625 (name "python-pafy")
1626 (version "0.5.3.1")
1627 (source
1628 (origin
1629 (method url-fetch)
1630 (uri (pypi-uri "pafy" version))
1631 (sha256
1632 (base32
1633 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1634 (build-system python-build-system)
1635 (arguments
1636 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1637 (propagated-inputs
1638 ;; Youtube-dl is a python package which is imported in the file
1639 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1640 `(("youtube-dl" ,youtube-dl)))
1641 (home-page "https://np1.github.io/pafy/")
1642 (synopsis "Retrieve YouTube content and metadata")
1643 (description
1644 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1645 (license license:lgpl3+)))
1646
1647 (define-public python2-funcsigs
1648 (package
1649 (name "python2-funcsigs")
1650 (version "1.0.2")
1651 (source (origin
1652 (method url-fetch)
1653 (uri (pypi-uri "funcsigs" version))
1654 (sha256
1655 (base32
1656 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1657 (build-system python-build-system)
1658 (arguments
1659 `(#:python ,python-2))
1660 (native-inputs
1661 `(("python2-unittest2" ,python2-unittest2)))
1662 (home-page "http://funcsigs.readthedocs.org")
1663 (synopsis "Python function signatures from PEP362")
1664 (description
1665 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1666 (license license:asl2.0)))
1667
1668 (define-public python-pafy
1669 (package
1670 (name "python-pafy")
1671 (version "0.5.3.1")
1672 (source
1673 (origin
1674 (method url-fetch)
1675 (uri (pypi-uri "pafy" version))
1676 (sha256
1677 (base32
1678 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1679 (build-system python-build-system)
1680 (arguments
1681 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1682 (propagated-inputs
1683 ;; Youtube-dl is a python package which is imported in the file
1684 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1685 `(("youtube-dl" ,youtube-dl)))
1686 (home-page "https://np1.github.io/pafy/")
1687 (synopsis "Retrieve YouTube content and metadata")
1688 (description
1689 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1690 (license license:lgpl3+)))
1691
1692 (define-public python-py
1693 (package
1694 (name "python-py")
1695 (version "1.4.34")
1696 (source
1697 (origin
1698 (method url-fetch)
1699 (uri (pypi-uri "py" version))
1700 (sha256
1701 (base32
1702 "1qyd5z0hv8ymxy84v5vig3vps2fvhcf4bdlksb3r03h549fmhb8g"))))
1703 (build-system python-build-system)
1704 (arguments
1705 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1706 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1707 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1708 ;; Is this module globally installed?"
1709 '(#:tests? #f))
1710 (home-page "http://pylib.readthedocs.org/")
1711 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1712 (description
1713 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1714 code introspection, and logging.")
1715 (license license:expat)))
1716
1717 (define-public python2-py
1718 (package-with-python2 python-py))
1719
1720 ;; Recent versions of python-fixtures and python-testrepository need
1721 ;; python-pbr for packaging, which itself needs these two packages for
1722 ;; testing.
1723 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1724 ;; same source, just without any test dependencies and with tests disabled.
1725 ;; python-pbr-minmal is then used to package python-fixtures and
1726 ;; python-testrepository.
1727 ;; Strictly speaking we currently could remove the test-requirements from the
1728 ;; normal python-pbr package (and save this package) since test are disabled
1729 ;; there anyway. But this may change in future.
1730 (define-public python-pbr-minimal
1731 (package
1732 (name "python-pbr-minimal")
1733 (version "3.0.1")
1734 (source
1735 (origin
1736 (method url-fetch)
1737 (uri (pypi-uri "pbr" version))
1738 (sha256
1739 (base32
1740 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1741 (build-system python-build-system)
1742 (arguments
1743 `(#:tests? #f))
1744 (home-page "http://docs.openstack.org/developer/pbr/")
1745 (synopsis "Minimal build of python-pbr used for bootstrapping")
1746 (description
1747 "Used only for bootstrapping python2-pbr, you should not need this.")
1748 (license license:asl2.0)))
1749
1750 (define-public python2-pbr-minimal
1751 (package-with-python2 python-pbr-minimal))
1752
1753 (define-public python-pbr
1754 (package
1755 (inherit python-pbr-minimal)
1756 (name "python-pbr")
1757 (arguments
1758 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1759 (propagated-inputs
1760 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1761 (native-inputs
1762 `(("python-fixtures" ,python-fixtures-bootstrap)
1763 ;; discover, coverage, hacking, subunit
1764 ("python-mock" ,python-mock)
1765 ("python-six" ,python-six)
1766 ("python-sphinx" ,python-sphinx)
1767 ("python-testrepository" ,python-testrepository-bootstrap)
1768 ("python-testresources" ,python-testresources-bootstrap)
1769 ("python-testscenarios" ,python-testscenarios-bootstrap)
1770 ("python-testtools" ,python-testtools-bootstrap)
1771 ("python-virtualenv" ,python-virtualenv)))
1772 (synopsis "Enhance the default behavior of Python’s setuptools")
1773 (description
1774 "Python Build Reasonableness (PBR) is a library that injects some useful
1775 and sensible default behaviors into your setuptools run. It will set
1776 versions, process requirements files and generate AUTHORS and ChangeLog file
1777 from git information.
1778 ")))
1779
1780 (define-public python2-pbr
1781 (package-with-python2 python-pbr))
1782
1783 (define-public python-exif-read
1784 (package
1785 (name "python-exif-read")
1786 (version "2.1.2")
1787 (source (origin
1788 (method url-fetch)
1789 (uri (pypi-uri "ExifRead" version))
1790 (sha256
1791 (base32
1792 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1793 (build-system python-build-system)
1794 (arguments `(#:tests? #f)) ; no tests
1795 (home-page "https://github.com/ianare/exif-py")
1796 (synopsis "Python library to extract EXIF data from image files")
1797 (description
1798 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1799 files.")
1800 (license license:bsd-3)))
1801
1802 (define-public python2-exif-read
1803 (package-with-python2 python-exif-read))
1804
1805 (define-public python-pyld
1806 (package
1807 (name "python-pyld")
1808 (version "0.7.1")
1809 (source (origin
1810 (method url-fetch)
1811 (uri (pypi-uri "PyLD" version))
1812 (sha256
1813 (base32
1814 "1m0fs6897vxfkf7awah5i66i7b7smm5fnywf1w50fpzyfbfhr156"))))
1815 (build-system python-build-system)
1816 (arguments `(#:tests? #f)) ; no tests
1817 (home-page "https://github.com/digitalbazaar/pyld")
1818 (synopsis "Python implementation of the JSON-LD specification")
1819 (description
1820 "PyLD is an implementation of the JSON-LD specification.")
1821 (license license:bsd-3)))
1822
1823 (define-public python2-pyld
1824 (package-with-python2 python-pyld))
1825
1826 (define-public python-click
1827 (package
1828 (name "python-click")
1829 (version "6.7")
1830 (source
1831 (origin
1832 (method url-fetch)
1833 (uri (pypi-uri "click" version))
1834 (sha256
1835 (base32
1836 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
1837 (build-system python-build-system)
1838 (arguments
1839 `(;; The tests are fragile, depending on a specific version of pytest:
1840 ;; <https://github.com/pallets/click/issues/823>
1841 #:tests? #f
1842 #:phases
1843 (modify-phases %standard-phases
1844 (add-after 'unpack 'fix-paths
1845 (lambda* (#:key inputs #:allow-other-keys)
1846 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1847 "cross-libc" "libc"))))
1848 (substitute* "click/_unicodefun.py"
1849 (("'locale'")
1850 (string-append "'" glibc "/bin/locale'"))))
1851 #t)))))
1852 (native-inputs
1853 `(("python-pytest" ,python-pytest)))
1854 (home-page "http://click.pocoo.org")
1855 (synopsis "Command line library for Python")
1856 (description
1857 "Click is a Python package for creating command line interfaces in a
1858 composable way with as little code as necessary. Its name stands for
1859 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1860 with sensible defaults out of the box.")
1861 (license license:bsd-3)))
1862
1863 (define-public python2-click
1864 (package-with-python2 python-click))
1865
1866 (define-public python-wheel
1867 (package
1868 (name "python-wheel")
1869 (version "0.30.0a0")
1870 (source
1871 (origin
1872 (method url-fetch)
1873 (uri (pypi-uri "wheel" version))
1874 (sha256
1875 (base32
1876 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
1877 (build-system python-build-system)
1878 (native-inputs
1879 `(("python-jsonschema" ,python-jsonschema)
1880 ("python-pytest-cov" ,python-pytest-cov)))
1881 (home-page "https://bitbucket.org/pypa/wheel/")
1882 (synopsis "Format for built Python packages")
1883 (description
1884 "A wheel is a ZIP-format archive with a specially formatted filename and
1885 the @code{.whl} extension. It is designed to contain all the files for a PEP
1886 376 compatible install in a way that is very close to the on-disk format. Many
1887 packages will be properly installed with only the @code{Unpack} step and the
1888 unpacked archive preserves enough information to @code{Spread} (copy data and
1889 scripts to their final locations) at any later time. Wheel files can be
1890 installed with a newer @code{pip} or with wheel's own command line utility.")
1891 (license license:expat)
1892 (properties `((python2-variant . ,(delay python2-wheel))))))
1893
1894 (define-public python2-wheel
1895 (let ((wheel (package-with-python2
1896 (strip-python2-variant python-wheel))))
1897 (package (inherit wheel)
1898 (native-inputs `(("python2-functools32" ,python2-functools32)
1899 ,@(package-native-inputs wheel))))))
1900
1901 (define-public python-vcversioner
1902 (package
1903 (name "python-vcversioner")
1904 (version "2.16.0.0")
1905 (source
1906 (origin
1907 (method url-fetch)
1908 (uri (pypi-uri "vcversioner" version))
1909 (sha256
1910 (base32
1911 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1912 (build-system python-build-system)
1913 (synopsis "Python library for version number discovery")
1914 (description "Vcversioner is a Python library that inspects tagging
1915 information in a variety of version control systems in order to discover
1916 version numbers.")
1917 (home-page "https://github.com/habnabit/vcversioner")
1918 (license license:isc)))
1919
1920 (define-public python2-vcversioner
1921 (package-with-python2 python-vcversioner))
1922
1923 (define-public python-jsonschema
1924 (package
1925 (name "python-jsonschema")
1926 (version "2.5.1")
1927 (source (origin
1928 (method url-fetch)
1929 (uri
1930 (string-append
1931 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
1932 version ".tar.gz"))
1933 (sha256
1934 (base32
1935 "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn"))))
1936 (build-system python-build-system)
1937 (arguments
1938 '(#:phases
1939 (modify-phases %standard-phases
1940 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
1941 (native-inputs
1942 `(("python-nose" ,python-nose)
1943 ("python-vcversioner" ,python-vcversioner)))
1944 (home-page "https://github.com/Julian/jsonschema")
1945 (synopsis "Implementation of JSON Schema for Python")
1946 (description
1947 "Jsonschema is an implementation of JSON Schema for Python.")
1948 (license license:expat)
1949 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1950
1951 (define-public python2-jsonschema
1952 (let ((jsonschema (package-with-python2
1953 (strip-python2-variant python-jsonschema))))
1954 (package (inherit jsonschema)
1955 (native-inputs
1956 `(("python2-mock" ,python2-mock)
1957 ,@(package-native-inputs jsonschema)))
1958 (propagated-inputs
1959 `(("python2-functools32" ,python2-functools32))))))
1960
1961 (define-public python-schema
1962 (package
1963 (name "python-schema")
1964 (version "0.6.6")
1965 (source
1966 (origin
1967 (method url-fetch)
1968 (uri (pypi-uri "schema" version))
1969 (sha256
1970 (base32
1971 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
1972 (build-system python-build-system)
1973 (native-inputs
1974 `(("python-pytest" ,python-pytest)))
1975 (home-page "https://github.com/keleshev/schema")
1976 (synopsis "Simple data validation library")
1977 (description
1978 "@code{python-schema} is a library for validating Python data
1979 structures, such as those obtained from config-files, forms, external
1980 services or command-line parsing, converted from JSON/YAML (or
1981 something else) to Python data-types.")
1982 (license license:psfl)))
1983
1984 (define-public python2-schema
1985 (package-with-python2 python-schema))
1986
1987 (define-public python-schema-0.5
1988 (package (inherit python-schema)
1989 (version "0.5.0")
1990 (source
1991 (origin
1992 (method url-fetch)
1993 (uri (pypi-uri "schema" version))
1994 (sha256
1995 (base32
1996 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
1997
1998 (define-public python2-schema-0.5
1999 (package-with-python2 python-schema-0.5))
2000
2001 (define-public python-kitchen
2002 (package
2003 (name "python-kitchen")
2004 (version "1.2.5")
2005 (source
2006 (origin
2007 (method url-fetch)
2008 (uri (pypi-uri "kitchen" version))
2009 (sha256
2010 (base32
2011 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2012 (build-system python-build-system)
2013 (propagated-inputs
2014 `(("python-chardet" ,python-chardet)))
2015 (home-page "https://github.com/fedora-infra/kitchen")
2016 (synopsis "Python API for snippets")
2017 (description "@code{kitchen} module provides a python API for all sorts of
2018 little useful snippets of code that everybody ends up writing for their projects
2019 but never seem big enough to build an independent release. Use kitchen and stop
2020 cutting and pasting that code over and over.")
2021 (license (list license:lgpl2.1+
2022 ;; subprocess.py, test_subprocess.py,
2023 ;; kitchen/pycompat25/defaultdict.py:
2024 license:psfl))))
2025
2026 (define-public python2-kitchen
2027 (package-with-python2 python-kitchen))
2028
2029 (define-public python-unidecode
2030 (package
2031 (name "python-unidecode")
2032 (version "0.04.21")
2033 (source (origin
2034 (method url-fetch)
2035 (uri (pypi-uri "Unidecode" version))
2036 (sha256
2037 (base32
2038 "0lfhp9c5xrbpjvbpr12ji52g1lx04404bzzdg6pvabhzisw6l2i8"))))
2039 (build-system python-build-system)
2040 (home-page "https://pypi.python.org/pypi/Unidecode")
2041 (synopsis "ASCII transliterations of Unicode text")
2042 (description
2043 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2044 useful when integrating with legacy code that doesn't support Unicode, or for
2045 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2046 machine identifiers from human-readable Unicode strings that should still be
2047 somewhat intelligible.")
2048 (license license:gpl2+)))
2049
2050 (define-public python2-unidecode
2051 (package-with-python2 python-unidecode))
2052
2053 (define-public python-pyjwt
2054 (package
2055 (name "python-pyjwt")
2056 (version "1.5.3")
2057 (source
2058 (origin
2059 (method url-fetch)
2060 (uri (pypi-uri "PyJWT" version))
2061 (sha256
2062 (base32
2063 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2064 (modules '((guix build utils)))
2065 (snippet
2066 '(begin
2067 (for-each delete-file-recursively
2068 (find-files "." "\\.pyc$"))
2069 #t))))
2070 (build-system python-build-system)
2071 (native-inputs
2072 `(("python-pytest" ,python-pytest)
2073 ("python-pytest-cov" ,python-pytest-cov)
2074 ("python-pytest-runner" ,python-pytest-runner)))
2075 (home-page "https://github.com/progrium/pyjwt")
2076 (synopsis "JSON Web Token implementation in Python")
2077 (description
2078 "PyJWT is a JSON Web Token implementation written in Python.")
2079 (license license:expat)))
2080
2081 (define-public python2-pyjwt
2082 (package-with-python2 python-pyjwt))
2083
2084 (define-public python-pykka
2085 (package
2086 (name "python-pykka")
2087 (version "1.2.1")
2088 (source
2089 (origin
2090 (method url-fetch)
2091 (uri (pypi-uri "Pykka" version))
2092 (sha256
2093 (base32
2094 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2095 (build-system python-build-system)
2096 (native-inputs
2097 `(("python-mock" ,python-mock)
2098 ("python-nose" ,python-nose)
2099 ("python-gevent" ,python-gevent)
2100 ("python-eventlet" ,python-eventlet)))
2101 (home-page "https://www.pykka.org/")
2102 (synopsis "Pykka is a Python implementation of the actor model")
2103 (description
2104 "Pykka is a Python implementation of the actor model.
2105 The actor model introduces some simple rules to control the sharing
2106 of state and cooperation between execution units, which makes it
2107 easier to build concurrent applications.")
2108 (license license:asl2.0)))
2109
2110 (define-public python2-pykka
2111 (package-with-python2 python-pykka))
2112
2113 (define-public python-itsdangerous
2114 (package
2115 (name "python-itsdangerous")
2116 (version "0.24")
2117 (source
2118 (origin
2119 (method url-fetch)
2120 (uri (string-append
2121 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
2122 version ".tar.gz"))
2123 (sha256
2124 (base32
2125 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
2126 (build-system python-build-system)
2127 (home-page "https://github.com/mitsuhiko/itsdangerous")
2128 (synopsis "Python library for passing data to/from untrusted environments")
2129 (description
2130 "Itsdangerous provides various helpers to pass trusted data to untrusted
2131 environments and back.")
2132 (license license:bsd-3)))
2133
2134 (define-public python2-itsdangerous
2135 (package-with-python2 python-itsdangerous))
2136
2137 (define-public python-pyyaml
2138 (package
2139 (name "python-pyyaml")
2140 (version "3.12")
2141 (source
2142 (origin
2143 (method url-fetch)
2144 (uri (pypi-uri "PyYAML" version))
2145 (sha256
2146 (base32
2147 "1aqjl8dk9amd4zr99n8v2qxzgmr2hdvqfma4zh7a41rj6336c9sr"))))
2148 (build-system python-build-system)
2149 (inputs
2150 `(("libyaml" ,libyaml)))
2151 (home-page "http://pyyaml.org/wiki/PyYAML")
2152 (synopsis "YAML parser and emitter for Python")
2153 (description
2154 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2155 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2156 API, and sensible error messages. PyYAML supports standard YAML tags and
2157 provides Python-specific tags that allow to represent an arbitrary Python
2158 object.")
2159 (license license:expat)))
2160
2161 (define-public python2-pyyaml
2162 (package-with-python2 python-pyyaml))
2163
2164 (define-public python-virtualenv
2165 (package
2166 (name "python-virtualenv")
2167 (version "15.0.3")
2168 (source
2169 (origin
2170 (method url-fetch)
2171 (uri (pypi-uri "virtualenv" version))
2172 (sha256
2173 (base32
2174 "07cbajzk8l05k5zhlw0b9wbf2is65bl9v6zrn2a0iyn57w6pd73d"))))
2175 (build-system python-build-system)
2176 (arguments
2177 `(#:phases
2178 (modify-phases %standard-phases
2179 (replace 'check
2180 (lambda _
2181 ;; Disable failing test. See upstream bug report
2182 ;; https://github.com/pypa/virtualenv/issues/957
2183 (substitute* "tests/test_virtualenv.py"
2184 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2185 (zero? (system* "py.test")))))))
2186 (native-inputs
2187 `(("python-mock" ,python-mock)
2188 ("python-pytest" ,python-pytest)))
2189 (home-page "https://virtualenv.pypa.io/")
2190 (synopsis "Virtual Python environment builder")
2191 (description
2192 "Virtualenv is a tool to create isolated Python environments.")
2193 (license license:expat)))
2194
2195 (define-public python2-virtualenv
2196 (package-with-python2 python-virtualenv))
2197
2198 (define-public python-markupsafe
2199 (package
2200 (name "python-markupsafe")
2201 (version "0.23")
2202 (source
2203 (origin
2204 (method url-fetch)
2205 (uri (string-append
2206 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2207 version ".tar.gz"))
2208 (sha256
2209 (base32
2210 "1hvip33wva3fnmvfp9x5klqri7hpl1hkgqmjbss18nmrb7zimv54"))))
2211 (build-system python-build-system)
2212 (home-page "https://github.com/mitsuhiko/markupsafe")
2213 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2214 (description
2215 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2216 for Python.")
2217 (license license:bsd-3)))
2218
2219 (define-public python2-markupsafe
2220 (package-with-python2 python-markupsafe))
2221
2222 (define-public python-jinja2
2223 (package
2224 (name "python-jinja2")
2225 (version "2.9.6")
2226 (source
2227 (origin
2228 (method url-fetch)
2229 (uri (pypi-uri "Jinja2" version))
2230 (sha256
2231 (base32
2232 "1zzrkywhziqffrzks14kzixz7nd4yh2vc0fb04a68vfd2ai03anx"))))
2233 (build-system python-build-system)
2234 (propagated-inputs
2235 `(("python-markupsafe" ,python-markupsafe)))
2236 (home-page "http://jinja.pocoo.org/")
2237 (synopsis "Python template engine")
2238 (description
2239 "Jinja2 is a small but fast and easy to use stand-alone template engine
2240 written in pure Python.")
2241 (license license:bsd-3)))
2242
2243 (define-public python2-jinja2
2244 (package-with-python2 python-jinja2))
2245
2246 (define-public python-pystache
2247 (package
2248 (name "python-pystache")
2249 (version "0.5.4")
2250 (source (origin
2251 (method url-fetch)
2252 (uri (pypi-uri "pystache" version))
2253 (sha256
2254 (base32
2255 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2256 (build-system python-build-system)
2257 (arguments
2258 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2259 (home-page "http://defunkt.io/pystache/")
2260 (synopsis "Python logic-less template engine")
2261 (description
2262 "Pystache is a Python implementation of the framework agnostic,
2263 logic-free templating system Mustache.")
2264 (license license:expat)
2265 (properties `((python2-variant . ,(delay python2-pystache))))))
2266
2267 (define-public python2-pystache
2268 (package (inherit (package-with-python2
2269 (strip-python2-variant python-pystache)))
2270 (arguments
2271 `(#:python ,python-2
2272 #:phases
2273 (modify-phases %standard-phases
2274 (replace 'check
2275 (lambda _
2276 (zero? (system* "python" "test_pystache.py")))))))))
2277
2278 (define-public python-joblib
2279 (package
2280 (name "python-joblib")
2281 (version "0.10.3")
2282 (source (origin
2283 (method url-fetch)
2284 (uri (pypi-uri "joblib" version))
2285 (sha256
2286 (base32
2287 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
2288 (modules '((guix build utils)))
2289 (snippet
2290 '(begin
2291 ;; Remove pre-compiled .pyc files from source.
2292 (for-each delete-file-recursively
2293 (find-files "." "__pycache__" #:directories? #t))
2294 (for-each delete-file (find-files "." "\\.pyc$"))
2295 #t))))
2296 (build-system python-build-system)
2297 (arguments
2298 `(#:phases
2299 (modify-phases %standard-phases
2300 (add-before 'check 'disable-failing-tests
2301 (lambda _
2302 ;; This numpydoc tests fails for unknown reasons
2303 (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py")
2304 ;; This numpydoc test depends on matplotlib, which is not a
2305 ;; required input.
2306 (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py")
2307 ;; These tests fail to execute sys.executable
2308 (substitute* "joblib/test/test_parallel.py"
2309 (("import nose" line)
2310 (string-append "from nose.plugins.skip import SkipTest\n" line))
2311 (("def test_nested_parallel_warnings" line)
2312 (string-append "@SkipTest\n" line))
2313 (("def test_parallel_with_interactively_defined_functions" line)
2314 (string-append "@SkipTest\n" line)))
2315 #t)))))
2316 ;; Provide nose to enable tests command
2317 (native-inputs
2318 `(("python-nose" ,python-nose)
2319 ("python-sphinx" ,python-sphinx)
2320 ("python-docutils" ,python-docutils)
2321 ("python-numpydoc" ,python-numpydoc)))
2322 (home-page "http://pythonhosted.org/joblib/")
2323 (synopsis "Using Python functions as pipeline jobs")
2324 (description
2325 "Joblib is a set of tools to provide lightweight pipelining in Python.
2326 In particular, joblib offers: transparent disk-caching of the output values
2327 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2328 logging and tracing of the execution.")
2329 (license license:bsd-3)))
2330
2331 (define-public python2-joblib
2332 (package-with-python2 python-joblib))
2333
2334 (define-public python-docutils
2335 (package
2336 (name "python-docutils")
2337 (version "0.14")
2338 (source
2339 (origin
2340 (method url-fetch)
2341 (uri (pypi-uri "docutils" version))
2342 (sha256
2343 (base32
2344 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2345 (build-system python-build-system)
2346 (arguments
2347 '(#:tests? #f)) ; no setup.py test command
2348 (home-page "http://docutils.sourceforge.net/")
2349 (synopsis "Python Documentation Utilities")
2350 (description
2351 "Docutils is a modular system for processing documentation into useful
2352 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2353 reStructuredText.")
2354 ;; Most of the source code is public domain, but some source files are
2355 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2356 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2357
2358 (define-public python2-docutils
2359 (package-with-python2 python-docutils))
2360
2361 (define-public python-pygments
2362 (package
2363 (name "python-pygments")
2364 (version "2.2.0")
2365 (source
2366 (origin
2367 (method url-fetch)
2368 (uri (pypi-uri "Pygments" version))
2369 (sha256
2370 (base32
2371 "1k78qdvir1yb1c634nkv6rbga8wv4289xarghmsbbvzhvr311bnv"))))
2372 (build-system python-build-system)
2373 (arguments
2374 ;; FIXME: Tests require sphinx, which depends on this.
2375 '(#:tests? #f))
2376 (home-page "http://pygments.org/")
2377 (synopsis "Syntax highlighting")
2378 (description
2379 "Pygments is a syntax highlighting package written in Python.")
2380 (license license:bsd-2)))
2381
2382 (define-public python2-pygments
2383 (package-with-python2 python-pygments))
2384
2385 (define-public python-sphinxcontrib-websupport
2386 (package
2387 (name "python-sphinxcontrib-websupport")
2388 (version "1.0.1")
2389 (source (origin
2390 (method url-fetch)
2391 (uri (pypi-uri "sphinxcontrib-websupport" version))
2392 (sha256
2393 (base32
2394 "1f9f0wjpi9nhikbyaz6d19s7qvzdf1nq2g5dsh640fma4q9rd1bs"))))
2395 (build-system python-build-system)
2396 (propagated-inputs
2397 `(("python-mock" ,python-mock)
2398 ("python-pytest" ,python-pytest)
2399 ("python-xapian-bindings" ,python-xapian-bindings)))
2400 ;; Needed for running the test suite
2401 (native-inputs
2402 `(("python-six" ,python-six)
2403 ("python-jinja2" ,python-jinja2)
2404 ("python-docutils" ,python-docutils)
2405 ("python-sphinx" ,python-sphinx)
2406 ("python-sqlalchemy" ,python-sqlalchemy)
2407 ("python-whoosh" ,python-whoosh)))
2408 (home-page "http://sphinx-doc.org/")
2409 (synopsis "Sphinx API for web applications")
2410 (description "This package provides a Python API to easily integrate
2411 Sphinx documentation into your web application. It provides tools to
2412 integrate Sphinx documents in web templates and to handle searches.")
2413 (license license:bsd-3)))
2414
2415 (define-public python-sphinx
2416 (package
2417 (name "python-sphinx")
2418 (version "1.5.1")
2419 (source
2420 (origin
2421 (method url-fetch)
2422 (uri (pypi-uri "Sphinx" version))
2423 (sha256
2424 (base32
2425 "1i8p9idnli4gr0y4x67yakbdk5w6a0xjzhrg6bg51y9d1fi7fslf"))))
2426 (build-system python-build-system)
2427 (arguments
2428 `(#:phases
2429 (modify-phases %standard-phases
2430 (replace 'check
2431 (lambda _
2432 ;; Requires Internet access.
2433 (delete-file "tests/test_build_linkcheck.py")
2434 (zero? (system* "make" "test")))))))
2435 (propagated-inputs
2436 `(("python-imagesize" ,python-imagesize)
2437 ("python-sphinx-alabaster-theme"
2438 ,python-sphinx-alabaster-theme)
2439 ("python-babel" ,python-babel)
2440 ("python-snowballstemmer" ,python-snowballstemmer)
2441 ("python-docutils" ,python-docutils)
2442 ("python-jinja2" ,python-jinja2)
2443 ("python-pygments" ,python-pygments)
2444 ("python-requests" ,python-requests)
2445 ("python-six" ,python-six)))
2446 (native-inputs
2447 `(("graphviz" ,graphviz)
2448 ("python-html5lib" ,python-html5lib)
2449 ("python-mock" ,python-mock)
2450 ("python-nose" ,python-nose)))
2451 (home-page "http://sphinx-doc.org/")
2452 (synopsis "Python documentation generator")
2453 (description "Sphinx is a tool that makes it easy to create documentation
2454 for Python projects or other documents consisting of multiple reStructuredText
2455 sources.")
2456 (license license:bsd-3)
2457 (properties `((python2-variant . ,(delay python2-sphinx))))))
2458
2459 (define-public python-sphinx-1.6
2460 (package (inherit python-sphinx)
2461 (name "python-sphinx")
2462 (version "1.6.3")
2463 (source (origin
2464 (method url-fetch)
2465 (uri (pypi-uri "Sphinx" version))
2466 (sha256
2467 (base32
2468 "1rj6f3i8hmrx2qlkshi5kp5xcy98dlynwlyl05yvflj5f66dp2xg"))))
2469 (arguments
2470 `(#:phases
2471 (modify-phases %standard-phases
2472 (replace 'check
2473 (lambda _
2474 ;; Requires Internet access.
2475 (delete-file "tests/test_build_linkcheck.py")
2476 (substitute* "tests/test_build_latex.py"
2477 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
2478 "@pytest.mark.skip()"))
2479 (zero? (system* "make" "test")))))))
2480 (propagated-inputs
2481 `(("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)
2482 ,@(package-propagated-inputs python-sphinx)))
2483 (native-inputs
2484 `(("python-pytest" ,python-pytest)
2485 ("imagemagick" ,imagemagick) ; for "convert"
2486 ,@(package-native-inputs python-sphinx)))
2487 (properties `((python2-variant . ,(delay python2-sphinx-1.6))))))
2488
2489 (define-public python2-sphinx-1.6
2490 (let ((base (package-with-python2 (strip-python2-variant python-sphinx-1.6))))
2491 (package
2492 (inherit base)
2493 (propagated-inputs
2494 `(("python2-typing" ,python2-typing)
2495 ,@(package-propagated-inputs base)))
2496 (native-inputs `(("python2-enum34" ,python2-enum34)
2497 ,@(package-native-inputs base))))))
2498
2499 (define-public python-sphinx-1.5.3
2500 (package
2501 (inherit python-sphinx)
2502 (name "python-sphinx")
2503 (version "1.5.3")
2504 (source
2505 (origin
2506 (method url-fetch)
2507 (uri (pypi-uri "Sphinx" version))
2508 (sha256
2509 (base32
2510 "0kw1axswbvaavr8ggyf4qr6hnisnrzlbkkcdada69vk1x9xjassg"))))
2511 (native-inputs
2512 `(("python-pytest" ,python-pytest)
2513 ,@(package-native-inputs python-sphinx)))))
2514
2515 (define-public python2-sphinx
2516 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
2517 (package
2518 (inherit base)
2519 (native-inputs `(("python2-mock" ,python2-mock)
2520 ("python2-enum34" ,python2-enum34)
2521 ,@(package-native-inputs base)))
2522 (propagated-inputs `(("python2-pytz" ,python2-pytz)
2523 ,@(package-propagated-inputs base))))))
2524
2525 (define-public python-sphinx-rtd-theme
2526 (package
2527 (name "python-sphinx-rtd-theme")
2528 (version "0.2.4")
2529 (source
2530 (origin
2531 (method url-fetch)
2532 (uri (pypi-uri "sphinx_rtd_theme" version))
2533 (sha256
2534 (base32
2535 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
2536 (build-system python-build-system)
2537 (arguments '(#:tests? #f)) ; No tests.
2538 (propagated-inputs
2539 `(("python-sphinx" ,python-sphinx)))
2540 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2541 (synopsis "ReadTheDocs.org theme for Sphinx")
2542 (description "A theme for Sphinx used by ReadTheDocs.org.")
2543 (license license:expat)))
2544
2545 (define-public python2-sphinx-rtd-theme
2546 (package-with-python2 python-sphinx-rtd-theme))
2547
2548 (define-public python-guzzle-sphinx-theme
2549 (package
2550 (name "python-guzzle-sphinx-theme")
2551 (version "0.7.11")
2552 (source
2553 (origin
2554 (method url-fetch)
2555 (uri (pypi-uri "guzzle_sphinx_theme" version))
2556 (sha256
2557 (base32
2558 "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
2559 (build-system python-build-system)
2560 (propagated-inputs
2561 `(("python-sphinx" ,python-sphinx)))
2562 (home-page "https://github.com/guzzle/guzzle_sphinx_theme")
2563 (synopsis "Sphinx theme used by Guzzle")
2564 (description "This package provides guzzle_sphinx_theme, a theme for the
2565 Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
2566 and several other projects.")
2567 (license license:expat)))
2568
2569 (define-public python2-guzzle-sphinx-theme
2570 (package-with-python2 python-guzzle-sphinx-theme))
2571
2572 (define-public python-rst.linker
2573 (package
2574 (name "python-rst.linker")
2575 (version "1.7")
2576 (source
2577 (origin
2578 (method url-fetch)
2579 (uri (pypi-uri "rst.linker" version))
2580 (sha256
2581 (base32
2582 "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
2583 (build-system python-build-system)
2584 (propagated-inputs
2585 `(("python-dateutil" ,python-dateutil)
2586 ("python-six" ,python-six)))
2587 (native-inputs
2588 `(("python-setuptools-scm" ,python-setuptools-scm)))
2589 ;; Test would require path.py, which would introduce a cyclic dependence.
2590 (arguments `(#:tests? #f))
2591 ;; Note: As of version 1.7 the documentation is not worth building.
2592 (home-page "https://github.com/jaraco/rst.linker")
2593 (synopsis "Sphinx plugin to add links and timestamps")
2594 (description "rst.linker allows to automatically replace text by a
2595 reStructuredText external reference or timestamps. It's primary purpose is to
2596 augment the changelog, but it can be used for other documents, too.")
2597 (license license:expat)))
2598
2599 (define-public python2-rst.linker
2600 (package-with-python2 python-rst.linker))
2601
2602 (define-public python-feedgenerator
2603 (package
2604 (name "python-feedgenerator")
2605 (version "1.9")
2606 (source
2607 (origin
2608 (method url-fetch)
2609 (uri (pypi-uri "feedgenerator" version))
2610 (sha256
2611 (base32
2612 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2613 (modules '((guix build utils)))
2614 (snippet
2615 '(begin
2616 ;; Remove pre-compiled .pyc files from source.
2617 (for-each delete-file-recursively
2618 (find-files "." "__pycache__" #:directories? #t))
2619 (for-each delete-file (find-files "." "\\.pyc$"))
2620 #t))))
2621 (build-system python-build-system)
2622 (propagated-inputs
2623 `(("python-pytz" ,python-pytz)
2624 ("python-six" ,python-six)))
2625 (home-page "https://github.com/getpelican/feedgenerator")
2626 (synopsis
2627 "Standalone version of Django's Atom/RSS feed generator")
2628 (description
2629 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2630 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2631 (license license:bsd-3)))
2632
2633 (define-public python2-feedgenerator
2634 (package-with-python2 python-feedgenerator))
2635
2636 (define-public python-blinker
2637 (package
2638 (name "python-blinker")
2639 (version "1.4")
2640 (source
2641 (origin
2642 (method url-fetch)
2643 (uri (pypi-uri "blinker" version))
2644 (sha256
2645 (base32
2646 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2647 (build-system python-build-system)
2648 (home-page "http://pythonhosted.org/blinker/")
2649 (synopsis "Fast, simple object-to-object and broadcast signaling")
2650 (description
2651 "Blinker provides a fast dispatching system that allows any number of
2652 interested parties to subscribe to events, or \"signals\".")
2653 (license license:expat)))
2654
2655 (define-public python2-blinker
2656 (package-with-python2 python-blinker))
2657
2658 (define-public pelican
2659 (package
2660 (name "pelican")
2661 (version "3.6.3")
2662 (source
2663 (origin
2664 (method url-fetch)
2665 (uri (pypi-uri "pelican" version))
2666 (sha256
2667 (base32
2668 "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
2669 (build-system python-build-system)
2670 (propagated-inputs
2671 `(("python-feedgenerator" ,python-feedgenerator)
2672 ("python-jinja2" ,python-jinja2)
2673 ("python-pygments" ,python-pygments)
2674 ("python-docutils" ,python-docutils)
2675 ("python-pytz" ,python-pytz)
2676 ("python-blinker" ,python-blinker)
2677 ("python-unidecode" ,python-unidecode)
2678 ("python-six" ,python-six)
2679 ("python-dateutil" ,python-dateutil)
2680 ("python-markdown" ,python-markdown)))
2681 (home-page "http://getpelican.com/")
2682 (arguments
2683 `(;; XXX Requires a lot more packages to do unit tests :P
2684 #:tests? #f
2685 #:phases (modify-phases %standard-phases
2686 (add-before
2687 'install 'adjust-requires
2688 ;; Since feedgenerator is installed from git, it doesn't
2689 ;; conform to the version requirements.
2690 ;;
2691 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2692 ;; version requirement so setuptools doesn't get confused.
2693 (lambda _
2694 (substitute* "setup.py"
2695 (("['\"]feedgenerator.*?['\"]")
2696 "'feedgenerator'")))))))
2697 (synopsis "Python-based static site publishing system")
2698 (description
2699 "Pelican is a tool to generate a static blog from reStructuredText,
2700 Markdown input files, and more. Pelican uses Jinja2 for templating
2701 and is very extensible.")
2702 (license license:agpl3+)))
2703
2704 (define-public python-scikit-image
2705 (package
2706 (name "python-scikit-image")
2707 (version "0.11.3")
2708 (source
2709 (origin
2710 (method url-fetch)
2711 (uri (string-append
2712 "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
2713 version ".tar.gz"))
2714 (sha256
2715 (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
2716 (build-system python-build-system)
2717 (arguments
2718 ;; TODO: Some tests require running X11 server. Disable them?
2719 '(#:tests? #f))
2720 ;; See DEPENDS.txt for the list of build and run time requiremnts
2721 (propagated-inputs
2722 `(("python-matplotlib" ,python-matplotlib)
2723 ("python-networkx" ,python-networkx)
2724 ("python-scipy" ,python-scipy)
2725 ("python-pillow" ,python-pillow)))
2726 (native-inputs
2727 `(("python-numpy" ,python-numpy)
2728 ("python-cython" ,python-cython)
2729 ("python-six" ,python-six)))
2730 (home-page "http://scikit-image.org/")
2731 (synopsis "Image processing in Python")
2732 (description
2733 "Scikit-image is a collection of algorithms for image processing.")
2734 (license license:bsd-3)))
2735
2736 (define-public python2-scikit-image
2737 (package-with-python2 python-scikit-image))
2738
2739 (define-public python-cython
2740 (package
2741 (name "python-cython")
2742 (version "0.27")
2743 (source
2744 (origin
2745 (method url-fetch)
2746 (uri (pypi-uri "Cython" version))
2747 (sha256
2748 (base32
2749 "02y0pp1nx77b8s1mpxc6da2dccl6wd31pp4ksi9via479qcvacmr"))))
2750 (build-system python-build-system)
2751 ;; we need the full python package and not just the python-wrapper
2752 ;; because we need libpython3.3m.so
2753 (inputs
2754 `(("python" ,python)))
2755 (arguments
2756 `(#:phases
2757 (modify-phases %standard-phases
2758 (add-before 'check 'set-HOME
2759 ;; some tests require access to "$HOME/.cython"
2760 (lambda _ (setenv "HOME" "/tmp") #t))
2761 (replace 'check
2762 (lambda _ (zero? (system* "python" "runtests.py" "-vv")))))))
2763 (home-page "http://cython.org/")
2764 (synopsis "C extensions for Python")
2765 (description "Cython is an optimising static compiler for both the Python
2766 programming language and the extended Cython programming language. It makes
2767 writing C extensions for Python as easy as Python itself.")
2768 (license license:asl2.0)
2769 (properties `((python2-variant . ,(delay python2-cython))))))
2770
2771 (define-public python2-cython
2772 (package (inherit (package-with-python2
2773 (strip-python2-variant python-cython)))
2774 (name "python2-cython")
2775 (inputs
2776 `(("python-2" ,python-2))))) ; this is not automatically changed
2777
2778 ;; The RPython toolchain currently does not support Python 3.
2779 (define-public python2-rpython
2780 (package
2781 (name "python2-rpython")
2782 (version "0.2.1")
2783 (source
2784 (origin
2785 (method url-fetch)
2786 (uri (pypi-uri "rpython" version))
2787 (sha256
2788 (base32
2789 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
2790 (build-system python-build-system)
2791 (arguments `(#:python ,python-2))
2792 (native-inputs
2793 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
2794 (home-page "https://rpython.readthedocs.org")
2795 (synopsis "Framework for implementing interpreters and virtual machines")
2796 (description "RPython is a translation and support framework for
2797 producing implementations of dynamic languages, emphasizing a clean separation
2798 between language specification and implementation aspects.")
2799 (license license:expat)))
2800
2801 ;; NOTE: when upgrading numpy please make sure that python-pandas and
2802 ;; python-scipy still build, as these three packages are often used together.
2803 (define-public python-numpy
2804 (package
2805 (name "python-numpy")
2806 (version "1.14.0")
2807 (source
2808 (origin
2809 (method url-fetch)
2810 (uri (string-append
2811 "https://github.com/numpy/numpy/releases/download/v"
2812 version "/numpy-" version ".tar.gz"))
2813 (sha256
2814 (base32
2815 "1kh7y2ay21s9mcc11mq59g2f1yc75v152z2k2vlh0xmh9c9rjpf4"))))
2816 (build-system python-build-system)
2817 (inputs
2818 `(("openblas" ,openblas)
2819 ("lapack" ,lapack)))
2820 (native-inputs
2821 `(("python-cython" ,python-cython)
2822 ("python-nose" ,python-nose)
2823 ("gfortran" ,gfortran)))
2824 (arguments
2825 `(#:phases
2826 (modify-phases %standard-phases
2827 (add-before 'build 'configure-blas-lapack
2828 (lambda* (#:key inputs #:allow-other-keys)
2829 (call-with-output-file "site.cfg"
2830 (lambda (port)
2831 (format port
2832 "[openblas]
2833 libraries = openblas
2834 library_dirs = ~a/lib
2835 include_dirs = ~a/include
2836
2837 # backslash-n to make emacs happy
2838 \n[lapack]
2839 lapack_libs = lapack
2840 library_dirs = ~a/lib
2841 include_dirs = ~a/include
2842 "
2843 (assoc-ref inputs "openblas")
2844 (assoc-ref inputs "openblas")
2845 (assoc-ref inputs "lapack")
2846 (assoc-ref inputs "lapack"))))
2847 #t))
2848 (add-before 'build 'fix-executable-paths
2849 (lambda* (#:key inputs #:allow-other-keys)
2850 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
2851 ;; instead of /bin/sh.
2852 (substitute* "numpy/distutils/exec_command.py"
2853 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
2854 (string-append match-start (assoc-ref inputs "bash") match-end)))
2855 ;; Use "gcc" executable, not "cc".
2856 (substitute* "numpy/distutils/system_info.py"
2857 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
2858 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2859 #t))
2860 ;; Tests can only be run after the library has been installed and not
2861 ;; within the source directory.
2862 (delete 'check)
2863 (add-after 'install 'check
2864 (lambda* (#:key outputs inputs #:allow-other-keys)
2865 ;; Make installed package available for running the tests
2866 (add-installed-pythonpath inputs outputs)
2867 (with-directory-excursion "/tmp"
2868 (zero? (system* "python" "-c"
2869 "import numpy; numpy.test(verbose=2)"))))))))
2870 (home-page "http://www.numpy.org/")
2871 (synopsis "Fundamental package for scientific computing with Python")
2872 (description "NumPy is the fundamental package for scientific computing
2873 with Python. It contains among other things: a powerful N-dimensional array
2874 object, sophisticated (broadcasting) functions, tools for integrating C/C++
2875 and Fortran code, useful linear algebra, Fourier transform, and random number
2876 capabilities.")
2877 (license license:bsd-3)))
2878
2879 (define-public python2-numpy
2880 (package-with-python2 python-numpy))
2881
2882 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
2883 ;; interest only for legacy code going back to NumPy's predecessor
2884 ;; Numeric.
2885 (define-public python2-numpy-1.8
2886 (package (inherit python2-numpy)
2887 (version "1.8.2")
2888 (source
2889 (origin
2890 (method url-fetch)
2891 (uri (string-append
2892 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
2893 (file-name (string-append "python2-numpy-" version ".tar.gz"))
2894 (sha256
2895 (base32
2896 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
2897 (arguments
2898 (substitute-keyword-arguments (package-arguments python2-numpy)
2899 ((#:phases phases)
2900 `(modify-phases ,phases
2901 (replace 'configure-blas-lapack
2902 (lambda* (#:key inputs #:allow-other-keys)
2903 (call-with-output-file "site.cfg"
2904 (lambda (port)
2905 (format port
2906 "[openblas]
2907 libraries = openblas,lapack
2908 library_dirs = ~a/lib:~a/lib
2909 include_dirs = ~a/include:~a/include
2910 "
2911 (assoc-ref inputs "openblas")
2912 (assoc-ref inputs "lapack")
2913 (assoc-ref inputs "openblas")
2914 (assoc-ref inputs "lapack"))))
2915 #t))))))
2916 (description "NumPy is the fundamental package for scientific computing
2917 with Python. It contains among other things: a powerful N-dimensional array
2918 object, sophisticated (broadcasting) functions, tools for integrating C/C++
2919 and Fortran code, useful linear algebra, Fourier transform, and random number
2920 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
2921 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
2922 Numeric.")
2923 (license license:bsd-3)))
2924
2925 (define-public python-munch
2926 (package
2927 (name "python-munch")
2928 (version "2.0.4")
2929 (source
2930 (origin
2931 (method url-fetch)
2932 (uri (pypi-uri "munch" version))
2933 (sha256
2934 (base32
2935 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
2936 (build-system python-build-system)
2937 (home-page "https://github.com/Infinidat/munch")
2938 (synopsis "Dot-accessible dictionary")
2939 (description "Munch is a dot-accessible dictionary similar to JavaScript
2940 objects.")
2941 (license license:expat)))
2942
2943 (define-public python2-munch
2944 (package-with-python2 python-munch))
2945
2946 (define-public python-colormath
2947 (package
2948 (name "python-colormath")
2949 (version "3.0.0")
2950 (source
2951 (origin
2952 (method url-fetch)
2953 (uri (pypi-uri "colormath" version))
2954 (sha256
2955 (base32
2956 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
2957 (build-system python-build-system)
2958 (propagated-inputs
2959 `(("python-networkx" ,python-networkx)
2960 ("python-numpy" ,python-numpy)))
2961 (home-page "https://github.com/gtaylor/python-colormath")
2962 (synopsis "Color math and conversion library")
2963 (description
2964 "This is a Python library for color math and conversions.")
2965 (license license:bsd-3)))
2966
2967 (define-public python2-colormath
2968 (package-with-python2 python-colormath))
2969
2970 (define-public python-spectra
2971 (package
2972 (name "python-spectra")
2973 (version "0.0.11")
2974 (source
2975 (origin
2976 (method url-fetch)
2977 (uri (pypi-uri "spectra" version))
2978 (sha256
2979 (base32
2980 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
2981 (build-system python-build-system)
2982 (arguments
2983 `(#:phases
2984 (modify-phases %standard-phases
2985 (replace 'check
2986 (lambda _
2987 (zero? (system* "nosetests" "-v")))))))
2988 (propagated-inputs
2989 `(("python-colormath" ,python-colormath)))
2990 (native-inputs
2991 `(("python-nose" ,python-nose)))
2992 (home-page "https://github.com/jsvine/spectra")
2993 (synopsis "Color scales and color conversion")
2994 (description
2995 "This package provides a Python library intended to make color math,
2996 color scales, and color space conversion easy. It has support for:
2997
2998 @enumerate
2999 @item Color scales
3000 @item Color ranges
3001 @item Color blending
3002 @item Brightening/darkening colors
3003 @item Saturating/desaturating colors
3004 @item Conversion to/from multiple color spaces.
3005 @end enumerate\n")
3006 (license license:expat)))
3007
3008 (define-public python2-spectra
3009 (package-with-python2 python-spectra))
3010
3011 (define-public python2-fastlmm
3012 (package
3013 (name "python2-fastlmm")
3014 (version "0.2.21")
3015 (source
3016 (origin
3017 (method url-fetch)
3018 (uri (pypi-uri "fastlmm" version ".zip"))
3019 (sha256
3020 (base32
3021 "1q8c34rpmwkfy3r4d5172pzdkpfryj561897z9r3x22gq7813x1m"))))
3022 (build-system python-build-system)
3023 (arguments
3024 `(#:python ,python-2)) ; only Python 2.7 is supported
3025 (propagated-inputs
3026 `(("python2-numpy" ,python2-numpy)
3027 ("python2-scipy" ,python2-scipy)
3028 ("python2-matplotlib" ,python2-matplotlib)
3029 ("python2-pandas" ,python2-pandas)
3030 ("python2-scikit-learn" ,python2-scikit-learn)
3031 ("python2-pysnptools" ,python2-pysnptools)))
3032 (native-inputs
3033 `(("unzip" ,unzip)
3034 ("python2-cython" ,python2-cython)
3035 ("python2-mock" ,python2-mock)
3036 ("python2-nose" ,python2-nose)))
3037 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
3038 (synopsis "Perform genome-wide association studies on large data sets")
3039 (description
3040 "FaST-LMM, which stands for Factored Spectrally Transformed Linear Mixed
3041 Models, is a program for performing both single-SNP and SNP-set genome-wide
3042 association studies (GWAS) on extremely large data sets.")
3043 (license license:asl2.0)))
3044
3045 (define-public python-numpy-documentation
3046 (package
3047 (name "python-numpy-documentation")
3048 (version (package-version python-numpy))
3049 (source (package-source python-numpy))
3050 (build-system python-build-system)
3051 (native-inputs
3052 `(("python-matplotlib" ,python-matplotlib)
3053 ("python-numpy" ,python-numpy)
3054 ("pkg-config" ,pkg-config)
3055 ("python-sphinx" ,python-sphinx)
3056 ("python-numpydoc" ,python-numpydoc)
3057 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
3058 texlive-fonts-ec
3059 texlive-generic-ifxetex
3060 texlive-generic-pdftex
3061 texlive-latex-amsfonts
3062 texlive-latex-capt-of
3063 texlive-latex-cmap
3064 texlive-latex-environ
3065 texlive-latex-eqparbox
3066 texlive-latex-etoolbox
3067 texlive-latex-expdlist
3068 texlive-latex-fancyhdr
3069 texlive-latex-fancyvrb
3070 texlive-latex-fncychap
3071 texlive-latex-float
3072 texlive-latex-framed
3073 texlive-latex-geometry
3074 texlive-latex-graphics
3075 texlive-latex-hyperref
3076 texlive-latex-mdwtools
3077 texlive-latex-multirow
3078 texlive-latex-oberdiek
3079 texlive-latex-parskip
3080 texlive-latex-preview
3081 texlive-latex-tabulary
3082 texlive-latex-threeparttable
3083 texlive-latex-titlesec
3084 texlive-latex-trimspaces
3085 texlive-latex-ucs
3086 texlive-latex-upquote
3087 texlive-latex-url
3088 texlive-latex-varwidth
3089 texlive-latex-wrapfig)))
3090 ("texinfo" ,texinfo)
3091 ("perl" ,perl)
3092 ("scipy-sphinx-theme"
3093 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3094 (method git-fetch)
3095 (uri (git-reference
3096 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3097 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3098 (sha256
3099 (base32
3100 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3101 ,@(package-native-inputs python-numpy)))
3102 (arguments
3103 `(#:tests? #f ; we're only generating the documentation
3104 #:phases
3105 (modify-phases %standard-phases
3106 (delete 'build)
3107 (replace 'install
3108 (lambda* (#:key inputs outputs #:allow-other-keys)
3109 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3110 (doc (string-append
3111 data "/doc/" ,name "-"
3112 ,(package-version python-numpy)))
3113 (info-reader (string-append data "/info"))
3114 (html (string-append doc "/html"))
3115 (scipy-sphinx-theme "scipy-sphinx-theme")
3116 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3117 (pyver ,(string-append "PYVER=")))
3118
3119 ;; FIXME: this is needed to for texlive-union to generate
3120 ;; fonts, which are not found.
3121 (setenv "HOME" "/tmp")
3122
3123 (with-directory-excursion "doc"
3124 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3125 (mkdir-p html)
3126 (system* "make" "html" pyver)
3127 (system* "make" "latex" "PAPER=a4" pyver)
3128 (system* "make" "-C" "build/latex"
3129 "all-pdf" "PAPER=a4" pyver)
3130 ;; FIXME: Generation of the info file fails.
3131 ;; (system* "make" "info" pyver)
3132 ;; (mkdir-p info)
3133 ;; (copy-file "build/texinfo/numpy.info"
3134 ;; (string-append info "/numpy.info"))
3135 (for-each (lambda (file)
3136 (copy-file (string-append "build/latex" file)
3137 (string-append doc file)))
3138 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3139 (with-directory-excursion "build/html"
3140 (for-each (lambda (file)
3141 (let* ((dir (dirname file))
3142 (tgt-dir (string-append html "/" dir)))
3143 (unless (equal? "." dir)
3144 (mkdir-p tgt-dir))
3145 (install-file file html)))
3146 (find-files "." ".*")))))
3147 #t)))))
3148 (home-page (package-home-page python-numpy))
3149 (synopsis "Documentation for the python-numpy package")
3150 (description (package-description python-numpy))
3151 (license (package-license python-numpy))))
3152
3153 (define-public python2-numpy-documentation
3154 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3155 (package
3156 (inherit numpy-documentation)
3157 (native-inputs `(("python2-functools32" ,python2-functools32)
3158 ,@(package-native-inputs numpy-documentation))))))
3159
3160 (define-public python-pygit2
3161 (package
3162 (name "python-pygit2")
3163 (version "0.26.0")
3164 (source
3165 (origin
3166 (method url-fetch)
3167 (uri (pypi-uri "pygit2" version))
3168 (sha256
3169 (base32
3170 "1cbc488ra3kg7r3qky17ms0szi3cda2d96qfkv1l9djsy9hnvw57"))
3171 (patches
3172 (search-patches "python-pygit2-disable-network-tests.patch"))))
3173 (build-system python-build-system)
3174 (propagated-inputs
3175 `(("python-six" ,python-six)
3176 ("python-cffi" ,python-cffi)
3177 ("libgit2" ,libgit2)
3178 ("python-tox" ,python-tox)))
3179 (home-page "https://github.com/libgit2/pygit2")
3180 (synopsis "Python bindings for libgit2")
3181 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3182 library, libgit2 implements Git plumbing.")
3183 ;; GPL2.0 only, with linking exception.
3184 (license license:gpl2)))
3185
3186 (define-public python2-pygit2
3187 (package-with-python2 python-pygit2))
3188
3189 (define-public python-pyparsing
3190 (package
3191 (name "python-pyparsing")
3192 (version "2.2.0")
3193 (source
3194 (origin
3195 (method url-fetch)
3196 (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
3197 "/pyparsing-" version
3198 "/pyparsing-" version ".tar.gz"))
3199 (sha256
3200 (base32
3201 "016b9gh606aa44sq92jslm89bg874ia0yyiyb643fa6dgbsbqch8"))))
3202 (build-system python-build-system)
3203 (outputs '("out" "doc"))
3204 (arguments
3205 `(#:tests? #f ; no test target
3206 #:phases
3207 (modify-phases %standard-phases
3208 (add-after 'install 'install-doc
3209 (lambda* (#:key outputs #:allow-other-keys)
3210 (let* ((doc (string-append (assoc-ref outputs "doc")
3211 "/share/doc/" ,name "-" ,version))
3212 (html-doc (string-append doc "/html"))
3213 (examples (string-append doc "/examples")))
3214 (mkdir-p html-doc)
3215 (mkdir-p examples)
3216 (for-each
3217 (lambda (dir tgt)
3218 (map (lambda (file)
3219 (install-file file tgt))
3220 (find-files dir ".*")))
3221 (list "docs" "htmldoc" "examples")
3222 (list doc html-doc examples))
3223 #t))))))
3224 (home-page "http://pyparsing.wikispaces.com")
3225 (synopsis "Python parsing class library")
3226 (description
3227 "The pyparsing module is an alternative approach to creating and
3228 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3229 of regular expressions. The pyparsing module provides a library of classes
3230 that client code uses to construct the grammar directly in Python code.")
3231 (license license:expat)))
3232
3233 (define-public python2-pyparsing
3234 (package-with-python2 python-pyparsing))
3235
3236 (define-public python-numpydoc
3237 (package
3238 (name "python-numpydoc")
3239 (version "0.5")
3240 (source
3241 (origin
3242 (method url-fetch)
3243 (uri (string-append
3244 "https://pypi.python.org/packages/source/n/numpydoc/numpydoc-"
3245 version ".tar.gz"))
3246 (sha256
3247 (base32
3248 "0d4dnifaxkll50jx6czj05y8cb4ny60njd2wz299sj2jxfy51w4k"))
3249 (modules '((guix build utils)))
3250 (snippet
3251 '(begin
3252 ;; Drop a test requiring matplotlib, which we cannot add as an
3253 ;; input since it would create a circular dependency: Extend the
3254 ;; test for Python 3, where it is already dropped, to Python 2.
3255 (substitute* "numpydoc/tests/test_plot_directive.py"
3256 (("3") "2"))
3257 #t))))
3258 (build-system python-build-system)
3259 (propagated-inputs
3260 `(("python-sphinx" ,python-sphinx)))
3261 (native-inputs
3262 `(("python-nose" ,python-nose)))
3263 (home-page "https://pypi.python.org/pypi/numpydoc")
3264 (synopsis
3265 "Numpy's Sphinx extensions")
3266 (description
3267 "Sphinx extension to support docstrings in Numpy format.")
3268 (license license:bsd-2)))
3269
3270 (define-public python2-numpydoc
3271 (package-with-python2 python-numpydoc))
3272
3273 (define-public python-numexpr
3274 (package
3275 (name "python-numexpr")
3276 (version "2.6.4")
3277 (source
3278 (origin
3279 (method url-fetch)
3280 (uri (pypi-uri "numexpr" version))
3281 (sha256
3282 (base32
3283 "1kpnbb5d5n927113zccfibn16z7gidjipyac6kbbhzs0lnizkgph"))))
3284 (build-system python-build-system)
3285 (arguments `(#:tests? #f)) ; no tests included
3286 (propagated-inputs
3287 `(("python-numpy" ,python-numpy)))
3288 (home-page "https://github.com/pydata/numexpr")
3289 (synopsis "Fast numerical expression evaluator for NumPy")
3290 (description
3291 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3292 expressions that operate on arrays are accelerated and use less memory than
3293 doing the same calculation in Python. In addition, its multi-threaded
3294 capabilities can make use of all your cores, which may accelerate
3295 computations, most specially if they are not memory-bounded (e.g. those using
3296 transcendental functions).")
3297 (license license:expat)))
3298
3299 (define-public python2-numexpr
3300 (package-with-python2 python-numexpr))
3301
3302 (define-public python-cycler
3303 (package
3304 (name "python-cycler")
3305 (version "0.10.0")
3306 (source (origin
3307 (method url-fetch)
3308 (uri (pypi-uri "cycler" version))
3309 (sha256
3310 (base32
3311 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3312 (build-system python-build-system)
3313 (arguments
3314 ;; XXX: The current version requires 'coveralls' which we don't have.
3315 ;; Enable this for the next release which uses 'python-pytest'.
3316 '(#:tests? #f))
3317 (propagated-inputs
3318 `(("python-six" ,python-six)))
3319 (home-page "http://matplotlib.org/cycler/")
3320 (synopsis "Composable keyword argument iterator")
3321 (description
3322 "When using @code{matplotlib} and plotting more than one line, it is
3323 common to want to be able to want to be able to cycle over one or more artist
3324 styles; but the plotting logic can quickly become involved.
3325 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3326 @code{Cycler} class was developed.")
3327 (license license:bsd-3)))
3328
3329 (define-public python2-cycler
3330 (package-with-python2 python-cycler))
3331
3332 (define-public python-colorspacious
3333 (package
3334 (name "python-colorspacious")
3335 (version "1.1.0")
3336 (source
3337 (origin
3338 (method url-fetch)
3339 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3340 version ".tar.gz"))
3341 (file-name (string-append name "-" version))
3342 (sha256
3343 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3344 (build-system python-build-system)
3345 (propagated-inputs
3346 `(("python-numpy" ,python-numpy)))
3347 (native-inputs
3348 `(("python-nose" ,python-nose)))
3349 (arguments
3350 `(#:phases
3351 (modify-phases %standard-phases
3352 (replace 'check
3353 (lambda _
3354 (zero? (system* "nosetests" "--all-modules" "-v" "colorspacious")))))))
3355 (home-page "https://github.com/njsmith/colorspacious")
3356 (synopsis "Python library for colorspace conversions")
3357 (description "@code{colorspacious} is a Python library that lets you
3358 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3359 (license license:expat)))
3360
3361 (define-public python2-colorspacious
3362 (package-with-python2 python-colorspacious))
3363
3364 (define-public python-matplotlib
3365 (package
3366 (name "python-matplotlib")
3367 (version "2.0.2")
3368 (source
3369 (origin
3370 (method url-fetch)
3371 (uri (pypi-uri "matplotlib" version))
3372 (sha256
3373 (base32
3374 "1w8z2a1l7s72p1byfz7g03wqhygqxi8w82619dqb3a1lm97w9yqg"))))
3375 (build-system python-build-system)
3376 (propagated-inputs ; the following packages are all needed at run time
3377 `(("python-cycler" ,python-cycler)
3378 ("python-pyparsing" ,python-pyparsing)
3379 ("python-pygobject" ,python-pygobject)
3380 ("gobject-introspection" ,gobject-introspection)
3381 ("python-tkinter" ,python "tk")
3382 ("python-dateutil" ,python-dateutil)
3383 ("python-numpy" ,python-numpy)
3384 ("python-pillow" ,python-pillow)
3385 ("python-pytz" ,python-pytz)
3386 ("python-six" ,python-six)
3387 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3388 ;; from 'gtk+') provides the required 'typelib' files used by
3389 ;; 'gobject-introspection'. The location of these files is set with the
3390 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3391 ;; is done automatically by a 'native-search-path' procedure. However,
3392 ;; at run-time the user must set this variable as follows:
3393 ;;
3394 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3395 ("gtk+" ,gtk+)
3396 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3397 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3398 ;; object. For this reason we need to import both libraries.
3399 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3400 ("python-pycairo" ,python-pycairo)
3401 ("python-pyqt" ,python-pyqt)
3402 ("python-cairocffi" ,python-cairocffi)))
3403 (inputs
3404 `(("libpng" ,libpng)
3405 ("imagemagick" ,imagemagick)
3406 ("freetype" ,freetype)
3407 ("cairo" ,cairo)
3408 ("glib" ,glib)
3409 ;; FIXME: Add backends when available.
3410 ;("python-wxpython" ,python-wxpython)
3411 ("tcl" ,tcl)
3412 ("tk" ,tk)))
3413 (native-inputs
3414 `(("pkg-config" ,pkg-config)
3415 ("python-nose" ,python-nose)
3416 ("python-mock" ,python-mock)))
3417 (arguments
3418 `(#:phases
3419 (modify-phases %standard-phases
3420 (add-before 'build 'configure-environment
3421 (lambda* (#:key outputs inputs #:allow-other-keys)
3422 (let ((cairo (assoc-ref inputs "cairo"))
3423 (gtk+ (assoc-ref inputs "gtk+")))
3424 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3425 ;; has not effect.
3426 (setenv "LD_LIBRARY_PATH"
3427 (string-append cairo "/lib:" gtk+ "/lib"))
3428 (setenv "HOME" (getcwd))
3429 (call-with-output-file "setup.cfg"
3430 (lambda (port)
3431 (format port "[directories]~%
3432 basedirlist = ~a,~a~%
3433 [rc_options]~%
3434 backend = TkAgg~%"
3435 (assoc-ref inputs "tcl")
3436 (assoc-ref inputs "tk")))))
3437 #t)))))
3438 (home-page "http://matplotlib.org")
3439 (synopsis "2D plotting library for Python")
3440 (description
3441 "Matplotlib is a Python 2D plotting library which produces publication
3442 quality figures in a variety of hardcopy formats and interactive environments
3443 across platforms. Matplotlib can be used in Python scripts, the python and
3444 ipython shell, web application servers, and six graphical user interface
3445 toolkits.")
3446 (license license:psfl)
3447 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3448
3449 (define-public python2-matplotlib
3450 (let ((matplotlib (package-with-python2
3451 (strip-python2-variant python-matplotlib))))
3452 (package (inherit matplotlib)
3453 ;; Make sure to use special packages for Python 2 instead
3454 ;; of those automatically rewritten by package-with-python2.
3455 (propagated-inputs
3456 `(("python2-pycairo" ,python2-pycairo)
3457 ("python2-functools32" ,python2-functools32)
3458 ("python2-pygobject-2" ,python2-pygobject-2)
3459 ("python2-subprocess32" ,python2-subprocess32)
3460 ("python2-tkinter" ,python-2 "tk")
3461 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3462 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3463
3464 (define-public python-matplotlib-documentation
3465 (package
3466 (name "python-matplotlib-documentation")
3467 (version (package-version python-matplotlib))
3468 (source (package-source python-matplotlib))
3469 (build-system python-build-system)
3470 (native-inputs
3471 `(("python-matplotlib" ,python-matplotlib)
3472 ("python-colorspacious" ,python-colorspacious)
3473 ("python-sphinx" ,python-sphinx)
3474 ("python-numpydoc" ,python-numpydoc)
3475 ("python-ipython" ,python-ipython)
3476 ("python-mock" ,python-mock)
3477 ("graphviz" ,graphviz)
3478 ("texlive" ,texlive)
3479 ("texinfo" ,texinfo)
3480 ,@(package-native-inputs python-matplotlib)))
3481 (arguments
3482 `(#:tests? #f ; we're only generating documentation
3483 #:phases
3484 (modify-phases %standard-phases
3485 (replace 'build
3486 (lambda _
3487 (chdir "doc")
3488 ;; Produce pdf in 'A4' format.
3489 (substitute* "conf.py"
3490 (("latex_paper_size = 'letter'") "")
3491 ;; latex_paper_size is deprecated -> set paper size using
3492 ;; latex_elements
3493 (("latex_elements\\['pointsize'\\] = '11pt'" match)
3494 ;; insert at a point where latex_elements{} is defined:
3495 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
3496 (zero? (system* "python" "make.py" "html" "latex" "texinfo"))))
3497 (replace 'install
3498 (lambda* (#:key inputs outputs #:allow-other-keys)
3499 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3500 (doc (string-append data "/doc/python-matplotlib-" ,version))
3501 (info (string-append data "/info"))
3502 (html (string-append doc "/html")))
3503 (mkdir-p html)
3504 (mkdir-p info)
3505 (copy-recursively "build/html" html)
3506 (symlink (string-append html "/_images")
3507 (string-append info "/matplotlib-figures"))
3508 (with-directory-excursion "build/texinfo"
3509 (substitute* "matplotlib.texi"
3510 (("@image\\{([^,]*)" all file)
3511 (string-append "@image{matplotlib-figures/" file)))
3512 (symlink (string-append html "/_images")
3513 "./matplotlib-figures")
3514 (system* "makeinfo" "--no-split"
3515 "-o" "matplotlib.info" "matplotlib.texi"))
3516 (copy-file "build/texinfo/matplotlib.info"
3517 (string-append info "/matplotlib.info"))
3518 (copy-file "build/latex/Matplotlib.pdf"
3519 (string-append doc "/Matplotlib.pdf")))
3520 #t)))))
3521 (home-page (package-home-page python-matplotlib))
3522 (synopsis "Documentation for the python-matplotlib package")
3523 (description (package-description python-matplotlib))
3524 (license (package-license python-matplotlib))))
3525
3526 (define-public python2-matplotlib-documentation
3527 (package-with-python2 python-matplotlib-documentation))
3528
3529 (define-public python2-pysnptools
3530 (package
3531 (name "python2-pysnptools")
3532 (version "0.3.9")
3533 (source
3534 (origin
3535 (method url-fetch)
3536 (uri (pypi-uri "pysnptools" version ".zip"))
3537 (sha256
3538 (base32
3539 "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
3540 (build-system python-build-system)
3541 (arguments
3542 `(#:python ,python-2)) ; only Python 2.7 is supported
3543 (propagated-inputs
3544 `(("python2-numpy" ,python2-numpy)
3545 ("python2-scipy" ,python2-scipy)
3546 ("python2-pandas" ,python2-pandas)))
3547 (native-inputs
3548 `(("python2-cython" ,python2-cython)))
3549 (native-inputs
3550 `(("unzip" ,unzip)))
3551 (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
3552 (synopsis "Library for reading and manipulating genetic data")
3553 (description
3554 "PySnpTools is a library for reading and manipulating genetic data. It
3555 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3556 those files. It can also efficiently manipulate ranges of integers using set
3557 operators such as union, intersection, and difference.")
3558 (license license:asl2.0)))
3559
3560 (define-public python-rpy2
3561 (package
3562 (name "python-rpy2")
3563 (version "2.9.0")
3564 (source
3565 (origin
3566 (method url-fetch)
3567 (uri (pypi-uri "rpy2" version))
3568 (sha256
3569 (base32
3570 "0bqihjrdqwj5r1h86shvfb1p5hfr4a6klv1v54bzfr9r144w3rni"))))
3571 (build-system python-build-system)
3572 (arguments
3573 '(#:modules ((ice-9 ftw)
3574 (srfi srfi-1)
3575 (srfi srfi-26)
3576 (guix build utils)
3577 (guix build python-build-system))
3578 #:phases
3579 (modify-phases %standard-phases
3580 ;; Without this phase the test loader cannot find the directories, in
3581 ;; which it is supposed to look for test files.
3582 (add-after 'unpack 'fix-tests
3583 (lambda* (#:key outputs #:allow-other-keys)
3584 (substitute* "rpy/tests.py"
3585 (("loader.discover\\(")
3586 "loader.discover(rpy_root + '/' +"))
3587 #t))
3588 (replace 'check
3589 (lambda* (#:key outputs inputs #:allow-other-keys)
3590 (let ((cwd (getcwd)))
3591 (setenv "PYTHONPATH"
3592 (string-append cwd "/build/"
3593 (find (cut string-prefix? "lib" <>)
3594 (scandir (string-append cwd "/build")))
3595 ":"
3596 (getenv "PYTHONPATH"))))
3597 ;; FIXME: Even when all tests pass, the check phase will fail.
3598 (system* "python" "-m" "rpy2.tests" "-v"))))))
3599 (propagated-inputs
3600 `(("python-six" ,python-six)
3601 ("python-jinja2" ,python-jinja2)
3602 ("python-pytz" ,python-pytz)))
3603 (inputs
3604 `(("readline" ,readline)
3605 ("icu4c" ,icu4c)
3606 ("pcre" ,pcre)
3607 ("r-minimal" ,r-minimal)
3608 ("r-survival" ,r-survival)
3609 ("r-ggplot2" ,r-ggplot2)
3610 ("r-rsqlite" ,r-rsqlite)
3611 ("r-dplyr" ,r-dplyr)
3612 ("r-dbplyr" ,r-dbplyr)
3613 ("python-numpy" ,python-numpy)))
3614 (native-inputs
3615 `(("zlib" ,zlib)))
3616 (home-page "http://rpy.sourceforge.net/")
3617 (synopsis "Python interface to the R language")
3618 (description "rpy2 is a redesign and rewrite of rpy. It is providing a
3619 low-level interface to R from Python, a proposed high-level interface,
3620 including wrappers to graphical libraries, as well as R-like structures and
3621 functions.")
3622 ;; Any of these licenses can be picked for the R interface. The whole
3623 ;; project is released under GPLv2+ according to the license declaration
3624 ;; in "setup.py".
3625 (license (list license:mpl2.0 license:gpl2+ license:lgpl2.1+))))
3626
3627 (define-public python-scipy
3628 (package
3629 (name "python-scipy")
3630 (version "1.0.0")
3631 (source
3632 (origin
3633 (method url-fetch)
3634 (uri (pypi-uri "scipy" version))
3635 (sha256
3636 (base32
3637 "043djb3vyk6qripmyw30jhl0g8qza0fmar6wck10iv79l08izsl7"))))
3638 (build-system python-build-system)
3639 (propagated-inputs
3640 `(("python-numpy" ,python-numpy)
3641 ("python-matplotlib" ,python-matplotlib)
3642 ("python-pyparsing" ,python-pyparsing)))
3643 (inputs
3644 `(("lapack" ,lapack)
3645 ("openblas" ,openblas)))
3646 (native-inputs
3647 `(("python-cython" ,python-cython)
3648 ("python-pytest" ,python-pytest)
3649 ("python-sphinx" ,python-sphinx)
3650 ("python-numpydoc" ,python-numpydoc)
3651 ("gfortran" ,gfortran)
3652 ("perl" ,perl)
3653 ("which" ,which)))
3654 (outputs '("out" "doc"))
3655 (arguments
3656 `(#:phases
3657 (modify-phases %standard-phases
3658 (add-before 'build 'configure-openblas
3659 (lambda* (#:key inputs #:allow-other-keys)
3660 (call-with-output-file "site.cfg"
3661 (lambda (port)
3662 (format port
3663 "[blas]
3664 libraries = openblas
3665 library_dirs = ~a/lib
3666 include_dirs = ~a/include
3667
3668 # backslash-n to make emacs happy
3669 \n[atlas]
3670 library_dirs = ~a/lib
3671 atlas_libs = openblas
3672 "
3673 (assoc-ref inputs "openblas")
3674 (assoc-ref inputs "openblas")
3675 (assoc-ref inputs "openblas"))))
3676 #t))
3677 (add-after 'install 'install-doc
3678 (lambda* (#:key inputs outputs #:allow-other-keys)
3679 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3680 (doc (string-append data "/doc/" ,name "-" ,version))
3681 (html (string-append doc "/html"))
3682 (pyver ,(string-append "PYVER=" (version-major+minor
3683 (package-version python))))
3684 ;; By default it tries to run sphinx-build through the Python
3685 ;; interpreter which won't work with our shell wrapper.
3686 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
3687 ;; Make installed package available for building the
3688 ;; documentation
3689 (add-installed-pythonpath inputs outputs)
3690 (with-directory-excursion "doc"
3691 ;; Fix generation of images for mathematical expressions.
3692 (substitute* (find-files "source" "conf\\.py")
3693 (("pngmath_use_preview = True")
3694 "pngmath_use_preview = False"))
3695 (mkdir-p html)
3696 (invoke "make" "html" pyver sphinxbuild)
3697 (with-directory-excursion "build/html"
3698 (for-each (lambda (file)
3699 (let* ((dir (dirname file))
3700 (tgt-dir (string-append html "/" dir)))
3701 (install-file file html)))
3702 (find-files "." ".*")))))
3703 #t))
3704 ;; Tests can only be run after the library has been installed and not
3705 ;; within the source directory.
3706 (delete 'check)
3707 (add-after 'install 'check
3708 (lambda* (#:key inputs outputs #:allow-other-keys)
3709 (add-installed-pythonpath inputs outputs)
3710 (with-directory-excursion "/tmp"
3711 (invoke "python" "-c"
3712 "import scipy; scipy.test('full', verbose=2)")))))))
3713 (home-page "https://www.scipy.org/")
3714 (synopsis "The Scipy library provides efficient numerical routines")
3715 (description "The SciPy library is one of the core packages that make up
3716 the SciPy stack. It provides many user-friendly and efficient numerical
3717 routines such as routines for numerical integration and optimization.")
3718 (properties `((python2-variant . ,(delay python2-scipy))))
3719 (license license:bsd-3)))
3720
3721 (define-public python2-scipy
3722 (package-with-python2
3723 (strip-python2-variant python-scipy)))
3724
3725 (define-public python-socksipy-branch
3726 (package
3727 (name "python-socksipy-branch")
3728 (version "1.01")
3729 (source
3730 (origin
3731 (method url-fetch)
3732 (uri (pypi-uri "SocksiPy-branch" version))
3733 (sha256
3734 (base32
3735 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3736 (build-system python-build-system)
3737 (arguments
3738 `(#:tests? #f)) ; There are no tests
3739 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3740 (synopsis "Python SOCKS module")
3741 (description
3742 "SocksiPy - A Python SOCKS client module. It provides a
3743 socket-like interface that supports connections to any TCP
3744 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3745 The original version was developed by Dan Haim, this is a
3746 branch created by Mario Vilas to address some open issues,
3747 as the original project seems to have been abandoned circa 2007.")
3748 (license license:bsd-3)))
3749
3750 (define-public python2-socksipy-branch
3751 (package-with-python2 python-socksipy-branch))
3752
3753 (define-public python-pycodestyle
3754 (package
3755 (name "python-pycodestyle")
3756 (version "2.3.1")
3757 (source
3758 (origin
3759 (method url-fetch)
3760 (uri (pypi-uri "pycodestyle" version))
3761 (sha256
3762 (base32
3763 "0rk78b66p57ala26mdldl9lafr48blv5s659sah9q50qnfjmc8k8"))))
3764 (build-system python-build-system)
3765 (home-page "https://pycodestyle.readthedocs.io/")
3766 (synopsis "Python style guide checker")
3767 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3768 Python code against some of the style conventions in
3769 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3770 (license license:expat)))
3771
3772 (define-public python2-pycodestyle
3773 (package-with-python2 python-pycodestyle))
3774
3775 (define-public python-orderedmultidict
3776 (package
3777 (name "python-orderedmultidict")
3778 (version "0.7.11")
3779 (source
3780 (origin
3781 (method url-fetch)
3782 (uri (pypi-uri "orderedmultidict" version))
3783 (sha256
3784 (base32
3785 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
3786 (build-system python-build-system)
3787 (arguments
3788 `(#:phases
3789 (modify-phases %standard-phases
3790 (add-after 'unpack 'fix-tests
3791 (lambda _
3792 ;; The package uses nosetest for running the tests.
3793 ;; Adding this initfile allows to run the test suite
3794 ;; without requiring nosetest.
3795 (zero? (system* "touch" "tests/__init__.py")))))))
3796 (propagated-inputs
3797 `(("python-six" ,python-six)))
3798 (native-inputs
3799 `(("python-pycodestyle" ,python-pycodestyle)))
3800 (home-page "https://github.com/gruns/orderedmultidict")
3801 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3802 (description "This package contains a library for ordered multivalue
3803 dictionaries. A multivalue dictionary is a dictionary that can store
3804 multiple values for the same key. An ordered multivalue dictionary is a
3805 multivalue dictionary that retains the order of insertions and deletions.")
3806 (license license:unlicense)))
3807
3808 (define-public python2-orderedmultidict
3809 (package-with-python2 python-orderedmultidict))
3810
3811 (define-public python-autopep8
3812 (package
3813 (name "python-autopep8")
3814 (version "1.3.2")
3815 (source
3816 (origin
3817 (method url-fetch)
3818 (uri (pypi-uri "autopep8" version))
3819 (sha256
3820 (base32
3821 "1p9pa1ffg4iy96l918808jggg9a69iaka5awmj8xid36yc5mk0ky"))))
3822 (build-system python-build-system)
3823 (propagated-inputs
3824 `(("python-pycodestyle" ,python-pycodestyle)))
3825 (home-page "https://github.com/hhatto/autopep8")
3826 (synopsis "Format Python code according to the PEP 8 style guide")
3827 (description
3828 "@code{autopep8} automatically formats Python code to conform to
3829 the PEP 8 style guide. It uses the pycodestyle utility to determine
3830 what parts of the code needs to be formatted. @code{autopep8} is
3831 capable of fixing most of the formatting issues that can be reported
3832 by pycodestyle.")
3833 (license (license:non-copyleft
3834 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
3835
3836 (define-public python2-autopep8
3837 (package-with-python2 python-autopep8))
3838
3839 (define-public python-distutils-extra
3840 (package
3841 (name "python-distutils-extra")
3842 (version "2.38")
3843 (source
3844 (origin
3845 (method url-fetch)
3846 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3847 version "/+download/python-distutils-extra-"
3848 version ".tar.gz"))
3849 (sha256
3850 (base32
3851 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3852 (build-system python-build-system)
3853 (home-page "https://launchpad.net/python-distutils-extra/")
3854 (synopsis "Enhancements to Python's distutils")
3855 (description
3856 "The python-distutils-extra module enables you to easily integrate
3857 gettext support, themed icons, and scrollkeeper-based documentation into
3858 Python's distutils.")
3859 (license license:gpl2)))
3860
3861 (define-public python2-distutils-extra
3862 (package-with-python2 python-distutils-extra))
3863
3864 (define-public python2-elib.intl
3865 (package
3866 (name "python2-elib.intl")
3867 (version "0.0.3")
3868 (source
3869 (origin
3870 ;; This project doesn't tag releases or publish tarballs, so we take
3871 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3872 (method git-fetch)
3873 (uri (git-reference
3874 (url "https://github.com/dieterv/elib.intl.git")
3875 (commit "d09997cfef")))
3876 (sha256
3877 (base32
3878 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3879 (build-system python-build-system)
3880 (arguments
3881 ;; incompatible with Python 3 (exception syntax)
3882 `(#:python ,python-2
3883 #:tests? #f))
3884 (home-page "https://github.com/dieterv/elib.intl")
3885 (synopsis "Enhanced internationalization for Python")
3886 (description
3887 "The elib.intl module provides enhanced internationalization (I18N)
3888 services for your Python modules and applications.")
3889 (license license:lgpl3+)))
3890
3891 (define-public python-olefile
3892 (package
3893 (name "python-olefile")
3894 (version "0.44")
3895 (source
3896 (origin
3897 (method url-fetch)
3898 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
3899 version ".tar.gz"))
3900 (file-name (string-append name "-" version ".tar.gz"))
3901 (sha256
3902 (base32
3903 "1wmxbrhyqjry2000zx0zdhqdqxhgi06nz7sbzjlh222q2zjv1gpj"))))
3904 (build-system python-build-system)
3905 (home-page
3906 "https://www.decalage.info/python/olefileio")
3907 (synopsis "Read and write Microsoft OLE2 files.")
3908 (description
3909 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
3910 Storage or Compound Document, Microsoft Office). It is an improved version of
3911 the OleFileIO module from PIL, the Python Image Library.")
3912 (license license:bsd-3)))
3913
3914 (define-public python2-olefile
3915 (package-with-python2 python-olefile))
3916
3917 (define-public python-pillow
3918 (package
3919 (name "python-pillow")
3920 (version "4.3.0")
3921 (source
3922 (origin
3923 (method url-fetch)
3924 (uri (pypi-uri "Pillow" version))
3925 (sha256
3926 (base32
3927 "09xmn7rl6840sli2iz1k3fgxfgmri2nqz6vkinmb9mgg8ifp2z59"))
3928 (patch-flags '("-p1" "--binary"))
3929 (patches (search-patches "python-pillow-fix-failing-tests.patch"))))
3930 (build-system python-build-system)
3931 (native-inputs
3932 `(("python-nose" ,python-nose)))
3933 (inputs
3934 `(("freetype" ,freetype)
3935 ("lcms" ,lcms)
3936 ("zlib" ,zlib)
3937 ("libjpeg" ,libjpeg)
3938 ("openjpeg" ,openjpeg)
3939 ("libtiff" ,libtiff)
3940 ("libwebp" ,libwebp)))
3941 (propagated-inputs
3942 `(("python-olefile" ,python-olefile)))
3943 (arguments
3944 `(#:phases (modify-phases %standard-phases
3945 (add-after
3946 'install 'check-installed
3947 (lambda* (#:key outputs inputs #:allow-other-keys)
3948 (begin
3949 (setenv "HOME" (getcwd))
3950 ;; Make installed package available for running the
3951 ;; tests
3952 (add-installed-pythonpath inputs outputs)
3953 (and (zero? (system* "python" "selftest.py"
3954 "--installed"))
3955 (zero? (system* "python" "test-installed.py"))))))
3956 (delete 'check))))
3957 (home-page "https://pypi.python.org/pypi/Pillow")
3958 (synopsis "Fork of the Python Imaging Library")
3959 (description
3960 "The Python Imaging Library adds image processing capabilities to your
3961 Python interpreter. This library provides extensive file format support, an
3962 efficient internal representation, and fairly powerful image processing
3963 capabilities. The core image library is designed for fast access to data
3964 stored in a few basic pixel formats. It should provide a solid foundation for
3965 a general image processing tool.")
3966 (license (license:x11-style
3967 "http://www.pythonware.com/products/pil/license.htm"
3968 "The PIL Software License"))))
3969
3970 (define-public python2-pillow
3971 (package-with-python2 python-pillow))
3972
3973 (define-public python-pycparser
3974 (package
3975 (name "python-pycparser")
3976 (version "2.17")
3977 (source
3978 (origin
3979 (method url-fetch)
3980 (uri (pypi-uri "pycparser" version))
3981 (sha256
3982 (base32
3983 "1dkkjri0miidqb1zcqhqljfa34fcy9k5akasgwsv6k622zlk3b0a"))))
3984 (outputs '("out" "doc"))
3985 (build-system python-build-system)
3986 (native-inputs
3987 `(("pkg-config" ,pkg-config)))
3988 (arguments
3989 `(#:phases
3990 (modify-phases %standard-phases
3991 (replace 'check
3992 (lambda _
3993 (with-directory-excursion "tests"
3994 (zero? (system* "python" "all_tests.py")))))
3995 (add-after 'install 'install-doc
3996 (lambda* (#:key outputs #:allow-other-keys)
3997 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3998 (doc (string-append data "/doc/" ,name "-" ,version))
3999 (examples (string-append doc "/examples")))
4000 (mkdir-p examples)
4001 (for-each (lambda (file)
4002 (copy-file (string-append "." file)
4003 (string-append doc file)))
4004 '("/README.rst" "/CHANGES" "/LICENSE"))
4005 (copy-recursively "examples" examples)))))))
4006 (home-page "https://github.com/eliben/pycparser")
4007 (synopsis "C parser in Python")
4008 (description
4009 "Pycparser is a complete parser of the C language, written in pure Python
4010 using the PLY parsing library. It parses C code into an AST and can serve as
4011 a front-end for C compilers or analysis tools.")
4012 (license license:bsd-3)))
4013
4014 (define-public python2-pycparser
4015 (package-with-python2 python-pycparser))
4016
4017 (define-public python-xcffib
4018 (package
4019 (name "python-xcffib")
4020 (version "0.5.1")
4021 (source
4022 (origin
4023 (method url-fetch)
4024 (uri (pypi-uri "xcffib" version))
4025 (sha256
4026 (base32
4027 "09gbnmr5vn58mm8xi3fmd7fz6743cks6c46dphnxzwax6zsxmy60"))))
4028 (build-system python-build-system)
4029 (inputs
4030 `(("libxcb" ,libxcb)))
4031 (propagated-inputs
4032 `(("python-cffi" ,python-cffi) ; used at run time
4033 ("python-six" ,python-six)))
4034 (arguments
4035 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4036 #:tests? #f
4037 #:phases
4038 (modify-phases %standard-phases
4039 (add-after 'unpack 'fix-libxcb-path
4040 (lambda* (#:key inputs #:allow-other-keys)
4041 (let ((libxcb (assoc-ref inputs "libxcb")))
4042 (substitute* '("xcffib/__init__.py")
4043 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4044 #t)))
4045 (add-after 'install 'install-doc
4046 (lambda* (#:key outputs #:allow-other-keys)
4047 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4048 "/doc/" ,name "-" ,version)))
4049 (mkdir-p doc)
4050 (copy-file "README.md"
4051 (string-append doc "/README.md"))
4052 #t))))))
4053 (home-page "https://github.com/tych0/xcffib")
4054 (synopsis "XCB Python bindings")
4055 (description
4056 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4057 support for Python 3 and PyPy. It is based on cffi.")
4058 (license license:expat)))
4059
4060 (define-public python2-xcffib
4061 (package-with-python2 python-xcffib))
4062
4063 (define-public python-cairocffi
4064 (package
4065 (name "python-cairocffi")
4066 (version "0.8.0")
4067 (source
4068 (origin
4069 (method url-fetch)
4070 ;; The archive on pypi is missing the 'utils' directory!
4071 (uri (string-append "https://github.com/Kozea/cairocffi/archive/v"
4072 version ".tar.gz"))
4073 (file-name (string-append name "-" version ".tar.gz"))
4074 (sha256
4075 (base32
4076 "1rk2dvy3fxrga6bvvxc2fi5lbaynm5h4a0w0aaxyn3bc77rszjg9"))))
4077 (build-system python-build-system)
4078 (outputs '("out" "doc"))
4079 (inputs
4080 `(("gdk-pixbuf" ,gdk-pixbuf)
4081 ("cairo" ,cairo)))
4082 (native-inputs
4083 `(("pkg-config" ,pkg-config)
4084 ("python-sphinx" ,python-sphinx)
4085 ("python-docutils" ,python-docutils)))
4086 (propagated-inputs
4087 `(("python-xcffib" ,python-xcffib))) ; used at run time
4088 (arguments
4089 `(;; FIXME: Tests cannot find 'libcairo.so.2'.
4090 #:tests? #f
4091 #:phases
4092 (modify-phases %standard-phases
4093 (add-after 'install 'install-doc
4094 (lambda* (#:key inputs outputs #:allow-other-keys)
4095 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4096 (doc (string-append data "/doc/" ,name "-" ,version))
4097 (html (string-append doc "/html")))
4098 (setenv "LD_LIBRARY_PATH"
4099 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4100 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4101 (setenv "LANG" "en_US.UTF-8")
4102 (mkdir-p html)
4103 (for-each (lambda (file)
4104 (copy-file (string-append "." file)
4105 (string-append doc file)))
4106 '("/README.rst" "/CHANGES" "/LICENSE"))
4107 (system* "python" "setup.py" "build_sphinx")
4108 (copy-recursively "docs/_build/html" html)
4109 #t))))))
4110 (home-page "https://github.com/Kozea/cairocffi")
4111 (synopsis "Python bindings and object-oriented API for Cairo")
4112 (description
4113 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4114 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4115 graphics library with support for multiple backends including image buffers,
4116 PNG, PostScript, PDF, and SVG file output.")
4117 (license license:bsd-3)))
4118
4119 (define-public python2-cairocffi
4120 (package-with-python2 python-cairocffi))
4121
4122 (define-public python-decorator
4123 (package
4124 (name "python-decorator")
4125 (version "4.1.2")
4126 (source
4127 (origin
4128 (method url-fetch)
4129 (uri (pypi-uri "decorator" version))
4130 (sha256
4131 (base32 "1d8npb11kxyi36mrvjdpcjij76l5zfyrz2f820brf0l0rcw4vdkw"))))
4132 (build-system python-build-system)
4133 (arguments '(#:tests? #f)) ; no test target
4134 (home-page "https://pypi.python.org/pypi/decorator/")
4135 (synopsis "Python module to simplify usage of decorators")
4136 (description
4137 "The aim of the decorator module is to simplify the usage of decorators
4138 for the average programmer, and to popularize decorators usage giving examples
4139 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4140 etc. The core of this module is a decorator factory.")
4141 (license license:expat)))
4142
4143 (define-public python2-decorator
4144 (package-with-python2 python-decorator))
4145
4146 (define-public python-drmaa
4147 (package
4148 (name "python-drmaa")
4149 (version "0.7.7")
4150 (source
4151 (origin
4152 (method url-fetch)
4153 (uri (pypi-uri "drmaa" version))
4154 (sha256
4155 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4156 (build-system python-build-system)
4157 ;; The test suite requires libdrmaa which is provided by the cluster
4158 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4159 ;; should be set to the path of the libdrmaa library.
4160 (arguments '(#:tests? #f))
4161 (native-inputs
4162 `(("python-nose" ,python-nose)))
4163 (home-page "https://pypi.python.org/pypi/drmaa")
4164 (synopsis "Python bindings for the DRMAA library")
4165 (description
4166 "A Python package for Distributed Resource Management (DRM) job
4167 submission and control. This package is an implementation of the DRMAA 1.0
4168 Python language binding specification.")
4169 (license license:bsd-3)))
4170
4171 (define-public python2-drmaa
4172 (package-with-python2 python-drmaa))
4173
4174 (define-public python-grako
4175 (package
4176 (name "python-grako")
4177 (version "3.99.9")
4178 (source
4179 (origin
4180 (method url-fetch)
4181 (uri
4182 (pypi-uri "grako" version ".zip"))
4183 (sha256
4184 (base32
4185 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4186 (build-system python-build-system)
4187 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4188 (native-inputs
4189 `(("unzip" ,unzip)
4190 ("python-pytest" ,python-pytest)
4191 ("python-pytest-runner" ,python-pytest-runner)))
4192 (home-page "https://bitbucket.org/neogeny/grako")
4193 (synopsis "EBNF parser generator")
4194 (description
4195 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4196 memoizing PEG/Packrat parser in Python.")
4197 (license license:bsd-3)))
4198
4199 (define-public python2-grako
4200 (package-with-python2 python-grako))
4201
4202 (define-public python-gridmap
4203 (package
4204 (name "python-gridmap")
4205 (version "0.13.0")
4206 (source
4207 (origin
4208 (method url-fetch)
4209 (uri (string-append
4210 "https://github.com/pygridtools/gridmap/archive/v"
4211 version ".tar.gz"))
4212 (file-name (string-append name "-" version ".tar.gz"))
4213 (sha256
4214 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4215 (build-system python-build-system)
4216 (arguments
4217 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4218 (propagated-inputs
4219 `(("python-psutil" ,python-psutil)
4220 ("python-drmaa" ,python-drmaa)
4221 ("python-pyzmq" ,python-pyzmq)))
4222 (home-page "https://github.com/pygridtools/gridmap")
4223 (synopsis "Create jobs on a cluster directly from Python")
4224 (description
4225 "Gridmap is a Python package to allow you to easily create jobs on the
4226 cluster directly from Python. You can directly map Python functions onto the
4227 cluster without needing to write any wrapper code yourself.")
4228 (license license:gpl3+)))
4229
4230 (define-public python2-gridmap
4231 (package-with-python2 python-gridmap))
4232
4233 (define-public python-honcho
4234 (package
4235 (name "python-honcho")
4236 (version "1.0.1")
4237 (source
4238 (origin
4239 (method url-fetch)
4240 (uri (string-append
4241 "https://github.com/nickstenning/honcho/archive/v"
4242 version ".tar.gz"))
4243 (file-name (string-append name "-" version ".tar.gz"))
4244 (sha256
4245 (base32 "0zizn61n5z5hq421hkypk9pw8s6fpxw30f4hsg7k4ivwzy3gjw9j"))))
4246 (build-system python-build-system)
4247 (native-inputs
4248 `(("python-pytest" ,python-pytest)
4249 ("python-mock" ,python-mock)
4250 ("python-tox" ,python-tox)
4251 ("which" ,which))) ;for tests
4252 (propagated-inputs
4253 `(("python-jinja2" ,python-jinja2)))
4254 (arguments
4255 `(#:phases
4256 (modify-phases %standard-phases
4257 (delete 'check)
4258 (add-after 'install 'check
4259 (lambda* (#:key outputs inputs #:allow-other-keys)
4260 ;; fix honcho path in testsuite
4261 (substitute* "tests/conftest.py"
4262 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4263 "/bin/honcho" "'")))
4264 ;; It's easier to run tests after install.
4265 ;; Make installed package available for running the tests
4266 (add-installed-pythonpath inputs outputs)
4267 (zero? (system* "py.test" "-v")))))))
4268 (home-page "https://github.com/nickstenning/honcho")
4269 (synopsis "Manage Procfile-based applications")
4270 (description
4271 "A Procfile is a file which describes how to run an application
4272 consisting of serveral processes. honcho starts all listed processes.
4273 The output of all running processes is collected by honcho and
4274 displayed.")
4275 (license license:expat)))
4276
4277 (define-public python2-honcho
4278 (package-with-python2 python-honcho))
4279
4280 (define-public python-pexpect
4281 (package
4282 (name "python-pexpect")
4283 (version "4.2.1")
4284 (source
4285 (origin
4286 (method url-fetch)
4287 (uri (pypi-uri "pexpect" version))
4288 (sha256
4289 (base32 "14ls7k99pwvl21zqv65kzrhccv50j89m5ij1hf0slmsvlxjj84rx"))))
4290 (build-system python-build-system)
4291 (arguments
4292 `(#:phases
4293 (modify-phases %standard-phases
4294 (add-before 'check 'prepare-tests
4295 (lambda _
4296 (substitute* (find-files "tests")
4297 (("/bin/ls") (which "ls"))
4298 (("/bin/echo") (which "echo"))
4299 (("/bin/which") (which "which"))
4300 ;; Many tests try to use the /bin directory which
4301 ;; is not present in the build environment.
4302 ;; Use one that's non-empty and unlikely to change.
4303 (("/bin'") "/dev'"))
4304 ;; XXX: Socket connection test gets "Connection reset by peer".
4305 ;; Why does it not work? Delete for now.
4306 (delete-file "tests/test_socket.py")
4307 #t))
4308 (replace 'check (lambda _ (zero? (system* "nosetests" "-v")))))))
4309 (native-inputs
4310 `(("python-nose" ,python-nose)
4311 ("python-pytest" ,python-pytest)
4312 ("man-db" ,man-db)
4313 ("which" ,which)
4314 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4315 (propagated-inputs
4316 `(("python-ptyprocess" ,python-ptyprocess)))
4317 (home-page "http://pexpect.readthedocs.org/")
4318 (synopsis "Controlling interactive console applications")
4319 (description
4320 "Pexpect is a pure Python module for spawning child applications;
4321 controlling them; and responding to expected patterns in their output.
4322 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4323 child application and control it as if a human were typing commands.")
4324 (license license:isc)))
4325
4326 (define-public python2-pexpect
4327 (package-with-python2 python-pexpect))
4328
4329 (define-public python-setuptools-scm
4330 (package
4331 (name "python-setuptools-scm")
4332 (version "1.15.6")
4333 (source (origin
4334 (method url-fetch)
4335 (uri (pypi-uri "setuptools_scm" version))
4336 (sha256
4337 (base32
4338 "0pzvfmx8s20yrgkgwfbxaspz2x1g38qv61jpm0ns91lrb22ldas9"))))
4339 (build-system python-build-system)
4340 (home-page "https://github.com/pypa/setuptools_scm/")
4341 (synopsis "Manage Python package versions in SCM metadata")
4342 (description
4343 "Setuptools_scm handles managing your Python package versions in
4344 @dfn{software configuration management} (SCM) metadata instead of declaring
4345 them as the version argument or in a SCM managed file.")
4346 (license license:expat)))
4347
4348 (define-public python2-setuptools-scm
4349 (package-with-python2 python-setuptools-scm))
4350
4351 (define-public python-pathpy
4352 (package
4353 (name "python-pathpy")
4354 (version "11.0")
4355 (source
4356 (origin
4357 (method url-fetch)
4358 (uri (pypi-uri "path.py" version))
4359 (sha256
4360 (base32 "12s84maimiz61980q065rjgi8ang6xw2wwm64m0lmfks51dlw4qn"))))
4361 ;; (outputs '("out" "doc"))
4362 (build-system python-build-system)
4363 (propagated-inputs
4364 `(("python-appdirs" ,python-appdirs)))
4365 (native-inputs
4366 `(("python-setuptools-scm" ,python-setuptools-scm)
4367 ("python-sphinx" ,python-sphinx)
4368 ("python-rst.linker" ,python-rst.linker)
4369 ("python-pytest" ,python-pytest)
4370 ("python-pytest-runner" ,python-pytest-runner)))
4371 (arguments
4372 ;; FIXME: Documentation and tests require "jaraco.packaging".
4373 `(#:tests? #f))
4374 ;; #:phases
4375 ;; (modify-phases %standard-phases
4376 ;; (add-after 'build 'build-doc
4377 ;; (lambda _
4378 ;; (setenv "LANG" "en_US.UTF-8")
4379 ;; (zero? (system* "python" "setup.py" "build_sphinx"))))
4380 ;; (add-after 'install 'install-doc
4381 ;; (lambda* (#:key outputs #:allow-other-keys)
4382 ;; (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4383 ;; (doc (string-append data "/doc/" ,name "-" ,version))
4384 ;; (html (string-append doc "/html")))
4385 ;; (mkdir-p html)
4386 ;; (for-each (lambda (file)
4387 ;; (copy-file file (string-append doc "/" file)))
4388 ;; '("README.rst" "CHANGES.rst"))
4389 ;; (copy-recursively "build/sphinx/html" html)))))))
4390 (home-page "https://github.com/jaraco/path.py")
4391 (synopsis "Python module wrapper for built-in os.path")
4392 (description
4393 "@code{path.py} implements path objects as first-class entities, allowing
4394 common operations on files to be invoked on those path objects directly.")
4395 (license license:expat)))
4396
4397 (define-public python2-pathpy
4398 (package-with-python2 python-pathpy))
4399
4400 (define-public python-simplegeneric
4401 (package
4402 (name "python-simplegeneric")
4403 (version "0.8.1")
4404 (source
4405 (origin
4406 (method url-fetch)
4407 (uri (string-append "https://pypi.python.org/packages/source/s/"
4408 "simplegeneric/simplegeneric-" version ".zip"))
4409 (sha256
4410 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4411 (build-system python-build-system)
4412 (native-inputs
4413 `(("unzip" ,unzip)))
4414 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4415 (synopsis "Python module for simple generic functions")
4416 (description
4417 "The simplegeneric module lets you define simple single-dispatch generic
4418 functions, akin to Python’s built-in generic functions like @code{len()},
4419 @code{iter()} and so on. However, instead of using specially-named methods,
4420 these generic functions use simple lookup tables, akin to those used by
4421 e.g. @code{pickle.dump()} and other generic functions found in the Python
4422 standard library.")
4423 (license license:zpl2.1)))
4424
4425 (define-public python2-simplegeneric
4426 (package-with-python2 python-simplegeneric))
4427
4428 (define-public python-ipython-genutils
4429 ;; TODO: This package is retired, check if can be removed, see description.
4430 (package
4431 (name "python-ipython-genutils")
4432 (version "0.1.0")
4433 (source
4434 (origin
4435 (method url-fetch)
4436 (uri (string-append "https://pypi.python.org/packages/source/i/"
4437 "ipython_genutils/ipython_genutils-"
4438 version ".tar.gz"))
4439 (sha256
4440 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4441 (build-system python-build-system)
4442 (arguments `(#:tests? #f)) ; no tests
4443 (home-page "https://ipython.org")
4444 (synopsis "Vestigial utilities from IPython")
4445 (description
4446 "This package provides retired utilities from IPython. No packages
4447 outside IPython/Jupyter should depend on it.
4448
4449 This package shouldn't exist. It contains some common utilities shared by
4450 Jupyter and IPython projects during The Big Split. As soon as possible, those
4451 packages will remove their dependency on this, and this package will go
4452 away.")
4453 (license license:bsd-3)))
4454
4455 (define-public python2-ipython-genutils
4456 (package-with-python2 python-ipython-genutils))
4457
4458 (define-public python-traitlets
4459 (package
4460 (name "python-traitlets")
4461 (version "4.2.0")
4462 (source
4463 (origin
4464 (method url-fetch)
4465 (uri (pypi-uri "traitlets" version))
4466 (sha256
4467 (base32
4468 "1afy08sa5n9gnkvh3da49c16zkyv598vchv0p1hp7zzjy8895hz4"))))
4469 (build-system python-build-system)
4470 (arguments
4471 `(#:phases
4472 (modify-phases %standard-phases
4473 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
4474 (propagated-inputs
4475 `(("python-ipython-genutils" ,python-ipython-genutils)
4476 ("python-decorator" ,python-decorator)))
4477 (native-inputs
4478 `(("python-mock" ,python-mock)
4479 ("python-nose" ,python-nose)))
4480 (home-page "https://ipython.org")
4481 (synopsis "Configuration system for Python applications")
4482 (description
4483 "Traitlets is a framework that lets Python classes have attributes with
4484 type checking, dynamically calculated default values, and ‘on change’
4485 callbacks. The package also includes a mechanism to use traitlets for
4486 configuration, loading values from files or from command line arguments. This
4487 is a distinct layer on top of traitlets, so you can use traitlets in your code
4488 without using the configuration machinery.")
4489 (license license:bsd-3)))
4490
4491 (define-public python2-traitlets
4492 (package-with-python2 python-traitlets))
4493
4494 (define-public python-jupyter-core
4495 (package
4496 (name "python-jupyter-core")
4497 (version "4.2.1")
4498 (source
4499 (origin
4500 (method url-fetch)
4501 (uri (string-append (pypi-uri "jupyter_core" version)))
4502 (sha256
4503 (base32
4504 "1cy7inv218dgh4m1fbzbsiqpz733ylgjrj62jxqpfzs3r2cm7ic9"))))
4505 (build-system python-build-system)
4506 ;; FIXME: not sure how to run the tests
4507 (arguments `(#:tests? #f))
4508 (propagated-inputs
4509 `(("python-traitlets" ,python-traitlets)))
4510 (home-page "http://jupyter.org/")
4511 (synopsis "Jupyter base package")
4512 (description
4513 "Jupyter core is the base package on which Jupyter projects rely.")
4514 (license license:bsd-3)))
4515
4516 (define-public python2-jupyter-core
4517 (package-with-python2 python-jupyter-core))
4518
4519 (define-public python-jupyter-client
4520 (package
4521 (name "python-jupyter-client")
4522 (version "4.4.0")
4523 (source
4524 (origin
4525 (method url-fetch)
4526 (uri (pypi-uri "jupyter_client" version))
4527 (sha256
4528 (base32
4529 "1vjjrpjw7k5sh982pbjnslv7byfbfazjw9g92jvs7dz5qbx556n9"))))
4530 (build-system python-build-system)
4531 ;; Tests fail because of missing native python kernel which I assume is
4532 ;; provided by the ipython package, which we cannot use because it would
4533 ;; cause a dependency cycle.
4534 (arguments `(#:tests? #f))
4535 (propagated-inputs
4536 `(("python-pyzmq" ,python-pyzmq)
4537 ("python-traitlets" ,python-traitlets)
4538 ("python-jupyter-core" ,python-jupyter-core)))
4539 (home-page "http://jupyter.org/")
4540 (synopsis "Jupyter protocol implementation and client libraries")
4541 (description
4542 "The @code{jupyter_client} package contains the reference implementation
4543 of the Jupyter protocol. It also provides client and kernel management APIs
4544 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4545 installing @code{kernelspec}s for use with Jupyter frontends.")
4546 (license license:bsd-3)))
4547
4548 (define-public python2-jupyter-client
4549 (package-with-python2 python-jupyter-client))
4550
4551 (define-public python-ipykernel
4552 (package
4553 (name "python-ipykernel")
4554 (version "4.5.2")
4555 (source
4556 (origin
4557 (method url-fetch)
4558 (uri (pypi-uri "ipykernel" version))
4559 (sha256
4560 (base32 "0qllv0k6zzv1r1cj1x2ygxmlrrqhbslzj8rc6r6fg3kc1rgz4m2s"))))
4561 (build-system python-build-system)
4562 ;; The tests load a submodule of IPython. However, IPython itself depends
4563 ;; on ipykernel.
4564 (arguments `(#:tests? #f))
4565 (propagated-inputs
4566 ;; imported at runtime during connect
4567 `(("python-jupyter-client" ,python-jupyter-client)))
4568 (home-page "https://ipython.org")
4569 (synopsis "IPython Kernel for Jupyter")
4570 (description
4571 "This package provides the IPython kernel for Jupyter.")
4572 (license license:bsd-3)))
4573
4574 (define-public python2-ipykernel
4575 (package-with-python2 python-ipykernel))
4576
4577 (define-public python-ipython
4578 (package
4579 (name "python-ipython")
4580 (version "5.5.0")
4581 (source
4582 (origin
4583 (method url-fetch)
4584 (uri (pypi-uri "ipython" version ".tar.gz"))
4585 (sha256
4586 (base32 "03qmzpfy00if10i9k8fjkam1s4xg22j73f933x5d228z9n4rwik6"))))
4587 (build-system python-build-system)
4588 (outputs '("out" "doc"))
4589 (propagated-inputs
4590 `(("python-pyzmq" ,python-pyzmq)
4591 ("python-prompt-toolkit" ,python-prompt-toolkit)
4592 ("python-terminado" ,python-terminado)
4593 ("python-matplotlib" ,python-matplotlib)
4594 ("python-numpy" ,python-numpy)
4595 ("python-numpydoc" ,python-numpydoc)
4596 ("python-jinja2" ,python-jinja2)
4597 ("python-jupyter-console"
4598 ;; The python-ipython and python-jupyter-console require each
4599 ;; other. To get the functionality in both packages working, strip
4600 ;; down the python-jupyter-console package when using it as an input
4601 ;; to python-ipython.
4602 ,python-jupyter-console-minimal)
4603 ("python-mistune" ,python-mistune)
4604 ("python-pexpect" ,python-pexpect)
4605 ("python-pickleshare" ,python-pickleshare)
4606 ("python-simplegeneric" ,python-simplegeneric)
4607 ("python-jsonschema" ,python-jsonschema)
4608 ("python-traitlets" ,python-traitlets)
4609 ("python-ipykernel" ,python-ipykernel)
4610 ("python-nbformat" ,python-nbformat)
4611 ("python-pygments" ,python-pygments)))
4612 (inputs
4613 `(("readline" ,readline)
4614 ("which" ,which)))
4615 (native-inputs
4616 `(("graphviz" ,graphviz)
4617 ("pkg-config" ,pkg-config)
4618 ("python-requests" ,python-requests) ;; for tests
4619 ("python-testpath" ,python-testpath)
4620 ("python-nose" ,python-nose)
4621 ("python-sphinx" ,python-sphinx)
4622 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
4623 ;; FIXME: It's possible that a smaller union would work just as well.
4624 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
4625 texlive-fonts-ec
4626 texlive-generic-ifxetex
4627 texlive-generic-pdftex
4628 texlive-latex-amsfonts
4629 texlive-latex-capt-of
4630 texlive-latex-cmap
4631 texlive-latex-environ
4632 texlive-latex-eqparbox
4633 texlive-latex-etoolbox
4634 texlive-latex-expdlist
4635 texlive-latex-fancyhdr
4636 texlive-latex-fancyvrb
4637 texlive-latex-fncychap
4638 texlive-latex-float
4639 texlive-latex-framed
4640 texlive-latex-geometry
4641 texlive-latex-graphics
4642 texlive-latex-hyperref
4643 texlive-latex-mdwtools
4644 texlive-latex-multirow
4645 texlive-latex-oberdiek
4646 texlive-latex-parskip
4647 texlive-latex-preview
4648 texlive-latex-tabulary
4649 texlive-latex-threeparttable
4650 texlive-latex-titlesec
4651 texlive-latex-trimspaces
4652 texlive-latex-ucs
4653 texlive-latex-upquote
4654 texlive-latex-url
4655 texlive-latex-varwidth
4656 texlive-latex-wrapfig)))
4657 ("texinfo" ,texinfo)))
4658 (arguments
4659 `(#:phases
4660 (modify-phases %standard-phases
4661 (add-after
4662 'install 'install-doc
4663 (lambda* (#:key inputs outputs #:allow-other-keys)
4664 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4665 (doc (string-append data "/doc/" ,name "-" ,version))
4666 (html (string-append doc "/html"))
4667 (man1 (string-append data "/man/man1"))
4668 (info (string-append data "/info"))
4669 (examples (string-append doc "/examples"))
4670 (python-arg (string-append "PYTHON=" (which "python"))))
4671 (setenv "LANG" "en_US.utf8")
4672 ;; Make installed package available for running the tests
4673 (add-installed-pythonpath inputs outputs)
4674 (with-directory-excursion "docs"
4675 ;; FIXME: pdf fails to build
4676 ;;(system* "make" "pdf" "PAPER=a4")
4677 (system* "make" python-arg "html")
4678 (system* "make" python-arg "info"))
4679 (copy-recursively "docs/man" man1)
4680 (copy-recursively "examples" examples)
4681 (copy-recursively "docs/build/html" html)
4682 ;; (copy-file "docs/build/latex/ipython.pdf"
4683 ;; (string-append doc "/ipython.pdf"))
4684 (mkdir-p info)
4685 (copy-file "docs/build/texinfo/ipython.info"
4686 (string-append info "/ipython.info"))
4687 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))
4688 ;; Tests can only be run after the library has been installed and not
4689 ;; within the source directory.
4690 (delete 'check)
4691 (add-after
4692 'install 'check
4693 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4694 (if tests?
4695 (with-directory-excursion "/tmp"
4696 ;; Make installed package available for running the tests
4697 (add-installed-pythonpath inputs outputs)
4698 (setenv "HOME" "/tmp/") ;; required by a test
4699 (zero? (system* (string-append (assoc-ref outputs "out")
4700 "/bin/iptest"))))
4701 #t)))
4702 (add-before
4703 'install 'fix-tests
4704 (lambda* (#:key inputs #:allow-other-keys)
4705 (substitute* "./IPython/utils/_process_posix.py"
4706 (("/usr/bin/env', 'which") (which "which")))
4707 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4708 (("#!/usr/bin/env python")
4709 (string-append "#!" (which "python"))))
4710 ;; Disable 1 failing test
4711 (substitute* "./IPython/core/tests/test_magic.py"
4712 (("def test_dirops\\(\\):" all)
4713 (string-append "@dec.skipif(True)\n" all))))))))
4714 (home-page "https://ipython.org")
4715 (synopsis "IPython is a tool for interactive computing in Python")
4716 (description
4717 "IPython provides a rich architecture for interactive computing with:
4718 Powerful interactive shells, a browser-based notebook, support for interactive
4719 data visualization, embeddable interpreters and tools for parallel
4720 computing.")
4721 (license license:bsd-3)
4722 (properties `((python2-variant . ,(delay python2-ipython))))))
4723
4724 (define-public python2-ipython
4725 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4726 (package
4727 (inherit ipython)
4728 ;; FIXME: add pyreadline once available.
4729 (propagated-inputs
4730 `(("python2-backports-shutil-get-terminal-size"
4731 ,python2-backports-shutil-get-terminal-size)
4732 ("python2-pathlib2" ,python2-pathlib2)
4733 ,@(package-propagated-inputs ipython)))
4734 (native-inputs
4735 `(("python2-mock" ,python2-mock)
4736 ,@(package-native-inputs ipython))))))
4737
4738 (define-public python-urwid
4739 (package
4740 (name "python-urwid")
4741 (version "1.3.1")
4742 (source
4743 (origin
4744 (method url-fetch)
4745 (uri (pypi-uri "urwid" version))
4746 (sha256
4747 (base32
4748 "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"))))
4749 (build-system python-build-system)
4750 (arguments
4751 `(#:phases
4752 (modify-phases %standard-phases
4753 ;; Disable failing test. Bug filed upstream:
4754 ;; https://github.com/wardi/urwid/issues/164
4755 ;; TODO: check again for python-urwid > 1.3.1 or python > 3.4.3.
4756 (add-after 'unpack 'disable-failing-test
4757 (lambda _
4758 (substitute* "urwid/tests/test_event_loops.py"
4759 (("test_remove_watch_file")
4760 "disable_remove_watch_file")))))))
4761 (home-page "http://urwid.org")
4762 (synopsis "Console user interface library for Python")
4763 (description
4764 "Urwid is a curses-based UI/widget library for Python. It includes many
4765 features useful for text console applications.")
4766 (license license:lgpl2.1+)))
4767
4768 (define-public python2-urwid
4769 (let ((python2-urwid (package-with-python2 python-urwid)))
4770 (package
4771 (inherit python2-urwid)
4772 (arguments
4773 (append
4774 `(;; Explicitly using Python 2 is necessary due the argument list being
4775 ;; built from only the 'delete-test_vterm.py' phase and python-urwid's
4776 ;; package arguments, which by default assumes the use of Python 3.
4777 #:python ,python-2
4778 #:phases
4779 (modify-phases %standard-phases
4780 ;; Disable the vterm tests because of non-deterministic failures
4781 ;; with Python 2. See https://github.com/urwid/urwid/issues/230.
4782 (add-after 'unpack 'delete-test_vterm.py
4783 (delete-file "urwid/tests/test_vterm.py"))))
4784 (package-arguments python-urwid))))))
4785
4786 (define-public python-urwidtrees
4787 (package
4788 (name "python-urwidtrees")
4789 (version "1.0.2")
4790 (source
4791 (origin
4792 (method url-fetch)
4793 ;; package author intends on distributing via github rather than pypi:
4794 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4795 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4796 version ".tar.gz"))
4797 (file-name (string-append name "-" version ".tar.gz"))
4798 (sha256
4799 (base32
4800 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
4801 (build-system python-build-system)
4802 (arguments
4803 '(#:tests? #f)) ; no tests
4804 (propagated-inputs `(("python-urwid" ,python-urwid)))
4805 (home-page "https://github.com/pazz/urwidtrees")
4806 (synopsis "Tree widgets for urwid")
4807 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4808 toolkit. Use it to build trees of widgets.")
4809 (license license:gpl3+)))
4810
4811 (define-public python2-urwidtrees
4812 (package-with-python2 python-urwidtrees))
4813
4814 (define-public python-dbus
4815 (package
4816 (name "python-dbus")
4817 (version "1.2.0")
4818 (source
4819 (origin
4820 (method url-fetch)
4821 (uri (string-append
4822 "https://dbus.freedesktop.org/releases/dbus-python/dbus-python-"
4823 version ".tar.gz"))
4824 (sha256
4825 (base32 "1py62qir966lvdkngg0v8k1khsqxwk5m4s8nflpk1agk5f5nqb71"))))
4826 (build-system gnu-build-system)
4827 (arguments
4828 '(#:phases
4829 (modify-phases %standard-phases
4830 (add-before
4831 'check 'pre-check
4832 (lambda _
4833 ;; XXX: For the missing '/etc/machine-id'.
4834 (substitute* "test/run-test.sh"
4835 (("DBUS_FATAL_WARNINGS=1")
4836 "DBUS_FATAL_WARNINGS=0"))
4837 #t)))))
4838 (native-inputs
4839 `(("pkg-config" ,pkg-config)))
4840 (inputs
4841 `(("python" ,python)
4842 ("dbus-glib" ,dbus-glib)))
4843 (synopsis "Python bindings for D-bus")
4844 (description "python-dbus provides bindings for libdbus, the reference
4845 implementation of D-Bus.")
4846 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
4847 (license license:expat)))
4848
4849 (define-public python2-dbus
4850 (package (inherit python-dbus)
4851 (name "python2-dbus")
4852 (inputs `(("python" ,python-2)
4853 ,@(alist-delete "python"
4854 (package-inputs python-dbus)
4855 equal?)))
4856 ;; FIXME: on Python 2, the test_utf8 fails with:
4857 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4858 (arguments `(#:tests? #f))))
4859
4860 (define-public python-lxml
4861 (package
4862 (name "python-lxml")
4863 (version "3.8.0")
4864 (source
4865 (origin
4866 (method url-fetch)
4867 (uri (pypi-uri "lxml" version))
4868 (sha256
4869 (base32
4870 "15nvf6n285n282682qyw3wihsncb0x5amdhyi4b83bfa2nz74vvk"))))
4871 (build-system python-build-system)
4872 (inputs
4873 `(("libxml2" ,libxml2)
4874 ("libxslt" ,libxslt)))
4875 (home-page "http://lxml.de/")
4876 (synopsis
4877 "Python XML processing library")
4878 (description
4879 "The lxml XML toolkit is a Pythonic binding for the C libraries
4880 libxml2 and libxslt.")
4881 (license license:bsd-3))) ; and a few more, see LICENSES.txt
4882
4883 (define-public python2-lxml
4884 (package-with-python2 python-lxml))
4885
4886 ;; beautifulsoup4 has a totally different namespace than 3.x,
4887 ;; and pypi seems to put it under its own name, so I guess we should too
4888 (define-public python-beautifulsoup4
4889 (package
4890 (name "python-beautifulsoup4")
4891 (version "4.5.3")
4892 (source
4893 (origin
4894 (method url-fetch)
4895 (uri (pypi-uri "beautifulsoup4" version))
4896 (sha256
4897 (base32
4898 "0glaw1vyxnbp03fni7h5496n6iib0n5iim4gax1n0ngscs9s075j"))))
4899 (build-system python-build-system)
4900 (arguments
4901 `(#:phases
4902 (modify-phases %standard-phases
4903 ;; The Python 2 source is the definitive source of beautifulsoup4. We
4904 ;; must use this conversion script when building with Python 3. The
4905 ;; conversion script also runs the tests.
4906 ;; For more information, see the file 'convert-py3k' in the source
4907 ;; distribution.
4908 (replace 'check
4909 (lambda _ (zero? (system* "./convert-py3k")))))))
4910 (home-page
4911 "https://www.crummy.com/software/BeautifulSoup/bs4/")
4912 (synopsis
4913 "Python screen-scraping library")
4914 (description
4915 "Beautiful Soup is a Python library designed for rapidly setting up
4916 screen-scraping projects. It offers Pythonic idioms for navigating,
4917 searching, and modifying a parse tree, providing a toolkit for
4918 dissecting a document and extracting what you need. It automatically
4919 converts incoming documents to Unicode and outgoing documents to UTF-8.")
4920 (license license:expat)
4921 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
4922
4923 (define-public python2-beautifulsoup4
4924 (package
4925 (inherit (package-with-python2
4926 (strip-python2-variant python-beautifulsoup4)))
4927 (arguments `(#:python ,python-2))))
4928
4929 (define-public python-netifaces
4930 (package
4931 (name "python-netifaces")
4932 (version "0.10.6")
4933 (source
4934 (origin
4935 (method url-fetch)
4936 (uri (pypi-uri "netifaces" version))
4937 (sha256
4938 (base32
4939 "1q7bi5k2r955rlcpspx4salvkkpk28jky67fjbpz2dkdycisak8c"))))
4940 (build-system python-build-system)
4941 (home-page "https://github.com/al45tair/netifaces")
4942 (synopsis
4943 "Python module for portable network interface information")
4944 (description
4945 "Netifaces is a Python module providing information on network
4946 interfaces in an easy and portable manner.")
4947 (license license:expat)))
4948
4949 (define-public python2-netifaces
4950 (package-with-python2 python-netifaces))
4951
4952 (define-public python-networkx
4953 (package
4954 (name "python-networkx")
4955 (version "2.1")
4956 (source
4957 (origin
4958 (method url-fetch)
4959 (uri (pypi-uri "networkx" version ".zip"))
4960 (sha256
4961 (base32 "1ccb8mfz4m821k9y0cigkbq42q2sbb4dj5fbjshp0awp32j2q9v4"))))
4962 (build-system python-build-system)
4963 ;; python-decorator is needed at runtime
4964 (propagated-inputs
4965 `(("python-decorator" ,python-decorator)))
4966 (native-inputs
4967 `(("python-nose" ,python-nose)
4968 ("unzip" ,unzip)))
4969 (home-page "http://networkx.github.io/")
4970 (synopsis "Python module for creating and manipulating graphs and networks")
4971 (description
4972 "NetworkX is a Python package for the creation, manipulation, and study
4973 of the structure, dynamics, and functions of complex networks.")
4974 (license license:bsd-3)))
4975
4976 (define-public python2-networkx
4977 (package-with-python2 python-networkx))
4978
4979 ;; Define new package, because the current version of python-colormath does
4980 ;; not build against 2.0.
4981 (define-public python-networkx2
4982 (package (inherit python-networkx)
4983 (name "python-networkx2")
4984 (version "2.0")
4985 (source
4986 (origin
4987 (method url-fetch)
4988 (uri (pypi-uri "networkx" version ".zip"))
4989 (sha256
4990 (base32
4991 "1ajl2jp8qry9nyjzzkqpy0vmsr14d23z1qk7y0vr5iwjbpvzhpyd"))
4992 (patches
4993 (search-patches "python-networkx2-reproducible-build.patch"))))))
4994
4995 (define-public python2-networkx2
4996 (package-with-python2 python-networkx2))
4997
4998 (define-public snakemake
4999 (package
5000 (name "snakemake")
5001 (version "4.4.0")
5002 (source
5003 (origin
5004 (method url-fetch)
5005 (uri (pypi-uri "snakemake" version))
5006 (sha256
5007 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5008 (build-system python-build-system)
5009 (arguments
5010 ;; TODO: Package missing test dependencies.
5011 '(#:tests? #f
5012 #:phases
5013 (modify-phases %standard-phases
5014 ;; For cluster execution Snakemake will call Python. Since there is
5015 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5016 ;; this by calling the snakemake wrapper instead.
5017 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5018 (lambda* (#:key outputs #:allow-other-keys)
5019 (substitute* "snakemake/executors.py"
5020 (("\\{sys.executable\\} -m snakemake")
5021 (string-append (assoc-ref outputs "out")
5022 "/bin/snakemake")))
5023 #t)))))
5024 (propagated-inputs
5025 `(("python-wrapt" ,python-wrapt)
5026 ("python-requests" ,python-requests)
5027 ("python-appdirs" ,python-appdirs)
5028 ("python-configargparse" ,python-configargparse)
5029 ("python-pyyaml" ,python-pyyaml)
5030 ("python-ratelimiter" ,python-ratelimiter)))
5031 (home-page "https://bitbucket.org/snakemake/snakemake/wiki/Home")
5032 (synopsis "Python-based execution environment for make-like workflows")
5033 (description
5034 "Snakemake aims to reduce the complexity of creating workflows by
5035 providing a clean and modern domain specific specification language (DSL) in
5036 Python style, together with a fast and comfortable execution environment.")
5037 (license license:expat)))
5038
5039 (define-public python-pyqrcode
5040 (package
5041 (name "python-pyqrcode")
5042 (version "1.2.1")
5043 (source
5044 (origin
5045 (method url-fetch)
5046 (uri (pypi-uri "PyQRCode" version))
5047 (sha256
5048 (base32
5049 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5050 (build-system python-build-system)
5051 (home-page
5052 "https://github.com/mnooner256/pyqrcode")
5053 (synopsis "QR code generator")
5054 (description
5055 "Pyqrcode is a QR code generator written purely in Python with
5056 SVG, EPS, PNG and terminal output.")
5057 (license license:bsd-3)))
5058
5059 (define-public python-seaborn
5060 (package
5061 (name "python-seaborn")
5062 (version "0.7.1")
5063 (source
5064 (origin
5065 (method url-fetch)
5066 (uri (pypi-uri "seaborn" version))
5067 (sha256
5068 (base32 "0pawrqc3mxpwd5g9pvi9gba02637bh5c8ldpp8izfwpfn52469zs"))))
5069 (build-system python-build-system)
5070 (arguments
5071 '(#:tests? #f)) ; Tests requires a running X11 server.
5072 (propagated-inputs
5073 `(("python-pandas" ,python-pandas)
5074 ("python-matplotlib" ,python-matplotlib)
5075 ("python-scipy" ,python-scipy)))
5076 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5077 (synopsis "Statistical data visualization")
5078 (description
5079 "Seaborn is a library for making attractive and informative statistical
5080 graphics in Python. It is built on top of matplotlib and tightly integrated
5081 with the PyData stack, including support for numpy and pandas data structures
5082 and statistical routines from scipy and statsmodels.")
5083 (license license:bsd-3)
5084 (properties `((python2-variant . ,(delay python2-seaborn))))))
5085
5086 (define-public python2-seaborn
5087 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
5088 (package
5089 (inherit base)
5090 (propagated-inputs `(("python2-pytz" ,python2-pytz)
5091 ,@(package-propagated-inputs base))))))
5092
5093 (define-public python-mpmath
5094 (package
5095 (name "python-mpmath")
5096 (version "0.19")
5097 (source (origin
5098 (method url-fetch)
5099 (uri (string-append "http://mpmath.org/files/mpmath-"
5100 version ".tar.gz"))
5101 (sha256
5102 (base32
5103 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5104 (build-system python-build-system)
5105 (arguments
5106 '(#:phases
5107 (modify-phases %standard-phases
5108 (replace 'check
5109 (lambda _
5110 (zero?
5111 (system* "python" "mpmath/tests/runtests.py" "-local")))))))
5112 (home-page "http://mpmath.org")
5113 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5114 (description
5115 "@code{mpmath} can be used as an arbitrary-precision substitute for
5116 Python's float/complex types and math/cmath modules, but also does much
5117 more advanced mathematics.")
5118 (license license:bsd-3)))
5119
5120 (define-public python2-mpmath
5121 (package-with-python2 python-mpmath))
5122
5123 (define-public python-sympy
5124 (package
5125 (name "python-sympy")
5126 (version "1.1.1")
5127 (source
5128 (origin
5129 (method url-fetch)
5130 (uri (string-append
5131 "https://github.com/sympy/sympy/releases/download/sympy-"
5132 version "/sympy-" version ".tar.gz"))
5133 (sha256
5134 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
5135 (build-system python-build-system)
5136 (arguments
5137 `(#:phases
5138 (modify-phases %standard-phases
5139 ;; Run the core tests after installation. By default it would run
5140 ;; *all* tests, which take a very long time to complete and are known
5141 ;; to be flaky.
5142 (delete 'check)
5143 (add-after 'install 'check
5144 (lambda* (#:key outputs #:allow-other-keys)
5145 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
5146 #t)))))
5147 (propagated-inputs
5148 `(("python-mpmath" ,python-mpmath)))
5149 (home-page "http://www.sympy.org/")
5150 (synopsis "Python library for symbolic mathematics")
5151 (description
5152 "SymPy is a Python library for symbolic mathematics. It aims to become a
5153 full-featured computer algebra system (CAS) while keeping the code as simple
5154 as possible in order to be comprehensible and easily extensible.")
5155 (license license:bsd-3)))
5156
5157 (define-public python2-sympy
5158 (package
5159 (inherit (package-with-python2 python-sympy))
5160 (arguments
5161 `(#:phases
5162 (modify-phases %standard-phases
5163 ;; Run the core tests after installation. By default it would run
5164 ;; *all* tests, which take a very long time to complete and are known
5165 ;; to be flaky.
5166 (delete 'check)
5167 (add-after 'install 'check
5168 (lambda* (#:key outputs #:allow-other-keys)
5169 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
5170 #t)))))))
5171
5172 (define-public python-q
5173 (package
5174 (name "python-q")
5175 (version "2.6")
5176 (source
5177 (origin
5178 (method url-fetch)
5179 (uri (pypi-uri "q" version))
5180 (sha256
5181 (base32
5182 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5183 (build-system python-build-system)
5184 (home-page "https://github.com/zestyping/q")
5185 (synopsis "Quick-and-dirty debugging output for tired programmers")
5186 (description
5187 "q is a Python module for \"print\" style of debugging Python code. It
5188 provides convenient short API for print out of values, tracebacks, and
5189 falling into the Python interpreter.")
5190 (license license:asl2.0)))
5191
5192 (define-public python2-q
5193 (package-with-python2 python-q))
5194
5195 (define-public python2-xlib
5196 (package
5197 (name "python2-xlib")
5198 (version "0.14")
5199 (source (origin
5200 (method url-fetch)
5201 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5202 "/" version "/"
5203 "python-xlib-" version ".tar.gz"))
5204 (sha256
5205 (base32
5206 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5207 (build-system python-build-system)
5208 (arguments
5209 `(#:python ,python-2 ;Python 2 only
5210 #:tests? #f)) ;no tests
5211 (home-page "http://python-xlib.sourceforge.net/")
5212 (synopsis "Python X11 client library")
5213 (description
5214 "The Python X Library is intended to be a fully functional X client
5215 library for Python programs. It is useful to implement low-level X clients.
5216 It is written entirely in Python.")
5217 (license license:gpl2+)))
5218
5219 (define-public python-singledispatch
5220 (package
5221 (name "python-singledispatch")
5222 (version "3.4.0.3")
5223 (source
5224 (origin
5225 (method url-fetch)
5226 (uri (pypi-uri "singledispatch" version))
5227 (sha256
5228 (base32
5229 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5230 (build-system python-build-system)
5231 (native-inputs
5232 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5233 (home-page
5234 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5235 (synopsis "Backport of singledispatch feature from Python 3.4")
5236 (description
5237 "This library brings functools.singledispatch from Python 3.4 to Python
5238 2.6-3.3.")
5239 (license license:expat)))
5240
5241 (define-public python2-singledispatch
5242 (package-with-python2 python-singledispatch))
5243
5244 ;; the python- version can be removed with python-3.5
5245 (define-public python-backports-abc
5246 (package
5247 (name "python-backports-abc")
5248 (version "0.5")
5249 (source
5250 (origin
5251 (method url-fetch)
5252 (uri (pypi-uri "backports_abc" version))
5253 (sha256
5254 (base32
5255 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5256 (build-system python-build-system)
5257 (home-page "https://github.com/cython/backports_abc")
5258 (synopsis "Backport of additions to the 'collections.abc' module")
5259 (description
5260 "Python-backports-abc provides a backport of additions to the
5261 'collections.abc' module in Python-3.5.")
5262 (license license:psfl)))
5263
5264 (define-public python2-backports-abc
5265 (package-with-python2 python-backports-abc))
5266
5267 (define-public python-backports-csv
5268 (package
5269 (name "python-backports-csv")
5270 (version "1.0.5")
5271 (source
5272 (origin
5273 (method url-fetch)
5274 (uri (pypi-uri "backports.csv" version))
5275 (sha256
5276 (base32
5277 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
5278 (build-system python-build-system)
5279 (home-page "https://github.com/ryanhiebert/backports.csv")
5280 (synopsis "Backport of Python 3's csv module for Python 2")
5281 (description
5282 "Provides a backport of Python 3's @code{csv} module for parsing
5283 comma separated values. The API of the @code{csv} module in Python 2
5284 is drastically different from the @code{csv} module in Python 3.
5285 This is due, for the most part, to the difference between str in
5286 Python 2 and Python 3.")
5287 (license license:psfl)))
5288
5289 (define-public python2-backports-csv
5290 (package-with-python2 python-backports-csv))
5291
5292 (define-public python2-backports-shutil-get-terminal-size
5293 (package
5294 (name "python2-backports-shutil-get-terminal-size")
5295 (version "1.0.0")
5296 (source
5297 (origin
5298 (method url-fetch)
5299 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
5300 (sha256
5301 (base32
5302 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
5303 (build-system python-build-system)
5304 (arguments
5305 `(#:python ,python-2
5306 #:phases
5307 (modify-phases %standard-phases
5308 (replace 'check
5309 (lambda _
5310 (zero? (system* "py.test" "-v")))))))
5311 (native-inputs
5312 `(("python2-pytest" ,python2-pytest)))
5313 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
5314 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
5315 (description
5316 "This package provides a backport of the @code{get_terminal_size
5317 function} from Python 3.3's @code{shutil}.
5318 Unlike the original version it is written in pure Python rather than C,
5319 so it might be a tiny bit slower.")
5320 (license license:expat)))
5321
5322 (define-public python-waf
5323 (package
5324 (name "python-waf")
5325 (version "1.9.8")
5326 (source (origin
5327 (method url-fetch)
5328 (uri (string-append "https://waf.io/"
5329 "waf-" version ".tar.bz2"))
5330 (sha256
5331 (base32
5332 "0wl4cnmp06lfxqjxaan58bqxn27smhydz0sg5prrfbl3bsw4gv6q"))))
5333 (build-system python-build-system)
5334 (arguments
5335 '(#:phases
5336 (modify-phases %standard-phases
5337 (replace 'build
5338 (lambda _
5339 (zero? (system* "python" "waf-light" "configure" "build"))))
5340 (replace 'check
5341 (lambda _
5342 (zero? (system* "python" "waf" "--version"))))
5343 (replace 'install
5344 (lambda _
5345 (copy-file "waf" %output))))))
5346 (home-page "https://waf.io/")
5347 (synopsis "Python-based build system")
5348 (description
5349 "Waf is a Python-based framework for configuring, compiling and installing
5350 applications.")
5351 (license license:bsd-3)))
5352
5353 (define-public python2-waf
5354 (package-with-python2 python-waf))
5355
5356 (define-public python-pyzmq
5357 (package
5358 (name "python-pyzmq")
5359 (version "15.1.0")
5360 (source
5361 (origin
5362 (method url-fetch)
5363 (uri (pypi-uri "pyzmq" version))
5364 (sha256
5365 (base32 "13fhwnlvsvxv72kfhqbpn6qi7msh8mc8377mpabv32skk2cjfnxx"))))
5366 (build-system python-build-system)
5367 (arguments
5368 `(#:configure-flags
5369 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5370 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5371 ;; --inplace' for 'python setup.py test' to work.
5372 #:tests? #f))
5373 (inputs
5374 `(("zeromq" ,zeromq)))
5375 (native-inputs
5376 `(("pkg-config" ,pkg-config)
5377 ("python-nose" ,python-nose)))
5378 (home-page "https://github.com/zeromq/pyzmq")
5379 (synopsis "Python bindings for 0MQ")
5380 (description
5381 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5382 (license license:bsd-4)))
5383
5384 (define-public python2-pyzmq
5385 (package-with-python2 python-pyzmq))
5386
5387 (define-public python-pep8
5388 (package
5389 (name "python-pep8")
5390 (version "1.7.0")
5391 (source
5392 (origin
5393 (method url-fetch)
5394 (uri (pypi-uri "pep8" version))
5395 (sha256
5396 (base32
5397 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5398 (build-system python-build-system)
5399 (home-page "http://pep8.readthedocs.org/")
5400 (synopsis "Python style guide checker")
5401 (description
5402 "This tools checks Python code against some of the style conventions in
5403 PEP 8.")
5404 (license license:expat)))
5405
5406 (define-public python2-pep8
5407 (package-with-python2 python-pep8))
5408
5409 (define-public python-pyflakes
5410 (package
5411 (name "python-pyflakes")
5412 (version "1.5.0")
5413 (source
5414 (origin
5415 (method url-fetch)
5416 (uri (pypi-uri "pyflakes" version))
5417 (sha256
5418 (base32
5419 "1x1pcca4a24k4pw8x1c77sgi58cg1wl2k38mp8a25k608pzls3da"))))
5420 (build-system python-build-system)
5421 (home-page
5422 "https://github.com/pyflakes/pyflakes")
5423 (synopsis "Passive checker of Python programs")
5424 (description
5425 "Pyflakes statically checks Python source code for common errors.")
5426 (license license:expat)))
5427
5428 (define-public python2-pyflakes
5429 (package-with-python2 python-pyflakes))
5430
5431 (define-public python-mccabe
5432 (package
5433 (name "python-mccabe")
5434 (version "0.6.1")
5435 (source
5436 (origin
5437 (method url-fetch)
5438 (uri (pypi-uri "mccabe" version))
5439 (sha256
5440 (base32
5441 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
5442 (build-system python-build-system)
5443 (native-inputs
5444 `(("python-pytest" ,python-pytest-bootstrap)
5445 ("python-pytest-runner" ,python-pytest-runner)))
5446 (home-page "https://github.com/flintwork/mccabe")
5447 (synopsis "McCabe checker, plugin for flake8")
5448 (description
5449 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5450 complexity of Python source code.")
5451 (license license:expat)))
5452
5453 (define-public python2-mccabe
5454 (package-with-python2 python-mccabe))
5455
5456 (define-public python-mccabe-0.2.1
5457 (package (inherit python-mccabe)
5458 (version "0.2.1")
5459 (source
5460 (origin
5461 (method url-fetch)
5462 (uri (pypi-uri "mccabe" version))
5463 (sha256
5464 (base32
5465 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5466
5467 (define-public python2-mccabe-0.2.1
5468 (package-with-python2 python-mccabe-0.2.1))
5469
5470 ;; Flake8 2.4.1 requires an older version of pep8.
5471 ;; This should be removed ASAP.
5472 (define-public python-pep8-1.5.7
5473 (package (inherit python-pep8)
5474 (version "1.5.7")
5475 (source
5476 (origin
5477 (method url-fetch)
5478 (uri (string-append
5479 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5480 version
5481 ".tar.gz"))
5482 (sha256
5483 (base32
5484 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
5485 (arguments
5486 ;; XXX Tests not compatible with Python 3.5.
5487 '(#:tests? #f))))
5488
5489 (define-public python2-pep8-1.5.7
5490 (package-with-python2 python-pep8-1.5.7))
5491
5492 ;; Flake8 2.4.1 requires an older version of pyflakes.
5493 ;; This should be removed ASAP.
5494 (define-public python-pyflakes-0.8.1
5495 (package (inherit python-pyflakes)
5496 (version "0.8.1")
5497 (source
5498 (origin
5499 (method url-fetch)
5500 (uri (string-append
5501 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5502 version
5503 ".tar.gz"))
5504 (sha256
5505 (base32
5506 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
5507 (arguments
5508 ;; XXX Tests not compatible with Python 3.5.
5509 '(#:tests? #f))))
5510
5511 (define-public python2-pyflakes-0.8.1
5512 (package-with-python2 python-pyflakes-0.8.1))
5513
5514 (define-public python-flake8
5515 (package
5516 (name "python-flake8")
5517 (version "3.4.1")
5518 (source
5519 (origin
5520 (method url-fetch)
5521 (uri (pypi-uri "flake8" version))
5522 (sha256
5523 (base32
5524 "1n0i38592vy3q0x2a9bf8z6rhhn04i30wsn5i5zzcj7qkxvl8062"))))
5525 (build-system python-build-system)
5526 (arguments
5527 `(#:phases
5528 (modify-phases %standard-phases
5529 (delete 'check)
5530 (add-after 'install 'check
5531 (lambda* (#:key inputs outputs #:allow-other-keys)
5532 (add-installed-pythonpath inputs outputs)
5533 (zero? (system* "pytest" "-v")))))))
5534 (propagated-inputs
5535 `(("python-pycodestyle" ,python-pycodestyle)
5536 ("python-pyflakes" ,python-pyflakes)
5537 ;; flake8 depends on a newer setuptools than provided by python.
5538 ("python-setuptools" ,python-setuptools)
5539 ("python-mccabe" ,python-mccabe)))
5540 (native-inputs
5541 `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
5542 ("python-pytest" ,python-pytest-bootstrap)
5543 ("python-pytest-runner" ,python-pytest-runner)))
5544 (home-page "https://gitlab.com/pycqa/flake8")
5545 (synopsis
5546 "The modular source code checker: pep8, pyflakes and co")
5547 (description
5548 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5549 (properties `((python2-variant . ,(delay python2-flake8))))
5550 (license license:expat)))
5551
5552 (define-public python2-flake8
5553 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
5554 (package (inherit base)
5555 (propagated-inputs
5556 `(("python2-configparser" ,python2-configparser)
5557 ("python2-enum" ,python2-enum)
5558 ,@(package-propagated-inputs base))))))
5559
5560 ;; python-hacking requires flake8 <2.6.0.
5561 (define-public python-flake8-2.5
5562 (package
5563 (inherit python-flake8)
5564 (version "2.5.5")
5565 (source (origin
5566 (method url-fetch)
5567 (uri (pypi-uri "flake8" version))
5568 (sha256
5569 (base32
5570 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
5571 (propagated-inputs
5572 `(("python-pep8" ,python-pep8)
5573 ,@(package-propagated-inputs python-flake8)))
5574 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
5575
5576 (define-public python2-flake8-2.5
5577 (package
5578 (inherit python2-flake8)
5579 (version (package-version python-flake8-2.5))
5580 (source (origin
5581 (inherit (package-source python-flake8-2.5))))
5582 (propagated-inputs
5583 `(("python2-pep8" ,python2-pep8)
5584 ,@(package-propagated-inputs python2-flake8)))))
5585
5586 (define-public python-flake8-polyfill
5587 (package
5588 (name "python-flake8-polyfill")
5589 (version "1.0.2")
5590 (source
5591 (origin
5592 (method url-fetch)
5593 (uri (pypi-uri "flake8-polyfill" version))
5594 (sha256
5595 (base32
5596 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
5597 (build-system python-build-system)
5598 (arguments
5599 '(#:phases
5600 (modify-phases %standard-phases
5601 (replace 'check
5602 (lambda _
5603 (setenv "PYTHONPATH"
5604 (string-append (getcwd) "/build/lib:"
5605 (getenv "PYTHONPATH")))
5606 (zero? (system* "py.test" "-v")))))))
5607 (native-inputs
5608 `(("python-flake8" ,python-flake8)
5609 ("python-mock" ,python-mock)
5610 ("python-pep8" ,python-pep8)
5611 ("python-pycodestyle" ,python-pycodestyle)
5612 ("python-pytest" ,python-pytest)))
5613 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
5614 (synopsis "Polyfill package for Flake8 plugins")
5615 (description
5616 "This package that provides some compatibility helpers for Flake8
5617 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
5618 (license license:expat)))
5619
5620 (define-public python2-flake8-polyfill
5621 (package-with-python2 python-flake8-polyfill))
5622
5623 (define-public python-mistune
5624 (package
5625 (name "python-mistune")
5626 (version "0.8.3")
5627 (source
5628 (origin
5629 (method url-fetch)
5630 (uri (pypi-uri "mistune" version))
5631 (sha256
5632 (base32
5633 "06b662p6kf46wh2jsabaqhaq4bz1srh2zxkrnx4yg96azlxw645w"))))
5634 (build-system python-build-system)
5635 (native-inputs
5636 `(("python-nose" ,python-nose)
5637 ("python-cython" ,python-cython)))
5638 (home-page "https://github.com/lepture/mistune")
5639 (synopsis "Markdown parser in pure Python")
5640 (description "This package provides a fast markdown parser in pure
5641 Python.")
5642 (license license:bsd-3)))
5643
5644 (define-public python2-mistune
5645 (package-with-python2 python-mistune))
5646
5647 (define-public python-markdown
5648 (package
5649 (name "python-markdown")
5650 (version "2.6.11")
5651 (source
5652 (origin
5653 (method url-fetch)
5654 (uri (pypi-uri "Markdown" version))
5655 (sha256
5656 (base32
5657 "108g80ryzykh8bj0i7jfp71510wrcixdi771lf2asyghgyf8cmm8"))))
5658 (build-system python-build-system)
5659 (arguments
5660 `(#:phases
5661 (modify-phases %standard-phases
5662 (replace 'check
5663 (lambda _
5664 (zero? (system* "python" "run-tests.py")))))))
5665 (native-inputs
5666 `(("python-nose" ,python-nose)
5667 ("python-pyyaml" ,python-pyyaml)))
5668 (home-page "https://pythonhosted.org/Markdown/")
5669 (synopsis "Python implementation of Markdown")
5670 (description
5671 "This package provides a Python implementation of John Gruber's
5672 Markdown. The library features international input, various Markdown
5673 extensions, and several HTML output formats. A command line wrapper
5674 markdown_py is also provided to convert Markdown files to HTML.")
5675 (license license:bsd-3)))
5676
5677 (define-public python2-markdown
5678 (package-with-python2 python-markdown))
5679
5680 (define-public python-ptyprocess
5681 (package
5682 (name "python-ptyprocess")
5683 (version "0.5.1")
5684 (source
5685 (origin
5686 (method url-fetch)
5687 (uri (string-append
5688 "https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-"
5689 version ".tar.gz"))
5690 (sha256
5691 (base32
5692 "19l1xrjn4l9gjz01s3vg92gn2dd9d8mw1v86ppkzlnr9m5iwwc05"))))
5693 (build-system python-build-system)
5694 (native-inputs
5695 `(("python-nose" ,python-nose)))
5696 (arguments
5697 `(#:phases
5698 (modify-phases %standard-phases
5699 (replace 'check
5700 (lambda _
5701 (zero? (system* "nosetests")))))))
5702 (home-page "https://github.com/pexpect/ptyprocess")
5703 (synopsis "Run a subprocess in a pseudo terminal")
5704 (description
5705 "This package provides a Python library used to launch a subprocess in a
5706 pseudo terminal (pty), and interact with both the process and its pty.")
5707 (license license:isc)))
5708
5709 (define-public python2-ptyprocess
5710 (package-with-python2 python-ptyprocess))
5711
5712 (define-public python-cram
5713 (package
5714 (name "python-cram")
5715 (version "0.7")
5716 (home-page "https://bitheap.org/cram/")
5717 (source (origin
5718 (method url-fetch)
5719 (uri (list (string-append home-page "cram-"
5720 version ".tar.gz")
5721 (pypi-uri "cram" version)))
5722 (sha256
5723 (base32
5724 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
5725 (arguments
5726 '(#:phases
5727 (modify-phases %standard-phases
5728 (add-after 'unpack 'patch-source
5729 (lambda _
5730 (substitute* (find-files "cram" ".*\\.py$")
5731 ;; Replace default shell path.
5732 (("/bin/sh") (which "sh")))
5733 (substitute* (find-files "tests" ".*\\.t$")
5734 (("md5") "md5sum")
5735 (("/bin/bash") (which "bash"))
5736 (("/bin/sh") (which "sh")))
5737 (substitute* "cram/_test.py"
5738 ;; This hack works around a bug triggered by substituting
5739 ;; the /bin/sh paths. "tests/usage.t" compares the output of
5740 ;; "cram -h", which breaks the output at 80 characters. This
5741 ;; causes the line showing the default shell to break into two
5742 ;; lines, but the test expects a single line...
5743 (("env\\['COLUMNS'\\] = '80'")
5744 "env['COLUMNS'] = '160'"))
5745 #t))
5746 (delete 'check)
5747 (add-after 'install 'check
5748 ;; The test phase uses the built library and executable.
5749 ;; It's easier to run it after install since the build
5750 ;; directory contains version-specific PATH.
5751 (lambda* (#:key inputs outputs #:allow-other-keys)
5752 (add-installed-pythonpath inputs outputs)
5753 (setenv "PATH" (string-append (getenv "PATH") ":"
5754 (assoc-ref outputs "out") "/bin"))
5755 (zero? (system* "make" "test")))))))
5756 (build-system python-build-system)
5757 (native-inputs
5758 `(("python-coverage" ,python-coverage)
5759 ("which" ,which)))
5760 (synopsis "Simple testing framework for command line applications")
5761 (description
5762 "Cram is a functional testing framework for command line applications.
5763 Cram tests look like snippets of interactive shell sessions. Cram runs each
5764 command and compares the command output in the test with the command’s actual
5765 output.")
5766 (license license:gpl2+)))
5767
5768 (define-public python2-cram
5769 (package-with-python2 python-cram))
5770
5771 (define-public python-straight-plugin
5772 (package
5773 (name "python-straight-plugin")
5774 (version "1.4.1")
5775 (source
5776 (origin
5777 (method url-fetch)
5778 (uri (pypi-uri "straight.plugin" version))
5779 (sha256
5780 (base32
5781 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
5782 (build-system python-build-system)
5783 (home-page "https://github.com/ironfroggy/straight.plugin")
5784 (synopsis "Simple namespaced plugin facility")
5785 (description "Straight Plugin provides a type of plugin you can create from
5786 almost any existing Python modules, and an easy way for outside developers to
5787 add functionality and customization to your projects with their own plugins.")
5788 (license license:expat)))
5789
5790 (define-public python2-straight-plugin
5791 (package-with-python2 python-straight-plugin))
5792
5793 (define-public python-fonttools
5794 (package
5795 (name "python-fonttools")
5796 (version "3.15.1")
5797 (source (origin
5798 (method url-fetch)
5799 (uri (pypi-uri "fonttools" version ".zip"))
5800 (sha256
5801 (base32
5802 "1hhj97izwliy0vybmza72d90l5d4mcn50y8akq7kyccfl82vdx4d"))))
5803 (build-system python-build-system)
5804 (arguments
5805 '(#:test-target "check"
5806 #:phases
5807 (modify-phases %standard-phases
5808 (add-after 'unpack 'patch-setuppy
5809 ;; Remove the undocumented "extra_path" argument, which adds an
5810 ;; intervening directories between site-packages and the package
5811 ;; directory.
5812 (lambda _
5813 (substitute* "setup.py"
5814 (("^[ \t]*extra_path *= *'FontTools',") ""))
5815 #t)))))
5816 (native-inputs
5817 `(("unzip" ,unzip)))
5818 (home-page "https://github.com/behdad/fonttools")
5819 (synopsis "Tools to manipulate font files")
5820 (description
5821 "FontTools/TTX is a library to manipulate font files from Python. It
5822 supports reading and writing of TrueType/OpenType fonts, reading and writing
5823 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5824 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5825 from an XML-based format.")
5826 (license (license:non-copyleft
5827 "file://LICENSE.txt"
5828 "See LICENSE.txt in the distribution."))))
5829
5830 (define-public python2-fonttools
5831 (package-with-python2 python-fonttools))
5832
5833 (define-public python-ly
5834 (package
5835 (name "python-ly")
5836 (version "0.9.5")
5837 (source
5838 (origin
5839 (method url-fetch)
5840 (uri (string-append "https://pypi.python.org/packages/57/4f/"
5841 "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
5842 "/python-ly-" version ".tar.gz"))
5843 (sha256
5844 (base32
5845 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
5846 (build-system python-build-system)
5847 (arguments
5848 ;; FIXME: Some tests need network access.
5849 '(#:tests? #f))
5850 (synopsis "Tool and library for manipulating LilyPond files")
5851 (description "This package provides a Python library to parse, manipulate
5852 or create documents in LilyPond format. A command line program ly is also
5853 provided that can be used to do various manipulations with LilyPond files.")
5854 (home-page "https://pypi.python.org/pypi/python-ly")
5855 (license license:gpl2+)))
5856
5857 (define-public python-appdirs
5858 (package
5859 (name "python-appdirs")
5860 (version "1.4.3")
5861 (source
5862 (origin
5863 (method url-fetch)
5864 (uri (pypi-uri "appdirs" version))
5865 (sha256
5866 (base32
5867 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
5868 (build-system python-build-system)
5869 (home-page "https://github.com/ActiveState/appdirs")
5870 (synopsis
5871 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5872 (description
5873 "This module provides a portable way of finding out where user data
5874 should be stored on various operating systems.")
5875 (license license:expat)))
5876
5877 (define-public python2-appdirs
5878 (package-with-python2 python-appdirs))
5879
5880 (define-public python-llfuse
5881 (package
5882 (name "python-llfuse")
5883 (version "1.3.2")
5884 (source (origin
5885 (method url-fetch)
5886 (uri (pypi-uri "llfuse" version ".tar.bz2"))
5887 (sha256
5888 (base32
5889 "0qxvnbz41bpvpc1vbi8qkhmpr9gj1qrrp5jdj085iqibd8l2l9cn"))))
5890 (build-system python-build-system)
5891 (inputs
5892 `(("fuse" ,fuse)
5893 ("attr" ,attr)))
5894 (native-inputs
5895 `(("pkg-config" ,pkg-config)))
5896 (synopsis "Python bindings for FUSE")
5897 (description
5898 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5899 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
5900 (license license:lgpl2.0+)
5901 (properties `((python2-variant . ,(delay python2-llfuse))))))
5902
5903 (define-public python2-llfuse
5904 (package (inherit (package-with-python2
5905 (strip-python2-variant python-llfuse)))
5906 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
5907
5908 ;; For attic-0.16
5909 (define-public python-llfuse-0.41
5910 (package (inherit python-llfuse)
5911 (version "0.41.1")
5912 (source (origin
5913 (method url-fetch)
5914 (uri (string-append
5915 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5916 "llfuse-" version ".tar.bz2"))
5917 (sha256
5918 (base32
5919 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
5920 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
5921 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
5922 (license (list license:expat license:lgpl2.0+))))
5923
5924 (define-public python-msgpack
5925 (package
5926 (name "python-msgpack")
5927 (version "0.5.6")
5928 (source (origin
5929 (method url-fetch)
5930 (uri (pypi-uri "msgpack" version))
5931 (sha256
5932 (base32
5933 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
5934 (build-system python-build-system)
5935 (arguments
5936 `(#:modules ((guix build utils)
5937 (guix build python-build-system)
5938 (ice-9 ftw)
5939 (srfi srfi-1)
5940 (srfi srfi-26))
5941 #:phases
5942 (modify-phases %standard-phases
5943 (replace 'check
5944 (lambda _
5945 (let ((cwd (getcwd)))
5946 (setenv "PYTHONPATH"
5947 (string-append cwd "/build/"
5948 (find (cut string-prefix? "lib" <>)
5949 (scandir (string-append cwd "/build")))
5950 ":"
5951 (getenv "PYTHONPATH")))
5952 (invoke "pytest" "-v" "test")))))))
5953 (native-inputs
5954 `(("python-pytest" ,python-pytest)))
5955 (synopsis "MessagePack (de)serializer")
5956 (description "MessagePack is a fast, compact binary serialization format,
5957 suitable for similar data to JSON. This package provides CPython bindings for
5958 reading and writing MessagePack data.")
5959 (home-page "https://pypi.python.org/pypi/msgpack/")
5960 (license license:asl2.0)))
5961
5962 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
5963 ;; release 0.5. Some packages like borg still call it by the old name for now.
5964 ;; <https://bugs.gnu.org/30662>
5965 (define-public python-msgpack-transitional
5966 (package
5967 (inherit python-msgpack)
5968 (name "python-msgpack-transitional")
5969 (arguments
5970 (substitute-keyword-arguments (package-arguments python-msgpack)
5971 ((#:phases phases)
5972 `(modify-phases ,phases
5973 (add-after 'unpack 'configure-transitional
5974 (lambda _
5975 ;; Keep using the old name.
5976 (substitute* "setup.py"
5977 (("TRANSITIONAL = False")
5978 "TRANSITIONAL = 1"))
5979 #t))))))))
5980
5981 (define-public python2-msgpack
5982 (package-with-python2 python-msgpack))
5983
5984 (define-public python-netaddr
5985 (package
5986 (name "python-netaddr")
5987 (version "0.7.19")
5988 (source
5989 (origin
5990 (method url-fetch)
5991 (uri (pypi-uri "netaddr" version))
5992 (sha256
5993 (base32
5994 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
5995 (build-system python-build-system)
5996 (arguments `(#:tests? #f)) ;; No tests.
5997 (home-page "https://github.com/drkjam/netaddr/")
5998 (synopsis "Pythonic manipulation of network addresses")
5999 (description
6000 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6001 and MAC network addresses.")
6002 (license license:bsd-3)))
6003
6004 (define-public python2-netaddr
6005 (package-with-python2 python-netaddr))
6006
6007 (define-public python-wrapt
6008 (package
6009 (name "python-wrapt")
6010 (version "1.10.11")
6011 (source
6012 (origin
6013 (method url-fetch)
6014 (uri (pypi-uri "wrapt" version))
6015 (sha256
6016 (base32
6017 "1ip3dwib39xhp79kblskgvz3fjzcwxgx3fs3ahdixhpjg7a61mfl"))))
6018 (build-system python-build-system)
6019 (arguments
6020 ;; Tests are not included in the tarball, they are only available in the
6021 ;; git repository.
6022 `(#:tests? #f))
6023 (home-page "https://github.com/GrahamDumpleton/wrapt")
6024 (synopsis "Module for decorators, wrappers and monkey patching")
6025 (description
6026 "The aim of the wrapt module is to provide a transparent object proxy for
6027 Python, which can be used as the basis for the construction of function
6028 wrappers and decorator functions.")
6029 (license license:bsd-2)))
6030
6031 (define-public python2-wrapt
6032 (package-with-python2 python-wrapt))
6033
6034 (define-public python-xlrd
6035 (package
6036 (name "python-xlrd")
6037 (version "1.0.0")
6038 (source (origin
6039 (method url-fetch)
6040 (uri (pypi-uri "xlrd" version))
6041 (sha256
6042 (base32
6043 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6044 (build-system python-build-system)
6045 (arguments
6046 `(#:phases
6047 (modify-phases %standard-phases
6048 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6049 ;; run tests instead for now.
6050 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
6051 (native-inputs `(("python-nose" ,python-nose)))
6052 (home-page "http://www.python-excel.org/")
6053 (synopsis "Library for extracting data from Excel files")
6054 (description "This packages provides a library to extract data from
6055 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6056 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6057 Unicode-aware. It is not intended as an end-user tool.")
6058 (license license:bsd-3)))
6059
6060 (define-public python2-xlrd
6061 (package-with-python2 python-xlrd))
6062
6063 (define-public python-prettytable
6064 (package
6065 (name "python-prettytable")
6066 (version "0.7.2")
6067 (source
6068 (origin
6069 (method url-fetch)
6070 (uri (string-append
6071 "https://pypi.python.org/packages/source/P/PrettyTable/"
6072 "prettytable-" version ".tar.bz2"))
6073 (sha256
6074 (base32
6075 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6076 (build-system python-build-system)
6077 (home-page "http://code.google.com/p/prettytable/")
6078 (synopsis "Display tabular data in an ASCII table format")
6079 (description
6080 "A library designed to represent tabular data in visually appealing ASCII
6081 tables. PrettyTable allows for selection of which columns are to be printed,
6082 independent alignment of columns (left or right justified or centred) and
6083 printing of sub-tables by specifying a row range.")
6084 (license license:bsd-3)))
6085
6086 (define-public python2-prettytable
6087 (package-with-python2 python-prettytable))
6088
6089 (define-public python-tables
6090 (package
6091 (name "python-tables")
6092 (version "3.2.2")
6093 (source
6094 (origin
6095 (method url-fetch)
6096 (uri (pypi-uri "tables" version))
6097 (sha256
6098 (base32
6099 "117s6w7s3yxafpmf3zz3svana7xfrsviw01va1xp7h8ylx8v6r1m"))
6100 (modules '((guix build utils)))
6101 (snippet
6102 '(begin
6103 ;; Remove pre-compiled .pyc files from source.
6104 (for-each delete-file-recursively
6105 (find-files "." "__pycache__" #:directories? #t))
6106 (for-each delete-file (find-files "." "\\.pyc$"))
6107 #t))))
6108 (build-system python-build-system)
6109 (arguments
6110 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6111 ;; or "check", so we must override the build and check phases.
6112 #:phases
6113 (modify-phases %standard-phases
6114 (add-after 'unpack 'use-gcc
6115 (lambda _
6116 (substitute* "setup.py"
6117 (("compiler = new_compiler\\(\\)" line)
6118 (string-append line
6119 "\ncompiler.set_executables(compiler='gcc',"
6120 "compiler_so='gcc',"
6121 "linker_exe='gcc',"
6122 "linker_so='gcc -shared')")))
6123 #t))
6124 (replace 'build
6125 (lambda* (#:key inputs #:allow-other-keys)
6126 (zero? (system* "python" "setup.py" "build"
6127 (string-append "--hdf5="
6128 (assoc-ref inputs "hdf5"))))))
6129 (replace 'check
6130 (lambda* (#:key inputs #:allow-other-keys)
6131 (zero? (system* "python" "setup.py" "check"
6132 (string-append "--hdf5="
6133 (assoc-ref inputs "hdf5")))))))))
6134 (propagated-inputs
6135 `(("python-numexpr" ,python-numexpr)
6136 ("python-numpy" ,python-numpy)))
6137 (native-inputs
6138 `(("python-cython" ,python-cython)
6139 ("pkg-config" ,pkg-config)))
6140 (inputs
6141 `(("hdf5" ,hdf5)
6142 ("bzip2" ,bzip2)
6143 ("zlib" ,zlib)))
6144 (home-page "http://www.pytables.org/")
6145 (synopsis "Hierarchical datasets for Python")
6146 (description "PyTables is a package for managing hierarchical datasets and
6147 designed to efficiently cope with extremely large amounts of data.")
6148 (license license:bsd-3)))
6149
6150 (define-public python2-tables
6151 (package-with-python2 python-tables))
6152
6153 (define-public python-pyasn1
6154 (package
6155 (name "python-pyasn1")
6156 (version "0.2.3")
6157 (source
6158 (origin
6159 (method url-fetch)
6160 (uri (pypi-uri "pyasn1" version))
6161 (sha256
6162 (base32
6163 "1b86yx23c1x74clai05a5ma8c8nfmhlx3j1mxq0ff657i2ylx33k"))))
6164 (build-system python-build-system)
6165 (home-page "http://pyasn1.sourceforge.net/")
6166 (synopsis "ASN.1 types and codecs")
6167 (description
6168 "This is an implementation of ASN.1 types and codecs in Python. It is
6169 suitable for a wide range of protocols based on the ASN.1 specification.")
6170 (license license:bsd-2)))
6171
6172 (define-public python2-pyasn1
6173 (package-with-python2 python-pyasn1))
6174
6175 (define-public python-pyasn1-modules
6176 (package
6177 (name "python-pyasn1-modules")
6178 (version "0.0.8")
6179 (source
6180 (origin
6181 (method url-fetch)
6182 (uri (pypi-uri "pyasn1-modules" version))
6183 (sha256
6184 (base32
6185 "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"))))
6186 (build-system python-build-system)
6187 (propagated-inputs
6188 `(("python-pyasn1" ,python-pyasn1)))
6189 (home-page "https://sourceforge.net/projects/pyasn1/")
6190 (synopsis "ASN.1 codec implementations")
6191 (description
6192 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6193 implementations of ASN.1-based codecs and protocols.")
6194 (license license:bsd-3)))
6195
6196 (define-public python2-pyasn1-modules
6197 (package-with-python2 python-pyasn1-modules))
6198
6199 (define-public python-ipaddress
6200 (package
6201 (name "python-ipaddress")
6202 (version "1.0.19")
6203 (source (origin
6204 (method url-fetch)
6205 (uri (pypi-uri "ipaddress" version))
6206 (sha256
6207 (base32
6208 "10agaa1cys1bk1ycpl2w8lky9vjx8h1xh1z29mg0niqx0638c390"))))
6209 (build-system python-build-system)
6210 (home-page "https://github.com/phihag/ipaddress")
6211 (synopsis "IP address manipulation library")
6212 (description
6213 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6214 in Python. This library is used to create, poke at, and manipulate IPv4 and
6215 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6216 module to older versions of Python.")
6217 (license license:psfl)))
6218
6219 (define-public python2-ipaddress
6220 (package-with-python2 python-ipaddress))
6221
6222 (define-public python2-ipaddr
6223 (package
6224 (name "python2-ipaddr")
6225 (version "2.1.11")
6226 (source
6227 (origin
6228 (method url-fetch)
6229 (uri (pypi-uri "ipaddr" version))
6230 (sha256
6231 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6232 (build-system python-build-system)
6233 (arguments
6234 `(#:python ,python-2 ;version 2 only
6235 #:phases
6236 (modify-phases %standard-phases
6237 (replace 'check
6238 (lambda* _
6239 (zero? (system* "python" "ipaddr_test.py")))))))
6240 (home-page "https://github.com/google/ipaddr-py")
6241 (synopsis "IP address manipulation library")
6242 (description
6243 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6244 IPv6 addresses and networks.
6245
6246 For new implementations you may prefer to use the standard module
6247 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
6248 versions of Python.")
6249 (license license:asl2.0)))
6250
6251 (define-public python-idna
6252 (package
6253 (name "python-idna")
6254 (version "2.6")
6255 (source
6256 (origin
6257 (method url-fetch)
6258 (uri (pypi-uri "idna" version))
6259 (sha256
6260 (base32
6261 "13qaab6d0s15gknz8v3zbcfmbj6v86hn9pjxgkdf62ch13imssic"))))
6262 (build-system python-build-system)
6263 (home-page "https://github.com/kjd/idna")
6264 (synopsis "Internationalized domain names in applications")
6265 (description
6266 "This is a library to support the Internationalised Domain Names in
6267 Applications (IDNA) protocol as specified in RFC 5891. This version of the
6268 protocol is often referred to as “IDNA2008” and can produce different results
6269 from the earlier standard from 2003. The library is also intended to act as a
6270 suitable drop-in replacement for the “encodings.idna” module that comes with
6271 the Python standard library but currently only supports the older 2003
6272 specification.")
6273 (license license:bsd-4)))
6274
6275 (define-public python2-idna
6276 (package-with-python2 python-idna))
6277
6278 (define-public python-pretend
6279 (package
6280 (name "python-pretend")
6281 (version "1.0.8")
6282 (source
6283 (origin
6284 (method url-fetch)
6285 (uri (string-append "https://pypi.python.org/packages/source/p/"
6286 "pretend/pretend-" version ".tar.gz"))
6287 (sha256
6288 (base32
6289 "0r5r7ygz9m6d2bklflbl84cqhjkc2q12xgis8268ygjh30g2q3wk"))))
6290 (build-system python-build-system)
6291 (home-page "https://github.com/alex/pretend")
6292 (synopsis "Library for stubbing in Python")
6293 (description
6294 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6295 technique for writing tests. You may hear the term mixed up with mocks,
6296 fakes, or doubles. Basically, a stub is an object that returns pre-canned
6297 responses, rather than doing any computation.")
6298 (license license:bsd-3)))
6299
6300 (define-public python2-pretend
6301 (package-with-python2 python-pretend))
6302
6303 (define-public python-pip
6304 (package
6305 (name "python-pip")
6306 (version "9.0.1")
6307 (source
6308 (origin
6309 (method url-fetch)
6310 (uri (pypi-uri "pip" version))
6311 (sha256
6312 (base32
6313 "03clr9c1dih5n9c00c592zzvf6r1ffimywkaq9agcqdllzhl7wh9"))))
6314 (build-system python-build-system)
6315 (arguments
6316 '(#:tests? #f)) ; there are no tests in the pypi archive.
6317 (home-page "https://pip.pypa.io/")
6318 (synopsis "Package manager for Python software")
6319 (description
6320 "Pip is a package manager for Python software, that finds packages on the
6321 Python Package Index (PyPI).")
6322 (license license:expat)))
6323
6324 (define-public python2-pip
6325 (package-with-python2 python-pip))
6326
6327 (define-public python-tlsh
6328 (package
6329 (name "python-tlsh")
6330 (version "3.4.4")
6331 (home-page "https://github.com/trendmicro/tlsh")
6332 (source (origin
6333 (method url-fetch)
6334 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6335 version ".tar.gz"))
6336 (sha256
6337 (base32
6338 "00bhzjqrlh7v538kbkbn8lgx976j1138al3sdhklaizqjvpwyk4r"))
6339 (file-name (string-append name "-" version ".tar.gz"))))
6340 (build-system cmake-build-system)
6341 (arguments
6342 '(#:out-of-source? #f
6343 #:phases (modify-phases %standard-phases
6344 (replace
6345 'install
6346 (lambda* (#:key outputs #:allow-other-keys)
6347 ;; Build and install the Python bindings. The underlying
6348 ;; C++ library is apparently not meant to be installed.
6349 (let ((out (assoc-ref outputs "out")))
6350 (with-directory-excursion "py_ext"
6351 (and (system* "python" "setup.py" "build")
6352 (system* "python" "setup.py" "install"
6353 (string-append "--prefix=" out))))))))))
6354 (inputs `(("python" ,python-wrapper))) ;for the bindings
6355 (synopsis "Fuzzy matching library for Python")
6356 (description
6357 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6358 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6359 value which can be used for similarity comparisons. Similar objects have
6360 similar hash values, which allows for the detection of similar objects by
6361 comparing their hash values. The byte stream should have a sufficient amount
6362 of complexity; for example, a byte stream of identical bytes will not generate
6363 a hash value.")
6364 (license license:asl2.0)))
6365
6366 (define-public python2-tlsh
6367 (package
6368 (inherit python-tlsh)
6369 (name "python2-tlsh")
6370 (inputs `(("python" ,python-2)))))
6371
6372 (define-public python-termcolor
6373 (package
6374 (name "python-termcolor")
6375 (version "1.1.0")
6376 (source
6377 (origin
6378 (method url-fetch)
6379 (uri (pypi-uri "termcolor" version))
6380 (sha256
6381 (base32
6382 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6383 (build-system python-build-system)
6384 (arguments
6385 ;; There are no tests.
6386 `(#:tests? #f))
6387 (home-page "https://pypi.python.org/pypi/termcolor")
6388 (synopsis "ANSII Color formatting for terminal output")
6389 (description
6390 "This package provides ANSII Color formatting for output in terminals.")
6391 (license license:expat)))
6392
6393 (define-public python2-termcolor
6394 (package-with-python2 python-termcolor))
6395
6396 (define-public python-libarchive-c
6397 (package
6398 (name "python-libarchive-c")
6399 (version "2.2")
6400 (source (origin
6401 (method url-fetch)
6402 (uri (pypi-uri "libarchive-c" version))
6403 (sha256
6404 (base32
6405 "0z4r7v3dhd6b3120mav05ff08srih176r2rg5k8kn7mjd9pslm2x"))))
6406 (build-system python-build-system)
6407 (arguments
6408 '(#:phases (modify-phases %standard-phases
6409 (add-before
6410 'build 'reference-libarchive
6411 (lambda* (#:key inputs #:allow-other-keys)
6412 ;; Retain the absolute file name of libarchive.so.
6413 (let ((libarchive (assoc-ref inputs "libarchive")))
6414 (substitute* "libarchive/ffi.py"
6415 (("find_library\\('archive'\\)")
6416 (string-append "'" libarchive
6417 "/lib/libarchive.so'")))))))))
6418 (inputs
6419 `(("libarchive" ,libarchive)))
6420 (home-page "https://github.com/Changaco/python-libarchive-c")
6421 (synopsis "Python interface to libarchive")
6422 (description
6423 "This package provides Python bindings to libarchive, a C library to
6424 access possibly compressed archives in many different formats. It uses
6425 Python's @code{ctypes} foreign function interface (FFI).")
6426 (license license:lgpl2.0+)))
6427
6428 (define-public python2-libarchive-c
6429 (package-with-python2 python-libarchive-c))
6430
6431 (define-public python-file
6432 (package
6433 (inherit file)
6434 (name "python-file")
6435 (build-system python-build-system)
6436 (arguments
6437 '(#:tests? #f ;no tests
6438 #:configure-flags '("--single-version-externally-managed" "--root=/")
6439 #:phases (modify-phases %standard-phases
6440 (add-before 'build 'change-directory
6441 (lambda _
6442 (chdir "python")
6443 #t))
6444 (add-before 'build 'set-library-file-name
6445 (lambda* (#:key inputs #:allow-other-keys)
6446 (let ((file (assoc-ref inputs "file")))
6447 (substitute* "magic.py"
6448 (("find_library\\('magic'\\)")
6449 (string-append "'" file "/lib/libmagic.so'")))
6450 #t))))))
6451 (inputs `(("file" ,file)))
6452 (self-native-input? #f)
6453 (synopsis "Python bindings to the libmagic file type guesser. Note that
6454 this module and the python-magic module both provide a \"magic.py\" file;
6455 these two modules, which are different and were developed separately, both
6456 serve the same purpose: provide Python bindings for libmagic.")))
6457
6458 (define-public python2-file
6459 (package-with-python2 python-file))
6460
6461 (define-public python-debian
6462 (package
6463 (name "python-debian")
6464 (version "0.1.28")
6465 (source
6466 (origin
6467 (method url-fetch)
6468 (uri (pypi-uri name version))
6469 (sha256
6470 (base32
6471 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
6472 (build-system python-build-system)
6473 (propagated-inputs
6474 `(("python-six" ,python-six)))
6475 (home-page "http://packages.debian.org/sid/python-debian")
6476 (synopsis "Debian package related modules")
6477 (description
6478 ;; XXX: Use @enumerate instead of @itemize to work around
6479 ;; <http://bugs.gnu.org/21772>.
6480 "This package provides Python modules that abstract many formats of
6481 Debian-related files, such as:
6482
6483 @enumerate
6484 @item Debtags information;
6485 @item @file{debian/changelog} files;
6486 @item packages files, pdiffs;
6487 @item control files of single or multiple RFC822-style paragraphs---e.g.
6488 @file{debian/control}, @file{.changes}, @file{.dsc};
6489 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6490 contained files and meta-information.
6491 @end enumerate\n")
6492
6493 ;; Modules are either GPLv2+ or GPLv3+.
6494 (license license:gpl3+)))
6495
6496 (define-public python2-debian
6497 (package-with-python2 python-debian))
6498
6499 (define-public python-nbformat
6500 (package
6501 (name "python-nbformat")
6502 (version "4.3.0")
6503 (source
6504 (origin
6505 (method url-fetch)
6506 (uri (pypi-uri "nbformat" version))
6507 (sha256
6508 (base32
6509 "12s7j4qja8b5bs1kyw5dzmrqbjxxj8wk52cyasbiqbv7fblcrssz"))))
6510 (build-system python-build-system)
6511 (arguments `(#:tests? #f)) ; no test target
6512 (propagated-inputs
6513 `(("python-ipython-genutils" ,python-ipython-genutils)
6514 ("python-jsonschema" ,python-jsonschema)
6515 ("python-jupyter-core" ,python-jupyter-core)
6516 ("python-traitlets" ,python-traitlets)))
6517 (home-page "http://jupyter.org")
6518 (synopsis "Jupyter Notebook format")
6519 (description "This package provides the reference implementation of the
6520 Jupyter Notebook format and Python APIs for working with notebooks.")
6521 (license license:bsd-3)))
6522
6523 (define-public python2-nbformat
6524 (package-with-python2 python-nbformat))
6525
6526 (define-public python-bleach
6527 (package
6528 (name "python-bleach")
6529 (version "1.4.3")
6530 (source
6531 (origin
6532 (method url-fetch)
6533 (uri (pypi-uri "bleach" version))
6534 (sha256
6535 (base32
6536 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6537 (build-system python-build-system)
6538 (propagated-inputs
6539 `(("python-html5lib" ,python-html5lib-0.9)
6540 ("python-six" ,python-six)))
6541 (native-inputs
6542 `(("python-nose" ,python-nose)))
6543 (home-page "https://github.com/jsocol/bleach")
6544 (synopsis "Whitelist-based HTML-sanitizing tool")
6545 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6546 (license license:asl2.0)))
6547
6548 (define-public python2-bleach
6549 (package-with-python2 python-bleach))
6550
6551 (define-public python-entrypoints
6552 (package
6553 (name "python-entrypoints")
6554 (version "0.2.2")
6555 (source
6556 (origin
6557 (method url-fetch)
6558 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
6559 version ".tar.gz"))
6560 (file-name (string-append name "-" version ".tar.gz"))
6561 (sha256
6562 (base32
6563 "0azqlkh3j0za080lsf5crnhaxx3c93k9dpv5ihkhf5cppgw5sjz5"))))
6564 (build-system python-build-system)
6565 ;; The package does not come with a setup.py file, so we have to generate
6566 ;; one ourselves.
6567 (arguments
6568 `(#:tests? #f
6569 #:phases
6570 (modify-phases %standard-phases
6571 (add-after 'unpack 'create-setup.py
6572 (lambda _
6573 (call-with-output-file "setup.py"
6574 (lambda (port)
6575 (format port "\
6576 from setuptools import setup
6577 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6578 " ,version))))))))
6579 (home-page "https://github.com/takluyver/entrypoints")
6580 (synopsis "Discover and load entry points from installed Python packages")
6581 (description "Entry points are a way for Python packages to advertise
6582 objects with some common interface. The most common examples are
6583 @code{console_scripts} entry points, which define shell commands by
6584 identifying a Python function to run. The @code{entrypoints} module contains
6585 functions to find and load entry points.")
6586 (license license:expat)))
6587
6588 (define-public python2-entrypoints
6589 (package-with-python2 python-entrypoints))
6590
6591 (define-public python-nbconvert
6592 (package
6593 (name "python-nbconvert")
6594 (version "5.0.0b1")
6595 (source
6596 (origin
6597 (method url-fetch)
6598 (uri (pypi-uri "nbconvert" version))
6599 (sha256
6600 (base32
6601 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6602 (build-system python-build-system)
6603 (arguments
6604 `(;; The "bdist_egg" target is disabled by default, causing the installation
6605 ;; to fail.
6606 #:configure-flags (list "bdist_egg")
6607 ;; FIXME: 5 failures, 40 errors.
6608 #:tests? #f))
6609 ;; #:phases
6610 ;; (modify-phases %standard-phases
6611 ;; (replace 'check
6612 ;; (lambda _
6613 ;; (zero? (system* "py.test" "-v")))))
6614 (native-inputs
6615 `(("python-pytest" ,python-pytest)))
6616 (propagated-inputs
6617 `(("python-bleach" ,python-bleach)
6618 ("python-entrypoints" ,python-entrypoints)
6619 ("python-jinja2" ,python-jinja2)
6620 ("python-jupyter-core" ,python-jupyter-core)
6621 ("python-mistune" ,python-mistune)
6622 ("python-nbformat" ,python-nbformat)
6623 ("python-pygments" ,python-pygments)
6624 ("python-traitlets" ,python-traitlets)))
6625 (home-page "http://jupyter.org")
6626 (synopsis "Converting Jupyter Notebooks")
6627 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6628 notebooks to various other formats via Jinja templates. It allows you to
6629 convert an @code{.ipynb} notebook file into various static formats including:
6630
6631 @enumerate
6632 @item HTML
6633 @item LaTeX
6634 @item PDF
6635 @item Reveal JS
6636 @item Markdown (md)
6637 @item ReStructured Text (rst)
6638 @item executable script
6639 @end enumerate\n")
6640 (license license:bsd-3)))
6641
6642 (define-public python2-nbconvert
6643 (package-with-python2 python-nbconvert))
6644
6645 (define-public python-notebook
6646 (package
6647 (name "python-notebook")
6648 (version "4.2.3")
6649 (source (origin
6650 (method url-fetch)
6651 (uri (pypi-uri "notebook" version))
6652 (sha256
6653 (base32
6654 "0laq5c2f21frq6xcdckgq7raqhznbjb0qs0357g612z87wyn1a9r"))))
6655 (build-system python-build-system)
6656 (arguments
6657 `(#:phases
6658 (modify-phases %standard-phases
6659 (replace 'check
6660 (lambda _
6661 ;; HOME must be set for tests
6662 (setenv "HOME" "/tmp")
6663 (zero? (system* "nosetests")))))))
6664 (propagated-inputs
6665 `(("python-jupyter-core" ,python-jupyter-core)
6666 ("python-nbformat" ,python-nbformat)
6667 ("python-nbconvert" ,python-nbconvert)
6668 ("python-ipython" ,python-ipython)))
6669 (native-inputs
6670 `(("python-nose" ,python-nose)
6671 ("python-sphinx" ,python-sphinx)
6672 ("python-requests" ,python-requests)))
6673 (home-page "http://jupyter.org/")
6674 (synopsis "Web-based notebook environment for interactive computing")
6675 (description
6676 "The Jupyter HTML notebook is a web-based notebook environment for
6677 interactive computing.")
6678 (properties `((python2-variant . ,(delay python2-notebook))))
6679 (license license:bsd-3)))
6680
6681 (define-public python2-notebook
6682 (let ((base (package-with-python2
6683 (strip-python2-variant python-notebook))))
6684 (package (inherit base)
6685 (native-inputs
6686 `(("python2-mock" ,python2-mock)
6687 ,@(package-native-inputs base)))
6688 (arguments
6689 (substitute-keyword-arguments (package-arguments base)
6690 ((#:phases phases)
6691 `(modify-phases ,phases
6692 (add-before 'check 'disable-test-case
6693 ;; The test requires network access to localhost. Curiously it
6694 ;; fails with Python 2 only. Simply make the test-case return
6695 ;; immediately.
6696 (lambda _
6697 (substitute*
6698 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
6699 (("formats = self.nbconvert_api") "return #")))))))))))
6700
6701 (define-public python-widgetsnbextension
6702 (package
6703 (name "python-widgetsnbextension")
6704 (version "1.2.6")
6705 (source
6706 (origin
6707 (method url-fetch)
6708 (uri (pypi-uri "widgetsnbextension" version))
6709 (sha256
6710 (base32
6711 "0lff2mrwrgsa1mxmwx3phl9xvy0jqfpg6khbmxy53jbq56rwy666"))))
6712 (build-system python-build-system)
6713 (propagated-inputs
6714 `(("python-notebook" ,python-notebook)))
6715 (native-inputs
6716 `(("python-certifi" ,python-certifi)
6717 ("python-nose" ,python-nose)))
6718 (home-page "https://ipython.org")
6719 (synopsis "IPython HTML widgets for Jupyter")
6720 (description "This package provides interactive HTML widgets for Jupyter
6721 notebooks.")
6722 (license license:bsd-3)))
6723
6724 (define-public python2-widgetsnbextension
6725 (package-with-python2 python-widgetsnbextension))
6726
6727 (define-public python-ipywidgets
6728 (package
6729 (name "python-ipywidgets")
6730 (version "5.2.2")
6731 (source
6732 (origin
6733 (method url-fetch)
6734 (uri (pypi-uri "ipywidgets" version))
6735 (sha256
6736 (base32
6737 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
6738 (build-system python-build-system)
6739 ;; FIXME: it's not clear how to run the tests.
6740 (arguments `(#:tests? #f))
6741 (propagated-inputs
6742 `(("python-ipykernel" ,python-ipykernel)
6743 ("python-ipython" ,python-ipython)
6744 ("python-traitlets" ,python-traitlets)
6745 ("python-widgetsnbextension" ,python-widgetsnbextension)))
6746 (home-page "https://ipython.org")
6747 (synopsis "IPython HTML widgets for Jupyter")
6748 (description "Ipywidgets are interactive HTML widgets for Jupyter
6749 notebooks and the IPython kernel. Notebooks come alive when interactive
6750 widgets are used. Users gain control of their data and can visualize changes
6751 in the data.")
6752 (license license:bsd-3)))
6753
6754 (define-public python2-ipywidgets
6755 (package-with-python2 python-ipywidgets))
6756
6757 (define-public python-jupyter-console
6758 (package
6759 (name "python-jupyter-console")
6760 (version "5.0.0")
6761 (source
6762 (origin
6763 (method url-fetch)
6764 (uri (pypi-uri "jupyter_console" version))
6765 (sha256
6766 (base32
6767 "04acmkwsi99rcg3vb54c6n492zv35s92h2ahabc0w6wj976cipvx"))))
6768 (build-system python-build-system)
6769 ;; FIXME: it's not clear how to run the tests.
6770 (arguments `(#:tests? #f))
6771 (propagated-inputs
6772 `(("python-ipykernel" ,python-ipykernel)
6773 ("python-ipython" ,python-ipython)
6774 ("python-jupyter-client" ,python-jupyter-client)
6775 ("python-prompt-toolkit" ,python-prompt-toolkit)
6776 ("python-pygments" ,python-pygments)))
6777 (home-page "https://jupyter.org")
6778 (synopsis "Jupyter terminal console")
6779 (description "This package provides a terminal-based console frontend for
6780 Jupyter kernels. It also allows for console-based interaction with non-Python
6781 Jupyter kernels such as IJulia and IRKernel.")
6782 (license license:bsd-3)))
6783
6784 (define-public python2-jupyter-console
6785 (package-with-python2 python-jupyter-console))
6786
6787 ;; The python-ipython and python-jupyter-console require each other. To get
6788 ;; the functionality in both packages working, strip down the
6789 ;; python-jupyter-console package when using it as an input to python-ipython.
6790 (define python-jupyter-console-minimal
6791 (package
6792 (inherit python-jupyter-console)
6793 (name "python-jupyter-console-minimal")
6794 (arguments
6795 (substitute-keyword-arguments
6796 (package-arguments python-jupyter-console)
6797 ((#:phases phases)
6798 `(modify-phases ,phases
6799 (add-after 'install 'delete-bin
6800 (lambda* (#:key outputs #:allow-other-keys)
6801 ;; Delete the bin files, to avoid conflicts in profiles
6802 ;; where python-ipython and python-jupyter-console are
6803 ;; both present.
6804 (delete-file-recursively
6805 (string-append
6806 (assoc-ref outputs "out") "/bin"))))))))
6807 ;; Remove the python-ipython propagated input, to avoid the cycle
6808 (propagated-inputs
6809 (alist-delete
6810 "python-ipython"
6811 (package-propagated-inputs python-jupyter-console)))))
6812
6813 (define-public jupyter
6814 (package
6815 (name "jupyter")
6816 (version "1.0.0")
6817 (source
6818 (origin
6819 (method url-fetch)
6820 (uri (pypi-uri "jupyter" version))
6821 (sha256
6822 (base32
6823 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
6824 (build-system python-build-system)
6825 ;; FIXME: it's not clear how to run the tests.
6826 (arguments `(#:tests? #f))
6827 (propagated-inputs
6828 `(("python-ipykernel" ,python-ipykernel)
6829 ("python-ipywidgets" ,python-ipywidgets)
6830 ("python-jupyter-console" ,python-jupyter-console)
6831 ("python-nbconvert" ,python-nbconvert)
6832 ("python-notebook" ,python-notebook)))
6833 (home-page "http://jupyter.org")
6834 (synopsis "Web application for interactive documents")
6835 (description
6836 "The Jupyter Notebook is a web application that allows you to create and
6837 share documents that contain live code, equations, visualizations and
6838 explanatory text. Uses include: data cleaning and transformation, numerical
6839 simulation, statistical modeling, machine learning and much more.")
6840 (license license:bsd-3)))
6841
6842 (define-public python-chardet
6843 (package
6844 (name "python-chardet")
6845 (version "3.0.4")
6846 (source
6847 (origin
6848 (method url-fetch)
6849 (uri (pypi-uri "chardet" version))
6850 (sha256
6851 (base32
6852 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
6853 (native-inputs
6854 `(("python-hypothesis" ,python-hypothesis)
6855 ("python-pytest" ,python-pytest)
6856 ("python-pytest-runner" ,python-pytest-runner)))
6857 (build-system python-build-system)
6858 (home-page "https://github.com/chardet/chardet")
6859 (synopsis "Universal encoding detector for Python 2 and 3")
6860 (description
6861 "This package provides @code{chardet}, a Python module that can
6862 automatically detect a wide range of file encodings.")
6863 (license license:lgpl2.1+)))
6864
6865 (define-public python2-chardet
6866 (package-with-python2 python-chardet))
6867
6868 (define-public python-docopt
6869 (package
6870 (name "python-docopt")
6871 (version "0.6.2")
6872 (source
6873 (origin
6874 (method url-fetch)
6875 ;; The release on PyPI does not include tests.
6876 (uri (string-append
6877 "https://github.com/docopt/docopt/archive/"
6878 version ".tar.gz"))
6879 (file-name (string-append name "-" version ".tar.gz"))
6880 (sha256
6881 (base32
6882 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
6883 (build-system python-build-system)
6884 (native-inputs
6885 `(("python-pytest" ,python-pytest)))
6886 (arguments
6887 `(#:phases
6888 (modify-phases %standard-phases
6889 (replace 'check
6890 (lambda _ (zero? (system* "py.test")))))))
6891 (home-page "http://docopt.org")
6892 (synopsis "Command-line interface description language for Python")
6893 (description "This library allows the user to define a command-line
6894 interface from a program's help message rather than specifying it
6895 programatically with command-line parsers like @code{getopt} and
6896 @code{argparse}.")
6897 (license license:expat)))
6898
6899 (define-public python2-docopt
6900 (package-with-python2 python-docopt))
6901
6902 (define-public python-pythondialog
6903 (package
6904 (name "python-pythondialog")
6905 (version "3.4.0")
6906 (source
6907 (origin
6908 (method url-fetch)
6909 (uri (pypi-uri "pythondialog" version))
6910 (sha256
6911 (base32
6912 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
6913 (build-system python-build-system)
6914 (arguments
6915 `(#:phases
6916 (modify-phases %standard-phases
6917 (add-after 'unpack 'patch-path
6918 (lambda* (#:key inputs #:allow-other-keys)
6919 (let* ((dialog (assoc-ref inputs "dialog")))
6920 ;; Since this library really wants to grovel the search path, we
6921 ;; must hardcode dialog's store path into it.
6922 (substitute* "dialog.py"
6923 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
6924 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
6925 #t))))
6926 #:tests? #f)) ; no test suite
6927 (propagated-inputs
6928 `(("dialog" ,dialog)))
6929 (home-page "http://pythondialog.sourceforge.net/")
6930 (synopsis "Python interface to the UNIX dialog utility")
6931 (description "A Python wrapper for the dialog utility. Its purpose is to
6932 provide an easy to use, pythonic and comprehensive Python interface to dialog.
6933 This allows one to make simple text-mode user interfaces on Unix-like systems")
6934 (license license:lgpl2.1)
6935 (properties `((python2-variant . ,(delay python2-pythondialog))))))
6936
6937 (define-public python2-pythondialog
6938 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
6939 (package
6940 (inherit base)
6941 (version (package-version python-pythondialog))
6942 (source (origin
6943 (method url-fetch)
6944 (uri (pypi-uri "python2-pythondialog" version))
6945 (sha256
6946 (base32
6947 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
6948
6949 (define-public python-configobj
6950 (package
6951 (name "python-configobj")
6952 (version "5.0.6")
6953 (source (origin
6954 (method url-fetch)
6955 (uri (string-append
6956 "https://pypi.python.org/packages/source/c/configobj/"
6957 "configobj-" version ".tar.gz"))
6958 (sha256
6959 (base32
6960 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
6961 ;; Patch setup.py so it looks for python-setuptools, which is
6962 ;; required to parse the keyword 'install_requires' in setup.py.
6963 (patches (search-patches "python-configobj-setuptools.patch"))))
6964 (build-system python-build-system)
6965 (propagated-inputs
6966 `(("python-six" ,python-six)))
6967 (synopsis "Config file reading, writing and validation")
6968 (description "ConfigObj is a simple but powerful config file reader and
6969 writer: an ini file round tripper. Its main feature is that it is very easy to
6970 use, with a straightforward programmer’s interface and a simple syntax for
6971 config files.")
6972 (home-page "https://github.com/DiffSK/configobj")
6973 (license license:bsd-3)))
6974
6975 (define-public python2-configobj
6976 (package-with-python2 python-configobj))
6977
6978 (define-public python-configargparse
6979 (package
6980 (name "python-configargparse")
6981 (version "0.12.0")
6982 (source (origin
6983 (method url-fetch)
6984 (uri (string-append
6985 "https://pypi.io/packages/source/C/ConfigArgParse/"
6986 "ConfigArgParse-" version ".tar.gz"))
6987 (sha256
6988 (base32
6989 "0fgkiqh6r3rbkdq3k8c48m85g52k96686rw3a6jg4lcncrkpvk98"))))
6990 (build-system python-build-system)
6991 (native-inputs
6992 `(("python-pyyaml" ,python-pyyaml)))
6993 (arguments
6994 `(#:phases
6995 (modify-phases %standard-phases
6996 (replace 'check
6997 (lambda _
6998 ;; Bypass setuptools-shim because one test relies on "setup.py"
6999 ;; being the first argument passed to the python call.
7000 ;;
7001 ;; NOTE: Many tests do not run because they rely on Python's
7002 ;; built-in test.test_argparse, but we remove the unit tests from
7003 ;; our Python installation.
7004 (zero? (system* "python" "setup.py" "test")))))))
7005 (synopsis "Replacement for argparse")
7006 (description "A drop-in replacement for argparse that allows options to also
7007 be set via config files and/or environment variables.")
7008 (home-page "https://github.com/bw2/ConfigArgParse")
7009 (license license:expat)))
7010
7011 (define-public python2-configargparse
7012 (package-with-python2 python-configargparse))
7013
7014 (define-public python-contextlib2
7015 (package
7016 (name "python-contextlib2")
7017 (version "0.4.0")
7018 (source
7019 (origin
7020 (method url-fetch)
7021 (uri (pypi-uri "contextlib2" version))
7022 (sha256
7023 (base32
7024 "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
7025 (build-system python-build-system)
7026 (arguments
7027 `(#:phases
7028 (modify-phases %standard-phases
7029 (replace 'check
7030 (lambda _ (zero?
7031 (system*
7032 "python" "test_contextlib2.py" "-v")))))))
7033 (home-page "http://contextlib2.readthedocs.org/")
7034 (synopsis "Tools for decorators and context managers")
7035 (description "This module is primarily a backport of the Python
7036 3.2 contextlib to earlier Python versions. Like contextlib, it
7037 provides utilities for common tasks involving decorators and context
7038 managers. It also contains additional features that are not part of
7039 the standard library.")
7040 (license license:psfl)))
7041
7042 (define-public python2-contextlib2
7043 (package-with-python2 python-contextlib2))
7044
7045 (define-public python-texttable
7046 (package
7047 (name "python-texttable")
7048 (version "0.8.7")
7049 (source
7050 (origin
7051 (method url-fetch)
7052 (uri (pypi-uri "texttable" version))
7053 (sha256
7054 (base32
7055 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
7056 (build-system python-build-system)
7057 (arguments '(#:tests? #f)) ; no tests
7058 (home-page "https://github.com/foutaise/texttable/")
7059 (synopsis "Python module for creating simple ASCII tables")
7060 (description "Texttable is a Python module for creating simple ASCII
7061 tables.")
7062 (license license:lgpl2.1+)))
7063
7064 (define-public python2-texttable
7065 (package-with-python2 python-texttable))
7066
7067 (define-public python-atomicwrites
7068 (package
7069 (name "python-atomicwrites")
7070 (version "1.1.5")
7071 (source (origin
7072 (method url-fetch)
7073 (uri (pypi-uri "atomicwrites" version))
7074 (sha256
7075 (base32
7076 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
7077 (build-system python-build-system)
7078 (synopsis "Atomic file writes in Python")
7079 (description "Library for atomic file writes using platform dependent tools
7080 for atomic file system operations.")
7081 (home-page "https://github.com/untitaker/python-atomicwrites")
7082 (license license:expat)))
7083
7084 (define-public python2-atomicwrites
7085 (package-with-python2 python-atomicwrites))
7086
7087 (define-public python-click-threading
7088 (package
7089 (name "python-click-threading")
7090 (version "0.4.4")
7091 (source (origin
7092 (method url-fetch)
7093 (uri (pypi-uri "click-threading" version))
7094 (sha256
7095 (base32
7096 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
7097 (build-system python-build-system)
7098 (propagated-inputs
7099 `(("python-click" ,python-click)))
7100 (synopsis "Utilities for multithreading in Click")
7101 (description "This package provides utilities for multithreading in Click
7102 applications.")
7103 (home-page "https://github.com/click-contrib/click-threading")
7104 (license license:expat)))
7105
7106 (define-public python-click-log
7107 (package
7108 (name "python-click-log")
7109 (version "0.2.1")
7110 (source (origin
7111 (method url-fetch)
7112 (uri (pypi-uri "click-log" version))
7113 (sha256
7114 (base32
7115 "1r1x85023cslb2pwldd089jjk573mk3w78cnashs77wrx7yz8fj9"))))
7116 (build-system python-build-system)
7117 (propagated-inputs
7118 `(("python-click" ,python-click)))
7119 (synopsis "Logging for click applications")
7120 (description "This package provides a Python library for logging Click
7121 applications.")
7122 (home-page "https://github.com/click-contrib/click-log")
7123 (license license:expat)))
7124
7125 (define-public python-apipkg
7126 (package
7127 (name "python-apipkg")
7128 (version "1.4")
7129 (source (origin
7130 (method url-fetch)
7131 (uri (pypi-uri "apipkg" version))
7132 (sha256
7133 (base32
7134 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7135 (build-system python-build-system)
7136 (native-inputs
7137 `(("python-pytest" ,python-pytest)))
7138 (synopsis "Namespace control and lazy-import mechanism")
7139 (description "With apipkg you can control the exported namespace of a Python
7140 package and greatly reduce the number of imports for your users. It is a small
7141 pure Python module that works on virtually all Python versions.")
7142 (home-page "https://bitbucket.org/hpk42/apipkg")
7143 (license license:expat)))
7144
7145 (define-public python2-apipkg
7146 (package-with-python2 python-apipkg))
7147
7148 (define-public python-execnet
7149 (package
7150 (name "python-execnet")
7151 (version "1.4.1")
7152 (source (origin
7153 (method url-fetch)
7154 (uri (pypi-uri "execnet" version))
7155 (sha256
7156 (base32
7157 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7158 (build-system python-build-system)
7159 (arguments
7160 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7161 ;; The two test failures are caused by the lack of an `ssh` executable.
7162 ;; The test suite can be run with pytest after the 'install' phase.
7163 #:tests? #f))
7164 (native-inputs
7165 `(("python-pytest" ,python-pytest)
7166 ("python-setuptools-scm" ,python-setuptools-scm)))
7167 (propagated-inputs
7168 `(("python-apipkg" ,python-apipkg)))
7169 (synopsis "Rapid multi-Python deployment")
7170 (description "Execnet provides a share-nothing model with
7171 channel-send/receive communication for distributing execution across many
7172 Python interpreters across version, platform and network barriers. It has a
7173 minimal and fast API targeting the following uses:
7174 @enumerate
7175 @item distribute tasks to (many) local or remote CPUs
7176 @item write and deploy hybrid multi-process applications
7177 @item write scripts to administer multiple environments
7178 @end enumerate")
7179 (home-page "http://codespeak.net/execnet/")
7180 (license license:expat)))
7181
7182 (define-public python2-execnet
7183 (package-with-python2 python-execnet))
7184
7185 (define-public python-icalendar
7186 (package
7187 (name "python-icalendar")
7188 (version "4.0.1")
7189 (source (origin
7190 (method url-fetch)
7191 (uri (pypi-uri "icalendar" version))
7192 (sha256
7193 (base32
7194 "139y79y6ijl39m5bj771r43vpah9s4ly7d1k76la6hrx7l144ak8"))))
7195 (build-system python-build-system)
7196 (propagated-inputs
7197 `(("python-dateutil" ,python-dateutil)
7198 ("python-pytz" ,python-pytz)))
7199 (synopsis "Python library for parsing iCalendar files")
7200 (description "The icalendar package is a parser/generator of iCalendar
7201 files for use with Python.")
7202 (home-page "https://github.com/collective/icalendar")
7203 (license license:bsd-2)))
7204
7205 (define-public python-sphinxcontrib-newsfeed
7206 (package
7207 (name "python-sphinxcontrib-newsfeed")
7208 (version "0.1.4")
7209 (source (origin
7210 (method url-fetch)
7211 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7212 (sha256
7213 (base32
7214 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7215 (arguments '(#:tests? #f)) ; No tests.
7216 (build-system python-build-system)
7217 (propagated-inputs
7218 `(("python-sphinx" ,python-sphinx)))
7219 (synopsis "News Feed extension for Sphinx")
7220 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7221 Blog, News or Announcements section to a Sphinx website.")
7222 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7223 (license license:bsd-2)))
7224
7225 (define-public python-args
7226 (package
7227 (name "python-args")
7228 (version "0.1.0")
7229 (source (origin
7230 (method url-fetch)
7231 (uri (pypi-uri "args" version))
7232 (sha256
7233 (base32
7234 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7235 (build-system python-build-system)
7236 (home-page "https://github.com/kennethreitz/args")
7237 (synopsis "Command-line argument parser")
7238 (description
7239 "This library provides a Python module to parse command-line arguments.")
7240 (license license:bsd-3)))
7241
7242 (define-public python2-args
7243 (package-with-python2 python-args))
7244
7245 (define-public python-clint
7246 (package
7247 (name "python-clint")
7248 (version "0.5.1")
7249 (source (origin
7250 (method url-fetch)
7251 (uri (pypi-uri "clint" version))
7252 (sha256
7253 (base32
7254 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7255 (build-system python-build-system)
7256 (arguments
7257 '(#:phases
7258 (modify-phases %standard-phases
7259 (replace 'check
7260 (lambda _
7261 (zero? (system* "py.test" "-v")))))))
7262 (native-inputs
7263 `(("python-pytest" ,python-pytest)))
7264 (propagated-inputs
7265 `(("python-args" ,python-args)))
7266 (home-page "https://github.com/kennethreitz/clint")
7267 (synopsis "Command-line interface tools")
7268 (description
7269 "Clint is a Python module filled with a set of tools for developing
7270 command-line applications, including tools for colored and indented
7271 output, progress bar display, and pipes.")
7272 (license license:isc)))
7273
7274 (define-public python2-clint
7275 (package-with-python2 python-clint))
7276
7277 (define-public python-astor
7278 (package
7279 (name "python-astor")
7280 (version "0.5")
7281 (source (origin
7282 (method url-fetch)
7283 (uri (pypi-uri "astor" version))
7284 (sha256
7285 (base32
7286 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7287 (build-system python-build-system)
7288 (home-page "https://github.com/berkerpeksag/astor")
7289 (synopsis "Read and write Python ASTs")
7290 (description
7291 "Astor is designed to allow easy manipulation of Python source via the
7292 Abstract Syntax Tree.")
7293 (license license:bsd-3)))
7294
7295 (define-public python2-astor
7296 (package-with-python2 python-astor))
7297
7298 (define-public python-rply
7299 (package
7300 (name "python-rply")
7301 (version "0.7.5")
7302 (source (origin
7303 (method url-fetch)
7304 (uri (pypi-uri "rply" version))
7305 (sha256
7306 (base32
7307 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
7308 (build-system python-build-system)
7309 (propagated-inputs
7310 `(("python-appdirs" ,python-appdirs)))
7311 (home-page "https://github.com/alex/rply")
7312 (synopsis "Parser generator for Python")
7313 (description
7314 "This package provides a pure Python based parser generator, that also
7315 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7316 with a new public API, and RPython support.")
7317 (license license:bsd-3)))
7318
7319 (define-public python2-rply
7320 (package-with-python2 python-rply))
7321
7322 (define-public python-hy
7323 (package
7324 (name "python-hy")
7325 (version "0.13.0")
7326 (source (origin
7327 (method url-fetch)
7328 (uri (pypi-uri "hy" version))
7329 (sha256
7330 (base32
7331 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
7332 (build-system python-build-system)
7333 (arguments
7334 '(#:phases
7335 (modify-phases %standard-phases
7336 (replace 'check
7337 (lambda _
7338 ;; Tests require write access to HOME.
7339 (setenv "HOME" "/tmp")
7340 (zero? (system* "nosetests")))))))
7341 (native-inputs
7342 `(("python-coverage" ,python-coverage)
7343 ("python-nose" ,python-nose)))
7344 (propagated-inputs
7345 `(("python-astor" ,python-astor)
7346 ("python-clint" ,python-clint)
7347 ("python-rply" ,python-rply)))
7348 (home-page "http://hylang.org/")
7349 (synopsis "Lisp frontend to Python")
7350 (description
7351 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7352 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7353 Python at your fingertips, in Lisp form.")
7354 (license license:expat)))
7355
7356 (define-public python2-hy
7357 (package-with-python2 python-hy))
7358
7359 (define-public python2-functools32
7360 (package
7361 (name "python2-functools32")
7362 (version "3.2.3-2")
7363 (source
7364 (origin
7365 (method url-fetch)
7366 (uri (pypi-uri "functools32" version))
7367 (sha256
7368 (base32
7369 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7370 (build-system python-build-system)
7371 (arguments
7372 `(#:python ,python-2
7373 #:tests? #f)) ; no test target
7374 (home-page "https://github.com/MiCHiLU/python-functools32")
7375 (synopsis
7376 "Backport of the functools module from Python 3.2.3")
7377 (description
7378 "This package is a backport of the @code{functools} module from Python
7379 3.2.3 for use with older versions of Python and PyPy.")
7380 (license license:expat)))
7381
7382 (define-public python2-subprocess32
7383 (package
7384 (name "python2-subprocess32")
7385 (version "3.2.7")
7386 (source (origin
7387 (method url-fetch)
7388 (uri (pypi-uri "subprocess32" version))
7389 (sha256
7390 (base32
7391 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
7392 (patches
7393 (search-patches "python2-subprocess32-disable-input-test.patch"))))
7394 (build-system python-build-system)
7395 (arguments
7396 `(#:python ,python-2
7397 ;; The test suite fails with Python > 2.7.13:
7398 ;; import test.support
7399 ;; ImportError: No module named support
7400 #:tests? #f
7401 #:phases
7402 (modify-phases %standard-phases
7403 (add-after 'unpack 'patch-/bin/sh
7404 (lambda _
7405 (substitute* '("subprocess32.py"
7406 "test_subprocess32.py")
7407 (("/bin/sh") (which "sh")))
7408 #t)))))
7409 (home-page "https://github.com/google/python-subprocess32")
7410 (synopsis "Backport of the subprocess module from Python 3.2")
7411 (description
7412 "This is a backport of the @code{subprocess} standard library module
7413 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
7414 new features. On POSIX systems it is guaranteed to be reliable when used
7415 in threaded applications. It includes timeout support from Python 3.3 but
7416 otherwise matches 3.2’s API.")
7417 (license license:psfl)))
7418
7419 (define-public python2-futures
7420 (package
7421 (name "python2-futures")
7422 (version "3.0.5")
7423 (source
7424 (origin
7425 (method url-fetch)
7426 (uri (pypi-uri "futures" version))
7427 (sha256
7428 (base32
7429 "1pw1z4329xvlabdpwqa6b7v2fxf7hl64m4cgr22ckbym8m8m4hh5"))))
7430 (build-system python-build-system)
7431 (arguments `(#:python ,python-2))
7432 (home-page "https://github.com/agronholm/pythonfutures")
7433 (synopsis
7434 "Backport of the concurrent.futures package from Python 3.2")
7435 (description
7436 "The concurrent.futures module provides a high-level interface for
7437 asynchronously executing callables. This package backports the
7438 concurrent.futures package from Python 3.2")
7439 (license license:bsd-3)))
7440
7441 (define-public python-promise
7442 (package
7443 (name "python-promise")
7444 (version "0.4.2")
7445 (source
7446 (origin
7447 (method url-fetch)
7448 (uri (pypi-uri "promise" version))
7449 (sha256
7450 (base32
7451 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7452 (build-system python-build-system)
7453 ;; Tests wants python-futures, which is a python2 only program, and
7454 ;; can't be found by python-promise at test time.
7455 (arguments `(#:tests? #f))
7456 (home-page "https://github.com/syrusakbary/promise")
7457 (synopsis "Promises/A+ implementation for Python")
7458 (description
7459 "Promises/A+ implementation for Python")
7460 (properties `((python2-variant . ,(delay python2-promise))))
7461 (license license:expat)))
7462
7463 (define-public python2-promise
7464 (let ((promise (package-with-python2
7465 (strip-python2-variant python-promise))))
7466 (package (inherit promise)
7467 (arguments (substitute-keyword-arguments (package-arguments promise)
7468 ((#:tests? _) #t)))
7469 (native-inputs
7470 `(("python2-futures" ,python2-futures)
7471 ("python2-pytest" ,python2-pytest)
7472 ,@(package-native-inputs promise))))))
7473
7474 (define-public python-colorama
7475 (package
7476 (name "python-colorama")
7477 (version "0.3.9")
7478 (source
7479 (origin
7480 (method url-fetch)
7481 (uri (pypi-uri "colorama" version))
7482 (sha256
7483 (base32
7484 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
7485 (build-system python-build-system)
7486 (synopsis "Colored terminal text rendering for Python")
7487 (description "Colorama is a Python library for rendering colored terminal
7488 text.")
7489 (home-page "https://pypi.python.org/pypi/colorama")
7490 (license license:bsd-3)))
7491
7492 (define-public python2-colorama
7493 (package-with-python2 python-colorama))
7494
7495 (define-public python-rsa
7496 (package
7497 (name "python-rsa")
7498 (version "3.4.2")
7499 (source
7500 (origin
7501 (method url-fetch)
7502 (uri (pypi-uri "rsa" version))
7503 (sha256
7504 (base32
7505 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
7506 (build-system python-build-system)
7507 (propagated-inputs
7508 `(("python-pyasn1" ,python-pyasn1)))
7509 (synopsis "Pure-Python RSA implementation")
7510 (description "Python-RSA is a pure-Python RSA implementation. It supports
7511 encryption and decryption, signing and verifying signatures, and key
7512 generation according to PKCS#1 version 1.5. It can be used as a Python
7513 library as well as on the command line.")
7514 (home-page "https://stuvel.eu/rsa")
7515 (license license:asl2.0)))
7516
7517 (define-public python2-rsa
7518 (package-with-python2 python-rsa))
7519
7520 (define-public python-pluggy
7521 (package
7522 (name "python-pluggy")
7523 (version "0.3.1")
7524 (source
7525 (origin
7526 (method url-fetch)
7527 (uri (pypi-uri "pluggy" version))
7528 (sha256
7529 (base32
7530 "18qfzfm40bgx672lkg8q9x5hdh76n7vax99aank7vh2nw21wg70m"))))
7531 (build-system python-build-system)
7532 (synopsis "Plugin and hook calling mechanism for Python")
7533 (description "Pluggy is an extraction of the plugin manager as used by
7534 Pytest but stripped of Pytest specific details.")
7535 (home-page "https://pypi.python.org/pypi/pluggy")
7536 (license license:expat)))
7537
7538 (define-public python2-pluggy
7539 (package-with-python2 python-pluggy))
7540
7541 (define-public python-tox
7542 (package
7543 (name "python-tox")
7544 (version "2.8.1")
7545 (source
7546 (origin
7547 (method url-fetch)
7548 (uri (pypi-uri "tox" version))
7549 (sha256
7550 (base32
7551 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
7552 (build-system python-build-system)
7553 (arguments
7554 ;; FIXME: Tests require pytest-timeout, which itself requires
7555 ;; pytest>=2.8.0 for installation.
7556 '(#:tests? #f))
7557 (propagated-inputs
7558 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
7559 ("python-py" ,python-py)
7560 ("python-virtualenv" ,python-virtualenv)))
7561 (native-inputs
7562 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
7563 ("python-pytest" ,python-pytest) ; >= 2.3.5
7564 ("python-setuptools-scm" ,python-setuptools-scm)))
7565 (home-page "http://tox.testrun.org/")
7566 (synopsis "Virtualenv-based automation of test activities")
7567 (description "Tox is a generic virtualenv management and test command line
7568 tool. It can be used to check that a package installs correctly with
7569 different Python versions and interpreters, or run tests in each type of
7570 supported environment, or act as a frontend to continuous integration
7571 servers.")
7572 (license license:expat)))
7573
7574 (define-public python2-tox
7575 (package-with-python2 python-tox))
7576
7577 (define-public python-jmespath
7578 (package
7579 (name "python-jmespath")
7580 (version "0.9.3")
7581 (source
7582 (origin
7583 (method url-fetch)
7584 (uri (pypi-uri "jmespath" version))
7585 (sha256
7586 (base32
7587 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
7588 (build-system python-build-system)
7589 (native-inputs
7590 `(("python-nose" ,python-nose)))
7591 (synopsis "JSON Matching Expressions")
7592 (description "JMESPath (pronounced “james path”) is a Python library that
7593 allows one to declaratively specify how to extract elements from a JSON
7594 document.")
7595 (home-page "https://github.com/jmespath/jmespath.py")
7596 (license license:expat)))
7597
7598 (define-public python2-jmespath
7599 (package-with-python2 python-jmespath))
7600
7601 (define-public python-botocore
7602 (package
7603 (name "python-botocore")
7604 (version "1.8.43")
7605 (source
7606 (origin
7607 (method url-fetch)
7608 (uri (pypi-uri "botocore" version))
7609 (sha256
7610 (base32
7611 "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg"))))
7612 (build-system python-build-system)
7613 (arguments
7614 ;; FIXME: Many tests are failing.
7615 '(#:tests? #f))
7616 (propagated-inputs
7617 `(("python-dateutil" ,python-dateutil)
7618 ("python-docutils" ,python-docutils)
7619 ("python-jmespath" ,python-jmespath)))
7620 (native-inputs
7621 `(("python-mock" ,python-mock)
7622 ("python-nose" ,python-nose)
7623 ("behave" ,behave)
7624 ("python-tox" ,python-tox)
7625 ("python-wheel" ,python-wheel)))
7626 (home-page "https://github.com/boto/botocore")
7627 (synopsis "Low-level interface to AWS")
7628 (description "Botocore is a Python library that provides a low-level
7629 interface to the Amazon Web Services (AWS) API.")
7630 (license license:asl2.0)))
7631
7632 (define-public python2-botocore
7633 (package-with-python2 python-botocore))
7634
7635 (define-public python-xdo
7636 (package
7637 (name "python-xdo")
7638 (version "0.3")
7639 (source (origin
7640 (method url-fetch)
7641 (uri (string-append
7642 "http://http.debian.net/debian/pool/main/p/python-xdo/"
7643 "python-xdo_" version ".orig.tar.gz"))
7644 (sha256
7645 (base32
7646 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
7647 (build-system python-build-system)
7648 (arguments
7649 '(#:phases
7650 (modify-phases %standard-phases
7651 (add-before 'install 'patch-libxdo-path
7652 ;; Hardcode the path of dynamically loaded libxdo library.
7653 (lambda* (#:key inputs #:allow-other-keys)
7654 (let ((libxdo (string-append
7655 (assoc-ref inputs "xdotool")
7656 "/lib/libxdo.so")))
7657 (substitute* "xdo/_xdo.py"
7658 (("find_library\\(\"xdo\"\\)")
7659 (simple-format #f "\"~a\"" libxdo)))
7660 #t))))
7661 #:tests? #f)) ; no tests provided
7662 (propagated-inputs
7663 `(("python-six" ,python-six)))
7664 (inputs
7665 `(("xdotool" ,xdotool)
7666 ("libX11" ,libx11)))
7667 (home-page "https://tracker.debian.org/pkg/python-xdo")
7668 (synopsis "Python library for simulating X11 keyboard/mouse input")
7669 (description "Provides bindings to libxdo for manipulating X11 via simulated
7670 input. (Note that this is mostly a legacy library; you may wish to look at
7671 python-xdo for newer bindings.)")
7672 (license license:bsd-3)))
7673
7674 (define-public python2-xdo
7675 (package-with-python2 python-xdo))
7676
7677 (define-public python-mako
7678 (package
7679 (name "python-mako")
7680 (version "1.0.6")
7681 (source
7682 (origin
7683 (method url-fetch)
7684 (uri (pypi-uri "Mako" version))
7685 (sha256
7686 (base32
7687 "03dyxgjknp4ffsv7vwfd28l5bbpzi0ylp20543wpg3iahyyrwma8"))))
7688 (build-system python-build-system)
7689 (propagated-inputs
7690 `(("python-markupsafe" ,python-markupsafe)))
7691 (native-inputs
7692 `(("python-mock" ,python-mock)
7693 ("python-nose" ,python-nose)
7694 ("python-pytest" ,python-pytest)))
7695 (home-page "http://www.makotemplates.org/")
7696 (synopsis "Templating language for Python")
7697 (description "Mako is a templating language for Python that compiles
7698 templates into Python modules.")
7699 (license license:expat)))
7700
7701 (define-public python2-mako
7702 (package-with-python2 python-mako))
7703
7704 (define-public python-waitress
7705 (package
7706 (name "python-waitress")
7707 (version "1.1.0")
7708 (source
7709 (origin
7710 (method url-fetch)
7711 (uri (pypi-uri "waitress" version))
7712 (patches (search-patches "python-waitress-fix-tests.patch"))
7713 (sha256
7714 (base32
7715 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
7716 (build-system python-build-system)
7717 (home-page "https://github.com/Pylons/waitress")
7718 (synopsis "Waitress WSGI server")
7719 (description "Waitress is meant to be a production-quality pure-Python WSGI
7720 server with very acceptable performance.")
7721 (license license:zpl2.1)))
7722
7723 (define-public python2-waitress
7724 (package-with-python2 python-waitress))
7725
7726 (define-public python-pyquery
7727 (package
7728 (name "python-pyquery")
7729 (version "1.2.17")
7730 (source
7731 (origin
7732 (method url-fetch)
7733 (uri (pypi-uri "pyquery" version))
7734 (sha256
7735 (base32
7736 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
7737 (build-system python-build-system)
7738 (native-inputs
7739 `(("python-webob" ,python-webob)
7740 ("python-webtest" ,python-webtest)))
7741 (propagated-inputs
7742 `(("python-lxml" ,python-lxml)
7743 ("python-cssselect" ,python-cssselect)))
7744 (home-page "https://github.com/gawel/pyquery")
7745 (synopsis "Make jQuery-like queries on xml documents")
7746 (description "pyquery allows you to make jQuery queries on xml documents.
7747 The API is as much as possible the similar to jQuery. pyquery uses lxml for
7748 fast xml and html manipulation.")
7749 (license license:bsd-3)))
7750
7751 (define-public python2-pyquery
7752 (package-with-python2 python-pyquery))
7753
7754 (define-public python-anyjson
7755 (package
7756 (name "python-anyjson")
7757 (version "0.3.3")
7758 (source
7759 (origin
7760 (method url-fetch)
7761 (uri (pypi-uri "anyjson" version))
7762 (sha256
7763 (base32
7764 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
7765 (build-system python-build-system)
7766 (arguments
7767 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
7768 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
7769 ;; whatever) so this transformation needs to be done before the tests
7770 ;; can be run. Maybe we could add a build step to transform beforehand
7771 ;; but it could be annoying/difficult.
7772 ;; We can enable tests for the Python 2 version, though, and do below.
7773 #:tests? #f))
7774 (home-page "https://bitbucket.org/runeh/anyjson/")
7775 (synopsis
7776 "Wraps best available JSON implementation in a common interface")
7777 (description
7778 "Anyjson loads whichever is the fastest JSON module installed
7779 and provides a uniform API regardless of which JSON implementation is used.")
7780 (license license:bsd-3)
7781 (properties `((python2-variant . ,(delay python2-anyjson))))))
7782
7783 (define-public python2-anyjson
7784 (let ((anyjson (package-with-python2
7785 (strip-python2-variant python-anyjson))))
7786 (package
7787 (inherit anyjson)
7788 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
7789 #:tests? #t
7790 ,@(package-arguments anyjson)))
7791 (native-inputs `(("python2-nose" ,python2-nose))))))
7792
7793 (define-public python-amqp
7794 (package
7795 (name "python-amqp")
7796 (version "1.4.9")
7797 (source
7798 (origin
7799 (method url-fetch)
7800 (uri (pypi-uri "amqp" version))
7801 (sha256
7802 (base32
7803 "06n6q0kxhjnbfz3vn8x9yz09lwmn1xi9d6wxp31h5jbks0b4vsid"))))
7804 (build-system python-build-system)
7805 (native-inputs
7806 `(("python-nose" ,python-nose)
7807 ("python-mock" ,python-mock)))
7808 (home-page "https://github.com/celery/py-amqp")
7809 (synopsis
7810 "Low-level AMQP client for Python (fork of amqplib)")
7811 (description
7812 "This is a fork of amqplib which was originally written by Barry Pederson.
7813 It is maintained by the Celery project, and used by kombu as a pure python
7814 alternative when librabbitmq is not available.")
7815 (license license:lgpl2.1+)
7816 (properties `((python2-variant . ,(delay python2-amqp))))))
7817
7818 (define-public python2-amqp
7819 (let ((amqp (package-with-python2
7820 (strip-python2-variant python-amqp))))
7821 (package
7822 (inherit amqp)
7823 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
7824 ;; unmaintained. Weirdly, does not do this on the python 3
7825 ;; version?
7826 #:tests? #f
7827 ,@(package-arguments amqp))))))
7828
7829 (define-public python-txamqp
7830 (package
7831 (name "python-txamqp")
7832 (version "0.8.0")
7833 (source
7834 (origin
7835 (method url-fetch)
7836 (uri (pypi-uri "txAMQP" version))
7837 (sha256
7838 (base32
7839 "1r43a66dd547mz40ikymm8y3d480cidy560fj81qc0jk4lncgmmr"))))
7840 (build-system python-build-system)
7841 (propagated-inputs
7842 `(("python-six" ,python-six)
7843 ("python-twisted" ,python-twisted)))
7844 (home-page "https://github.com/txamqp/txamqp")
7845 (synopsis "Communicate with AMQP peers and brokers using Twisted")
7846 (description
7847 "This package provides a Python library for communicating with AMQP peers
7848 and brokers using the asynchronous networking framework Twisted. It contains
7849 all the necessary code to connect, send and receive messages to/from an
7850 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
7851 also includes support for using Thrift RPC over AMQP in Twisted
7852 applications.")
7853 (license license:asl2.0)))
7854
7855 (define-public python2-txamqp
7856 (package-with-python2 python-txamqp))
7857
7858 (define-public python-kombu
7859 (package
7860 (name "python-kombu")
7861 (version "3.0.37")
7862 (source
7863 (origin
7864 (method url-fetch)
7865 (uri (pypi-uri "kombu" version))
7866 (sha256
7867 (base32
7868 "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70"))))
7869 (build-system python-build-system)
7870 (native-inputs
7871 `(("python-mock" ,python-mock)
7872 ("python-nose" ,python-nose)))
7873 (propagated-inputs
7874 `(("python-anyjson" ,python-anyjson)
7875 ("python-amqp" ,python-amqp)
7876 ("python-redis" ,python-redis)))
7877 (home-page "http://kombu.readthedocs.org")
7878 (synopsis "Message passing library for Python")
7879 (description "The aim of Kombu is to make messaging in Python as easy as
7880 possible by providing an idiomatic high-level interface for the AMQ protocol,
7881 and also provide proven and tested solutions to common messaging problems.
7882 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
7883 message orientation, queuing, routing, reliability and security, for which the
7884 RabbitMQ messaging server is the most popular implementation.")
7885 (license license:bsd-3)
7886 (properties `((python2-variant . ,(delay python2-kombu))))))
7887
7888 (define-public python2-kombu
7889 (let ((kombu (package-with-python2
7890 (strip-python2-variant python-kombu))))
7891 (package
7892 (inherit kombu)
7893 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
7894 ;; It works fine on the python3 variant.
7895 #:tests? #f
7896 ,@(package-arguments kombu)))
7897 (native-inputs `(("python2-unittest2" ,python2-unittest2)
7898 ,@(package-native-inputs kombu))))))
7899
7900 (define-public python-billiard
7901 (package
7902 (name "python-billiard")
7903 (version "3.3.0.23")
7904 (source
7905 (origin
7906 (method url-fetch)
7907 (uri (pypi-uri "billiard" version))
7908 (sha256
7909 (base32
7910 "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9"))))
7911 (build-system python-build-system)
7912 (native-inputs
7913 `(("python-nose" ,python-nose)))
7914 (home-page "https://github.com/celery/billiard")
7915 (synopsis
7916 "Python multiprocessing fork with improvements and bugfixes")
7917 (description
7918 "Billiard is a fork of the Python 2.7 multiprocessing package. The
7919 multiprocessing package itself is a renamed and updated version of R Oudkerk's
7920 pyprocessing package. This standalone variant is intended to be compatible with
7921 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
7922 (license license:bsd-3)
7923 (properties `((python2-variant . ,(delay python2-billiard))))))
7924
7925 (define-public python2-billiard
7926 (let ((billiard (package-with-python2
7927 (strip-python2-variant python-billiard))))
7928 (package
7929 (inherit billiard)
7930 (native-inputs `(("python2-unittest2" ,python2-unittest2)
7931 ("python2-mock" ,python2-mock)
7932 ,@(package-native-inputs billiard))))))
7933
7934 (define-public python-celery
7935 (package
7936 (name "python-celery")
7937 (version "3.1.24")
7938 (source
7939 (origin
7940 (method url-fetch)
7941 (uri (pypi-uri "celery" version))
7942 (sha256
7943 (base32
7944 "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r"))))
7945 (build-system python-build-system)
7946 (arguments
7947 `(#:phases
7948 (modify-phases %standard-phases
7949 ;; These tests break with Python 3.5:
7950 ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295
7951 (replace 'check
7952 (lambda _
7953 (zero?
7954 (system* "nosetests" "--exclude=^test_safe_to_remove.*")))))))
7955 (native-inputs
7956 `(("python-nose" ,python-nose)))
7957 (propagated-inputs
7958 `(("python-pytz" ,python-pytz)
7959 ("python-billiard" ,python-billiard)
7960 ("python-kombu" ,python-kombu)))
7961 (home-page "http://celeryproject.org")
7962 (synopsis "Distributed Task Queue")
7963 (description "Celery is an asynchronous task queue/job queue based on
7964 distributed message passing. It is focused on real-time operation, but
7965 supports scheduling as well. The execution units, called tasks, are executed
7966 concurrently on a single or more worker servers using multiprocessing,
7967 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
7968 synchronously (wait until ready).")
7969 (license license:bsd-3)
7970 (properties `((python2-variant . ,(delay python2-celery))))))
7971
7972 (define-public python2-celery
7973 (let ((celery (package-with-python2
7974 (strip-python2-variant python-celery))))
7975 (package
7976 (inherit celery)
7977 (native-inputs `(("python2-unittest2" ,python2-unittest2)
7978 ("python2-mock" ,python2-mock)
7979 ,@(package-native-inputs celery))))))
7980
7981 (define-public python-translitcodec
7982 (package
7983 (name "python-translitcodec")
7984 (version "0.4.0")
7985 (source
7986 (origin
7987 (method url-fetch)
7988 (uri (pypi-uri "translitcodec" version))
7989 (sha256
7990 (base32
7991 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
7992 (build-system python-build-system)
7993 (arguments
7994 `(#:tests? #f)) ; no tests provided
7995 (home-page
7996 "https://github.com/claudep/translitcodec")
7997 (synopsis
7998 "Unicode to 8-bit charset transliteration codec")
7999 (description
8000 "This package contains codecs for transliterating ISO 10646 texts into
8001 best-effort representations using smaller coded character sets (ASCII,
8002 ISO 8859, etc.).")
8003 (license license:expat)))
8004
8005 (define-public python2-translitcodec
8006 (package-with-python2 python-translitcodec))
8007
8008 (define-public python-editor
8009 (package
8010 (name "python-editor")
8011 (version "0.5")
8012 (source
8013 (origin
8014 (method url-fetch)
8015 (uri (pypi-uri "python-editor" version))
8016 (sha256
8017 (base32
8018 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8019 (build-system python-build-system)
8020 (home-page
8021 "https://github.com/fmoo/python-editor")
8022 (synopsis
8023 "Programmatically open an editor, capture the result")
8024 (description
8025 "python-editor is a library that provides the editor module for
8026 programmatically interfacing with your system's $EDITOR.")
8027 (license license:asl2.0)))
8028
8029 (define-public python2-editor
8030 (package-with-python2 python-editor))
8031
8032 (define-public python-sphinxcontrib-programoutput
8033 (package
8034 (name "python-sphinxcontrib-programoutput")
8035 (version "0.10")
8036 (source (origin
8037 (method url-fetch)
8038 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8039 (sha256
8040 (base32
8041 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
8042 (build-system python-build-system)
8043 (arguments
8044 ;; FIXME: Many tests are failing and the upstream is gone.
8045 '(#:tests? #f))
8046 (propagated-inputs
8047 `(("python-sphinx" ,python-sphinx)))
8048 (synopsis "Sphinx extension to include program output")
8049 (description "A Sphinx extension to literally insert the output of arbitrary
8050 commands into documents, helping you to keep your command examples up to date.")
8051 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8052 (license license:bsd-2)))
8053
8054 (define-public python2-sphinxcontrib-programoutput
8055 (package-with-python2 python-sphinxcontrib-programoutput))
8056
8057 (define-public python-sphinx-repoze-autointerface
8058 (package
8059 (name "python-sphinx-repoze-autointerface")
8060 (version "0.8")
8061 (source (origin
8062 (method url-fetch)
8063 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8064 (sha256
8065 (base32
8066 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8067 (build-system python-build-system)
8068 (arguments '(#:tests? #f)) ; No tests.
8069 (propagated-inputs
8070 `(("python-sphinx" ,python-sphinx)
8071 ("python-zope-interface" ,python-zope-interface)))
8072 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8073 (description "This package defines an extension for the Sphinx documentation
8074 system. The extension allows generation of API documentation by
8075 introspection of @code{zope.interface} instances in code.")
8076 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8077 (license license:repoze)))
8078
8079 (define-public python2-sphinx-repoze-autointerface
8080 (package-with-python2 python-sphinx-repoze-autointerface))
8081
8082 (define-public python-vobject
8083 (package
8084 (name "python-vobject")
8085 (version "0.9.5")
8086 (source (origin
8087 (method url-fetch)
8088 (uri (pypi-uri "vobject" version))
8089 (sha256
8090 (base32
8091 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
8092 (build-system python-build-system)
8093 (arguments
8094 '(;; The test suite relies on some non-portable Windows interfaces.
8095 #:tests? #f))
8096 (propagated-inputs
8097 `(("python-dateutil" ,python-dateutil)
8098 ("python-pyicu" ,python-pyicu)))
8099 (synopsis "Parse and generate vCard and vCalendar files")
8100 (description "Vobject is intended to be a full featured Python package for
8101 parsing and generating vCard and vCalendar files. Currently, iCalendar files
8102 are supported and well tested. vCard 3.0 files are supported, and all data
8103 should be imported, but only a few components are understood in a sophisticated
8104 way.")
8105 (home-page "http://eventable.github.io/vobject/")
8106 (license license:asl2.0)))
8107
8108 (define-public python2-vobject
8109 (package-with-python2 python-vobject))
8110
8111 (define-public python-munkres
8112 (package
8113 (name "python-munkres")
8114 (version "1.0.8")
8115 (source (origin
8116 (method url-fetch)
8117 (uri (pypi-uri "munkres" version))
8118 (sha256
8119 (base32
8120 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
8121 (build-system python-build-system)
8122 (arguments
8123 '(#:tests? #f)) ; no test suite
8124 (home-page "http://software.clapper.org/munkres/")
8125 (synopsis "Implementation of the Munkres algorithm")
8126 (description "The Munkres module provides an implementation of the Munkres
8127 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8128 useful for solving the Assignment Problem.")
8129 (license license:bsd-3)))
8130
8131 (define-public python2-munkres
8132 (package-with-python2 python-munkres))
8133
8134 (define-public python-whoosh
8135 (package
8136 (name "python-whoosh")
8137 (version "2.7.4")
8138 (source
8139 (origin
8140 (method url-fetch)
8141 (uri (pypi-uri "Whoosh" version))
8142 (sha256
8143 (base32
8144 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8145 (build-system python-build-system)
8146 (native-inputs
8147 `(("python-pytest" ,python-pytest)))
8148 (home-page "https://bitbucket.org/mchaput/whoosh")
8149 (synopsis "Full text indexing, search, and spell checking library")
8150 (description
8151 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8152 checking library.")
8153 (license license:bsd-2)))
8154
8155 (define-public python2-whoosh
8156 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8157 (package (inherit whoosh)
8158 (propagated-inputs
8159 `(("python2-backport-ssl-match-hostname"
8160 ,python2-backport-ssl-match-hostname)
8161 ,@(package-propagated-inputs whoosh))))))
8162
8163 (define-public python-pathlib
8164 (package
8165 (name "python-pathlib")
8166 (version "1.0.1")
8167 (source (origin
8168 (method url-fetch)
8169 (uri (pypi-uri "pathlib" version))
8170 (sha256
8171 (base32
8172 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8173 (build-system python-build-system)
8174 ;; The tests depend on the internal "test" module, which does not provide
8175 ;; a stable interface.
8176 (arguments `(#:tests? #f))
8177 (home-page "https://pathlib.readthedocs.org/")
8178 (synopsis "Object-oriented file system paths")
8179 (description "Pathlib offers a set of classes to handle file system paths.
8180 It offers the following advantages over using string objects:
8181
8182 @enumerate
8183 @item No more cumbersome use of os and os.path functions. Everything can
8184 be done easily through operators, attribute accesses, and method calls.
8185 @item Embodies the semantics of different path types. For example,
8186 comparing Windows paths ignores casing.
8187 @item Well-defined semantics, eliminating any inconsistencies or
8188 ambiguities (forward vs. backward slashes, etc.).
8189 @end enumerate
8190
8191 Note: In Python 3.4, pathlib is now part of the standard library. For other
8192 Python versions please consider python-pathlib2 instead, which tracks the
8193 standard library module. This module (python-pathlib) isn't maintained
8194 anymore.")
8195 (license license:expat)))
8196
8197 (define-public python2-pathlib
8198 (package-with-python2 python-pathlib))
8199
8200 (define-public python2-pathlib2
8201 (package
8202 (name "python2-pathlib2")
8203 (version "2.3.0")
8204 (source (origin
8205 (method url-fetch)
8206 (uri (pypi-uri "pathlib2" version))
8207 (sha256
8208 (base32
8209 "1cx5gs2v9j2vnzmcrbq5l8fq2mwrr1h6pyf1sjdji2w1bavm09fk"))))
8210 (build-system python-build-system)
8211 ;; We only need the the Python 2 variant, since for Python 3 our minimum
8212 ;; version is 3.4 which already includes this package as part of the
8213 ;; standard library.
8214 (arguments
8215 `(#:python ,python-2))
8216 (propagated-inputs
8217 `(("python2-scandir" ,python2-scandir)
8218 ("python2-six" ,python2-six)))
8219 (home-page "https://pypi.python.org/pypi/pathlib2/")
8220 (synopsis "Object-oriented file system paths - backport of standard
8221 pathlib module")
8222 (description "The goal of pathlib2 is to provide a backport of standard
8223 pathlib module which tracks the standard library module, so all the newest
8224 features of the standard pathlib can be used also on older Python versions.
8225
8226 Pathlib offers a set of classes to handle file system paths. It offers the
8227 following advantages over using string objects:
8228
8229 @enumerate
8230 @item No more cumbersome use of os and os.path functions. Everything can
8231 be done easily through operators, attribute accesses, and method calls.
8232 @item Embodies the semantics of different path types. For example,
8233 comparing Windows paths ignores casing.
8234 @item Well-defined semantics, eliminating any inconsistencies or
8235 ambiguities (forward vs. backward slashes, etc.).
8236 @end enumerate")
8237 (license license:expat)))
8238
8239 (define-public python-jellyfish
8240 (package
8241 (name "python-jellyfish")
8242 (version "0.5.6")
8243 (source (origin
8244 (method url-fetch)
8245 (uri (pypi-uri "jellyfish" version))
8246 (sha256
8247 (base32
8248 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
8249 (build-system python-build-system)
8250 (native-inputs
8251 `(("python-pytest" ,python-pytest)))
8252 (home-page "https://github.com/jamesturk/jellyfish")
8253 (synopsis "Approximate and phonetic matching of strings")
8254 (description "Jellyfish uses a variety of string comparison and phonetic
8255 encoding algorithms to do fuzzy string matching.")
8256 (license license:bsd-2)
8257 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8258
8259 (define-public python2-jellyfish
8260 (let ((jellyfish (package-with-python2
8261 (strip-python2-variant python-jellyfish))))
8262 (package (inherit jellyfish)
8263 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
8264 ,@(package-native-inputs jellyfish))))))
8265
8266 (define-public python2-unicodecsv
8267 (package
8268 (name "python2-unicodecsv")
8269 (version "0.14.1")
8270 (source (origin
8271 (method url-fetch)
8272 ;; The test suite is not included in the PyPi release.
8273 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8274 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8275 "archive/" version ".tar.gz"))
8276 (file-name (string-append name "-" version ".tar.gz"))
8277 (sha256
8278 (base32
8279 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8280 (build-system python-build-system)
8281 (arguments
8282 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8283 #:python ,python-2))
8284 (native-inputs
8285 `(("python2-unittest2" ,python2-unittest2)))
8286 (home-page "https://github.com/jdunck/python-unicodecsv")
8287 (synopsis "Unicode CSV module for Python 2")
8288 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8289 module, adding support for Unicode strings.")
8290 (license license:bsd-2)))
8291
8292 (define-public python-rarfile
8293 (package
8294 (name "python-rarfile")
8295 (version "2.8")
8296 (source (origin
8297 (method url-fetch)
8298 (uri (pypi-uri "rarfile" version))
8299 (sha256
8300 (base32
8301 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
8302 (build-system python-build-system)
8303 (arguments
8304 '(#:phases
8305 (modify-phases %standard-phases
8306 (replace 'check
8307 ;; Many tests fail, but the installation proceeds.
8308 (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
8309 (native-inputs
8310 `(("which" ,which))) ; required for tests
8311 (propagated-inputs
8312 `(("libarchive" ,libarchive)))
8313 (home-page "https://github.com/markokr/rarfile")
8314 (synopsis "RAR archive reader for Python")
8315 (description "This is Python module for RAR archive reading. The interface
8316 is made as zipfile like as possible.")
8317 (license license:isc)))
8318
8319 (define-public python2-rarfile
8320 (package-with-python2 python-rarfile))
8321
8322 (define-public python-magic
8323 (package
8324 (name "python-magic")
8325 (version "0.4.15")
8326 (source
8327 (origin
8328 (method url-fetch)
8329 (uri (pypi-uri "python-magic" version))
8330 (sha256
8331 (base32
8332 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
8333 (file-name (string-append name "-" version "-checkout"))))
8334 (build-system python-build-system)
8335 (arguments
8336 ;; The tests are unreliable, so don't run them. The tests fail
8337 ;; under Python3 because they were written for Python2 and
8338 ;; contain import statements that do not work in Python3. One of
8339 ;; the tests fails under Python2 because its assertions are
8340 ;; overly stringent; it relies on comparing output strings which
8341 ;; are brittle and can change depending on the version of
8342 ;; libmagic being used and the system on which the test is
8343 ;; running. In my case, under GuixSD 0.10.0, only one test
8344 ;; failed, and it seems to have failed only because the version
8345 ;; of libmagic that is packaged in Guix outputs a slightly
8346 ;; different (but not wrong) string than the one that the test
8347 ;; expected.
8348 '(#:tests? #f
8349 #:phases (modify-phases %standard-phases
8350 ;; Replace a specific method call with a hard-coded
8351 ;; path to the necessary libmagic.so file in the
8352 ;; store. If we don't do this, then the method call
8353 ;; will fail to find the libmagic.so file, which in
8354 ;; turn will cause any application using
8355 ;; python-magic to fail.
8356 (add-before 'build 'hard-code-path-to-libmagic
8357 (lambda* (#:key inputs #:allow-other-keys)
8358 (let ((file (assoc-ref inputs "file")))
8359 (substitute* "magic.py"
8360 (("ctypes.util.find_library\\('magic'\\)")
8361 (string-append "'" file "/lib/libmagic.so'")))
8362 #t)))
8363 (add-before 'install 'disable-egg-compression
8364 (lambda _
8365 (let ((port (open-file "setup.cfg" "a")))
8366 (display "\n[easy_install]\nzip_ok = 0\n"
8367 port)
8368 (close-port port)
8369 #t))))))
8370 (inputs
8371 ;; python-magic needs to be able to find libmagic.so.
8372 `(("file" ,file)))
8373 (home-page
8374 "https://github.com/ahupp/python-magic")
8375 (synopsis
8376 "File type identification using libmagic")
8377 (description
8378 "This module uses ctypes to access the libmagic file type
8379 identification library. It makes use of the local magic database and
8380 supports both textual and MIME-type output. Note that this module and
8381 the python-file module both provide a \"magic.py\" file; these two
8382 modules, which are different and were developed separately, both serve
8383 the same purpose: to provide Python bindings for libmagic.")
8384 (license license:expat)))
8385
8386 (define-public python2-magic
8387 (package-with-python2 python-magic))
8388
8389 (define-public python2-s3cmd
8390 (package
8391 (name "python2-s3cmd")
8392 (version "1.6.1")
8393 (source
8394 (origin
8395 (method url-fetch)
8396 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
8397 "s3cmd-" version ".tar.gz"))
8398 (sha256
8399 (base32
8400 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8401 (build-system python-build-system)
8402 (arguments
8403 ;; s3cmd is written for python2 only and contains no tests.
8404 `(#:python ,python-2
8405 #:tests? #f))
8406 (propagated-inputs
8407 `(("python2-dateutil" ,python2-dateutil)
8408 ;; The python-file package also provides a magic.py module.
8409 ;; This is an unfortunate state of affairs; however, s3cmd
8410 ;; fails to install if it cannot find specifically the
8411 ;; python-magic package. Thus we include it, instead of using
8412 ;; python-file. Ironically, s3cmd sometimes works better
8413 ;; without libmagic bindings at all:
8414 ;; https://github.com/s3tools/s3cmd/issues/198
8415 ("python2-magic" ,python2-magic)))
8416 (home-page "http://s3tools.org/s3cmd")
8417 (synopsis "Command line tool for S3-compatible storage services")
8418 (description
8419 "S3cmd is a command line tool for uploading, retrieving and managing data
8420 in storage services that are compatible with the Amazon Simple Storage
8421 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
8422 GnuPG encryption, and more. It also supports management of Amazon's
8423 CloudFront content delivery network.")
8424 (license license:gpl2+)))
8425
8426 (define-public python-pkgconfig
8427 (package
8428 (name "python-pkgconfig")
8429 (version "1.1.0")
8430 (source
8431 (origin
8432 (method url-fetch)
8433 (uri (pypi-uri "pkgconfig" version))
8434 (sha256
8435 (base32
8436 "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
8437 (build-system python-build-system)
8438 (native-inputs
8439 `(("python-nose" ,python-nose)))
8440 (inputs
8441 `(("pkg-config" ,pkg-config)))
8442 (arguments
8443 `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
8444 ;; and on Python 2 they need the dl module deprecated since Python 2.6.
8445 #:tests? #f
8446 ;; Hard-code the path to pkg-config.
8447 #:phases
8448 (modify-phases %standard-phases
8449 (add-before
8450 'build 'patch
8451 (lambda _
8452 (substitute* "pkgconfig/pkgconfig.py"
8453 (("cmd = 'pkg-config")
8454 (string-append "cmd = '" (which "pkg-config"))))
8455 #t)))))
8456 (home-page "https://github.com/matze/pkgconfig")
8457 (synopsis "Python interface for pkg-config")
8458 (description "This module provides a Python interface to pkg-config. It
8459 can be used to find all pkg-config packages, check if a package exists,
8460 check if a package meets certain version requirements, query CFLAGS and
8461 LDFLAGS and parse the output to build extensions with setup.py.")
8462 (license license:expat)))
8463
8464 (define-public python2-pkgconfig
8465 (package-with-python2 python-pkgconfig))
8466
8467 (define-public python-bz2file
8468 (package
8469 (name "python-bz2file")
8470 (version "0.98")
8471 (source
8472 (origin
8473 (method url-fetch)
8474 (uri (pypi-uri "bz2file" version))
8475 (sha256
8476 (base32
8477 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
8478 (build-system python-build-system)
8479 (arguments
8480 `(#:tests? #f)) ; Tests use deprecated python modules.
8481 (home-page "https://github.com/nvawda/bz2file")
8482 (synopsis "Read and write bzip2-compressed files")
8483 (description
8484 "Bz2file is a Python library for reading and writing bzip2-compressed
8485 files. It contains a drop-in replacement for the I/O interface in the
8486 standard library's @code{bz2} module, including features from the latest
8487 development version of CPython that are not available in older releases.")
8488 (license license:asl2.0)
8489 (properties `((python2-variant . ,(delay python2-bz2file))))))
8490
8491 (define-public python2-bz2file
8492 (let ((base (package-with-python2
8493 (strip-python2-variant python-bz2file))))
8494 (package
8495 (inherit base)
8496 (arguments
8497 `(#:python ,python-2
8498 #:phases
8499 (modify-phases %standard-phases
8500 ;; 'python setup.py test' does not work as of 0.98.
8501 ;; There is only the one test file, so we run it directly.
8502 (replace 'check
8503 (lambda _ (zero? (system* "python"
8504 "test_bz2file.py"))))))))))
8505
8506 (define-public python-future
8507 (package
8508 (name "python-future")
8509 (version "0.16.0")
8510 (source
8511 (origin
8512 (method url-fetch)
8513 (uri (pypi-uri "future" version))
8514 (sha256
8515 (base32
8516 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
8517 (build-system python-build-system)
8518 ;; Many tests connect to the network or are otherwise flawed.
8519 ;; https://github.com/PythonCharmers/python-future/issues/210
8520 (arguments
8521 `(#:tests? #f))
8522 (home-page "http://python-future.org")
8523 (synopsis "Single-source support for Python 3 and 2")
8524 (description
8525 "@code{python-future} is the missing compatibility layer between Python 2 and
8526 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
8527 to support both Python 2 and Python 3 with minimal overhead.")
8528 (license license:expat)))
8529
8530 (define-public python2-future
8531 (package-with-python2 python-future))
8532
8533 (define-public python-cysignals
8534 (package
8535 (name "python-cysignals")
8536 (version "1.1.0")
8537 (source
8538 (origin
8539 (method url-fetch)
8540 (uri (pypi-uri "cysignals" version ".tar.bz2"))
8541 (sha256
8542 (base32
8543 "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
8544 (build-system python-build-system)
8545 (native-inputs
8546 `(("python-cython" ,python-cython)
8547 ("python-sphinx" ,python-sphinx)))
8548 (inputs
8549 `(("pari-gp" ,pari-gp)))
8550 (arguments
8551 `(#:modules ((guix build python-build-system)
8552 ((guix build gnu-build-system) #:prefix gnu:)
8553 (guix build utils))
8554 ;; FIXME: Tests are executed after installation and currently fail
8555 ;; when not installing into standard locations; the author is working
8556 ;; on a fix.
8557 #:tests? #f
8558 #:phases
8559 (modify-phases %standard-phases
8560 (add-before
8561 'build 'configure
8562 (assoc-ref gnu:%standard-phases 'configure)))))
8563 (home-page
8564 "https://github.com/sagemath/cysignals")
8565 (synopsis
8566 "Handling of interrupts and signals for Cython")
8567 (description
8568 "The cysignals package provides mechanisms to handle interrupts (and
8569 other signals and errors) in Cython code, using two related approaches,
8570 for mixed Cython/Python code or external C libraries and pure Cython code,
8571 respectively.")
8572 (license license:lgpl3+)))
8573
8574 (define-public python2-cysignals
8575 (package-with-python2 python-cysignals))
8576
8577 (define-public python2-shedskin
8578 (package
8579 (name "python2-shedskin")
8580 (version "0.9.4")
8581 (source
8582 (origin
8583 (method url-fetch)
8584 (uri (string-append "https://github.com/shedskin/shedskin/"
8585 "releases/download/v" version
8586 "/shedskin-" version ".tgz"))
8587 (sha256
8588 (base32
8589 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
8590 (build-system python-build-system)
8591 (arguments
8592 `(#:python ,python-2
8593 #:phases (modify-phases %standard-phases
8594 (add-after 'unpack 'fix-resulting-include-libs
8595 (lambda* (#:key inputs #:allow-other-keys)
8596 (let ((libgc (assoc-ref inputs "libgc"))
8597 (pcre (assoc-ref inputs "pcre")))
8598 (substitute* "shedskin/makefile.py"
8599 (("variable == 'CCFLAGS':[ ]*")
8600 (string-append "variable == 'CCFLAGS':\n"
8601 " line += ' -I " pcre "/include"
8602 " -I " libgc "/include'"))
8603 (("variable == 'LFLAGS':[ ]*")
8604 (string-append "variable == 'LFLAGS':\n"
8605 " line += ' -L" pcre "/lib"
8606 " -L " libgc "/lib'")))
8607 #t))))))
8608 (inputs `(("pcre" ,pcre)
8609 ("libgc" ,libgc)))
8610 (home-page "https://shedskin.github.io/")
8611 (synopsis "Experimental Python-2 to C++ Compiler")
8612 (description (string-append "This is an experimental compiler for a subset of
8613 Python. It generates C++ code and a Makefile."))
8614 (license (list license:gpl3 license:bsd-3 license:expat))))
8615
8616 (define-public python2-rope
8617 (package
8618 (name "python2-rope")
8619 (version "0.10.3")
8620 (source
8621 (origin
8622 (method url-fetch)
8623 (uri (pypi-uri "rope" version))
8624 (sha256
8625 (base32
8626 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
8627 (arguments
8628 ;; Rope is currently python-2 only.
8629 ;; https://github.com/python-rope/rope/issues/57
8630 `(#:python ,python-2))
8631 (build-system python-build-system)
8632 (native-inputs
8633 `(("python2-unittest2" ,python2-unittest2)))
8634 (home-page "https://github.com/python-rope/rope")
8635 (synopsis "Refactoring library for Python")
8636 (description "Rope is a refactoring library for Python. It facilitates
8637 the renaming, moving and extracting of attributes, functions, modules, fields
8638 and parameters in Python 2 source code. These refactorings can also be applied
8639 to occurrences in strings and comments.")
8640 (license license:gpl2)))
8641
8642 (define-public python-py3status
8643 (package
8644 (name "python-py3status")
8645 (version "3.1")
8646 (source
8647 (origin
8648 (method url-fetch)
8649 (uri (pypi-uri "py3status" version))
8650 (sha256
8651 (base32
8652 "0i283z1pivmir61z8kbiycigc94l61v33ygzkhczf1ifq7cppyds"))))
8653 (build-system python-build-system)
8654 (inputs
8655 `(("file" ,file)))
8656 (arguments
8657 '(#:phases
8658 (modify-phases %standard-phases
8659 ;; 'file' is used for detection of configuration file encoding
8660 ;; let's make link the dependency to particular input
8661 (add-before 'build 'patch-file-path
8662 (lambda* (#:key inputs #:allow-other-keys)
8663 (let ((file-path (assoc-ref inputs "file")))
8664 (substitute* "py3status/parse_config.py"
8665 (("check_output\\(\\['file'")
8666 (string-append "check_output(['" file-path "/bin/file'")))
8667 #t))))
8668 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
8669 (home-page "https://github.com/ultrabug/py3status")
8670 (synopsis "Extensible i3status wrapper written in Python")
8671 (description "py3status is an i3status wrapper which extends i3status
8672 functionality in a modular way, allowing you to extend your panel with your
8673 own code, responding to click events and updating clock every second.")
8674 (license license:bsd-3)))
8675
8676 (define-public python-tblib
8677 (package
8678 (name "python-tblib")
8679 (version "1.3.2")
8680 (source (origin
8681 (method url-fetch)
8682 (uri (pypi-uri "tblib" version))
8683 (sha256 (base32
8684 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
8685 (build-system python-build-system)
8686 (arguments
8687 `(#:phases
8688 (modify-phases %standard-phases
8689 (replace 'check
8690 (lambda _
8691 ;; Upstream runs tests after installation and the package itself
8692 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
8693 ;; found.
8694 (setenv "PYTHONPATH"
8695 (string-append (getcwd) "/build/lib:"
8696 (getenv "PYTHONPATH")))
8697 (zero? (system* "py.test" "-vv" "tests" "README.rst")))))))
8698 (native-inputs
8699 `(("python-pytest" ,python-pytest)
8700 ("python-six" ,python-six)))
8701 (home-page "https://github.com/ionelmc/python-tblib")
8702 (synopsis "Traceback serialization library")
8703 (description
8704 "Traceback serialization allows you to:
8705
8706 @enumerate
8707 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
8708 different processes. This allows better error handling when running code over
8709 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
8710
8711 @item Parse traceback strings and raise with the parsed tracebacks.
8712 @end enumerate\n")
8713 (license license:bsd-3)))
8714
8715 (define-public python2-tblib
8716 (package-with-python2 python-tblib))
8717
8718 (define-public python-greenlet
8719 (package
8720 (name "python-greenlet")
8721 (version "0.4.11")
8722 (source (origin
8723 (method url-fetch)
8724 (uri (pypi-uri "greenlet" version))
8725 (sha256
8726 (base32
8727 "1xhik26j4f3kc4qw9xmj0c567rb5h1zryb4ijwqnqwwjvfhbv59h"))))
8728 (build-system python-build-system)
8729 (home-page "https://greenlet.readthedocs.io/")
8730 (synopsis "Lightweight in-process concurrent programming")
8731 (description
8732 "Greenlet package is a spin-off of Stackless, a version of CPython
8733 that supports micro-threads called \"tasklets\". Tasklets run
8734 pseudo-concurrently (typically in a single or a few OS-level threads) and
8735 are synchronized with data exchanges on \"channels\".")
8736 (license (list license:psfl license:expat))))
8737
8738 (define-public python2-greenlet
8739 (package-with-python2 python-greenlet))
8740
8741 (define-public python-gevent
8742 (package
8743 (name "python-gevent")
8744 (version "1.2.2")
8745 (source (origin
8746 (method url-fetch)
8747 (uri (pypi-uri "gevent" version))
8748 (sha256
8749 (base32
8750 "0bbbjvi423y9k9xagrcsimnayaqymg6f2dj76m9z3mjpkjpci4a7"))
8751 (modules '((guix build utils)))
8752 (snippet
8753 '(begin
8754 ;; unbunding libev and c-ares
8755 (delete-file-recursively "deps")
8756 #t))))
8757 (build-system python-build-system)
8758 (arguments
8759 `(#:modules ((ice-9 ftw)
8760 (srfi srfi-26)
8761 (guix build utils)
8762 (guix build python-build-system))
8763 #:phases (modify-phases %standard-phases
8764 (add-after 'unpack 'unpack-libev
8765 (lambda* (#:key inputs #:allow-other-keys)
8766 (mkdir-p "deps/libev")
8767 ;; FIXME: gevent requires building libev, even though
8768 ;; it only links against the proper one.
8769 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
8770 "--strip-components=1" "-C" "deps/libev")))
8771 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
8772 (lambda _
8773 (substitute* "src/gevent/subprocess.py"
8774 (("/bin/sh") (which "sh")))
8775 (for-each (lambda (file)
8776 (substitute* file
8777 (("/bin/sh") (which "sh"))
8778 (("/bin/true") (which "true"))))
8779 (find-files "src/greentest" "\\.py$"))
8780 #t))
8781 (add-before 'build 'do-not-use-bundled-sources
8782 (lambda _
8783 (setenv "CONFIG_SHELL" (which "bash"))
8784 (setenv "LIBEV_EMBED" "false")
8785 (setenv "CARES_EMBED" "false")
8786 (setenv "EMBED" "false")
8787 #t))
8788 (replace 'check
8789 (lambda _
8790 ;; Make sure the build directory is on PYTHONPATH.
8791 (setenv "PYTHONPATH"
8792 (string-append
8793 (getenv "PYTHONPATH") ":"
8794 (getcwd) "/build/"
8795 (car (scandir "build" (cut string-prefix? "lib." <>)))))
8796 (with-directory-excursion "src/greentest"
8797 ;; XXX: Many tests require network access. Instead we only
8798 ;; run known-good tests. Unfortunately we cannot use
8799 ;; recursion here since this directory also contains
8800 ;; Python-version-specific subfolders.
8801 (apply invoke "python" "testrunner.py" "--config"
8802 "known_failures.py"
8803 (scandir "." (cut regexp-exec
8804 (make-regexp "test_+(subprocess|core)")
8805 <>)))))))))
8806 (propagated-inputs
8807 `(("python-greenlet" ,python-greenlet)))
8808 (native-inputs
8809 `(("libev-source" ,(package-source libev))
8810 ("python-six" ,python-six)))
8811 (inputs
8812 `(("c-ares" ,c-ares)
8813 ("libev" ,libev)))
8814 (home-page "http://www.gevent.org/")
8815 (synopsis "Coroutine-based network library")
8816 (description
8817 "gevent is a coroutine-based Python networking library that uses greenlet
8818 to provide a high-level synchronous API on top of the libev event loop.")
8819 (license license:expat)))
8820
8821 (define-public python2-gevent
8822 (package-with-python2 python-gevent))
8823
8824 (define-public python-fastimport
8825 (package
8826 (name "python-fastimport")
8827 (version "0.9.6")
8828 (source
8829 (origin
8830 (method url-fetch)
8831 (uri (pypi-uri "fastimport" version))
8832 (sha256
8833 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
8834 (build-system python-build-system)
8835 (home-page "https://github.com/jelmer/python-fastimport")
8836 (synopsis "VCS fastimport parser and generator in Python")
8837 (description "This package provides a parser for and generator of the Git
8838 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
8839 format.")
8840 (license license:gpl2+)))
8841
8842 (define-public python2-fastimport
8843 (package-with-python2 python-fastimport))
8844
8845 (define-public python-twisted
8846 (package
8847 (name "python-twisted")
8848 (version "17.1.0")
8849 (source (origin
8850 (method url-fetch)
8851 (uri (pypi-uri "Twisted" version ".tar.bz2"))
8852 (sha256
8853 (base32
8854 "1p245mg15hkxp7hy5cyq2fgvlgjkb4cg0gwkwd148nzy1bbi3wnv"))))
8855 (build-system python-build-system)
8856 (arguments
8857 '(#:tests? #f)) ; FIXME: Some tests are failing.
8858 ;; #:phases
8859 ;; (modify-phases %standard-phases
8860 ;; (replace 'check
8861 ;; (lambda _
8862 ;; (zero? (system* "./bin/trial" "twisted")))))
8863 (propagated-inputs
8864 `(("python-zope-interface" ,python-zope-interface)
8865 ("python-incremental" ,python-incremental)
8866 ("python-constantly" ,python-constantly)
8867 ("python-automat" ,python-automat)))
8868 (home-page "https://twistedmatrix.com/")
8869 (synopsis "Asynchronous networking framework written in Python")
8870 (description
8871 "Twisted is an extensible framework for Python programming, with special
8872 focus on event-based network programming and multiprotocol integration.")
8873 (license license:expat)))
8874
8875 (define-public python2-twisted
8876 (package-with-python2 python-twisted))
8877
8878 (define-public python-pika
8879 (package
8880 (name "python-pika")
8881 (version "0.10.0")
8882 (source
8883 (origin
8884 (method url-fetch)
8885 (uri (pypi-uri "pika" version))
8886 (sha256
8887 (base32
8888 "0nb4h08di432lv7dy2v9kpwgk0w92f24sqc2hw2s9vwr5b8v8xvj"))))
8889 (build-system python-build-system)
8890 (native-inputs
8891 `(("python-pyev" ,python-pyev)
8892 ("python-tornado" ,python-tornado)
8893 ("python-twisted" ,python-twisted)))
8894 (home-page "https://pika.readthedocs.org")
8895 (synopsis "Pure Python AMQP Client Library")
8896 (description
8897 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
8898 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
8899 network support library.")
8900 (license license:bsd-3)))
8901
8902 (define-public python2-pika
8903 (package-with-python2 python-pika))
8904
8905 (define-public python-ply
8906 (package
8907 (name "python-ply")
8908 (version "3.10")
8909 (source
8910 (origin
8911 (method url-fetch)
8912 (uri (pypi-uri "ply" version))
8913 (sha256
8914 (base32
8915 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
8916 (build-system python-build-system)
8917 (home-page "http://www.dabeaz.com/ply/")
8918 (synopsis "Python Lex & Yacc")
8919 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
8920 It uses LR parsing and does extensive error checking.")
8921 (license license:bsd-3)))
8922
8923 (define-public python2-ply
8924 (package-with-python2 python-ply))
8925
8926 (define-public python-tabulate
8927 (package
8928 (name "python-tabulate")
8929 (version "0.7.7")
8930 (source (origin
8931 (method url-fetch)
8932 (uri (pypi-uri "tabulate" version))
8933 (sha256
8934 (base32
8935 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
8936 (build-system python-build-system)
8937 (arguments
8938 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
8939 ;; and the latest release is not tagged in the upstream repository.
8940 '(#:tests? #f))
8941 (home-page "https://bitbucket.org/astanin/python-tabulate")
8942 (synopsis "Pretty-print tabular data")
8943 (description
8944 "Tabulate is a library and command-line utility to pretty-print tabular
8945 data in Python.")
8946 (license license:expat)))
8947
8948 (define-public python2-tabulate
8949 (package-with-python2 python-tabulate))
8950
8951 (define-public python-kazoo
8952 (package
8953 (name "python-kazoo")
8954 (version "2.2.1")
8955 (source
8956 (origin
8957 (method url-fetch)
8958 (uri (pypi-uri "kazoo" version))
8959 (sha256
8960 (base32
8961 "10pb864if9qi2pq9lfb9m8f7z7ss6rml80gf1d9h64lap5crjnjj"))))
8962 (build-system python-build-system)
8963 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
8964 (propagated-inputs
8965 `(("python-six" ,python-six)))
8966 (home-page "https://kazoo.readthedocs.org")
8967 (synopsis "High-level Zookeeper client library")
8968 (description
8969 "Kazoo is a Python client library for the Apache Zookeeper distributed
8970 application service. It is designed to be easy to use and to avoid common
8971 programming errors.")
8972 (license license:asl2.0)))
8973
8974 (define-public python2-kazoo
8975 (package-with-python2 python-kazoo))
8976
8977 (define-public python-pykafka
8978 (package
8979 (name "python-pykafka")
8980 (version "2.4.0")
8981 (source (origin
8982 (method url-fetch)
8983 (uri (string-append
8984 "https://pypi.python.org/packages/8b/3e/"
8985 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
8986 "pykafka-" version ".tar.gz"))
8987 (sha256
8988 (base32
8989 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
8990 (build-system python-build-system)
8991 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
8992 (propagated-inputs
8993 `(("python-gevent" ,python-gevent)
8994 ("python-kazoo" ,python-kazoo)
8995 ("python-tabulate" ,python-tabulate)))
8996 (inputs
8997 `(("librdkafka" ,librdkafka)))
8998 (home-page "https://pykafka.readthedocs.io/")
8999 (synopsis "Apache Kafka client for Python")
9000 (description
9001 "PyKafka is a client for the Apache Kafka distributed messaging system.
9002 It includes Python implementations of Kafka producers and consumers, which
9003 are optionally backed by a C extension built on librdkafka.")
9004 (license license:asl2.0)))
9005
9006 (define-public python2-pykafka
9007 (package-with-python2 python-pykafka))
9008
9009 (define-public python-wcwidth
9010 (package
9011 (name "python-wcwidth")
9012 (version "0.1.7")
9013 (source
9014 (origin
9015 (method url-fetch)
9016 (uri (pypi-uri "wcwidth" version))
9017 (sha256
9018 (base32
9019 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
9020 (build-system python-build-system)
9021 (home-page "https://github.com/jquast/wcwidth")
9022 (synopsis "Measure number of terminal column cells of wide-character codes")
9023 (description "Wcwidth measures the number of terminal column cells of
9024 wide-character codes. It is useful for those implementing a terminal emulator,
9025 or programs that carefully produce output to be interpreted by one. It is a
9026 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9027 specified in POSIX.1-2001 and POSIX.1-2008.")
9028 (license license:expat)))
9029
9030 (define-public python2-wcwidth
9031 (package-with-python2 python-wcwidth))
9032
9033 (define-public python2-jsonrpclib
9034 (package
9035 (name "python2-jsonrpclib")
9036 (version "0.1.7")
9037 (source (origin
9038 (method url-fetch)
9039 (uri (string-append
9040 "https://pypi.python.org/packages/source/j/jsonrpclib/"
9041 "jsonrpclib-" version ".tar.gz"))
9042 (sha256
9043 (base32
9044 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9045 (build-system python-build-system)
9046 (arguments
9047 `(#:tests? #f
9048 #:python ,python-2))
9049 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9050 (synopsis "Implementation of JSON-RPC specification for Python")
9051 (description
9052 "This library is an implementation of the JSON-RPC specification.
9053 It supports both the original 1.0 specification, as well as the
9054 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9055 etc.")
9056 (license license:asl2.0)))
9057
9058 (define-public python-chai
9059 (package
9060 (name "python-chai")
9061 (version "1.1.1")
9062 (source (origin
9063 (method url-fetch)
9064 (uri (pypi-uri "chai" version))
9065 (sha256
9066 (base32
9067 "016kf3irrclpkpvcm7q0gmkfibq7jgy30a9v73pp42bq9h9a32bl"))))
9068 (build-system python-build-system)
9069 (home-page "https://github.com/agoragames/chai")
9070 (synopsis "Mocking framework for Python")
9071 (description
9072 "Chai provides an api for mocking, stubbing and spying your python
9073 objects, patterned after the Mocha library for Ruby.")
9074 (license license:bsd-3)))
9075
9076 (define-public python2-chai
9077 (package-with-python2 python-chai))
9078
9079 (define-public python-inflection
9080 (package
9081 (name "python-inflection")
9082 (version "0.3.1")
9083 (source
9084 (origin (method url-fetch)
9085 (uri (pypi-uri "inflection" version))
9086 (sha256
9087 (base32
9088 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9089 (build-system python-build-system)
9090 (native-inputs
9091 `(("python-pytest" ,python-pytest)))
9092 (home-page "https://github.com/jpvanhal/inflection")
9093 (synopsis "Python string transformation library")
9094 (description
9095 "Inflection is a string transformation library. It singularizes
9096 and pluralizes English words, and transforms strings from CamelCase to
9097 underscored string.")
9098 (license license:expat)))
9099
9100 (define-public python2-inflection
9101 (package-with-python2 python-inflection))
9102
9103 (define-public python-pylev
9104 (package
9105 (name "python-pylev")
9106 (version "1.3.0")
9107 (source (origin
9108 (method url-fetch)
9109 (uri (pypi-uri "pylev" version))
9110 (sha256
9111 (base32
9112 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9113 (build-system python-build-system)
9114 (home-page "https://github.com/toastdriven/pylev")
9115 (synopsis "Levenshtein distance implementation in Python")
9116 (description "Pure Python Levenshtein implementation, based off the
9117 Wikipedia code samples at
9118 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9119 (license license:bsd-3)))
9120
9121 (define-public python2-pylev
9122 (package-with-python2 python-pylev))
9123
9124 (define-public python-cleo
9125 (package
9126 (name "python-cleo")
9127 (version "0.6.1")
9128 (source (origin
9129 (method url-fetch)
9130 (uri (pypi-uri "cleo" version))
9131 (sha256
9132 (base32
9133 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
9134 (build-system python-build-system)
9135 (native-inputs
9136 `(;; For testing
9137 ("python-mock" ,python-mock)
9138 ("python-pytest-mock" ,python-pytest-mock)
9139 ("python-pytest" ,python-pytest)))
9140 (propagated-inputs
9141 `(("python-backpack" ,python-backpack)
9142 ("python-pastel" ,python-pastel)
9143 ("python-pylev" ,python-pylev)))
9144 (home-page "https://github.com/sdispater/cleo")
9145 (synopsis "Command-line arguments library for Python")
9146 (description
9147 "Cleo allows you to create command-line commands with signature in
9148 docstring and colored output.")
9149 (license license:expat)))
9150
9151 (define-public python2-cleo
9152 (package-with-python2 python-cleo))
9153
9154 (define-public python-lazy-object-proxy
9155 (package
9156 (name "python-lazy-object-proxy")
9157 (version "1.2.2")
9158 (source (origin
9159 (method url-fetch)
9160 (uri (pypi-uri "lazy-object-proxy" version))
9161 (sha256
9162 (base32
9163 "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
9164 (build-system python-build-system)
9165 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9166 (synopsis "Lazy object proxy for python")
9167 (description
9168 "Lazy object proxy is an object that wraps a callable but defers the call
9169 until the object is actually required, and caches the result of said call.")
9170 (license license:bsd-2)))
9171
9172 (define-public python2-lazy-object-proxy
9173 (package-with-python2 python-lazy-object-proxy))
9174
9175 (define-public python-dnspython
9176 (package
9177 (name "python-dnspython")
9178 (version "1.15.0")
9179 (source (origin
9180 (method url-fetch)
9181 (uri (string-append "http://www.dnspython.org/kits/"
9182 version "/dnspython-" version ".tar.gz"))
9183 (sha256
9184 (base32
9185 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
9186 (build-system python-build-system)
9187 (arguments '(#:tests? #f)) ; XXX: requires internet access
9188 (home-page "http://www.dnspython.org")
9189 (synopsis "DNS toolkit for Python")
9190 (description
9191 "dnspython is a DNS toolkit for Python. It supports almost all record
9192 types. It can be used for queries, zone transfers, and dynamic updates.
9193 It supports TSIG authenticated messages and EDNS0.")
9194 (license license:expat)))
9195
9196 (define-public python2-dnspython
9197 (package-with-python2 python-dnspython))
9198
9199 (define-public python-email-validator
9200 (package
9201 (name "python-email-validator")
9202 (version "1.0.2")
9203 (source
9204 (origin (method url-fetch)
9205 (uri (pypi-uri "email_validator" version))
9206 (sha256
9207 (base32
9208 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
9209 (build-system python-build-system)
9210 (arguments
9211 '(#:phases
9212 (modify-phases %standard-phases
9213 (add-before 'build 'use-dnspython
9214 (lambda _
9215 (substitute* "setup.py"
9216 (("dnspython3") "dnspython"))
9217 #t)))))
9218 (propagated-inputs
9219 `(("python-dnspython" ,python-dnspython)
9220 ("python-idna" ,python-idna)))
9221 (home-page "https://github.com/JoshData/python-email-validator")
9222 (synopsis "Email address validation library for Python")
9223 (description
9224 "This library validates email address syntax and deliverability.")
9225 (license license:cc0)))
9226
9227 (define-public python2-email-validator
9228 (package-with-python2 python-email-validator))
9229
9230 (define-public python-ukpostcodeparser
9231 (package
9232 (name "python-ukpostcodeparser")
9233 (version "1.0.3")
9234 (source (origin
9235 (method url-fetch)
9236 (uri (pypi-uri "UkPostcodeParser" version))
9237 (sha256
9238 (base32
9239 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9240 (build-system python-build-system)
9241 (home-page "https://github.com/hamstah/ukpostcodeparser")
9242 (synopsis "UK Postcode parser for Python")
9243 (description
9244 "This library provides the @code{parse_uk_postcode} function for
9245 parsing UK postcodes.")
9246 (license license:expat)))
9247
9248 (define-public python2-ukpostcodeparser
9249 (package-with-python2 python-ukpostcodeparser))
9250
9251 (define-public python-faker
9252 (package
9253 (name "python-faker")
9254 (version "0.7.9")
9255 (source (origin
9256 (method url-fetch)
9257 (uri (pypi-uri "Faker" version))
9258 (sha256
9259 (base32
9260 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
9261 (patches
9262 (search-patches "python-faker-fix-build-32bit.patch"))
9263 (modules '((guix build utils)))
9264 (snippet
9265 '(begin
9266 (for-each delete-file (find-files "." "\\.pyc$"))
9267 #t))))
9268 (build-system python-build-system)
9269 (arguments
9270 '(#:phases
9271 (modify-phases %standard-phases
9272 (replace 'check
9273 (lambda _
9274 (zero? (system* "python" "-m" "unittest" "-v" "tests")))))))
9275 (native-inputs
9276 `(;; For testing
9277 ("python-email-validator" ,python-email-validator)
9278 ("python-mock" ,python-mock)
9279 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
9280 (propagated-inputs
9281 `(("python-dateutil" ,python-dateutil)
9282 ("python-six" ,python-six)))
9283 (home-page "https://github.com/joke2k/faker")
9284 (synopsis "Python package that generates fake data")
9285 (description
9286 "Faker is a Python package that generates fake data such as names,
9287 addresses, and phone numbers.")
9288 (license license:expat)
9289 (properties `((python2-variant . ,(delay python2-faker))))))
9290
9291 (define-public python2-faker
9292 (let ((base (package-with-python2 (strip-python2-variant
9293 python-faker))))
9294 (package
9295 (inherit base)
9296 (propagated-inputs
9297 `(("python2-ipaddress" ,python2-ipaddress)
9298 ,@(package-propagated-inputs base))))))
9299
9300 (define-public python-pyaml
9301 (package
9302 (name "python-pyaml")
9303 (version "17.7.2")
9304 (source (origin
9305 (method url-fetch)
9306 (uri (pypi-uri "pyaml" version))
9307 (sha256
9308 (base32
9309 "132grrw0ajq4nrappi3ldbkb952k7yn9b6c7csi2rmvzm1g6ppp2"))))
9310 (build-system python-build-system)
9311 (native-inputs
9312 `(("python-unidecode" ,python-unidecode)))
9313 (propagated-inputs
9314 `(("python-pyyaml" ,python-pyyaml)))
9315 (home-page "https://github.com/mk-fg/pretty-yaml")
9316 (synopsis "YAML pretty-print library for Python")
9317 (description
9318 "pyaml is a PyYAML based python module to produce pretty and readable
9319 YAML-serialized data.")
9320 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
9321
9322 (define-public python2-pyaml
9323 (package-with-python2 python-pyaml))
9324
9325 (define-public python-backpack
9326 (package
9327 (name "python-backpack")
9328 (version "0.1")
9329 (source
9330 (origin
9331 (method url-fetch)
9332 (uri (pypi-uri "backpack" version))
9333 (sha256
9334 (base32
9335 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
9336 (build-system python-build-system)
9337 (native-inputs
9338 `(("python-pytest" ,python-pytest)
9339 ("python-nose" ,python-nose)))
9340 (propagated-inputs
9341 `(("python-simplejson" ,python-simplejson)))
9342 (home-page "https://github.com/sdispater/backpack")
9343 (synopsis "Utilities for working with Python collections")
9344 (description "Backpack provides some useful utilities for working with
9345 collections of data.")
9346 (license license:expat)))
9347
9348 (define-public python2-backpack
9349 (package-with-python2 python-backpack))
9350
9351 (define-public python-prompt-toolkit
9352 (package
9353 (name "python-prompt-toolkit")
9354 (version "1.0.15")
9355 (source
9356 (origin
9357 (method url-fetch)
9358 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9359 (sha256
9360 (base32
9361 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))
9362 (build-system python-build-system)
9363 (arguments
9364 '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
9365 (propagated-inputs
9366 `(("python-wcwidth" ,python-wcwidth)
9367 ("python-six" ,python-six)
9368 ("python-pygments" ,python-pygments)))
9369 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
9370 (synopsis "Library for building command line interfaces in Python")
9371 (description
9372 "Prompt-Toolkit is a library for building interactive command line
9373 interfaces in Python. It's like GNU Readline but it also features syntax
9374 highlighting while typing, out-of-the-box multi-line input editing, advanced
9375 code completion, incremental search, support for Chinese double-width
9376 characters, mouse support, and auto suggestions.")
9377 (license license:bsd-3)))
9378
9379 (define-public python2-prompt-toolkit
9380 (package-with-python2 python-prompt-toolkit))
9381
9382 (define-public python-jedi
9383 (package
9384 (name "python-jedi")
9385 (version "0.9.0")
9386 (source
9387 (origin
9388 (method url-fetch)
9389 (uri (pypi-uri "jedi" version))
9390 (sha256
9391 (base32
9392 "0c8x962ynpx001fdvp07m2q5jk4igkxbj3rmnydavphvlgxijk1v"))))
9393 (build-system python-build-system)
9394 (arguments
9395 ;; FIXME: One test fails (use "py.test" instead of 'setup.py test').
9396 '(#:tests? #f))
9397 (native-inputs
9398 `(("python-pytest" ,python-pytest)))
9399 (home-page "https://github.com/davidhalter/jedi")
9400 (synopsis
9401 "Autocompletion for Python that can be used for text editors")
9402 (description
9403 "Jedi is an autocompletion tool for Python that can be used for text editors.")
9404 (license license:expat)))
9405
9406 (define-public python2-jedi
9407 (package-with-python2 python-jedi))
9408
9409 (define-public ptpython
9410 (package
9411 (name "ptpython")
9412 (version "0.34")
9413 (source (origin
9414 (method url-fetch)
9415 (uri (pypi-uri "ptpython" version))
9416 (sha256
9417 (base32
9418 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
9419 (build-system python-build-system)
9420 (arguments
9421 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
9422 (propagated-inputs
9423 `(("python-docopt" ,python-docopt)
9424 ("python-jedi" ,python-jedi)
9425 ("python-prompt-toolkit" ,python-prompt-toolkit)
9426 ("python-pygments" ,python-pygments)))
9427 (home-page "https://github.com/jonathanslenders/ptpython")
9428 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
9429 (description
9430 "ptpython is a Python read-eval-print loop with IDE-like features.
9431 It supports syntax highlighting, multiline editing, autocompletion, mouse,
9432 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
9433 etc.")
9434 (license license:bsd-3)
9435 (properties `((python2-variant . ,(delay ptpython-2))))))
9436
9437 (define-public ptpython-2
9438 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
9439 (package
9440 (inherit base)
9441 (name "ptpython2"))))
9442
9443 (define-public python-stem
9444 (package
9445 (name "python-stem")
9446 (version "1.6.0")
9447 (source
9448 (origin
9449 (method url-fetch)
9450 (uri (pypi-uri "stem" version))
9451 (sha256
9452 (base32
9453 "1va9p3ij7lxg6ixfsvaql06dn11l3fgpxmss1dhlvafm7sqizznp"))))
9454 (build-system python-build-system)
9455 (arguments
9456 `(#:phases
9457 (modify-phases %standard-phases
9458 (add-before 'check 'fix-test-environment
9459 (lambda _
9460 ;; Fixes: FileNotFoundError: [Errno 2] No such file or directory:
9461 ;; '/tmp/guix-build-python-stem-1.6.0.drv-0/stem-1.6.0/.gitignore'.
9462 (with-output-to-file ".gitignore"
9463 (lambda _ (format #t "%")))
9464 #t))
9465 (replace 'check
9466 (lambda _
9467 (invoke "./run_tests.py" "--unit")
9468 #t)))))
9469 (native-inputs
9470 `(("python-mock" ,python-mock)
9471 ("python-pep8" ,python-pep8)
9472 ("python-pyflakes" ,python-pyflakes)))
9473 (home-page "https://stem.torproject.org/")
9474 (synopsis
9475 "Python controller library that allows applications to interact with Tor")
9476 (description
9477 "Stem is a Python controller library for Tor. With it you can use Tor's
9478 control protocol to script against the Tor process and read descriptor data
9479 relays publish about themselves.")
9480 (license license:lgpl3)))
9481
9482 (define-public python2-stem
9483 (package-with-python2 python-stem))
9484
9485 (define-public python-pyserial
9486 (package
9487 (name "python-pyserial")
9488 (version "3.1.1")
9489 (source
9490 (origin
9491 (method url-fetch)
9492 (uri (pypi-uri "pyserial" version))
9493 (sha256
9494 (base32
9495 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
9496 (build-system python-build-system)
9497 (arguments
9498 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
9499 ;; #:phases
9500 ;; (modify-phases %standard-phases
9501 ;; (replace 'check
9502 ;; (lambda _
9503 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
9504 (home-page
9505 "https://github.com/pyserial/pyserial")
9506 (synopsis "Python Serial Port Bindings")
9507 (description "@code{pyserial} provide serial port bindings for Python. It
9508 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
9509 and/or Xon/Xoff. The port is accessed in RAW mode.")
9510 (license license:bsd-3)))
9511
9512 (define-public python2-pyserial
9513 (package-with-python2 python-pyserial))
9514
9515 (define-public python-kivy
9516 (package
9517 (name "python-kivy")
9518 (version "1.10.0")
9519 (source
9520 (origin
9521 (method url-fetch)
9522 (uri (pypi-uri "Kivy" version))
9523 (file-name (string-append name "-" version ".tar.gz"))
9524 (sha256
9525 (base32
9526 "1394zh6kvf7k5d8vlzxcsfcailr3q59xwg9b1n7qaf25bvyq1h98"))))
9527 (build-system python-build-system)
9528 (arguments
9529 `(#:tests? #f ; Tests require many optional packages
9530 #:phases
9531 (modify-phases %standard-phases
9532 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
9533 (lambda* (#:key inputs #:allow-other-keys)
9534 (setenv "KIVY_SDL2_PATH"
9535 (string-append (assoc-ref inputs "sdl-union")
9536 "/include/SDL2"))
9537 #t)))))
9538 (native-inputs
9539 `(("git" ,git)
9540 ("pkg-config" ,pkg-config)
9541 ("python-cython" ,python-cython)))
9542 (inputs
9543 `(("gstreamer" ,gstreamer)
9544 ("mesa" ,mesa)
9545 ("sdl-union"
9546 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
9547 (home-page "http://kivy.org")
9548 (synopsis
9549 "Multitouch application framework")
9550 (description
9551 "A software library for rapid development of
9552 hardware-accelerated multitouch applications.")
9553 (license license:expat)))
9554
9555 (define-public python2-kivy
9556 (package-with-python2 python-kivy))
9557
9558 (define-public python-kivy-next
9559 (let ((commit "a988c5e7a47da56263ff39514264a3de516ef2fe")
9560 (revision "1"))
9561 (package (inherit python-kivy)
9562 (name "python-kivy-next")
9563 (version (string-append "1.9.1-" revision "."
9564 (string-take commit 7)))
9565 (source
9566 (origin
9567 (method git-fetch)
9568 (uri (git-reference
9569 (url "https://github.com/kivy/kivy")
9570 (commit commit)))
9571 (file-name (string-append name "-" version "-checkout"))
9572 (sha256
9573 (base32
9574 "0jk92b4a8l7blkvkgkjihk171s0dfnq582cckff5srwc8kal5m0p")))))))
9575
9576 (define-public python2-kivy-next
9577 (package-with-python2 python-kivy-next))
9578
9579 (define-public python-binaryornot
9580 (package
9581 (name "python-binaryornot")
9582 (version "0.4.0")
9583 (source (origin
9584 (method url-fetch)
9585 (uri (pypi-uri "binaryornot" version))
9586 (sha256
9587 (base32
9588 "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"))))
9589 (build-system python-build-system)
9590 (propagated-inputs
9591 `(("python-chardet" ,python-chardet)
9592 ("python-hypothesis" ,python-hypothesis)))
9593 (home-page "https://github.com/audreyr/binaryornot")
9594 (synopsis "Package to check if a file is binary or text")
9595 (description "Ultra-lightweight pure Python package to check if a file is
9596 binary or text.")
9597 (license license:bsd-3)
9598 (properties `((python2-variant . ,(delay python2-binaryornot))))))
9599
9600 (define-public python2-binaryornot
9601 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
9602 (package (inherit base)
9603 (propagated-inputs
9604 `(("python2-enum34" ,python2-enum34)
9605 ,@(package-propagated-inputs base))))))
9606
9607 (define-public python-nltk
9608 (package
9609 (name "python-nltk")
9610 (version "3.2.1")
9611 (source (origin
9612 (method url-fetch)
9613 (uri (pypi-uri "nltk" version))
9614 (sha256
9615 (base32
9616 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
9617 (build-system python-build-system)
9618 (arguments
9619 '(;; The tests require some extra resources to be downloaded.
9620 ;; TODO Try packaging these resources.
9621 #:tests? #f))
9622 (home-page "http://nltk.org/")
9623 (synopsis "Natural Language Toolkit")
9624 (description "It provides interfaces to over 50 corpora and lexical
9625 resources such as WordNet, along with a suite of text processing libraries
9626 for classification, tokenization, stemming, tagging, parsing, and semantic
9627 reasoning, wrappers for natural language processing libraries.")
9628 (license license:asl2.0)))
9629
9630 (define-public python2-nltk
9631 (package-with-python2 python-nltk))
9632
9633 (define-public python-pymongo
9634 (package
9635 (name "python-pymongo")
9636 (version "3.3.0")
9637 (source (origin
9638 (method url-fetch)
9639 (uri (pypi-uri "pymongo" version))
9640 (sha256
9641 (base32
9642 "07mra6w86wjqy4lx5fvimidjhhfzd562gfjn8grsnbv2q8pk0i9x"))))
9643 (build-system python-build-system)
9644 (propagated-inputs
9645 `(("python-certifi" ,python-certifi)))
9646 (home-page "https://github.com/mongodb/mongo-python-driver")
9647 (synopsis "Python driver for MongoDB")
9648 (description "Python driver for MongoDB.")
9649 (license license:asl2.0)))
9650
9651 (define-public python2-pymongo
9652 (package-with-python2 python-pymongo))
9653
9654 (define-public python-sh
9655 (package
9656 (name "python-sh")
9657 (version "1.11")
9658 (source (origin
9659 (method url-fetch)
9660 (uri (pypi-uri "sh" version))
9661 (sha256
9662 (base32
9663 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
9664 (build-system python-build-system)
9665 (arguments
9666 `(#:tests? #f)) ; no tests
9667 (home-page "https://github.com/amoffat/sh")
9668 (synopsis "Python subprocess interface")
9669 (description "Abstracts process invocation by providing a function
9670 interface for programs.")
9671 (license license:expat)))
9672
9673 (define-public python2-sh
9674 (package-with-python2 python-sh))
9675
9676 (define-public python-consul
9677 (package
9678 (name "python-consul")
9679 (version "0.6.1")
9680 (source
9681 (origin
9682 (method url-fetch)
9683 (uri (pypi-uri "python-consul" version))
9684 (sha256
9685 (base32
9686 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
9687 (build-system python-build-system)
9688 (arguments
9689 '(#:tests? #f)) ; The tests are not distributed
9690 (propagated-inputs
9691 `(("python-requests" ,python-requests)
9692 ("python-six" ,python-six)))
9693 (home-page "https://github.com/cablehead/python-consul")
9694 (synopsis "Python client for Consul")
9695 (description
9696 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
9697 discovery, monitoring and configuration.")
9698 (license license:expat)))
9699
9700 (define-public python2-consul
9701 (package-with-python2 python-consul))
9702
9703 (define-public python-schematics
9704 (package
9705 (name "python-schematics")
9706 (version "1.1.1")
9707 (source
9708 (origin
9709 (method url-fetch)
9710 (uri (string-append
9711 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
9712 (file-name (string-append name "-" version ".tar.gz"))
9713 (sha256
9714 (base32
9715 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
9716 (build-system python-build-system)
9717 (propagated-inputs
9718 `(("python-six" ,python-six)))
9719 (arguments
9720 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
9721 ; version requirements (eg python-coveralls)
9722 (home-page "https://github.com/schematics/schematics")
9723 (synopsis "Python Data Structures for Humans")
9724 (description "Python Data Structures for Humans.")
9725 (license license:bsd-3)))
9726
9727 (define-public python2-schematics
9728 (package-with-python2 python-schematics))
9729
9730 (define-public python-odfpy
9731 (package
9732 (name "python-odfpy")
9733 (version "1.3.3")
9734 (source (origin
9735 (method url-fetch)
9736 (uri (pypi-uri "odfpy" version))
9737 (sha256
9738 (base32
9739 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
9740 (arguments
9741 `(#:modules ((srfi srfi-1)
9742 (guix build python-build-system)
9743 (guix build utils))
9744 #:phases
9745 (modify-phases %standard-phases
9746 (replace 'check
9747 ;; The test runner invokes python2 and python3 for test*.py.
9748 ;; To avoid having both in inputs, we replicate it here.
9749 (lambda _
9750 (every (lambda (test-file)
9751 (zero? (system* "python" test-file)))
9752 (find-files "tests" "^test.*\\.py$")))))))
9753 (build-system python-build-system)
9754 (home-page "https://github.com/eea/odfpy")
9755 (synopsis "Python API and tools to manipulate OpenDocument files")
9756 (description "Collection of libraries and utility programs written in
9757 Python to manipulate OpenDocument 1.2 files.")
9758 (license
9759 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
9760 ;; number of files with other licenses.
9761 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
9762
9763 (define-public python2-odfpy
9764 (package-with-python2 python-odfpy))
9765
9766 (define-public python-natsort
9767 (package
9768 (name "python-natsort")
9769 (version "5.0.2")
9770 (source (origin
9771 (method url-fetch)
9772 (uri (pypi-uri "natsort" version))
9773 (sha256
9774 (base32
9775 "0bh6j0l8iapjnsgg3bs6q075cnzjl6zw1vlgqyv3qrygm2cxypkn"))))
9776 (build-system python-build-system)
9777 (arguments
9778 `(#:phases
9779 (modify-phases %standard-phases
9780 (add-before 'check 'set-cachedir
9781 ;; Tests require write access to $HOME by default
9782 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
9783 (native-inputs
9784 `(("python-hypothesis" ,python-hypothesis)
9785 ("python-pytest-cache" ,python-pytest-cache)
9786 ("python-pytest-cov" ,python-pytest-cov)
9787 ("python-pytest-flakes" ,python-pytest-flakes)
9788 ("python-pytest-pep8" ,python-pytest-pep8)))
9789 (propagated-inputs ; TODO: Add python-fastnumbers.
9790 `(("python-pyicu" ,python-pyicu)))
9791 (home-page "https://github.com/SethMMorton/natsort")
9792 (synopsis "Natural sorting for python and shell")
9793 (description
9794 "Natsort lets you apply natural sorting on lists instead of
9795 lexicographical. If you use the built-in @code{sorted} method in python
9796 on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
9797 returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
9798 function @code{natsorted} that identifies numbers and sorts them separately
9799 from strings. It can also sort version numbers, real numbers, mixed types
9800 and more, and comes with a shell command @command{natsort} that exposes this
9801 functionality in the command line.")
9802 (license license:expat)
9803 (properties `((python2-variant . ,(delay python2-natsort))))))
9804
9805 (define-public python2-natsort
9806 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
9807 (package (inherit base)
9808 (native-inputs
9809 `(("python2-pathlib" ,python2-pathlib)
9810 ("python2-mock" ,python2-mock)
9811 ("python2-enum34" ,python2-enum34)
9812 ,@(package-native-inputs base))))))
9813
9814 (define-public python-glances
9815 (package
9816 (name "python-glances")
9817 (version "2.7.1")
9818 (source
9819 (origin
9820 (method url-fetch)
9821 (uri (pypi-uri "Glances" version))
9822 (sha256
9823 (base32
9824 "11jbq40g8alsbirnd4kiagznqg270247i0m8qhi48ldf2i5xppxg"))))
9825 (build-system python-build-system)
9826 (propagated-inputs
9827 `(("python-psutil" ,python-psutil)))
9828 (home-page
9829 "https://github.com/nicolargo/glances")
9830 (synopsis
9831 "A cross-platform curses-based monitoring tool")
9832 (description
9833 "Glances is a curses-based monitoring tool for a wide variety of platforms.
9834 Glances uses the PsUtil library to get information from your system. It monitors
9835 CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
9836 (license license:lgpl3+)))
9837
9838 (define-public python2-glances
9839 (package-with-python2 python-glances))
9840
9841 (define-public python-graphql-core
9842 (package
9843 (name "python-graphql-core")
9844 (version "0.5.3")
9845 (source
9846 (origin
9847 (method url-fetch)
9848 (uri (pypi-uri "graphql-core" version))
9849 (sha256
9850 (base32
9851 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
9852 (build-system python-build-system)
9853 (arguments
9854 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
9855 #:phases
9856 (modify-phases %standard-phases
9857 (add-after 'unpack 'patch-hardcoded-version
9858 (lambda _ (substitute*
9859 "setup.py"
9860 (("'gevent==1.1rc1'") "'gevent'"))
9861 #t)))))
9862 (native-inputs
9863 `(("python-gevent" ,python-gevent)
9864 ("python-mock" ,python-mock)
9865 ("python-pytest-mock" ,python-pytest-mock)))
9866 (propagated-inputs
9867 `(("python-promise" ,python-promise)
9868 ("python-six" ,python-six)))
9869 (home-page "https://github.com/graphql-python/graphql-core")
9870 (synopsis "GraphQL implementation for Python")
9871 (description
9872 "GraphQL implementation for Python. GraphQL is a data query language and
9873 runtime designed and used to request and deliver data to mobile and web apps.
9874 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
9875 to Python.")
9876 (license license:expat)))
9877
9878 (define-public python2-graphql-core
9879 (package-with-python2 python-graphql-core))
9880
9881 (define-public python-graphql-relay
9882 (package
9883 (name "python-graphql-relay")
9884 (version "0.4.5")
9885 (source
9886 (origin
9887 (method url-fetch)
9888 (uri (pypi-uri "graphql-relay" version))
9889 (sha256
9890 (base32
9891 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
9892 (build-system python-build-system)
9893 (arguments
9894 '(#:tests? #f)) ; The tests are not distributed
9895 (propagated-inputs
9896 `(("python-graphql-core" ,python-graphql-core)
9897 ("python-promise" ,python-promise)
9898 ("python-six" ,python-six)))
9899 (home-page "https://github.com/graphql-python/graphql-relay-py")
9900 (synopsis "Relay implementation for Python")
9901 (description
9902 "This is a library to allow the easy creation of Relay-compliant servers
9903 using the GraphQL Python reference implementation of a GraphQL server. It
9904 should be noted that the code is a exact port of the original
9905 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
9906 from Facebook.")
9907 (license license:expat)))
9908
9909 (define-public python2-graphql-relay
9910 (package-with-python2 python-graphql-relay))
9911
9912 (define-public python-graphene
9913 (package
9914 (name "python-graphene")
9915 (version "0.10.2")
9916 (source
9917 (origin
9918 (method url-fetch)
9919 (uri (pypi-uri "graphene" version))
9920 (sha256
9921 (base32
9922 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
9923 (build-system python-build-system)
9924 (propagated-inputs
9925 `(("python-graphql-core" ,python-graphql-core)
9926 ("python-graphql-relay" ,python-graphql-relay)
9927 ("python-iso8601" ,python-iso8601)
9928 ("python-promise" ,python-promise)
9929 ("python-six" ,python-six)))
9930 (arguments
9931 `(#:tests? #f)) ; no tests/ in the PyPI tarball
9932 (home-page "http://graphene-python.org/")
9933 (synopsis "GraphQL Framework for Python")
9934 (description
9935 "Graphene is a Python library for building GraphQL schemas/types.
9936 A GraphQL schema describes your data model, and provides a GraphQL server
9937 with an associated set of resolve methods that know how to fetch data.")
9938 (properties `((python2-variant . ,(delay python2-graphene))))
9939 (license license:expat)))
9940
9941 (define-public python2-graphene
9942 (let ((base (package-with-python2
9943 (strip-python2-variant python-graphene))))
9944 (package (inherit base)
9945 (native-inputs
9946 `(("python2-sqlalchemy" ,python2-sqlalchemy)
9947 ,@(package-native-inputs base))))))
9948
9949 (define-public python-nautilus
9950 (package
9951 (name "python-nautilus")
9952 (version "0.4.9")
9953 (source
9954 (origin
9955 (method url-fetch)
9956 (uri (pypi-uri "nautilus" version))
9957 (sha256
9958 (base32
9959 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
9960 (build-system python-build-system)
9961 (arguments `(#:tests? #f)) ; fails to import test modules
9962 (propagated-inputs
9963 `(("python-bcrypt" ,python-bcrypt)
9964 ("python-click" ,python-click)
9965 ("python-consul" ,python-consul)
9966 ("python-graphene" ,python-graphene)
9967 ("python-jinja2" ,python-jinja2)
9968 ("python-peewee" ,python-peewee)
9969 ("python-pika" ,python-pika)
9970 ("python-tornado" ,python-tornado)
9971 ("python-wtforms" ,python-wtforms)))
9972 (native-inputs
9973 `(("python-nose2" ,python-nose2)))
9974 (home-page "https://github.com/AlecAivazis/nautilus")
9975 (synopsis "Library for creating microservice applications")
9976 (description
9977 "Nautilus is a framework for flux based microservices that looks to
9978 provide extendible implementations of common aspects of a cloud so that you can
9979 focus on building massively scalable web applications.")
9980 (license license:expat)))
9981
9982 (define-public python-snowballstemmer
9983 (package
9984 (name "python-snowballstemmer")
9985 (version "1.2.1")
9986 (source (origin
9987 (method url-fetch)
9988 (uri (pypi-uri "snowballstemmer" version))
9989 (sha256
9990 (base32
9991 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
9992 (build-system python-build-system)
9993 (arguments
9994 `(;; No tests exist
9995 #:tests? #f))
9996 (home-page "https://github.com/shibukawa/snowball_py")
9997 (synopsis "Snowball stemming library collection for Python")
9998 (description "This package provides 16 word stemmer algorithms generated
9999 from Snowball algorithms. It includes the 15 original ones plus the Poerter
10000 English stemmer.")
10001 (license license:bsd-3)))
10002
10003 (define-public python2-snowballstemmer
10004 (package-with-python2 python-snowballstemmer))
10005
10006 (define-public python-sphinx-cloud-sptheme
10007 (package
10008 (name "python-sphinx-cloud-sptheme")
10009 (version "1.8.0")
10010 (source (origin
10011 (method url-fetch)
10012 (uri (pypi-uri "cloud_sptheme" version))
10013 (sha256
10014 (base32
10015 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
10016 (build-system python-build-system)
10017 ;; FIXME: The 'pypi' release archive does not contain tests.
10018 (arguments '(#:tests? #f))
10019 (native-inputs
10020 `(("python-sphinx" ,python-sphinx)))
10021 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
10022 (synopsis "'Cloud' theme for Sphinx documenter")
10023 (description "This package contains the \"Cloud\" theme for Sphinx and some
10024 related extensions.")
10025 (license license:bsd-3)))
10026
10027 (define-public python2-sphinx-cloud-sptheme
10028 (package-with-python2 python-sphinx-cloud-sptheme))
10029
10030 (define-public python-sphinx-alabaster-theme
10031 (package
10032 (name "python-sphinx-alabaster-theme")
10033 (version "0.7.9")
10034 (source (origin
10035 (method url-fetch)
10036 (uri (pypi-uri "alabaster" version))
10037 (sha256
10038 (base32
10039 "027anxzcb951gjlcc43y3rbn9qrw36d16vj9wd2smv5410xx9bs7"))))
10040 (build-system python-build-system)
10041 (propagated-inputs
10042 `(("python-pygments" ,python-pygments)))
10043 (home-page "https://alabaster.readthedocs.io/")
10044 (synopsis "Configurable sidebar-enabled Sphinx theme")
10045 (description "Alabaster is a visually (c)lean, responsive, configurable
10046 theme for the Sphinx documentation system. It's the default theme of Sphinx.")
10047 (license license:bsd-3)))
10048
10049 (define-public python2-sphinx-alabaster-theme
10050 (package-with-python2 python-sphinx-alabaster-theme))
10051
10052 (define-public python-setproctitle
10053 (package
10054 (name "python-setproctitle")
10055 (version "1.1.10")
10056 (source
10057 (origin
10058 (method url-fetch)
10059 (uri (pypi-uri "setproctitle" version))
10060 (sha256
10061 (base32
10062 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
10063 (build-system python-build-system)
10064 (arguments
10065 '(#:phases
10066 (modify-phases %standard-phases
10067 (add-before 'check 'patch-Makefile
10068 ;; Stricly this is only required for the python2 variant.
10069 ;; But adding a phase in an inherited package seems to be
10070 ;; cumbersum. So we patch even for python3.
10071 (lambda _
10072 (let ((nose (assoc-ref %build-inputs "python2-nose")))
10073 (when nose
10074 (substitute* "Makefile"
10075 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
10076 (string-append nose "/bin/nosetests "))))
10077 #t)))
10078 (replace 'check
10079 (lambda _
10080 (setenv "PYTHON" (or (which "python3") (which "python")))
10081 (setenv "PYCONFIG" (or (which "python3-config")
10082 (which "python-config")))
10083 (setenv "CC" "gcc")
10084 ;; No need to extend PYTHONPATH to find the built package, since
10085 ;; the Makefile will build anyway
10086 (zero? (system* "make" "check")))))))
10087 (native-inputs
10088 `(("procps" ,procps))) ; required for tests
10089 (home-page
10090 "https://github.com/dvarrazzo/py-setproctitle")
10091 (synopsis
10092 "Setproctitle implementation for Python to customize the process title")
10093 (description "The library allows a process to change its title (as displayed
10094 by system tools such as ps and top).
10095
10096 Changing the title is mostly useful in multi-process systems, for
10097 example when a master process is forked: changing the children's title
10098 allows to identify the task each process is busy with. The technique
10099 is used by PostgreSQL and the OpenSSH Server for example.")
10100 (license license:bsd-3)
10101 (properties `((python2-variant . ,(delay python2-setproctitle))))))
10102
10103 (define-public python2-setproctitle
10104 (let ((base (package-with-python2
10105 (strip-python2-variant python-setproctitle))))
10106 (package
10107 (inherit base)
10108 (native-inputs `(("python2-nose" ,python2-nose)
10109 ,@(package-native-inputs base))))))
10110
10111 (define-public python-validictory
10112 (package
10113 (name "python-validictory")
10114 (version "1.0.1")
10115 (source
10116 (origin
10117 (method url-fetch)
10118 (uri (pypi-uri "validictory" version))
10119 (sha256
10120 (base32
10121 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
10122 (build-system python-build-system)
10123 (arguments
10124 '(#:phases
10125 (modify-phases %standard-phases
10126 (add-after 'unpack 'bootstrap
10127 ;; Move the tests out of the package directory to avoid
10128 ;; packaging them.
10129 (lambda* _
10130 (rename-file "validictory/tests" "tests")
10131 (delete-file "tests/__init__.py")))
10132 (replace 'check
10133 (lambda _
10134 ;; Extend PYTHONPATH so the built package will be found.
10135 (setenv "PYTHONPATH"
10136 (string-append (getcwd) "/build/lib:"
10137 (getenv "PYTHONPATH")))
10138 (zero? (system* "py.test" "-vv" )))))))
10139 (native-inputs
10140 `(("python-pytest" ,python-pytest)))
10141 (home-page
10142 "https://github.com/jamesturk/validictory")
10143 (synopsis "General purpose Python data validator")
10144 (description "It allows validation of arbitrary Python data structures.
10145
10146 The schema format is based on the JSON Schema
10147 proposal (http://json-schema.org), so combined with json the library is also
10148 useful as a validator for JSON data.")
10149 (license license:expat)))
10150
10151 (define-public python2-validictory
10152 (package-with-python2 python-validictory))
10153
10154 (define-public python-pyev
10155 (package
10156 (name "python-pyev")
10157 (version "0.9.0")
10158 (source
10159 (origin
10160 (method url-fetch)
10161 (uri (pypi-uri "pyev" version))
10162 (sha256
10163 (base32
10164 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
10165 (build-system python-build-system)
10166 (arguments
10167 `(#:tests? #f ; no test suite
10168 #:phases
10169 (modify-phases %standard-phases
10170 (add-after 'unpack 'patch
10171 (lambda* (#:key inputs #:allow-other-keys)
10172 (let ((libev (string-append (assoc-ref inputs "libev")
10173 "/lib/libev.so.4")))
10174 (substitute* "setup.py"
10175 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
10176 (string-append "libev_dll_name = \"" libev "\"")))))))))
10177 (inputs
10178 `(("libev" ,libev)))
10179 (home-page "http://pythonhosted.org/pyev/")
10180 (synopsis "Python libev interface")
10181 (description "Pyev provides a Python interface to libev.")
10182 (license license:gpl3)))
10183
10184 (define-public python2-pyev
10185 (package-with-python2 python-pyev))
10186
10187 (define-public python-imagesize
10188 (package
10189 (name "python-imagesize")
10190 (version "0.7.1")
10191 (source
10192 (origin
10193 (method url-fetch)
10194 (uri (pypi-uri "imagesize" version))
10195 (sha256
10196 (base32
10197 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha"))))
10198 (build-system python-build-system)
10199 (arguments
10200 '(;; Test files are not distributed on PyPi:
10201 ;; https://github.com/shibukawa/imagesize_py/issues/7
10202 #:tests? #f))
10203 (home-page "https://github.com/shibukawa/imagesize_py")
10204 (synopsis "Gets image size of files in variaous formats in Python")
10205 (description
10206 "This package allows determination of image size from
10207 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
10208 (license license:expat)))
10209
10210 (define-public python2-imagesize
10211 (package-with-python2 python-imagesize))
10212
10213 (define-public python-termstyle
10214 (package
10215 (name "python-termstyle")
10216 (version "0.1.11")
10217 (source
10218 (origin
10219 (method url-fetch)
10220 (uri (pypi-uri "termstyle" version))
10221 (sha256
10222 (base32
10223 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
10224 (build-system python-build-system)
10225 (arguments
10226 '(#:phases
10227 (modify-phases %standard-phases
10228 (replace 'check
10229 (lambda _
10230 (zero? (system* "python" "test3.py")))))))
10231 (home-page "https://github.com/gfxmonk/termstyle")
10232 (synopsis "Console text coloring for Python")
10233 (description "This package provides console text coloring for Python.")
10234 (license license:bsd-3)))
10235
10236 (define-public python-argcomplete
10237 (package
10238 (name "python-argcomplete")
10239 (version "1.7.0")
10240 (source
10241 (origin
10242 (method url-fetch)
10243 (uri (pypi-uri "argcomplete" version))
10244 (sha256
10245 (base32
10246 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
10247 (build-system python-build-system)
10248 (native-inputs
10249 `(("python-pexpect" ,python-pexpect)
10250 ("tcsh" ,tcsh)
10251 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
10252 (home-page "https://github.com/kislyuk/argcomplete")
10253 (synopsis "Shell tab completion for Python argparse")
10254 (description "argcomplete provides extensible command line tab completion
10255 of arguments and options for Python scripts using @code{argparse}. It's
10256 particularly useful for programs with many options or sub-parsers that can
10257 dynamically suggest completions; for example, when browsing resources over the
10258 network.")
10259 (license license:asl2.0)))
10260
10261 (define-public python2-argcomplete
10262 (package-with-python2 python-argcomplete))
10263
10264 (define-public python-xopen
10265 (package
10266 (name "python-xopen")
10267 (version "0.3.2")
10268 (source
10269 (origin
10270 (method url-fetch)
10271 (uri (pypi-uri "xopen" version))
10272 (sha256
10273 (base32
10274 "0bzjmn3rl1cd3d2q39cjwnkhaspk2b0hfj3rl64pclm44ihg5fb6"))
10275 (file-name (string-append name "-" version ".tar.gz"))))
10276 (build-system python-build-system)
10277 (home-page "https://github.com/marcelm/xopen/")
10278 (synopsis "Open compressed files transparently")
10279 (description "This module provides an @code{xopen} function that works like
10280 Python's built-in @code{open} function, but can also deal with compressed files.
10281 Supported compression formats are gzip, bzip2 and, xz, and are automatically
10282 recognized by their file extensions. The focus is on being as efficient as
10283 possible on all supported Python versions.")
10284 (license license:expat)))
10285
10286 (define-public python2-xopen
10287 (package-with-python2 python-xopen))
10288
10289 (define-public python2-cheetah
10290 (package
10291 (name "python2-cheetah")
10292 (version "2.4.4")
10293 (source
10294 (origin
10295 (method url-fetch)
10296 (uri (pypi-uri "Cheetah" version))
10297 (sha256
10298 (base32
10299 "0l5mm4lnysjkzpjr95q5ydm9xc8bv43fxmr79ypybrf1y0lq4c5y"))))
10300 (build-system python-build-system)
10301 (arguments
10302 `(#:python ,python-2))
10303 (propagated-inputs
10304 `(("python2-markdown" ,python2-markdown)))
10305 (home-page "https://pythonhosted.org/Cheetah/")
10306 (synopsis "Template engine")
10307 (description "Cheetah is a text-based template engine and Python code
10308 generator.
10309
10310 Cheetah can be used as a standalone templating utility or referenced as
10311 a library from other Python applications. It has many potential uses,
10312 but web developers looking for a viable alternative to ASP, JSP, PHP and
10313 PSP are expected to be its principle user group.
10314
10315 Features:
10316 @enumerate
10317 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
10318 text-based format.
10319 @item Cleanly separates content, graphic design, and program code.
10320 @item Blends the power and flexibility of Python with a simple template language
10321 that non-programmers can understand.
10322 @item Gives template writers full access to any Python data structure, module,
10323 function, object, or method in their templates.
10324 @item Makes code reuse easy by providing an object-orientated interface to
10325 templates that is accessible from Python code or other Cheetah templates.
10326 One template can subclass another and selectively reimplement sections of it.
10327 @item Provides a simple, yet powerful, caching mechanism that can dramatically
10328 improve the performance of a dynamic website.
10329 @item Compiles templates into optimized, yet readable, Python code.
10330 @end enumerate")
10331 (license (license:x11-style "file://LICENSE"))))
10332
10333 (define-public python-dulwich
10334 (package
10335 (name "python-dulwich")
10336 (version "0.18.6")
10337 (source
10338 (origin
10339 (method url-fetch)
10340 (uri (list (string-append "https://www.dulwich.io/releases/"
10341 "dulwich-" version ".tar.gz")
10342 (pypi-uri "dulwich" version)))
10343 (sha256
10344 (base32
10345 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
10346 (build-system python-build-system)
10347 (arguments
10348 `(#:phases
10349 (modify-phases %standard-phases
10350 (add-before 'check 'fix-tests
10351 (lambda* (#:key inputs #:allow-other-keys)
10352 ;; The tests use Popen with a custom environment which doesn't
10353 ;; include PATH.
10354 (substitute* "dulwich/tests/compat/utils.py"
10355 (("'git'") (string-append "'"
10356 (which "git")
10357 "'")))
10358 (substitute* '("dulwich/tests/test_repository.py"
10359 "dulwich/tests/test_hooks.py")
10360 (("#!/bin/sh") (string-append "#!" (which "sh"))))
10361 (setenv "TEST_RUNNER" "unittest")
10362 (setenv "PYTHONHASHSEED" "random")
10363 #t)))))
10364 (propagated-inputs
10365 `(("python-fastimport" ,python-fastimport)))
10366 (native-inputs
10367 `(("python-mock" ,python-mock)
10368 ("python-geventhttpclient" ,python-geventhttpclient)
10369 ("git" ,git)))
10370 (home-page "https://www.dulwich.io/")
10371 (synopsis "Git implementation in Python")
10372 (description "Dulwich is an implementation of the Git file formats and
10373 protocols written in pure Python.")
10374 ;; Can be used with either license.
10375 (license (list license:asl2.0 license:gpl2+))))
10376
10377 (define-public python2-dulwich
10378 (package-with-python2 python-dulwich))
10379
10380 (define-public python-pbkdf2
10381 (package
10382 (name "python-pbkdf2")
10383 (version "1.3")
10384 (source
10385 (origin
10386 (method url-fetch)
10387 (uri (pypi-uri "pbkdf2" version))
10388 (sha256
10389 (base32
10390 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
10391 (build-system python-build-system)
10392 (arguments
10393 '(#:phases
10394 (modify-phases %standard-phases
10395 (replace 'check
10396 (lambda _
10397 (setenv "PYTHONPATH"
10398 (string-append (getcwd) "/build/lib:"
10399 (getenv "PYTHONPATH")))
10400 (zero? (system* "python" "test/test_pbkdf2.py")))))))
10401 (propagated-inputs
10402 `(("python-pycrypto" ,python-pycrypto))) ; optional
10403 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
10404 (synopsis "Password-based key derivation")
10405 (description "This module implements the password-based key derivation
10406 function, PBKDF2, specified in RSA PKCS#5 v2.0.
10407
10408 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
10409 is part of the RSA Public Key Cryptography Standards series. The provided
10410 implementation takes a password or a passphrase and a salt value (and
10411 optionally a iteration count, a digest module, and a MAC module) and provides
10412 a file-like object from which an arbitrarly-sized key can be read.")
10413 (license license:expat)))
10414
10415 (define-public python2-pbkdf2
10416 (package-with-python2 python-pbkdf2))
10417
10418 (define-public python-qrcode
10419 (package
10420 (name "python-qrcode")
10421 (version "5.3")
10422 (source
10423 (origin
10424 (method url-fetch)
10425 (uri (pypi-uri "qrcode" version))
10426 (sha256
10427 (base32
10428 "0kljfrfq0c2rmxf8am57333ia41kd0snbm2rnqbdy816hgpcq5a1"))))
10429 (build-system python-build-system)
10430 (arguments
10431 ;; FIXME: Tests require packaging 'pymaging'.
10432 '(#:tests? #f))
10433 (propagated-inputs
10434 `(("python-lxml" ,python-lxml) ; for SVG output
10435 ("python-pillow" ,python-pillow) ; for PNG output
10436 ("python-six" ,python-six)))
10437 (home-page "https://github.com/lincolnloop/python-qrcode")
10438 (synopsis "QR Code image generator")
10439 (description "This package provides a pure Python QR Code generator
10440 module. It uses the Python Imaging Library (PIL) to allow for the generation
10441 of QR Codes.
10442
10443 In addition this package provides a command line tool to generate QR codes and
10444 either write these QR codes to a file or do the output as ascii art at the
10445 console.")
10446 (license license:bsd-3)))
10447
10448 (define-public python2-qrcode
10449 (package-with-python2 python-qrcode))
10450
10451 (define-public python-rst2ansi
10452 (package
10453 (name "python-rst2ansi")
10454 (version "0.1.5")
10455 (source
10456 (origin
10457 (method url-fetch)
10458 (uri (pypi-uri "rst2ansi" version))
10459 (sha256
10460 (base32
10461 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
10462 (build-system python-build-system)
10463 (propagated-inputs
10464 `(("python-docutils" ,python-docutils)))
10465 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
10466 (synopsis "Convert RST to ANSI-decorated console output")
10467 (description
10468 "Python module dedicated to rendering RST (reStructuredText) documents
10469 to ansi-escaped strings suitable for display in a terminal.")
10470 (license license:expat)))
10471
10472 (define-public python-ansi2html
10473 (package
10474 (name "python-ansi2html")
10475 (version "1.2.0")
10476 (source
10477 (origin
10478 (method url-fetch)
10479 (uri (pypi-uri "ansi2html" version))
10480 (sha256
10481 (base32
10482 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
10483 (build-system python-build-system)
10484 (native-inputs
10485 `(("python-mock" ,python-mock)
10486 ("python-nose" ,python-nose)))
10487 (propagated-inputs
10488 `(("python-six" ,python-six)))
10489 (home-page "https://github.com/ralphbean/ansi2html")
10490 (synopsis "Convert ANSI-decorated console output to HTML")
10491 (description
10492 "@command{ansi2html} is a Python library and command line utility for
10493 convering text with ANSI color codes to HTML or LaTeX.")
10494 (license license:gpl3+)))
10495
10496 (define-public python2-ansi2html
10497 (package-with-python2 python-ansi2html))
10498
10499 (define-public python-ddt
10500 (package
10501 (name "python-ddt")
10502 (version "1.1.2")
10503 (source
10504 (origin
10505 (method url-fetch)
10506 (uri (pypi-uri "ddt" version))
10507 (sha256
10508 (base32
10509 "1wqkmz0yhanly8sif5vb02p2iik7mwxwph8ywph2kbb8ws8szdpx"))))
10510 (build-system python-build-system)
10511 (native-inputs
10512 `(("python-mock" ,python-mock)
10513 ("python-nose" ,python-nose)))
10514 (propagated-inputs
10515 `(("python-six" ,python-six)
10516 ("python-pyyaml" ,python-pyyaml)))
10517 (home-page "https://github.com/txels/ddt")
10518 (synopsis "Data-Driven Tests")
10519 (description
10520 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
10521 running it with different test data, and make it appear as multiple test
10522 cases.")
10523 (license license:expat)))
10524
10525 (define-public python2-ddt
10526 (package-with-python2 python-ddt))
10527
10528 (define-public python-pycosat
10529 (package
10530 (name "python-pycosat")
10531 (version "0.6.1")
10532 (source
10533 (origin
10534 (method url-fetch)
10535 (uri (pypi-uri "pycosat" version))
10536 (sha256
10537 (base32
10538 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
10539 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
10540 (build-system python-build-system)
10541 (home-page "https://github.com/ContinuumIO/pycosat")
10542 (synopsis "Bindings to picosat (a SAT solver)")
10543 (description
10544 "This package provides efficient Python bindings to @code{picosat} on
10545 the C level. When importing pycosat, the @code{picosat} solver becomes part
10546 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
10547 Problem} (SAT) solver.")
10548 (license license:expat)))
10549
10550 (define-public python2-pycosat
10551 (package-with-python2 python-pycosat))
10552
10553 (define-public python2-ruamel.ordereddict
10554 (package
10555 (name "python2-ruamel.ordereddict")
10556 (version "0.4.9")
10557 (source
10558 (origin
10559 (method url-fetch)
10560 (uri (pypi-uri "ruamel.ordereddict" version))
10561 (sha256
10562 (base32
10563 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
10564 (build-system python-build-system)
10565 (arguments
10566 `(#:python ,python-2
10567 #:phases
10568 (modify-phases %standard-phases
10569 (delete 'check)
10570 (add-after 'install 'check
10571 (lambda* (#:key inputs outputs #:allow-other-keys)
10572 (add-installed-pythonpath inputs outputs)
10573 (zero? (system* "python" "test/testordereddict.py")))))))
10574 (home-page "https://bitbucket.org/ruamel/ordereddict")
10575 (synopsis "Version of dict that keeps keys in insertion order")
10576 (description
10577 "This is an implementation of an ordered dictionary with @dfn{Key
10578 Insertion Order} (KIO: updates of values do not affect the position of the
10579 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
10580 removed and put at the back). The standard library module @code{OrderedDict},
10581 implemented later, implements a subset of @code{ordereddict} functionality.
10582 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
10583 Order} (KSO, no sorting function can be specified, but a transform can be
10584 specified to apply on the key before comparison (e.g. @code{string.lower})).")
10585 (license license:expat)))
10586
10587 (define-public python-pypeg2
10588 (package
10589 (name "python-pypeg2")
10590 (version "2.15.2")
10591 (source
10592 (origin
10593 (method url-fetch)
10594 (uri (pypi-uri "pyPEG2" version))
10595 (sha256
10596 (base32
10597 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
10598 (build-system python-build-system)
10599 (propagated-inputs `(("python-lxml" ,python-lxml)))
10600 (arguments
10601 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
10602 '(#:tests? #f))
10603 (home-page "https://fdik.org/pyPEG/")
10604 (synopsis "Parsering Expression Grammars in Python")
10605 (description "PyPEG is an intrinsic parser interpreter framework for
10606 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
10607 parse many formal languages.")
10608 (license license:gpl2)))
10609
10610 (define-public python-incremental
10611 (package
10612 (name "python-incremental")
10613 (version "17.5.0")
10614 (source
10615 (origin
10616 (method url-fetch)
10617 (uri (pypi-uri "incremental" version))
10618 (sha256
10619 (base32
10620 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
10621 (build-system python-build-system)
10622 (home-page "https://github.com/hawkowl/incremental")
10623 (synopsis "Library for versioning Python projects")
10624 (description "Incremental is a small library that versions your Python
10625 projects.")
10626 (license license:expat)))
10627
10628 (define-public python2-incremental
10629 (package-with-python2 python-incremental))
10630
10631 (define-public python-automat
10632 (package
10633 (name "python-automat")
10634 (version "0.6.0")
10635 (source (origin
10636 (method url-fetch)
10637 (uri (pypi-uri "Automat" version))
10638 (sha256
10639 (base32
10640 "1a7nsrljysfmdqmpn2apfa1gg6rfah4y9sizvns8gb08rx7d07rw"))))
10641 (build-system python-build-system)
10642 ;; We disable the tests because they require python-twisted, while
10643 ;; python-twisted depends on python-automat. Twisted is optional, but the
10644 ;; tests fail if it is not available. Also see
10645 ;; <https://github.com/glyph/automat/issues/71>.
10646 (arguments '(#:tests? #f))
10647 (native-inputs
10648 `(("python-m2r" ,python-m2r)
10649 ("python-setuptools-scm" ,python-setuptools-scm)
10650 ("python-graphviz" ,python-graphviz)))
10651 (propagated-inputs
10652 `(("python-six" ,python-six)
10653 ("python-attrs" ,python-attrs)))
10654 (home-page "https://github.com/glyph/Automat")
10655 (synopsis "Self-service finite-state machines")
10656 (description "Automat is a library for concise, idiomatic Python
10657 expression of finite-state automata (particularly deterministic finite-state
10658 transducers).")
10659 (license license:expat)))
10660
10661 (define-public python2-automat
10662 (package-with-python2 python-automat))
10663
10664 (define-public python-m2r
10665 (package
10666 (name "python-m2r")
10667 (version "0.1.12")
10668 (source (origin
10669 (method url-fetch)
10670 (uri (pypi-uri "m2r" version))
10671 (sha256
10672 (base32
10673 "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd"))))
10674 (build-system python-build-system)
10675 (propagated-inputs
10676 `(("python-docutils" ,python-docutils)
10677 ("python-mistune" ,python-mistune)))
10678 (native-inputs
10679 `(("python-pygments" ,python-pygments)
10680 ("python-mock" ,python-mock)))
10681 (home-page "https://github.com/miyakogi/m2r")
10682 (synopsis "Markdown to reStructuredText converter")
10683 (description "M2R converts a markdown file including reST markups to valid
10684 reST format.")
10685 (license license:expat)))
10686
10687 (define-public python2-m2r
10688 (package-with-python2 python-m2r))
10689
10690 (define-public python-constantly
10691 (package
10692 (name "python-constantly")
10693 (version "15.1.0")
10694 (source (origin
10695 (method url-fetch)
10696 (uri (pypi-uri "constantly" version))
10697 (sha256
10698 (base32
10699 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
10700 (build-system python-build-system)
10701 (home-page "https://github.com/twisted/constantly")
10702 (synopsis "Symbolic constants in Python")
10703 (description "Constantly is a Python library that provides symbolic
10704 constant support. It includes collections and constants with text, numeric,
10705 and bit flag values.")
10706 (license license:expat)))
10707
10708 (define-public python2-constantly
10709 (package-with-python2 python-constantly))
10710
10711 (define-public python-attrs
10712 (package
10713 (name "python-attrs")
10714 (version "17.2.0")
10715 (source (origin
10716 (method url-fetch)
10717 (uri (pypi-uri "attrs" version))
10718 (sha256
10719 (base32
10720 "04gx08ikpk26wnq22f7l42gapcvk8iz1512r927k6sadz6cinkax"))))
10721 (build-system python-build-system)
10722 (native-inputs
10723 `(("python-pytest" ,python-pytest)
10724 ("python-hypothesis" ,python-hypothesis)
10725 ("python-zope-interface" ,python-zope-interface)
10726 ("python-six" ,python-six)))
10727 (home-page "https://github.com/python-attrs/attrs/")
10728 (synopsis "Attributes without boilerplate")
10729 (description "@code{attrs} is a Python package with class decorators that
10730 ease the chores of implementing the most common attribute-related object
10731 protocols.")
10732 (license license:expat)))
10733
10734 (define-public python2-attrs
10735 (package-with-python2 python-attrs))
10736
10737 (define-public python2-cliapp
10738 (package
10739 (name "python2-cliapp")
10740 (version "1.20170823")
10741 (source
10742 (origin
10743 (method url-fetch)
10744 (uri (string-append
10745 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
10746 version ".tar.gz"))
10747 (sha256
10748 (base32
10749 "1i9gik0xrj6jmi95s5w988jl1y265baz5xm5pbqdyvsh8h9ln6yq"))))
10750 (build-system python-build-system)
10751 (arguments
10752 `(#:python ,python-2
10753 #:phases
10754 (modify-phases %standard-phases
10755 ;; check phase needs to be run before the build phase. If not,
10756 ;; coverage-test-runner looks for tests for the built source files,
10757 ;; and fails.
10758 (delete 'check)
10759 (add-before 'build 'check
10760 (lambda _
10761 ;; Disable python3 tests
10762 (substitute* "check"
10763 (("python3") "# python3"))
10764 (zero? (system* "./check")))))))
10765 (native-inputs
10766 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
10767 ("python2-pep8" ,python2-pep8)))
10768 (propagated-inputs
10769 `(("python2-pyaml" ,python2-pyaml)))
10770 (home-page "https://liw.fi/cliapp/")
10771 (synopsis "Python framework for command line programs")
10772 (description "@code{python2-cliapp} is a python framework for
10773 command line programs. It contains the typical stuff such programs
10774 need to do, such as parsing the command line for options, and
10775 iterating over input files.")
10776 (license license:gpl2+)))
10777
10778 (define-public python2-ttystatus
10779 (package
10780 (name "python2-ttystatus")
10781 (version "0.35")
10782 (source
10783 (origin
10784 (method url-fetch)
10785 (uri (string-append
10786 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
10787 version ".tar.gz"))
10788 (sha256
10789 (base32
10790 "0vivqbw7ddhsq1zj3g9cvvv4f0phl0pis2smsnwcr2szz2fk3hl6"))))
10791 (build-system python-build-system)
10792 (native-inputs
10793 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
10794 ("python2-pep8" ,python2-pep8)))
10795 (arguments
10796 `(#:python ,python-2
10797 #:phases
10798 (modify-phases %standard-phases
10799 ;; check phase needs to be run before the build phase. If not,
10800 ;; coverage-test-runner looks for tests for the built source files,
10801 ;; and fails.
10802 (delete 'check)
10803 (add-before 'build 'check
10804 (lambda _
10805 (zero? (system* "make" "check")))))))
10806 (home-page "https://liw.fi/ttystatus/")
10807 (synopsis "Python library for showing progress reporting and
10808 status updates on terminals")
10809 (description "@code{python2-ttystatus} is a python library for
10810 showing progress reporting and status updates on terminals, for
10811 command line programs. Output is automatically adapted to the width
10812 of the terminal: truncated if it does not fit, and resized if the
10813 terminal size changes.")
10814 (license license:gpl3+)))
10815
10816 (define-public python2-tracing
10817 (package
10818 (name "python2-tracing")
10819 (version "0.10")
10820 (source
10821 (origin
10822 (method url-fetch)
10823 (uri (string-append
10824 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
10825 version ".tar.gz"))
10826 (sha256
10827 (base32
10828 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
10829 (build-system python-build-system)
10830 (arguments
10831 `(#:python ,python-2))
10832 (home-page "https://liw.fi/tracing/")
10833 (synopsis "Python debug logging helper")
10834 (description "@code{python2-tracing} is a python library for
10835 logging debug messages. It provides a way to turn debugging messages
10836 on and off, based on the filename they occur in. It is much faster
10837 than using @code{logging.Filter} to accomplish the same thing, which
10838 matters when code is run in production mode. The actual logging still
10839 happens using the @code{logging} library.")
10840 (license license:gpl3+)))
10841
10842 (define-public python2-larch
10843 (package
10844 (name "python2-larch")
10845 (version "1.20151025")
10846 (source
10847 (origin
10848 (method url-fetch)
10849 (uri (string-append
10850 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
10851 version ".tar.gz"))
10852 (patches (search-patches
10853 "python2-larch-coverage-4.0a6-compatibility.patch"))
10854 (sha256
10855 (base32
10856 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
10857 (build-system python-build-system)
10858 (arguments
10859 `(#:python ,python-2
10860 #:phases
10861 (modify-phases %standard-phases
10862 ;; check phase needs to be run before the build phase. If not,
10863 ;; coverage-test-runner looks for tests for the built source files,
10864 ;; and fails.
10865 (delete 'check)
10866 (add-before 'build 'check
10867 (lambda _
10868 (zero? (system* "make" "check")))))))
10869 (native-inputs
10870 `(("cmdtest" ,cmdtest)
10871 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
10872 (propagated-inputs
10873 `(("python2-tracing" ,python2-tracing)))
10874 (home-page "https://liw.fi/larch/")
10875 (synopsis "Python copy-on-write B-tree library")
10876 (description "@code{python2-larch} is an implementation of
10877 particular kind of B-tree, based on research by Ohad Rodeh. See
10878 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
10879 on the data structure.
10880
10881 The distinctive feature of this B-tree is that a node is never
10882 (conceptually) modified. Instead, all updates are done by
10883 copy-on-write. This makes it easy to clone a tree, and modify only the
10884 clone, while other processes access the original tree.")
10885 (license license:gpl3+)))
10886
10887 (define-public python-astroid
10888 (package
10889 (name "python-astroid")
10890 (version "1.5.3")
10891 (source
10892 (origin
10893 (method url-fetch)
10894 (uri (string-append
10895 "https://github.com/PyCQA/astroid/archive/astroid-"
10896 version ".tar.gz"))
10897 (sha256
10898 (base32
10899 "0isn5p7f9n48hmksgbrj7dkm9dyglnayzn5jngk37qywg8a74ngn"))))
10900 (build-system python-build-system)
10901 (propagated-inputs
10902 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
10903 ("python-six" ,python-six)
10904 ("python-wrapt" ,python-wrapt)))
10905 (arguments
10906 `(#:phases
10907 (modify-phases %standard-phases
10908 (replace 'check
10909 (lambda _
10910 (zero? (system* "python" "-m" "unittest" "discover"
10911 "-p" "unittest*.py")))))))
10912 (home-page "https://github.com/PyCQA/astroid")
10913 (synopsis "Common base representation of python source code for pylint and
10914 other projects")
10915 (description "@code{python-astroid} provides a common base representation
10916 of python source code for projects such as pychecker, pyreverse, pylint, etc.
10917
10918 It provides a compatible representation which comes from the _ast module. It
10919 rebuilds the tree generated by the builtin _ast module by recursively walking
10920 down the AST and building an extended ast. The new node classes have
10921 additional methods and attributes for different usages. They include some
10922 support for static inference and local name scopes. Furthermore, astroid
10923 builds partial trees by inspecting living objects.")
10924 (license license:lgpl2.1+)
10925 (properties `((python2-variant . ,(delay python2-astroid))))))
10926
10927 (define-public python2-astroid
10928 (let ((base (package-with-python2
10929 (strip-python2-variant python-astroid))))
10930 (package (inherit base)
10931 (propagated-inputs
10932 `(("python2-backports-functools-lru-cache"
10933 ,python2-backports-functools-lru-cache)
10934 ("python2-enum34" ,python2-enum34)
10935 ("python2-singledispatch" ,python2-singledispatch)
10936 ,@(package-propagated-inputs base))))))
10937
10938 (define-public python-isort
10939 (package
10940 (name "python-isort")
10941 (version "4.2.5")
10942 (source
10943 (origin
10944 (method url-fetch)
10945 (uri (string-append
10946 "https://github.com/timothycrosley/isort/archive/"
10947 version ".tar.gz"))
10948 (file-name (string-append name "-" version ".tar.gz"))
10949 (sha256
10950 (base32
10951 "0zsrgkb0krn5476yncy5dd56k7dk34zqb4bnlvwy44ixgilyjmfh"))))
10952 (build-system python-build-system)
10953 (native-inputs
10954 `(("python-mock" ,python-mock)
10955 ("python-pytest" ,python-pytest)))
10956 (home-page "https://github.com/timothycrosley/isort")
10957 (synopsis "Python utility/library to sort python imports")
10958 (description "@code{python-isort} is a python utility/library to sort
10959 imports alphabetically, and automatically separated into sections. It
10960 provides a command line utility, a python library and plugins for various
10961 editors.")
10962 (license license:expat)))
10963
10964 (define-public python2-isort
10965 (package-with-python2 python-isort))
10966
10967 (define-public python2-backports-functools-lru-cache
10968 (package
10969 (name "python2-backports-functools-lru-cache")
10970 (version "1.3")
10971 (source
10972 (origin
10973 (method url-fetch)
10974 ;; only the pypi tarballs contain the necessary metadata
10975 (uri (pypi-uri "backports.functools_lru_cache" version))
10976 (sha256
10977 (base32
10978 "158ysf2hb0q4p4695abfiym9x1ywg0dgh8a3apd7gqaaxjy22jj4"))))
10979 (build-system python-build-system)
10980 (native-inputs
10981 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
10982 (arguments
10983 `(#:python ,python-2))
10984 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
10985 (synopsis "Backport of functools.lru_cache from Python 3.3")
10986 (description "@code{python2-backports-functools-lru-cache} is a backport
10987 of @code{functools.lru_cache} from python 3.3.")
10988 (license license:expat)))
10989
10990 (define-public python-configparser
10991 (package
10992 (name "python-configparser")
10993 (version "3.5.0")
10994 (source
10995 (origin
10996 (method url-fetch)
10997 (uri (string-append
10998 "https://bitbucket.org/ambv/configparser/get/"
10999 version ".tar.bz2"))
11000 (file-name (string-append name "-" version ".tar.gz"))
11001 (sha256
11002 (base32
11003 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
11004 (build-system python-build-system)
11005 (home-page "http://docs.python.org/py3k/library/configparser.html")
11006 (synopsis "Backport of configparser from python 3.5")
11007 (description "@code{python-configparser} is a backport of
11008 @code{configparser} from Python 3.5 so that it can be used directly
11009 in other versions.")
11010 (license license:expat)))
11011
11012 (define-public python2-configparser
11013 (package-with-python2 python-configparser))
11014
11015 (define-public python-mando
11016 (package
11017 (name "python-mando")
11018 (version "0.6.4")
11019 (source (origin
11020 (method url-fetch)
11021 (uri (pypi-uri "mando" version))
11022 (sha256
11023 (base32
11024 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
11025 (build-system python-build-system)
11026 (propagated-inputs
11027 `(("python-rst2ansi" ,python-rst2ansi)
11028 ("python-six" ,python-six)))
11029 (native-inputs
11030 `(("python-pytest" ,python-pytest)))
11031 (home-page "https://mando.readthedocs.org/")
11032 (synopsis
11033 "Wrapper around argparse, allowing creation of complete CLI applications")
11034 (description
11035 "This package is a wrapper around argparse, allowing you to write complete CLI
11036 applications in seconds while maintaining all the flexibility.")
11037 (license license:expat)))
11038
11039 (define-public python2-mando
11040 (package-with-python2 python-mando))
11041
11042 (define-public python-fudge
11043 (package
11044 (name "python-fudge")
11045 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
11046 ;; package, which is currently the only use of this package.
11047 (version "0.9.6")
11048 (source
11049 (origin
11050 (method url-fetch)
11051 (uri (pypi-uri "fudge" version))
11052 (sha256
11053 (base32
11054 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
11055 (build-system python-build-system)
11056 (arguments
11057 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
11058 (home-page "https://github.com/fudge-py/fudge")
11059 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
11060 (description
11061 "Fudge is a Python module for using fake objects (mocks and stubs) to
11062 test real ones.
11063
11064 In readable Python code, you declare the methods available on your fake object
11065 and how they should be called. Then you inject that into your application and
11066 start testing. This declarative approach means you don’t have to record and
11067 playback actions and you don’t have to inspect your fakes after running code.
11068 If the fake object was used incorrectly then you’ll see an informative
11069 exception message with a traceback that points to the culprit.")
11070 (license license:expat)))
11071
11072 (define-public python2-fudge
11073 (package-with-python2 python-fudge))
11074
11075 (define-public python-mwclient
11076 (package
11077 (name "python-mwclient")
11078 (version "0.8.4")
11079 (source
11080 (origin
11081 (method url-fetch)
11082 ;; The PyPI version wouldn't contain tests.
11083 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
11084 "v" version ".tar.gz"))
11085 (file-name (string-append name "-" version ".tar.gz"))
11086 (sha256
11087 (base32
11088 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
11089 (build-system python-build-system)
11090 (propagated-inputs
11091 `(("python-requests" ,python-requests)
11092 ("python-requests-oauthlib"
11093 ,python-requests-oauthlib)
11094 ("python-six" ,python-six)))
11095 (native-inputs
11096 `(("python-mock" ,python-mock)
11097 ("python-pytest" ,python-pytest)
11098 ("python-pytest-pep8" ,python-pytest-pep8)
11099 ("python-pytest-cache" ,python-pytest-cache)
11100 ("python-pytest-cov" ,python-pytest-cov)
11101 ("python-responses" ,python-responses)))
11102 (home-page "https://github.com/btongminh/mwclient")
11103 (synopsis "MediaWiki API client")
11104 (description "This package provides a MediaWiki API client.")
11105 (license license:expat)))
11106
11107 (define-public python2-mwclient
11108 (package-with-python2 python-mwclient))
11109
11110 (define-public python-utils
11111 (package
11112 (name "python-utils")
11113 (version "2.1.0")
11114 (source (origin
11115 (method url-fetch)
11116 (uri (pypi-uri "python-utils" version))
11117 (sha256
11118 (base32
11119 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
11120 (build-system python-build-system)
11121 (native-inputs
11122 `(("pytest-runner" ,python-pytest-runner)
11123 ("pytest" ,python-pytest)
11124 ("six" ,python-six)))
11125 (home-page "https://github.com/WoLpH/python-utils")
11126 (synopsis "Convenient utilities not included with the standard Python install")
11127 (description
11128 "Python Utils is a collection of small Python functions and classes which
11129 make common patterns shorter and easier.")
11130 (license license:bsd-2)))
11131
11132 (define-public python2-utils
11133 (package-with-python2 python-utils))
11134
11135 (define-public python-sphinx-me
11136 (package
11137 (name "python-sphinx-me")
11138 (version "0.3")
11139 (source
11140 (origin
11141 (method url-fetch)
11142 (uri (pypi-uri "sphinx-me" version))
11143 (sha256
11144 (base32
11145 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
11146 (build-system python-build-system)
11147 (home-page "https://github.com/stephenmcd/sphinx-me")
11148 (synopsis "Create a Sphinx documentation shell")
11149 (description
11150 "Create a Sphinx documentation shell for your project and include the
11151 README file as the documentation index. It handles extracting the required
11152 meta data such as the project name, author and version from your project for
11153 use in your Sphinx docs.")
11154 (license license:bsd-2)))
11155
11156 (define-public python2-sphinx-me
11157 (package-with-python2 python-sphinx-me))
11158
11159 (define-public python-diff-match-patch
11160 (package
11161 (name "python-diff-match-patch")
11162 (version "20121119")
11163 (source
11164 (origin
11165 (method url-fetch)
11166 (uri (pypi-uri "diff-match-patch" version))
11167 (sha256
11168 (base32
11169 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
11170 (build-system python-build-system)
11171 (home-page "https://code.google.com/p/google-diff-match-patch")
11172 (synopsis "Synchronize plain text")
11173 (description "Diff Match and Patch libraries offer robust algorithms to
11174 perform the operations required for synchronizing plain text.")
11175 (license license:asl2.0)))
11176
11177 (define-public python2-diff-match-patch
11178 (package-with-python2 python-diff-match-patch))
11179
11180 (define-public python-dirsync
11181 (package
11182 (name "python-dirsync")
11183 (version "2.2.2")
11184 (source
11185 (origin
11186 (method url-fetch)
11187 (uri (pypi-uri "dirsync" version ".zip"))
11188 (sha256
11189 (base32
11190 "1hcdvmkwd5512zbxpin0k7bx5bkgzy3swjx7d0kj1y45af6r75v2"))))
11191 (build-system python-build-system)
11192 (native-inputs
11193 `(("unzip" ,unzip)))
11194 (propagated-inputs
11195 `(("six" ,python-six)))
11196 (home-page "https://bitbucket.org/tkhyn/dirsync")
11197 (synopsis "Advanced directory tree synchronisation tool")
11198 (description "Advanced directory tree synchronisation tool.")
11199 (license license:expat)))
11200
11201 (define-public python2-dirsync
11202 (package-with-python2 python-dirsync))
11203
11204 (define-public python-levenshtein
11205 (package
11206 (name "python-levenshtein")
11207 (version "0.12.0")
11208 (source
11209 (origin
11210 (method url-fetch)
11211 (uri (pypi-uri "python-Levenshtein" version))
11212 (sha256
11213 (base32
11214 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
11215 (build-system python-build-system)
11216 (home-page "https://github.com/ztane/python-Levenshtein")
11217 (synopsis "Fast computation of Levenshtein distance and string similarity")
11218 (description
11219 "The Levenshtein Python C extension module contains functions for fast computation of
11220 @enumerate
11221 @item Levenshtein (edit) distance, and edit operations
11222 @item string similarity
11223 @item approximate median strings, and generally string averaging
11224 @item string sequence and set similarity
11225 @end enumerate
11226 It supports both normal and Unicode strings.")
11227 (license license:gpl2+)))
11228
11229 (define-public python2-levenshtein
11230 (package-with-python2 python-levenshtein))
11231
11232 (define-public python-scandir
11233 (package
11234 (name "python-scandir")
11235 (version "1.7")
11236 (source
11237 (origin
11238 (method url-fetch)
11239 (uri (pypi-uri "scandir" version))
11240 (sha256
11241 (base32 "0gbnhjzg42rj87ljv9kb648rfxph69ly3c8r9841dxy4d7l5pmdj"))))
11242 (build-system python-build-system)
11243 (arguments
11244 `(#:phases (modify-phases %standard-phases
11245 (replace 'check
11246 (lambda _
11247 (invoke "python" "test/run_tests.py"))))))
11248 (home-page "https://github.com/benhoyt/scandir")
11249 (synopsis "Directory iteration function")
11250 (description
11251 "Directory iteration function like os.listdir(), except that instead of
11252 returning a list of bare filenames, it yields DirEntry objects that include
11253 file type and stat information along with the name. Using scandir() increases
11254 the speed of os.walk() by 2-20 times (depending on the platform and file
11255 system) by avoiding unnecessary calls to os.stat() in most cases.
11256
11257 This package is part of the Python standard library since version 3.5.")
11258 (license license:bsd-3)))
11259
11260 (define-public python2-scandir
11261 (package-with-python2 python-scandir))
11262
11263 (define-public python2-stemming
11264 (package
11265 (name "python2-stemming")
11266 (version "1.0.1")
11267 (source
11268 (origin
11269 (method url-fetch)
11270 (uri (pypi-uri "stemming" version))
11271 (sha256
11272 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
11273 (build-system python-build-system)
11274 (arguments
11275 `(#:python ,python-2))
11276 (home-page "https://bitbucket.org/mchaput/stemming/overview")
11277 (synopsis "Python implementations of various stemming algorithms")
11278 (description
11279 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
11280 stemming algorithms for English. These implementations are straightforward and
11281 efficient, unlike some Python versions of the same algorithms available on the
11282 Web. This package is an extraction of the stemming code included in the Whoosh
11283 search engine.")
11284 (license license:public-domain)))
11285
11286 (define-public python-factory-boy
11287 (package
11288 (name "python-factory-boy")
11289 (version "2.8.1")
11290 (source
11291 (origin
11292 (method url-fetch)
11293 (uri (pypi-uri "factory_boy" version))
11294 (sha256
11295 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
11296 (build-system python-build-system)
11297 (arguments
11298 ;; Tests are not included in the tarball.
11299 `(#:tests? #f))
11300 (propagated-inputs
11301 `(("faker" ,python-faker)))
11302 (home-page "https://github.com/benhoyt/scandir")
11303 (synopsis "Versatile test fixtures replacement")
11304 (description
11305 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
11306
11307 As a fixtures replacement tool, it aims to replace static, hard to maintain
11308 fixtures with easy-to-use factories for complex object.
11309
11310 Instead of building an exhaustive test setup with every possible combination
11311 of corner cases, factory_boy allows you to use objects customized for the
11312 current test, while only declaring the test-specific fields")
11313 (license license:expat)))
11314
11315 (define-public python2-factory-boy
11316 (package-with-python2 python-factory-boy))
11317
11318 (define-public python-translate-toolkit
11319 (package
11320 (name "python-translate-toolkit")
11321 (version "2.1.0")
11322 (source
11323 (origin
11324 (method url-fetch)
11325 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
11326 (sha256
11327 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
11328 (build-system python-build-system)
11329 (native-inputs
11330 `(("python-pytest" ,python-pytest)
11331 ("python-sphinx" ,python-sphinx)))
11332 (propagated-inputs
11333 `(("python-babel" ,python-babel)
11334 ("python-beautifulsoup4" ,python-beautifulsoup4)
11335 ("python-chardet" ,python-chardet)
11336 ("python-diff-match-patch" ,python-diff-match-patch)
11337 ("python-levenshtein" ,python-levenshtein)
11338 ("python-lxml" ,python-lxml)
11339 ("python-six" ,python-six)
11340 ("python-vobject" ,python-vobject)
11341 ("python-pyyaml" ,python-pyyaml)))
11342 (arguments
11343 ;; TODO: tests are not run, because they end with
11344 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
11345 ;; 'parse_funcs'
11346 ;; during test setup.
11347 `(#:tests? #f))
11348 (home-page "http://toolkit.translatehouse.org")
11349 (synopsis "Tools and API for translation and localization engineering")
11350 (description
11351 "Tools and API for translation and localization engineering. It contains
11352 several utilities, as well as an API for building localization tools.")
11353 (license license:gpl2+)))
11354
11355 (define-public python2-translate-toolkit
11356 (package-with-python2 python-translate-toolkit))
11357
11358 (define-public python-packaging
11359 (package
11360 (name "python-packaging")
11361 (version "16.8")
11362 (source
11363 (origin
11364 (method url-fetch)
11365 (uri (pypi-uri "packaging" version))
11366 (sha256
11367 (base32
11368 "17k1xbjshackwvbsnxqixbph8rbqhz4bf4g3al5xyzhavxgq6l2x"))))
11369 (build-system python-build-system)
11370 (native-inputs
11371 `(("python-pretend" ,python-pretend)
11372 ("python-pytest" ,python-pytest)))
11373 (propagated-inputs
11374 `(("python-pyparsing" ,python-pyparsing)
11375 ("python-six" ,python-six)))
11376 (home-page "https://github.com/pypa/packaging")
11377 (synopsis "Core utilities for Python packages")
11378 (description "Packaging is a Python module for dealing with Python packages.
11379 It offers an interface for working with package versions, names, and dependency
11380 information.")
11381 ;; From 'LICENSE': This software is made available under the terms of
11382 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
11383 ;; Contributions to this software is made under the terms of *both* these
11384 ;; licenses.
11385 (license (list license:asl2.0 license:bsd-2))))
11386
11387 (define-public python2-packaging
11388 (package-with-python2 python-packaging))
11389
11390 (define-public python-relatorio
11391 (package
11392 (name "python-relatorio")
11393 (version "0.8.0")
11394 (source
11395 (origin
11396 (method url-fetch)
11397 (uri (pypi-uri "relatorio" version))
11398 (sha256
11399 (base32
11400 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
11401 (build-system python-build-system)
11402 (propagated-inputs
11403 `(("python-lxml" ,python-lxml)
11404 ("python-genshi" ,python-genshi)))
11405 (native-inputs
11406 `(("python-magic" ,python-magic)))
11407 (home-page "https://relatorio.tryton.org/")
11408 (synopsis "Templating library able to output ODT and PDF files")
11409 (description "Relatorio is a templating library which provides a way to
11410 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
11411 for more filetypes can be easily added by creating plugins for them.")
11412 (license license:gpl3+)))
11413
11414 (define-public python2-relatorio
11415 (package-with-python2 python-relatorio))
11416
11417 (define-public python-radon
11418 (package
11419 (name "python-radon")
11420 (version "2.2.0")
11421 (source
11422 (origin
11423 (method url-fetch)
11424 (uri (pypi-uri "radon" version))
11425 (sha256
11426 (base32
11427 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
11428 (build-system python-build-system)
11429 (arguments
11430 `(#:phases (modify-phases %standard-phases
11431 (replace 'check
11432 (lambda _
11433 (invoke "python" "radon/tests/run.py"))))))
11434 (propagated-inputs
11435 `(("python-colorama" ,python-colorama)
11436 ("python-flake8-polyfill" ,python-flake8-polyfill)
11437 ("python-mando" ,python-mando)))
11438 (native-inputs
11439 `(("python-pytest" ,python-pytest)
11440 ("python-pytest-mock" ,python-pytest-mock)))
11441 (home-page "https://radon.readthedocs.org/")
11442 (synopsis "Code Metrics in Python")
11443 (description "Radon is a Python tool which computes various code metrics.
11444 Supported metrics are:
11445 @itemize @bullet
11446 @item raw metrics: SLOC, comment lines, blank lines, &c.
11447 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
11448 @item Halstead metrics (all of them)
11449 @item the Maintainability Index (a Visual Studio metric)
11450 @end itemize")
11451 (license license:expat)))
11452
11453 (define-public python2-radon
11454 (package-with-python2 python-radon))
11455
11456 (define-public python-sure
11457 (package
11458 (name "python-sure")
11459 (version "1.4.6")
11460 (source
11461 (origin
11462 (method url-fetch)
11463 (uri (pypi-uri "sure" version))
11464 (sha256
11465 (base32
11466 "1iyqsy2d6radi88g1qf0lziy5b39h5cpb3g5jiqyb4xi46ig3x1z"))))
11467 (build-system python-build-system)
11468 (propagated-inputs
11469 `(("python-mock" ,python-mock)
11470 ("python-six" ,python-six)))
11471 (native-inputs
11472 `(("python-nose" ,python-nose)))
11473 (home-page "https://github.com/gabrielfalcao/sure")
11474 (synopsis "Automated testing library in python for python")
11475 (description
11476 "Sure is a python library that leverages a DSL for writing assertions.
11477 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
11478 (license license:gpl3+)))
11479
11480 (define-public python2-sure
11481 (package-with-python2 python-sure))
11482
11483 (define-public python2-couleur
11484 ;; This package does not seem to support python3 at all, hence,
11485 ;; only the python2 variant definition is provided.
11486 (package
11487 (name "python2-couleur")
11488 (version "0.6.2")
11489 (source
11490 (origin
11491 (method url-fetch)
11492 (uri (pypi-uri "couleur" version))
11493 (sha256
11494 (base32
11495 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
11496 (build-system python-build-system)
11497 (arguments
11498 `(#:python ,python-2))
11499 (home-page "https://github.com/gabrielfalcao/couleur")
11500 (synopsis
11501 "ANSI terminal tool for python, colored shell and other handy fancy features")
11502 (description
11503 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
11504 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
11505 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
11506 ;; https://github.com/gabrielfalcao/couleur/issues/11
11507 (license license:lgpl3+)))
11508
11509 (define-public python-misaka
11510 (package
11511 (name "python-misaka")
11512 (version "2.1.0")
11513 (source
11514 (origin
11515 (method url-fetch)
11516 (uri (pypi-uri "misaka" version))
11517 (sha256
11518 (base32
11519 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
11520 (build-system python-build-system)
11521 (arguments
11522 `(;; Line 37 of setup.py calls self.run_command('develop')
11523 ;; in the 'check' phase. This command seems to be trying
11524 ;; to write to
11525 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
11526 ;; for which it does not have the permission to write.
11527 #:tests? #f))
11528 (propagated-inputs
11529 `(("python-cffi" ,python-cffi)))
11530 (home-page "https://github.com/FSX/misaka")
11531 (synopsis "Python binding for Hoedown")
11532 (description
11533 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
11534 library written in C. It features a fast HTML renderer and functionality to make custom
11535 renderers (e.g. man pages or LaTeX).")
11536 (license license:expat)))
11537
11538 (define-public python2-misaka
11539 (package-with-python2 python-misaka))
11540
11541 (define-public python2-steadymark
11542 ;; This is forced into being a python2 only variant
11543 ;; due to its dependence on couleur that has no support
11544 ;; for python3
11545 (package
11546 (name "python2-steadymark")
11547 (version "0.7.3")
11548 (source
11549 (origin
11550 (method url-fetch)
11551 (uri (pypi-uri "steadymark" version))
11552 (sha256
11553 (base32
11554 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
11555 (build-system python-build-system)
11556 (native-inputs
11557 `(("python-couleur" ,python2-couleur)
11558 ("python-sure" ,python2-sure)
11559 ("python-misaka" ,python2-misaka)))
11560 (arguments
11561 `(#:python ,python-2
11562 #:phases
11563 (modify-phases %standard-phases
11564 (add-before 'build 'patch-setup-py
11565 (lambda _
11566 ;; Update requirements from dependency==version
11567 ;; to dependency>=version
11568 (substitute* "setup.py"
11569 (("==") ">="))
11570 #t)))))
11571 (home-page "https://github.com/gabrielfalcao/steadymark")
11572 (synopsis "Markdown-based test runner for python")
11573 (description
11574 "@code{Steadymark} allows documentation to be written in github-flavoured
11575 markdown. The documentation may contain snippets of code surrounded by python
11576 code blocks and @code{Steadymark} will find these snippets and run them, making
11577 sure that there are no old malfunctional examples in the documentation examples.")
11578 (license license:expat)))
11579
11580 (define-public python-jsonpointer
11581 (package
11582 (name "python-jsonpointer")
11583 (version "1.10")
11584 (source
11585 (origin
11586 (method url-fetch)
11587 (uri (pypi-uri "jsonpointer" version))
11588 (sha256
11589 (base32
11590 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
11591 (build-system python-build-system)
11592 (home-page "https://github.com/stefankoegl/python-json-pointer")
11593 (synopsis "Identify specific nodes in a JSON document")
11594 (description "@code{jsonpointer} allows you to access specific nodes
11595 by path in a JSON document (see RFC 6901).")
11596 (license license:bsd-3)))
11597
11598 (define-public python2-jsonpointer
11599 (package-with-python2 python-jsonpointer))
11600
11601 (define-public python-jsonpatch
11602 (package
11603 (name "python-jsonpatch")
11604 (version "1.16")
11605 (source
11606 (origin
11607 (method url-fetch)
11608 ;; pypi version lacks tests.js
11609 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
11610 "archive/v" version ".tar.gz"))
11611 (file-name (string-append name "-" version ".tar.gz"))
11612 (sha256
11613 (base32
11614 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
11615 (build-system python-build-system)
11616 (native-inputs
11617 `(("python-jsonpointer" ,python-jsonpointer)))
11618 (home-page "https://github.com/stefankoegl/python-json-patch")
11619 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
11620 (description "@code{jsonpatch} is a library and program that allows
11621 applying JSON Patches according to RFC 6902.")
11622 (license license:bsd-3)))
11623
11624 (define-public python2-jsonpatch
11625 (package-with-python2 python-jsonpatch))
11626
11627 (define-public python-jsonpatch-0.4
11628 (package (inherit python-jsonpatch)
11629 (name "python-jsonpatch")
11630 (version "0.4")
11631 (source
11632 (origin
11633 (method url-fetch)
11634 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
11635 "archive/v" version ".tar.gz"))
11636 (file-name (string-append name "-" version ".tar.gz"))
11637 (sha256
11638 (base32
11639 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
11640
11641 (define-public python2-jsonpatch-0.4
11642 (package-with-python2 python-jsonpatch-0.4))
11643
11644 (define-public python-rfc3986
11645 (package
11646 (name "python-rfc3986")
11647 (version "1.1.0")
11648 (source (origin
11649 (method url-fetch)
11650 (uri (pypi-uri "rfc3986" version))
11651 (sha256
11652 (base32
11653 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
11654 (build-system python-build-system)
11655 (arguments
11656 `(#:modules ((guix build utils)
11657 (guix build python-build-system)
11658 (ice-9 ftw)
11659 (srfi srfi-1)
11660 (srfi srfi-26))
11661 #:phases
11662 (modify-phases %standard-phases
11663 (replace 'check
11664 (lambda _
11665 (let ((cwd (getcwd)))
11666 (setenv "PYTHONPATH"
11667 (string-append cwd "/build/"
11668 (find (cut string-prefix? "lib" <>)
11669 (scandir (string-append cwd "/build")))
11670 ":"
11671 (getenv "PYTHONPATH")))
11672 (invoke "pytest" "-v")))))))
11673 (native-inputs
11674 `(("python-pytest" ,python-pytest)))
11675 (home-page "https://rfc3986.readthedocs.io/")
11676 (synopsis "Parse and validate URI references")
11677 (description
11678 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
11679 validation and authority parsing. This module also supports RFC@tie{}6874
11680 which adds support for zone identifiers to IPv6 addresses.")
11681 (license license:asl2.0)))
11682
11683 (define-public python2-rfc3986
11684 (package-with-python2 python-rfc3986))
11685
11686 (define-public python-rfc3987
11687 (package
11688 (name "python-rfc3987")
11689 (version "1.3.7")
11690 (source
11691 (origin
11692 (method url-fetch)
11693 (uri (pypi-uri "rfc3987" version))
11694 (sha256
11695 (base32
11696 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
11697 (build-system python-build-system)
11698 (home-page "https://pypi.python.org/pypi/rfc3987")
11699 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
11700 (description "@code{rfc3987} provides routines for parsing and
11701 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
11702 (license license:gpl3+)))
11703
11704 (define-public python2-rfc3987
11705 (package-with-python2 python-rfc3987))
11706
11707 (define-public python-validate-email
11708 (package
11709 (name "python-validate-email")
11710 (version "1.3")
11711 (source
11712 (origin
11713 (method url-fetch)
11714 (uri (pypi-uri "validate_email" version))
11715 (sha256
11716 (base32
11717 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
11718 (build-system python-build-system)
11719 (home-page "https://github.com/syrusakbary/validate_email")
11720 (synopsis "Verifies if an email address is valid and really exists")
11721 (description "@code{validate_email} can be used to verify if an email
11722 address is valid and really exists.")
11723 (license license:lgpl3+)))
11724
11725 (define-public python2-validate-email
11726 (package-with-python2 python-validate-email))
11727
11728 (define-public python-flex
11729 (package
11730 (name "python-flex")
11731 (version "6.10.0")
11732 (source
11733 (origin
11734 (method url-fetch)
11735 (uri (pypi-uri "flex" version))
11736 (sha256
11737 (base32
11738 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
11739 (build-system python-build-system)
11740 (propagated-inputs
11741 `(("python-click" ,python-click)
11742 ("python-iso8601" ,python-iso8601)
11743 ("python-jsonpointer" ,python-jsonpointer)
11744 ("python-pyyaml" ,python-pyyaml)
11745 ("python-requests" ,python-requests)
11746 ("python-rfc3987" ,python-rfc3987)
11747 ("python-six" ,python-six)
11748 ("python-validate-email" ,python-validate-email)))
11749 (home-page "https://github.com/pipermerriam/flex")
11750 (synopsis "Validates Swagger schemata")
11751 (description "@code{flex} can be used to validate Swagger schemata.")
11752 (license license:bsd-3)))
11753
11754 (define-public python2-flex
11755 (package-with-python2 python-flex))
11756
11757 (define-public python-marshmallow
11758 (package
11759 (name "python-marshmallow")
11760 (version "3.0.0b3")
11761 (source
11762 (origin
11763 (method url-fetch)
11764 (uri (pypi-uri "marshmallow" version))
11765 (sha256
11766 (base32
11767 "07mcrij1yvk85lvgx44wwr9pc80xryghvlgayb057g1cazcypysd"))))
11768 (build-system python-build-system)
11769 (propagated-inputs
11770 `(("python-dateutil" ,python-dateutil)
11771 ("python-simplejson" ,python-simplejson)))
11772 (native-inputs
11773 `(("python-pytest" ,python-pytest)
11774 ("python-pytz" ,python-pytz)))
11775 (home-page "https://github.com/marshmallow-code/marshmallow")
11776 (synopsis "Convert complex datatypes to and from native
11777 Python datatypes.")
11778 (description "@code{marshmallow} provides a library for converting
11779 complex datatypes to and from native Python datatypes.")
11780 (license license:expat)))
11781
11782 (define-public python2-marshmallow
11783 (package-with-python2 python-marshmallow))
11784
11785 (define-public python-apispec
11786 (package
11787 (name "python-apispec")
11788 (version "0.25.3")
11789 (source
11790 (origin
11791 (method url-fetch)
11792 (uri (pypi-uri "apispec" version))
11793 (sha256
11794 (base32
11795 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
11796 (build-system python-build-system)
11797 (propagated-inputs
11798 `(("python-pyyaml" ,python-pyyaml)))
11799 (native-inputs
11800 `(("python-pytest" ,python-pytest)
11801 ("python-flask" ,python-flask)
11802 ("python-marshmallow" ,python-marshmallow)
11803 ("python-tornado" ,python-tornado)
11804 ("python-bottle" ,python-bottle)
11805 ("python-mock" ,python-mock)))
11806 (home-page "https://github.com/marshmallow-code/apispec")
11807 (synopsis "Swagger 2.0 API specification generator")
11808 (description "@code{python-apispec} is a pluggable API specification
11809 generator. Currently supports the OpenAPI specification (f.k.a.
11810 Swagger 2.0).")
11811 (license license:expat)))
11812
11813 (define-public python2-apispec
11814 (package-with-python2 python-apispec))
11815
11816 (define-public python-flasgger
11817 (package
11818 (name "python-flasgger")
11819 (version "0.6.3")
11820 (source
11821 (origin
11822 (method url-fetch)
11823 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
11824 version ".tar.gz"))
11825 (file-name (string-append name "-" version ".tar.gz"))
11826 (sha256
11827 (base32
11828 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
11829 (build-system python-build-system)
11830 (arguments
11831 `(#:phases
11832 (modify-phases %standard-phases
11833 (replace 'check
11834 (lambda* (#:key inputs outputs #:allow-other-keys)
11835 (substitute* "Makefile"
11836 (("flake8 flasgger --ignore=F403")
11837 "flake8 flasgger --ignore=E731,F403"))
11838 (setenv "PYTHONPATH" (string-append (getcwd)
11839 ":"
11840 (getenv "PYTHONPATH")))
11841 (zero? (system* "py.test")))))))
11842 (propagated-inputs
11843 `(("python-flask" ,python-flask)
11844 ("python-pyyaml" ,python-pyyaml)
11845 ("python-jsonschema" ,python-jsonschema)
11846 ("python-mistune" ,python-mistune)
11847 ("python-six" ,python-six)))
11848 (native-inputs
11849 `(("python-decorator" ,python-decorator)
11850 ("python-flake8" ,python-flake8)
11851 ("python-flask-restful" ,python-flask-restful)
11852 ("python-flex" ,python-flex)
11853 ("python-pytest" ,python-pytest)
11854 ("python-pytest-cov" ,python-pytest-cov)
11855 ("python-marshmallow" ,python-marshmallow)
11856 ("python-apispec" ,python-apispec)))
11857 (home-page "https://github.com/rochacbruno/flasgger/")
11858 (synopsis "Extract Swagger specs from your Flask project")
11859 (description "@code{python-flasgger} allows extracting Swagger specs
11860 from your Flask project. It is a fork of Flask-Swagger.")
11861 (license license:expat)))
11862
11863 (define-public python2-flasgger
11864 (package-with-python2 python-flasgger))
11865
11866 (define-public python-swagger-spec-validator
11867 (package
11868 (name "python-swagger-spec-validator")
11869 (version "2.1.0")
11870 (source
11871 (origin
11872 (method url-fetch)
11873 (uri (pypi-uri "swagger-spec-validator" version))
11874 (sha256
11875 (base32
11876 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
11877 (build-system python-build-system)
11878 (propagated-inputs
11879 `(("python-jsonschema" ,python-jsonschema)
11880 ("python-six" ,python-six)))
11881 (home-page
11882 "https://github.com/Yelp/swagger_spec_validator")
11883 (synopsis "Validation of Swagger specifications")
11884 (description "@code{swagger_spec_validator} provides a library for
11885 validating Swagger API specifications.")
11886 (license license:asl2.0)))
11887
11888 (define-public python2-swagger-spec-validator
11889 (package-with-python2 python-swagger-spec-validator))
11890
11891 (define-public python-apache-libcloud
11892 (package
11893 (name "python-apache-libcloud")
11894 (version "2.0.0")
11895 (source
11896 (origin
11897 (method url-fetch)
11898 (uri (pypi-uri "apache-libcloud" version))
11899 (sha256
11900 (base32
11901 "1a71z02ckcxld72k4qgmdnkjan52c4wczncs3p2mp5yafh7dsan7"))))
11902 (build-system python-build-system)
11903 (arguments
11904 `(#:phases
11905 (modify-phases %standard-phases
11906 (add-after 'unpack 'patch-ssh
11907 (lambda* (#:key inputs #:allow-other-keys)
11908 (substitute* "libcloud/compute/ssh.py"
11909 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
11910 "/bin/ssh" "'")))
11911 #t))
11912 (add-after 'unpack 'patch-tests
11913 (lambda _
11914 (substitute* "./libcloud/test/test_file_fixtures.py"
11915 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
11916 (("def _ascii") "def _raw_data(self, method, url, body, headers):
11917 return (httplib.OK,
11918 \"1234abcd\",
11919 {\"test\": \"value\"},
11920 httplib.responses[httplib.OK])
11921 def _ascii"))
11922 (substitute* "libcloud/test/compute/test_ssh_client.py"
11923 (("class ShellOutSSHClientTests")
11924 "@unittest.skip(\"Guix container doesn't have ssh service\")
11925 class ShellOutSSHClientTests")
11926 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
11927 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
11928 (("'.xF0', '.x90', '.x8D', '.x88'")
11929 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
11930 #t)))))
11931 (inputs
11932 `(("openssh" ,openssh)))
11933 (propagated-inputs
11934 `(("python-paramiko" ,python-paramiko)
11935 ("python-requests" ,python-requests)))
11936 (native-inputs
11937 `(("python-lockfile" ,python-lockfile)
11938 ("python-mock" ,python-mock)
11939 ("python-requests-mock" ,python-requests-mock)))
11940 (home-page "https://libcloud.apache.org/")
11941 (synopsis "Unified Cloud API")
11942 (description "@code{libcloud} is a Python library for interacting with
11943 many of the popular cloud service providers using a unified API.")
11944 (license license:asl2.0)))
11945
11946 (define-public python2-apache-libcloud
11947 (package-with-python2 python-apache-libcloud))
11948
11949 (define-public python-smmap2
11950 (package
11951 (name "python-smmap2")
11952 (version "2.0.3")
11953 (source
11954 (origin
11955 (method url-fetch)
11956 (uri (pypi-uri "smmap2" version))
11957 (sha256
11958 (base32
11959 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
11960 (build-system python-build-system)
11961 (native-inputs
11962 `(("python-nosexcover" ,python-nosexcover)))
11963 (home-page "https://github.com/Byron/smmap")
11964 (synopsis "Python sliding window memory map manager")
11965 (description "@code{smmap2} is a pure Python implementation of a sliding
11966 window memory map manager.")
11967 (license license:bsd-3)))
11968
11969 (define-public python2-smmap2
11970 (package-with-python2 python-smmap2))
11971
11972 (define-public python-regex
11973 (package
11974 (name "python-regex")
11975 (version "2017.06.07")
11976 (source (origin
11977 (method url-fetch)
11978 (uri (pypi-uri "regex" version))
11979 (sha256
11980 (base32
11981 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
11982 (build-system python-build-system)
11983 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
11984 (synopsis "Alternative regular expression module")
11985 (description "This regular expression implementation is backwards-
11986 compatible with the standard @code{re} module, but offers additional
11987 functionality like full case-folding for case-insensitive matches in Unicode.")
11988 (license license:psfl)))
11989
11990 (define-public python2-regex
11991 (package-with-python2 python-regex))
11992
11993 (define-public python2-pyopengl
11994 (package
11995 (name "python2-pyopengl")
11996 (version "3.1.0")
11997 (source
11998 (origin
11999 (method url-fetch)
12000 (uri (pypi-uri "PyOpenGL" version))
12001 (sha256
12002 (base32
12003 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
12004 (arguments
12005 `(#:python ,python-2))
12006 (build-system python-build-system)
12007 (home-page "http://pyopengl.sourceforge.net")
12008 (synopsis "Standard OpenGL bindings for Python")
12009 (description
12010 "PyOpenGL is the most common cross platform Python binding to OpenGL and
12011 related APIs. The binding is created using the standard @code{ctypes}
12012 library.")
12013 (license license:bsd-3)))
12014
12015 (define-public python2-pyopengl-accelerate
12016 (package
12017 (inherit python2-pyopengl)
12018 (name "python2-pyopengl-accelerate")
12019 (version "3.1.0")
12020 (source
12021 (origin
12022 (method url-fetch)
12023 (uri (pypi-uri "PyOpenGL-accelerate" version))
12024 (sha256
12025 (base32
12026 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
12027 (synopsis "Acceleration code for PyOpenGL")
12028 (description
12029 "This is the Cython-coded accelerator module for PyOpenGL.")))
12030
12031 (define-public python-rencode
12032 (package
12033 (name "python-rencode")
12034 (version "1.0.3")
12035 (source
12036 (origin
12037 (method url-fetch)
12038 (uri (pypi-uri "rencode" version))
12039 (sha256
12040 (base32
12041 "08if5yax1xn5yfp8p3765ccjmfcv9di7i4m5jckgnwvdsgznwkbj"))))
12042 (build-system python-build-system)
12043 (native-inputs `(("pkg-config" ,pkg-config)
12044 ("python-cython", python-cython)))
12045 (home-page "https://github.com/aresch/rencode")
12046 (synopsis "Serialization of heterogeneous data structures")
12047 (description
12048 "The @code{rencode} module is a data structure serialization library,
12049 similar to @code{bencode} from the BitTorrent project. For complex,
12050 heterogeneous data structures with many small elements, r-encoding stake up
12051 significantly less space than b-encodings. This version of rencode is a
12052 complete rewrite in Cython to attempt to increase the performance over the
12053 pure Python module.")
12054 (license license:bsd-3)))
12055
12056 (define-public python2-rencode
12057 (package-with-python2 python-rencode))
12058
12059 (define-public python-xenon
12060 (package
12061 (name "python-xenon")
12062 (version "0.5.1")
12063 (source
12064 (origin
12065 (method url-fetch)
12066 (uri (pypi-uri "xenon" version))
12067 (sha256
12068 (base32
12069 "14kby2y48vp3sgwxqlm5d5789yibqwb1qli5fwcmdqg3iayrbklc"))))
12070 (build-system python-build-system)
12071 (native-inputs
12072 `(("python-pyyaml" ,python-pyyaml)
12073 ("python-radon" ,python-radon)
12074 ("python-requests" ,python-requests)
12075 ("python-flake8" ,python-flake8)
12076 ("python-tox" ,python-tox)))
12077 (arguments
12078 `(#:phases
12079 (modify-phases %standard-phases
12080 (add-before 'build 'patch-test-requirements
12081 (lambda* (#:key inputs #:allow-other-keys)
12082 ;; Update requirements from dependency==version to
12083 ;; dependency>=version.
12084 (substitute* "requirements.txt"
12085 (("==") ">=")
12086 ((",<1.5.0") ""))
12087 ;; Remove httpretty dependency for tests.
12088 (substitute* "setup.py"
12089 (("httpretty") ""))
12090 #t)))))
12091 (home-page "https://xenon.readthedocs.org/")
12092 (synopsis "Monitor code metrics for Python on your CI server")
12093 (description
12094 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
12095 Ideally, @code{xenon} is run every time code is committed. Through command
12096 line options, various thresholds can be set for the complexity of code. It
12097 will fail (i.e. it will exit with a non-zero exit code) when any of these
12098 requirements is not met.")
12099 (license license:expat)))
12100
12101 (define-public python2-xenon
12102 (package-with-python2 python-xenon))
12103
12104 (define-public python-pysocks
12105 (package
12106 (name "python-pysocks")
12107 (version "1.6.7")
12108 (source
12109 (origin
12110 (method url-fetch)
12111 (uri (pypi-uri "PySocks" version))
12112 (sha256
12113 (base32
12114 "1krkiss578zqwcg4c8iqz1hwscwhsvy2djp3xyvps5gsgvr2j0yh"))))
12115 (build-system python-build-system)
12116 (arguments `(#:tests? #f))
12117 (home-page "https://github.com/Anorov/PySocks")
12118 (synopsis "SOCKS client module")
12119 (description "@code{pysocks} is an updated and semi-actively maintained
12120 version of @code{SocksiPy} with bug fixes and extra features.")
12121 (license license:bsd-3)))
12122
12123 (define-public python2-pysocks
12124 (package-with-python2 python-pysocks))
12125
12126 (define-public python-pydiff
12127 (package
12128 (name "python-pydiff")
12129 (version "0.2")
12130 (source
12131 (origin
12132 (method url-fetch)
12133 (uri (pypi-uri "pydiff" version))
12134 (sha256
12135 (base32
12136 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
12137 (build-system python-build-system)
12138 (home-page "https://github.com/myint/pydiff")
12139 (synopsis "Library to diff two Python files at the bytecode level")
12140 (description
12141 "@code{pydiff} makes it easy to look for actual code changes while
12142 ignoring formatting changes.")
12143 (license license:expat)))
12144
12145 (define-public python2-pydiff
12146 (package-with-python2 python-pydiff))
12147
12148 (define-public python-tqdm
12149 (package
12150 (name "python-tqdm")
12151 (version "4.19.6")
12152 (source
12153 (origin
12154 (method url-fetch)
12155 (uri (pypi-uri "tqdm" version))
12156 (sha256
12157 (base32
12158 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
12159 (build-system python-build-system)
12160 (native-inputs
12161 `(("python-flake8" ,python-flake8)
12162 ("python-nose" ,python-nose)
12163 ("python-coverage" ,python-coverage)))
12164 (home-page "https://github.com/tqdm/tqdm")
12165 (synopsis "Fast, extensible progress meter")
12166 (description
12167 "Make loops show a progress bar on the console by just wrapping any
12168 iterable with @code{|tqdm(iterable)|}. Offers many options to define
12169 design and layout.")
12170 (license (list license:mpl2.0 license:expat))
12171 (properties `((python2-variant . ,(delay python2-tqdm))))))
12172
12173 (define-public python2-tqdm
12174 (let ((tqdm (package-with-python2
12175 (strip-python2-variant python-tqdm))))
12176 (package
12177 (inherit tqdm)
12178 (native-inputs
12179 ;; FIXME: This should be propagated from python2-flake8 instead.
12180 `(("python2-enum34" ,python2-enum34)
12181 ,@(package-native-inputs tqdm))))))
12182
12183 (define-public python-pkginfo
12184 (package
12185 (name "python-pkginfo")
12186 (version "1.4.1")
12187 (source
12188 (origin
12189 (method url-fetch)
12190 (uri (pypi-uri "pkginfo" version))
12191 (sha256
12192 (base32
12193 "17pqjfpq3c6xzdmk8pski6jcjgjv78q00zjf2bgzb668pzm6l6mv"))))
12194 (build-system python-build-system)
12195 (arguments
12196 ;; The tests are broken upstream.
12197 '(#:tests? #f))
12198 (home-page
12199 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
12200 (synopsis
12201 "Query metadatdata from sdists, bdists, and installed packages")
12202 (description
12203 "API to query the distutils metadata written in @file{PKG-INFO} inside a
12204 source distriubtion (an sdist) or a binary distribution (e.g., created by
12205 running bdist_egg). It can also query the EGG-INFO directory of an installed
12206 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
12207 created by running @code{python setup.py develop}).")
12208 (license license:expat)))
12209
12210 (define-public python2-pkginfo
12211 (package-with-python2 python-pkginfo))
12212
12213 (define-public python-twine
12214 (package
12215 (name "python-twine")
12216 (version "1.9.1")
12217 (source
12218 (origin
12219 (method url-fetch)
12220 (uri (pypi-uri "twine" version))
12221 (sha256
12222 (base32
12223 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
12224 (build-system python-build-system)
12225 (propagated-inputs
12226 `(("python-tqdm" ,python-tqdm)
12227 ("python-pkginfo", python-pkginfo)
12228 ("python-requests" ,python-requests)
12229 ("python-requests-toolbelt" ,python-requests-toolbelt)))
12230 (home-page "https://github.com/pypa/twine")
12231 (synopsis "Collection of utilities for interacting with PyPI")
12232 (description
12233 "@code{twine} currently supports registering projects and uploading
12234 distributions. It authenticates the user over HTTPS, allows them to pre-sign
12235 their files and supports any packaging format (including wheels).")
12236 (license license:asl2.0)))
12237
12238 (define-public python2-twine
12239 (package-with-python2 python-twine))
12240
12241 (define-public python-linecache2
12242 (package
12243 (name "python-linecache2")
12244 (version "1.0.0")
12245 (source
12246 (origin
12247 (method url-fetch)
12248 (uri (pypi-uri "linecache2" version))
12249 (sha256
12250 (base32
12251 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
12252 (build-system python-build-system)
12253 (arguments
12254 `(;; The tests depend on unittest2, and our version is a bit too old.
12255 #:tests? #f))
12256 (native-inputs
12257 `(("python-pbr" ,python-pbr-minimal)))
12258 (home-page
12259 "https://github.com/testing-cabal/linecache2")
12260 (synopsis "Backports of the linecache module")
12261 (description
12262 "The linecache module allows one to get any line from any file, while
12263 attempting to optimize internally, using a cache, the common case where many
12264 lines are read from a single file.")
12265 (license license:psfl)))
12266
12267 (define-public python2-linecache2
12268 (package-with-python2 python-linecache2))
12269
12270 (define-public python-traceback2
12271 (package
12272 (name "python-traceback2")
12273 (version "1.4.0")
12274 (source
12275 (origin
12276 (method url-fetch)
12277 (uri (pypi-uri "traceback2" version))
12278 (sha256
12279 (base32
12280 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
12281 (build-system python-build-system)
12282 (arguments
12283 `(;; python-traceback2 and python-unittest2 depend on one another.
12284 #:tests? #f))
12285 (native-inputs
12286 `(("python-pbr" ,python-pbr-minimal)))
12287 (propagated-inputs
12288 `(("python-linecache2" ,python-linecache2)))
12289 (home-page
12290 "https://github.com/testing-cabal/traceback2")
12291 (synopsis "Backports of the traceback module")
12292 (description
12293 "This module provides a standard interface to extract, format and print
12294 stack traces of Python programs. It exactly mimics the behavior of the Python
12295 interpreter when it prints a stack trace.")
12296 (license license:psfl)))
12297
12298 (define-public python2-traceback2
12299 (package-with-python2 python-traceback2))
12300
12301 (define-public python-ratelimiter
12302 (package
12303 (name "python-ratelimiter")
12304 (version "1.2.0")
12305 (source
12306 (origin
12307 (method url-fetch)
12308 (uri (pypi-uri "ratelimiter" version))
12309 (sha256
12310 (base32
12311 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
12312 (build-system python-build-system)
12313 (arguments
12314 '(#:tests? #f)) ; There are no tests in the pypi archive.
12315 (home-page "https://github.com/RazerM/ratelimiter")
12316 (synopsis "Simple rate limiting object")
12317 (description
12318 "The @code{ratelimiter} module ensures that an operation will not be
12319 executed more than a given number of times during a given period.")
12320 (license license:asl2.0)))
12321
12322 (define-public python2-ratelimiter
12323 (package-with-python2 python-ratelimiter))
12324
12325 (define-public python-dukpy
12326 (package
12327 (name "python-dukpy")
12328 (version "0.3")
12329 (source
12330 (origin
12331 (method url-fetch)
12332 (uri (string-append "https://github.com/kovidgoyal/dukpy/archive/v"
12333 version ".tar.gz"))
12334 (file-name (string-append name "-" version ".tar.gz"))
12335 (sha256
12336 (base32
12337 "0pj39rfwlzivqm5hkrsza7gssg6ggpxlq5ivc8f3h7x5pfgc6y6c"))))
12338 (build-system python-build-system)
12339 (home-page "https://github.com/kovidgoyal/dukpy")
12340 (synopsis "Run JavaScript in python")
12341 (description
12342 "dukpy is a JavaScript runtime environment for Python using the duktape
12343 embeddable JavaScript engine.")
12344 ;; Dukpy is licensed under MIT like the embedded duktape library,
12345 ;; with 'errors.c' as GPL3.
12346 (license (list license:expat license:gpl3))))
12347
12348 (define-public python2-dukpy
12349 (package-with-python2 python-dukpy))
12350
12351 (define-public python-jsonrpclib-pelix
12352 (package
12353 (name "python-jsonrpclib-pelix")
12354 (version "0.3.1")
12355 (source
12356 (origin
12357 (method url-fetch)
12358 (uri (pypi-uri "jsonrpclib-pelix" version))
12359 (sha256
12360 (base32
12361 "1qs95vxplxwspbrqy8bvc195s58iy43qkf75yrjfql2sim8b25sl"))))
12362 (build-system python-build-system)
12363 (home-page "https://github.com/tcalmant/jsonrpclib/")
12364 (synopsis "JSON-RPC 2.0 client library for Python")
12365 (description
12366 "This library implements the JSON-RPC v2.0
12367 specification (backwards-compatible) as a client library for Python. This
12368 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
12369 services.")
12370 (license license:asl2.0)))
12371
12372 (define-public python2-jsonrpclib-pelix
12373 (package-with-python2 python-jsonrpclib-pelix))
12374
12375 (define-public python-setuptools-scm-git-archive
12376 (package
12377 (name "python-setuptools-scm-git-archive")
12378 (version "1.0")
12379 (source
12380 (origin
12381 (method url-fetch)
12382 (uri (pypi-uri "setuptools_scm_git_archive" version))
12383 (sha256
12384 (base32
12385 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
12386 (build-system python-build-system)
12387 (native-inputs
12388 `(("python-pytest" ,python-pytest)))
12389 (propagated-inputs
12390 `(("python-setuptools-scm" ,python-setuptools-scm)))
12391 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
12392 (synopsis "Setuptools_scm plugin for git archives")
12393 (description
12394 "The setuptools_scm_git_archive package is a plugin to
12395 setuptools_scm, which supports obtaining versions from git archives that
12396 belong to tagged versions.")
12397 (license license:expat)))
12398
12399 (define-public python2-setuptools-scm-git-archive
12400 (package-with-python2 python-setuptools-scm-git-archive))
12401
12402 (define-public python-pyclipper
12403 (package
12404 (name "python-pyclipper")
12405 (version "1.0.6")
12406 (source
12407 (origin
12408 (method url-fetch)
12409 (uri (pypi-uri "pyclipper" version ".zip"))
12410 (sha256
12411 (base32
12412 "1zpmwv3bya3j984y5cf9x9d5108kf6mxldcba68wiq0frv5qrssw"))))
12413 (build-system python-build-system)
12414 (arguments
12415 `(#:tests? #f)); 8 Tests fail, 37 succeed
12416 (propagated-inputs
12417 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
12418 (native-inputs
12419 `(("unzip" ,unzip)))
12420 (home-page "https://github.com/greginvm/pyclipper")
12421 (synopsis "Wrapper for Angus Johnson's Clipper library")
12422 (description
12423 "Pyclipper is a Cython wrapper for the C++ translation of the
12424 Angus Johnson's polygon clipping Clipper library (ver. 6.2.1).")
12425 (license license:expat)))
12426
12427 (define-public python2-pyclipper
12428 (package-with-python2 python-pyclipper))
12429
12430 (define-public python2-booleanoperations
12431 (package
12432 (name "python2-booleanoperations")
12433 (version "0.7.1")
12434 (source
12435 (origin
12436 (method url-fetch)
12437 (uri (pypi-uri "booleanOperations" version ".zip"))
12438 (sha256
12439 (base32
12440 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
12441 (build-system python-build-system)
12442 (arguments
12443 `(#:python ,python-2))
12444 (native-inputs
12445 `(("unzip" ,unzip)
12446 ("python2-pytest" ,python2-pytest)
12447 ("python2-pytest-runner" ,python2-pytest-runner)))
12448 (propagated-inputs
12449 `(("python-fonttools" ,python2-fonttools)
12450 ("python-pyclipper" ,python2-pyclipper)
12451 ("python-ufolib" ,python2-ufolib)))
12452 (home-page "https://github.com/typemytype/booleanOperations")
12453 (synopsis "Boolean operations on paths")
12454 (description
12455 "BooleanOperations provides a Python library that enables
12456 boolean operations on paths.")
12457 (license license:expat)))
12458
12459 (define-public python-tempdir
12460 (package
12461 (name "python-tempdir")
12462 (version "0.7.1")
12463 (source
12464 (origin
12465 (method url-fetch)
12466 (uri (pypi-uri "tempdir" version))
12467 (sha256
12468 (base32
12469 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
12470 (build-system python-build-system)
12471 (home-page "https://pypi.org/project/tempdir/")
12472 (arguments
12473 ;; the package has no tests
12474 '(#:tests? #f))
12475 (synopsis "Python library for managing temporary directories")
12476 (description
12477 "This library manages temporary directories that are automatically
12478 deleted with all their contents when they are no longer needed. It is
12479 particularly convenient for use in tests.")
12480 (license license:expat)))
12481
12482 (define-public python2-tempdir
12483 (package-with-python2 python-tempdir))
12484
12485 (define-public python-activepapers
12486 (package
12487 (name "python-activepapers")
12488 (version "0.2.2")
12489 (source
12490 (origin
12491 (method url-fetch)
12492 (uri (pypi-uri "ActivePapers.Py" version))
12493 (sha256
12494 (base32
12495 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
12496 (build-system python-build-system)
12497 (arguments
12498 `(#:modules ((ice-9 ftw)
12499 (srfi srfi-1)
12500 (guix build utils)
12501 (guix build python-build-system))
12502
12503 #:phases
12504 (modify-phases %standard-phases
12505 (add-after 'unpack 'delete-python2-code
12506 (lambda _
12507 (for-each delete-file
12508 '("lib/activepapers/builtins2.py"
12509 "lib/activepapers/standardlib2.py"
12510 "lib/activepapers/utility2.py"))))
12511 (replace 'check
12512 (lambda _
12513 ;; Deactivate the test cases that download files
12514 (setenv "NO_NETWORK_ACCESS" "1")
12515 ;; For some strange reason, some tests fail if nosetests runs all
12516 ;; test modules in a single execution. They pass if each test
12517 ;; module is run individually.
12518 (for-each (lambda (filename)
12519 (invoke "nosetests"
12520 (string-append "tests/" filename)))
12521 (scandir "tests"
12522 (lambda (filename)
12523 (string-suffix? ".py" filename)))))))))
12524 (native-inputs
12525 `(("python-tempdir" ,python-tempdir)
12526 ("python-nose" ,python-nose)))
12527 (propagated-inputs
12528 `(("python-h5py" ,python-h5py)))
12529 (home-page "http://www.activepapers.org/")
12530 (synopsis "Executable papers for scientific computing")
12531 (description
12532 "ActivePapers is a tool for working with executable papers, which
12533 combine data, code, and documentation in single-file packages,
12534 suitable for publication as supplementary material or on repositories
12535 such as figshare or Zenodo.")
12536 (properties `((python2-variant . ,(delay python2-activepapers))))
12537 (license license:bsd-3)))
12538
12539 (define-public python2-activepapers
12540 (let ((base (package-with-python2
12541 (strip-python2-variant python-activepapers))))
12542 (package
12543 (inherit base)
12544 (arguments
12545 (substitute-keyword-arguments (package-arguments base)
12546 ((#:phases phases)
12547 `(modify-phases ,phases
12548 (delete 'delete-python2-code)
12549 (add-after 'unpack 'delete-python3-code
12550 (lambda _
12551 (for-each delete-file
12552 '("lib/activepapers/builtins3.py"
12553 "lib/activepapers/standardlib3.py"
12554 "lib/activepapers/utility3.py")))))))))))
12555
12556 (define-public python-semver
12557 (package
12558 (name "python-semver")
12559 (version "2.7.9")
12560 (source
12561 (origin
12562 (method url-fetch)
12563 (uri (pypi-uri "semver" version))
12564 (sha256
12565 (base32
12566 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
12567 (build-system python-build-system)
12568 (arguments
12569 `(#:phases
12570 (modify-phases %standard-phases
12571 (add-after 'unpack 'patch-test-requirements
12572 (lambda _
12573 (substitute* "setup.py"
12574 ;; Our Python is new enough.
12575 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
12576 #t)))))
12577 (native-inputs
12578 `(("python-tox" ,python-tox)
12579 ("python-virtualenv" ,python-virtualenv)))
12580 (home-page "https://github.com/k-bx/python-semver")
12581 (synopsis "Python helper for Semantic Versioning")
12582 (description "This package provides a Python library for
12583 @url{Semantic Versioning, http://semver.org/}.")
12584 (license license:bsd-3)))
12585
12586 (define-public python2-semver
12587 (package-with-python2 python-semver))
12588
12589 (define-public python2-pyro
12590 (package
12591 (name "python2-pyro")
12592 (version "3.16")
12593 (source
12594 (origin
12595 (method url-fetch)
12596 (uri (pypi-uri "Pyro" version))
12597 (file-name (string-append "Pyro-" version ".tar.gz"))
12598 (sha256
12599 (base32
12600 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
12601 (build-system python-build-system)
12602 (arguments
12603 ;; Pyro is not compatible with Python 3
12604 `(#:python ,python-2
12605 ;; Pyro has no test cases for automatic execution
12606 #:tests? #f))
12607 (home-page "http://pythonhosted.org/Pyro/")
12608 (synopsis "Distributed object manager for Python")
12609 (description "Pyro is a Distributed Object Technology system
12610 written in Python that is designed to be easy to use. It resembles
12611 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
12612 which is a system and language independent Distributed Object Technology
12613 and has much more to offer than Pyro or RMI. Pyro 3.x is no
12614 longer maintained. New projects should use Pyro4 instead, which
12615 is the new Pyro version that is actively developed.")
12616 (license license:expat)))
12617
12618 (define-public python2-scientific
12619 (package
12620 (name "python2-scientific")
12621 (version "2.9.4")
12622 (source
12623 (origin
12624 (method url-fetch)
12625 (uri (string-append "https://bitbucket.org/khinsen/"
12626 "scientificpython/downloads/ScientificPython-"
12627 version ".tar.gz"))
12628 (file-name (string-append "ScientificPython-" version ".tar.gz"))
12629 (sha256
12630 (base32
12631 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
12632 (build-system python-build-system)
12633 (inputs
12634 `(("netcdf" ,netcdf)))
12635 (propagated-inputs
12636 `(("python-numpy" ,python2-numpy-1.8)
12637 ("python-pyro", python2-pyro)))
12638 (arguments
12639 ;; ScientificPython is not compatible with Python 3
12640 `(#:python ,python-2
12641 #:tests? #f ; No test suite
12642 #:phases
12643 (modify-phases %standard-phases
12644 (replace 'build
12645 (lambda* (#:key inputs #:allow-other-keys)
12646 (zero? (system* "python" "setup.py" "build"
12647 (string-append "--netcdf_prefix="
12648 (assoc-ref inputs "netcdf")))))))))
12649 (home-page "https://bitbucket.org/khinsen/scientificpython")
12650 (synopsis "Python modules for scientific computing")
12651 (description "ScientificPython is a collection of Python modules that are
12652 useful for scientific computing. Most modules are rather general (Geometry,
12653 physical units, automatic derivatives, ...) whereas others are more
12654 domain-specific (e.g. netCDF and PDB support). The library is currently
12655 not actively maintained and works only with Python 2 and NumPy < 1.9.")
12656 (license license:cecill-c)))
12657
12658 (define-public python2-mmtk
12659 (package
12660 (name "python2-mmtk")
12661 (version "2.7.11")
12662 (source
12663 (origin
12664 (method url-fetch)
12665 (uri (string-append "https://bitbucket.org/khinsen/"
12666 "mmtk/downloads/MMTK-" version ".tar.gz"))
12667 (file-name (string-append "MMTK-" version ".tar.gz"))
12668 (sha256
12669 (base32
12670 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
12671 (build-system python-build-system)
12672 (native-inputs
12673 `(("netcdf" ,netcdf)))
12674 (propagated-inputs
12675 `(("python-scientific" ,python2-scientific)
12676 ("python-tkinter" ,python-2 "tk")))
12677 (arguments
12678 `(#:python ,python-2
12679 #:tests? #f
12680 #:phases
12681 (modify-phases %standard-phases
12682 (add-before 'build 'includes-from-scientific
12683 (lambda* (#:key inputs #:allow-other-keys)
12684 (mkdir-p "Include/Scientific")
12685 (copy-recursively
12686 (string-append
12687 (assoc-ref inputs "python-scientific")
12688 "/include/python2.7/Scientific")
12689 "Include/Scientific"))))))
12690 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
12691 (synopsis "Python library for molecular simulation")
12692 (description "MMTK is a library for molecular simulations with an emphasis
12693 on biomolecules. It provides widely used methods such as Molecular Dynamics
12694 and normal mode analysis, but also basic routines for implementing new methods
12695 for simulation and analysis. The library is currently not actively maintained
12696 and works only with Python 2 and NumPy < 1.9.")
12697 (license license:cecill-c)))
12698
12699 (define-public python-phonenumbers
12700 (package
12701 (name "python-phonenumbers")
12702 (version "8.8.9")
12703 (source
12704 (origin
12705 (method url-fetch)
12706 (uri (pypi-uri "phonenumbers" version))
12707 (sha256
12708 (base32
12709 "1lhhxmx3hk0b5891nc0p82dl5bq2w9cqbawmh8j5zy587af2j6fq"))))
12710 (build-system python-build-system)
12711 (home-page
12712 "https://github.com/daviddrysdale/python-phonenumbers")
12713 (synopsis
12714 "Python library for dealing with international phone numbers")
12715 (description
12716 "This package provides a Python port of Google's libphonenumber library.")
12717 (license license:asl2.0)))
12718
12719 (define-public python2-phonenumbers
12720 (package-with-python2 python-phonenumbers))
12721
12722 (define-public python-yapf
12723 (package
12724 (name "python-yapf")
12725 (version "0.20.1")
12726 (source
12727 (origin
12728 (method url-fetch)
12729 (uri (pypi-uri "yapf" version))
12730 (sha256
12731 (base32
12732 "0s7l6afzxvpx39kzd0lwshlaxw8m4fwh4iy0rlmav4vipr3g46dx"))))
12733 (build-system python-build-system)
12734 (home-page "https://github.com/google/yapf")
12735 (synopsis "Formatter for Python code")
12736 (description "YAPF is a formatter for Python code. It's based off of
12737 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
12738 takes the code and reformats it to the best formatting that conforms to the
12739 style guide, even if the original code didn't violate the style guide.")
12740 (license license:asl2.0)))
12741
12742 (define-public python2-yapf
12743 (package-with-python2 python-yapf))
12744
12745 (define-public python-gyp
12746 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
12747 (revision "0"))
12748 (package
12749 (name "python-gyp")
12750 ;; Google does not release versions,
12751 ;; based on second most recent commit date.
12752 (version (git-version "0.0.0" revision commit))
12753 (source
12754 (origin
12755 ;; Google does not release tarballs,
12756 ;; git checkout is needed.
12757 (method git-fetch)
12758 (uri (git-reference
12759 (url "https://chromium.googlesource.com/external/gyp")
12760 (commit commit)))
12761 (file-name (git-file-name name version))
12762 (sha256
12763 (base32
12764 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
12765 (build-system python-build-system)
12766 (home-page "https://gyp.gsrc.io/")
12767 (synopsis "GYP is a Meta-Build system")
12768 (description
12769 "GYP builds build systems for large, cross platform applications.
12770 It can be used to generate XCode projects, Visual Studio projects, Ninja build
12771 files, and Makefiles.")
12772 (license license:bsd-3))))
12773
12774 (define-public python2-gyp
12775 (package-with-python2 python-gyp))
12776
12777 (define-public python-whatever
12778 (package
12779 (name "python-whatever")
12780 (version "0.5")
12781 (source
12782 (origin
12783 (method url-fetch)
12784 (uri (string-append "https://github.com/Suor/whatever/archive/" version
12785 ".tar.gz"))
12786 (sha256
12787 (base32
12788 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
12789 (file-name (string-append name "-" version ".tar.gz"))))
12790 (build-system python-build-system)
12791 (arguments
12792 `(#:phases
12793 (modify-phases %standard-phases
12794 (replace 'check
12795 (lambda _
12796 (invoke "py.test"))))))
12797 (native-inputs
12798 `(("python-pytest" ,python-pytest)))
12799 (home-page "http://github.com/Suor/whatever")
12800 (synopsis "Make anonymous functions by partial application of operators")
12801 (description "@code{whatever} provides an easy way to make anonymous
12802 functions by partial application of operators.")
12803 (license license:bsd-3)))
12804
12805 (define-public python2-whatever
12806 (package-with-python2 python-whatever))
12807
12808 (define-public python-funcy
12809 (package
12810 (name "python-funcy")
12811 (version "1.10")
12812 (source
12813 (origin
12814 (method url-fetch)
12815 (uri (string-append "https://github.com/Suor/funcy/archive/" version
12816 ".tar.gz"))
12817 (sha256
12818 (base32
12819 "1fanxivsip29vgarw6dn39xym3q4pbxcpa11plpp548lvxajpahz"))
12820 (file-name (string-append name "-" version ".tar.gz"))))
12821 (build-system python-build-system)
12822 (arguments
12823 `(#:phases
12824 (modify-phases %standard-phases
12825 (replace 'check
12826 (lambda _
12827 (invoke "py.test"))))))
12828 (native-inputs
12829 `(("python-pytest" ,python-pytest)
12830 ("python-whatever" ,python-whatever)))
12831 (home-page "http://github.com/Suor/funcy")
12832 (synopsis "Functional tools")
12833 (description "@code{funcy} is a library that provides functional tools.
12834 Examples are:
12835 @enumerate
12836 @item merge - Merges collections of the same type
12837 @item walk - Type-preserving map
12838 @item select - Selects a part of a collection
12839 @item take - Takes the first n items of a collection
12840 @item first - Takes the first item of a collection
12841 @item remove - Predicated-removes items of a collection
12842 @item concat - Concatenates two collections
12843 @item flatten - Flattens a collection with subcollections
12844 @item distinct - Returns only distinct items
12845 @item split - Predicated-splits a collection
12846 @item split_at - Splits a collection at a given item
12847 @item group_by - Groups items by group
12848 @item pairwise - Pairs off adjacent items
12849 @item partial - Partially-applies a function
12850 @item curry - Curries a function
12851 @item compose - Composes functions
12852 @item complement - Complements a predicate
12853 @item all_fn - \"all\" with predicate
12854 @end enumerate")
12855 (license license:bsd-3)))
12856
12857 (define-public python2-funcy
12858 (package-with-python2 python-funcy))
12859
12860 (define-public python-isoweek
12861 (package
12862 (name "python-isoweek")
12863 (version "1.3.3")
12864 (source
12865 (origin
12866 (method url-fetch)
12867 (uri (pypi-uri "isoweek" version))
12868 (sha256
12869 (base32
12870 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
12871 (build-system python-build-system)
12872 (home-page "https://github.com/gisle/isoweek")
12873 (synopsis "Objects representing a week")
12874 (description "The @code{isoweek} module provide the class Week that
12875 implements the week definition of ISO 8601. This standard also defines
12876 a notation for identifying weeks; yyyyWww (where the W is a literal).
12877 Week instances stringify to this form.")
12878 (license license:bsd-3)))
12879
12880 (define-public python2-isoweek
12881 (package-with-python2 python-isoweek))
12882
12883 (define-public python-tokenize-rt
12884 (package
12885 (name "python-tokenize-rt")
12886 (version "2.0.1")
12887 (source
12888 (origin
12889 (method url-fetch)
12890 (uri (pypi-uri "tokenize-rt" version))
12891 (sha256
12892 (base32
12893 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
12894 (build-system python-build-system)
12895 (home-page "https://github.com/asottile/tokenize-rt")
12896 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
12897 (description
12898 "This Python library is a wrapper around @code{tokenize} from the Python
12899 standard library. It provides two additional tokens @code{ESCAPED_NL} and
12900 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
12901 and @code{tokens_to_src} to roundtrip.")
12902 (license license:expat)))
12903
12904 (define-public python-future-fstrings
12905 (package
12906 (name "python-future-fstrings")
12907 (version "0.4.1")
12908 (source
12909 (origin
12910 (method url-fetch)
12911 (uri (pypi-uri "future_fstrings" version))
12912 (sha256
12913 (base32
12914 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
12915 (build-system python-build-system)
12916 (propagated-inputs
12917 `(("python-tokenize-rt" ,python-tokenize-rt)))
12918 (home-page "https://github.com/asottile/future-fstrings")
12919 (synopsis "Backport of fstrings to Python < 3.6")
12920 (description
12921 "This package provides a UTF-8 compatible encoding
12922 @code{future_fstrings}, which performs source manipulation. It decodes the
12923 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
12924 @code{f} strings.")
12925 (license license:expat)))
12926
12927 (define-public python-typing
12928 (package
12929 (name "python-typing")
12930 (version "3.6.4")
12931 (source
12932 (origin
12933 (method url-fetch)
12934 (uri (pypi-uri "typing" version))
12935 (sha256
12936 (base32
12937 "1wmk9nkh30n37cbrqwkbggmj2390lhrlagjkd0ikm02l88saj06l"))))
12938 (build-system python-build-system)
12939 (home-page "https://docs.python.org/3/library/typing.html")
12940 (synopsis "Type hints for Python")
12941 (description "This is a backport of the standard library @code{typing}
12942 module to Python versions older than 3.5. Typing defines a standard notation
12943 for Python function and variable type annotations. The notation can be used
12944 for documenting code in a concise, standard format, and it has been designed
12945 to also be used by static and runtime type checkers, static analyzers, IDEs
12946 and other tools.")
12947 (license license:psfl)))
12948
12949 (define-public python2-typing
12950 (package-with-python2 python-typing))
12951
12952 (define-public bpython
12953 (package
12954 (name "bpython")
12955 (version "0.17.1")
12956 (source
12957 (origin
12958 (method url-fetch)
12959 (uri (pypi-uri "bpython" version))
12960 (sha256
12961 (base32
12962 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
12963 (build-system python-build-system)
12964 (arguments
12965 `(#:phases
12966 (modify-phases %standard-phases
12967 (add-after 'unpack 'remove-failing-test
12968 (lambda _
12969 ;; Remove failing test. FIXME: make it pass
12970 (delete-file "bpython/test/test_args.py")
12971 #t))
12972 (add-after 'wrap 'add-aliases
12973 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
12974 (lambda* (#:key outputs #:allow-other-keys)
12975 (let ((out (assoc-ref outputs "out")))
12976 (for-each
12977 (lambda (old new)
12978 (symlink old (string-append out "/bin/" new)))
12979 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
12980 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
12981 #t)))))
12982 (propagated-inputs
12983 `(("python-pygments" ,python-pygments)
12984 ("python-requests", python-requests)
12985 ("python-babel" ,python-babel) ; optional, for internationalization
12986 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
12987 ("python-greenlet" ,python-greenlet)
12988 ("python-urwid" ,python-urwid) ; for bpython-urwid only
12989 ("python-six" ,python-six)))
12990 (native-inputs
12991 `(("python-sphinx" ,python-sphinx)
12992 ("python-mock" ,python-mock)))
12993 (home-page "https://bpython-interpreter.org/")
12994 (synopsis "Fancy interface to the Python interpreter")
12995 (description "Bpython is a fancy interface to the Python
12996 interpreter. bpython's main features are
12997
12998 @enumerate
12999 @item in-line syntax highlighting,
13000 @item readline-like autocomplete with suggestions displayed as you type,
13001 @item expected parameter list for any Python function,
13002 @item \"rewind\" function to pop the last line of code from memory and
13003 re-evaluate,
13004 @item send the code you've entered off to a pastebin,
13005 @item save the code you've entered to a file, and
13006 @item auto-indentation.
13007 @end enumerate")
13008 (license license:expat)))
13009
13010 (define-public bpython2
13011 (let ((base (package-with-python2
13012 (strip-python2-variant bpython))))
13013 (package (inherit base)
13014 (name "bpython2")
13015 (arguments
13016 `(#:python ,python-2
13017 #:phases
13018 (modify-phases %standard-phases
13019 (add-after 'unpack 'remove-failing-test
13020 (lambda _
13021 ;; Remove failing test. FIXME: make it pass
13022 (delete-file "bpython/test/test_args.py")
13023 ;; Disable failing test-cases (renaming inhibits they are
13024 ;; discovered)
13025 (substitute* "bpython/test/test_curtsies_repl.py"
13026 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
13027 (string-append a "xxx_off_" b))
13028 (("^(\\s*def )(test_complex\\W)" _ a b)
13029 (string-append a "xxx_off_" b)))
13030 #t))
13031 (add-before 'build 'rename-scripts
13032 ;; rename the scripts to bypthon2, bpdb2, etc.
13033 (lambda _
13034 (substitute* "setup.py"
13035 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
13036 (string-append name "2" rest "\n"))
13037 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
13038 (string-append name "2" (or sub "") rest "\n")))
13039 #t))))))))
13040
13041 (define-public python-pyinotify
13042 (package
13043 (name "python-pyinotify")
13044 (version "0.9.6")
13045 (source (origin
13046 (method url-fetch)
13047 (uri (pypi-uri "pyinotify" version))
13048 (sha256
13049 (base32
13050 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
13051 (build-system python-build-system)
13052 (arguments `(#:tests? #f)) ;no tests
13053 (home-page "https://github.com/seb-m/pyinotify")
13054 (synopsis "Python library for monitoring inotify events")
13055 (description
13056 "@code{pyinotify} provides a Python interface for monitoring
13057 filesystem events on Linux.")
13058 (license license:expat)))
13059
13060 (define-public python2-pyinotify
13061 (package-with-python2 python-pyinotify))
13062
13063 ;; Ada parser uses this version.
13064 (define-public python2-quex-0.67.3
13065 (package
13066 (name "python2-quex")
13067 (version "0.67.3")
13068 (source
13069 (origin
13070 (method url-fetch)
13071 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
13072 (version-major+minor version)
13073 "/quex-" version ".zip"))
13074 (sha256
13075 (base32
13076 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
13077 (build-system python-build-system)
13078 (native-inputs
13079 `(("unzip" ,unzip)))
13080 (arguments
13081 `(#:python ,python-2
13082 #:tests? #f
13083 #:phases
13084 (modify-phases %standard-phases
13085 (delete 'configure)
13086 (delete 'build)
13087 (replace 'install
13088 (lambda* (#:key outputs #:allow-other-keys)
13089 (let* ((out (assoc-ref outputs "out"))
13090 (share/quex (string-append out "/share/quex"))
13091 (bin (string-append out "/bin")))
13092 (copy-recursively "." share/quex)
13093 (mkdir-p bin)
13094 (symlink (string-append share/quex "/quex-exe.py")
13095 (string-append bin "/quex"))
13096 #t))))))
13097 (native-search-paths
13098 (list (search-path-specification
13099 (variable "QUEX_PATH")
13100 (files '("share/quex")))))
13101 (home-page "http://quex.sourceforge.net/")
13102 (synopsis "Lexical analyzer generator in Python")
13103 (description "@code{quex} is a lexical analyzer generator in Python.")
13104 (license license:lgpl2.1+))) ; Non-military
13105
13106 (define-public python2-quex
13107 (package (inherit python2-quex-0.67.3)
13108 (name "python2-quex")
13109 (version "0.68.1")
13110 (source
13111 (origin
13112 (method url-fetch)
13113 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
13114 (sha256
13115 (base32
13116 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
13117 (file-name (string-append name "-" version ".tar.gz"))))))